1 Reply Latest reply on Sep 27, 2007 12:36 PM by Weston M. Price

    Can I share connection pool among applications?

    Joe n/a Newbie

      I have 5 different instances of the same web application (to provide the service to 5 different clients). They all connect to the same oracle database, but they should each connect to a different schema. Currently I use a different datasource for each application, so my deployments look something like this:

      app1.war, app1-ds.xml
      app2.war, app2-ds.xml
      app5.war, app5-ds.xml

      I have a total of 550 allowable connections to oracle database, so I allow each to make up to 100 connections via the MaxSize attribute on the ManagedConnectionPool.

      The problem is that app1 gets far more usage, and sometimes has surpasses that 100-connection limit, while the others rarely see more than 30 concurrent connections. Can I set up a single shared pool that has 550 max connections that all 5 applications can draw from?

      I know that I can supply credentials to getConnection(..), but that would require a code change to my application. I read something very brief that I interpreted be a method for piggy-backing credentials from the app's login module. Or perhaps it was a misinterpretation.

      In any case, I appreciate your suggestions and advice. Thanks!

        • 1. Re: Can I share connection pool among applications?
          Weston M. Price Master

          Currently, there is no way to conveniently do this. Technically this falls under the JCA spec area of reauthentication support which is, to date, unimplemented though there is a JIRA task for it.

          The best solution at this point would be to tune each pool according to your usage patterns (ie allow more on app1 and scale down appx).

          Note, even credential based access would not really address the issue as separate pools would be created for each credential.