0

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

DBMS_SESSION.CLEAR_ALL_CONTEXT

This procedure clears application context information in the specified namespace.

DBMS_SESSION.RESET_PACKAGE

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

1

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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