Tuesday, March 20, 2012

Testing ADF BC Proxy User DB Connection in Multi-User Environment

I had a blog post about ADF BC Proxy User DB connection - Extending Application Module for ADF BC Proxy User DB Connection. It was quite interesting to test, how this approach works in multi-user environment, when passivation/activation happens. Good news - I didn't found any problems, all works well, I would like to describe my experiment today.

Sample application - AMExtendApp_v2.zip implements such use case - different users are connecting from the Web, ADF BC creates DB proxy, on stress load - PS_TXN table is used for passivation/activation:

In order to test how proxy user works, I have 3 DB users (APPUSER, HR and REDSAM). Both REDSAM and HR have EMPLOYEES table:

With different data:

Proxy user - APPUSER, doesn't have any tables:

For the stress test, I have disabled AM pool - this will simulate passivation/activation environment:

ADF BC internal connection is left as default - blank, this means it will create PS_TXN table inside proxy APPUSER schema (you can change it to different data source):

There are two users defined in the local security store:

Once page is opened, we set Bind Variable value for VO SQL statement. Bind Variable is set from onload popup (read here for onload popup technique - Opening ADF PopUp on Page Load). Bind Variable is set to 5000 for the first user:

To 50 for the second user:

When navigating through the rowset, passivation/activation happens correctly - bind variable value is not lost:

As expected, PS_TXN table is created inside proxy user schema:

I have tested as well with database connection pooling enabled (read more - Stress Testing Oracle ADF BC Applications - Do Connection Pooling and TXN Disconnect Level). ADF BC proxy user works well with database connection pooling enabled:

TXN Disconnect Level = 1:

No comments: