In my application I have multithreads that needs to access database and I am using apache.tomcat.jdbc.pool.DataSource as a JDBC connection pool.

In some cases users execute stored procedures that might affect the database session context/variables before executing another query to retrieve some data.

Is there a way to enforce closing the connection instead of just returning it to pool. Or how can we clear/reset the connection session context/variables for MySQL or Oracle using a stored procedure.

1 Answer 1



This procedure clears application context information in the specified namespace.


This procedure de-instantiates all packages in this session. It frees the package state.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.