How do I see the SQL that OpenJPA is executing?
OpenJPA provides configurable channel-based logging, as described in the chapter on Logging. The simplest example of enabling verbose logging is by using the following property in your persistence.xml file:
How do I enable connection pooling in OpenJPA?
OpenJPA doesn't include any built-in connection pool, but you can use any third-party connection pool that is configurable via the JDBC DataSource API (which most are). The following persistence.xml example shows how to use OpenJPA with a Apache Derby database and the Apache DBCP connection pool:
See the documentation on Using a Third-Party DataSource for further details.
本文介绍如何使用OpenJPA进行SQL日志记录及配置连接池的方法。通过设置persistence.xml文件中的属性,可以启用详细的SQL日志记录,并且可以使用第三方连接池如Apache DBCP来实现连接池功能。
636

被折叠的 条评论
为什么被折叠?



