Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

Troubleshooting
Research
Professional Opinions
Ask a Question
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE

troubleshooting Question

How to invoke JDBC setApplicationContext just after “getting” a connection from the pool

Avatar of javaCaravan0
javaCaravan0 asked on
Oracle DatabaseJavaJava App ServersJava EE
10 Comments1 Solution1591 ViewsLast Modified:
I need to set an Oracle application context. I found there is a method "public void setApplicationContext(String CLIENTCONTEXT, string attribute,string value) throws SQLException;" in JDBC to set values for the client's session. I'm using Spring 2.0 JDBC Template and connection pooling in JBOSS AS 4.0.3. There are more than 100 concurrenct users of the application. I need to pass atleast two parameters to oracle procedure whenever a connection is picked from the pool. Let say User A submits a request, I'll pass values for two parameters to the DAO class. I want to know how can I set the values when a connection is picked from the pool. Will I also need to invoke "clearAllApplicationContext(‘CLIENTCONTEXT’) " just before “returning” the connection to the pool? Please note, I want to set the values for the entire session therefore I am trying to find how can I do so when the connection is picked from the pool.
ASKER CERTIFIED SOLUTION
Avatar of Franck Pachot
Franck PachotFlag of Switzerland imageOracle DBA

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Commented:
This problem has been solved!
Unlock 1 Answer and 10 Comments.
See Answers