i hava adf application using a remote oracle database via jdbc , Application will accessed by mulitple users which are creating different sessions at database level. Like if 20 users open the web page there 20 session entries in v$session
table. I want to limit one session at oracle database level and if multiple users connects connection must be one however user can wait to complete the statement and one completed next user should reuse the same jdbc connection to run his query
0
votes
Just open one connection and have each user request it in turn. Why do you think you want to restrict at DB level? You can, I suppose, if they all connect to the same DB user - with resource limits, and retry if no session available - but opening a new connection for each request isn't very efficient anyway.
– Alex Poole
1 Answers
1
votes
Weblogic has a pool of database connections that will share for all the users. So, you can't enforce a certain physical connection per user.
The pattern for this use case is to fire a pl sql call from ADF to your database session every time the ADF user receives a new db connection where you pass in the username: http://adfcodebits.blogspot.com/2010/06/bit-21-overriding-preparesession-to-do.html
You have to remember, each click accquires a db connection - uses it - then releases it. You can't cache data within v$session.