1 Reply Latest reply on Apr 13, 2004 10:11 AM by Adrian Brock

    disabling managed connection pool

    amirkibbar Newbie


      Iḿ trying to figure out a way to incorporate oracleś Proxy Authentication into JBoss.
      Proxy Authentication is a method of connecting to the database using one user through another. This means that my application has a database user, for example - appserv, and my users each has his own database user, for example joe. With proxy authentication, I can connect from the middle tier to jo through appserv. This enables all kinds of database features, mainly security related features, such as audit, label security, etc.

      I wrote a database driver to replace the default oracle driver, and used it instead of the OracleDriver within the xxx-ds.xml file. Now everything works fine except for one little thing - JBoss always has to define a pool of connections, that the application uses to retrieve a data source. However, the proxy authentication is a pool on its own, and does not require a different pool. Not only that, but if JBoss caches (in the pool) my database connection, users might get a connection authenticated to someone else, becuase the connection is not really closed, just returned to the pool.
      Waht can I do?

      I tried setting the min and max size of the pool to 0, but in this case, instead of creating new connections for each request, I get an exception that there are no connections availble within the timeout.

      Can I disable the JBoss pool?

      please help,


        • 1. Re: disabling managed connection pool
          Adrian Brock Master

          It sounds like you have the wrong end of the stick.
          Pooling should not be in your jdbc driver/connection factory, that breaks the contract.

          It is possible to pass the user through to the jdbc driver/connection factory
          if you use the CallerIdentityLoginModule (if you use the servlet/ejb user/password)
          or set <application-managed-security/> (if the user/password are passed as
          parameters on getConnection())
          This will create separate subpools for each user.