My application throws error after enabling jbo.doconnectionpooling = true !

Recently, a few of the developers reported saying that their application started misbehaving after setting jbo.doconnectionpooling = true. Interestingly, in most of the cases, root cause was one and same - incorrect usage of EntityImpl::postChanges(TransactionEvent e). This method posts changed data to database, and these changes would be only visible within the same transaction associated with current 'Connection' instance. If you are building fusion web application, please don't call this method unless the transaction is getting committed within the same service request. Please note that database transaction is associated with Connection that you are using. If you turn on connection pooling, there is no guarantee that same connection would be available to serve your future service requests (unless you use the reserved release mode for the ApplicationModule).

To learn more on the topic, please go through the following topics from Fusion Developer's Guide for Oracle Application Development Framework
1.41.3.2 What You May Need to Know About Database User State and jbo.doconnectionpooling = true
2.40.11 Keeping Pending Changes in the Middle Tier

Comments

Disclaimer

The views expressed on this blog are my own and do not necessarily reflect the views of my employer.