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.