Skip to main content

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 What You May Need to Know About Database User State and jbo.doconnectionpooling = true
2.40.11 Keeping Pending Changes in the Middle Tier


Popular posts from this blog

Happy New Year 2018 !

We can't go back and change the beginning, but we always can start where we are and change the ending. Believe in yourself and you will be unstoppable!

Wishing you and your family a very happy new year 2018 !!!

How to set Bind Variable Values at runtime ?

In this post I'm sharing a couple of approaches for programmatically setting bind variables values at run time. This post is an attempt to explain 'When to use what ?'[ In case if you are familiar with 'Bind Variables' in ADF BC, please refer Section 5.10, Working with Bind Variables in Fusion Developer's Guide ]

1. Set the Bind Variable value using RowSet::setNamedWhereClauseParam(...)

You can use use the setNamedWhereClauseParam(...) method on the ViewObject interface (which extends oracle.jbo.RowSet) to set the value for bind variables. Please note this sets the value on default RowSet. In other words, this doesn't have any effect on the secondary RowSets that you/system generates.
ViewObject vo = am.findViewObject("EmployeesView1"); vo.setNamedWhereClauseParam("bindVarDeptId", new Number(10)); vo.executeQuery();
2. Set the Bind Variable value using ViewObject's VariableValueManager::setVariableValue(...)

VariableValueManager Ma…