Skip to Main Content

Java Development Tools

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

ADF + Quartz application runs out of DB connections

Juan S.Apr 9 2018 — edited Apr 9 2018

Hi everybody,

We implemented an ADF app which uses Quartz as a scheduler engine. We use ADF 11.1.1.7 and the quartz library version is 2.1.7.

We have a quartz job implementation (the quartz job is the piece of code which is called by the scheduler engine). This job gets the ApplicationModule instance in order to execute some am methods to get some data from the DB. This is the code snippet where we get the am instance and then we try to release (within the quartz job implementation):

=========

    /**

     * Executes runs logic.

     * @param jobExecutionContext

     */

    @Override

    public void execute(JobExecutionContext jobExecutionContext) {

               ....

               ....

               OVIAppModuleImpl am = null;

               ....

               try {

                   ....

                    am = (OVIAppModuleImpl)Configuration.createRootApplicationModule(AM_DEF, AM_CONFIG); // --> this are constants aiming to the am configuration

                   ....

                   //--> Execute several am methods

                   ....

               } catch (...) {

                    ....

               }

               ...

               oracle.jbo.client.Configuration.releaseRootApplicationModule(am, true); //--> Release the am instance

} //--> End of execute method

=========

This job is being executed every 3 minutes, and after 24 to 36 hours the application runs out of DB connections and the app stops working. We observed that every time the job is executed, the JDBC connection remains open even we are trying to release the am instance (with the line Configuration.releaseRootApplicationModule(am, true)), therefore, eventually the app runs out of DB connections.

We tried to search the issue and tried a few things to solve the issue, such as:

- Andrejus Baranovskis Blog: ADF BC Tuning with Do Connection Pooling and TXN Disconnect Level : a great article. Guided by this, we set  jbo.doconnectionpooling = true and jbo.txn.disconnect_level = 1 (the last one was already set in 1)

- as I wrote above, we tried to release the am (which is not releasing the JDBC connections at all).

- We found an old post (My application runs out of datasource connections  ), but we couldn't find a solution for our problem.

- We tried a tuning solution in the connection pool: https://docs.oracle.com/cd/E15523_01/web.1111/b31974/bcampool.htm#ADFFD1341

But none of the above approaches worked.

We are really stuck on this. Any help will be much appreciated!

Kind regards,

Juan

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on May 7 2018
Added on Apr 9 2018
4 comments
499 views