Gareth Carter created OFBIZ-7346: ------------------------------------ Summary: connection pooling not working Key: OFBIZ-7346 URL: https://issues.apache.org/jira/browse/OFBIZ-7346 Project: OFBiz Issue Type: Bug Components: ALL COMPONENTS Affects Versions: Trunk Reporter: Gareth Carter Priority: Minor
Connection pooling does not seem to work. Connections are created fine but as the close() method is called (outside of transaction) or the transaction is committed the connections are closed to the db server and not returned to the pool. I believe the issue is with org.apache.commons.dbcp2.PoolableConnectionFactory passivateObject method. This will call rollback() when rollbackOnReturn is set to true even if the transaction is committed. This is because any connection wrappers extending org.apache.commons.dbcp2.DelegatingConnection cache autoCommit status. At some point, this cached autoCommit is different from the underlying connection autoCommit. The rollback() method will throw an exception and the connection is destroyed rather than put back to the pool -- This message was sent by Atlassian JIRA (v6.3.4#6332)