Skip to Main Content
  • Questions
  • Initializing Contexts after getting a connection from a ConnectionPool

Breadcrumb

Question and Answer

Connor McDonald

Thanks for the question, Tech.

Asked: July 16, 2018 - 1:52 pm UTC

Last updated: July 18, 2018 - 1:30 am UTC

Version: Any

Viewed 1000+ times

You Asked

I understand best practice is to initialize a connection from a connection pool by clearing the Application Context.

However,there are multiple namespaces.

Should every namespace be cleared?

How does one find the name of every namespace?


and Connor said...

Not cleared but set.

You should have knowledge of what contexts your application requires/uses, and these are the things that should be set to the values you require for your duration of the use of the connection from the pool.

But this can be avoided with global application contexts, so that you don't run the possibility of clashing - each logical session gets its on value, as determined by a client identifier that you control.

See

https://asktom.oracle.com/pls/asktom/asktom.search?tag=application-contexts-in-a-web-environment

for an example of that

Is this answer out of date? If it is, please let us know via a Comment

More to Explore

PL/SQL demos

Check out more PL/SQL tutorials on our LiveSQL tool.

PL/SQL docs

PL/SQL reference manual from the Oracle documentation library