This content has been marked as final. Show 1 reply
If you let, for instance, JNDI manage the database connection then it (or the pool it comes from) will only be created at startup (usually) depending on your application server.
In your provider you can create an InitialContext on each request (if required) and it will only point to the original connection pool created.
Not sure why you would be seeing multiple DB connections created if you had them marked as static - unless there are threading issues in your code or perhaps if you are deploying your plugin using the OPA plugin loading mechanism perhaps there are some class loader issues as it creates new ClassLoaders for each jar in the plugin lib directory - and each class loader would have it's own static instance.