5 Replies Latest reply on Apr 5, 2011 4:38 PM by cg2008

    Configuring a custom connection pool manager in JBoss

    cg2008

      Hi

       

      1. Can I configure Oracle JDBC Connection pool manager in JBoss AS?

       

      2. If not, how do I configure a Oracle datasource for use with JBoss AS cluster? Do I need to bind the Oracle DataSource to the JNDI tree statically as opposed to dynamic configuration using JBoss mBNean configuration?

       

      Appreciate the help

       

       

      Thanks

      Chandru

        • 1. Configuring a custom connection pool manager in JBoss
          wdfink

          Yes,

          look into the directory docs/examples/jca/oracle* for a template.

           

          You should try the XA variant if you plan to have more than one transaction participant (DB, JMS ..) otherwise you can use the 'normal' one.

          From Java code you must lookup via context and use the provided connenction.

          • 2. Configuring a custom connection pool manager in JBoss
            cg2008

            Thanks for the response.

             

            I'd like to use the Connection Pool manager that is part of Oracle JDBC driver class - oracle.jdbc.pool.OracleDataSource within JBoss AS

            I assume configuring a Oracle datasource using the following uses JBoss built-in connection pool manager

            <datasources>

              <local-tx-datasource>

                <jndi-name> ....

                <driver-class>oracle.jdbc.driver.OracleDriver</driver-class>

                 ...............

                  .............

               </local-tx-datasource>

            </datasources>

             

            Can I configure oracle.jdbc.pool.OracleDataSource class for use with JBoss as it contains built-in conncetion pool manager? If so, could you help with sample ds configuration data.

            http://download.oracle.com/docs/cd/B28359_01/java.111/b31224/urls.htm#i1066337

             

            Thanks

            Chandru

            • 3. Configuring a custom connection pool manager in JBoss
              wdfink

              I never think about it, but I suppose not.

              But why do you want to use a different connection-pool?

              If you drop the ojdbc.jar into server/.../lib and configure the oracle-ds.xml the JBoss will provide the oracle connection in the same way.

               

              In a cluster you deploy the same oracle-ds.xml on each server instance and thats it.

              You should configure the same max connection value because of load balancing if the JBoss instance distribute the load.

              • 4. Configuring a custom connection pool manager in JBoss
                cg2008

                My understanding is JBoss AS uses commons-dbcp connection pool which is Single threaded and there is no support for high concurrency (on multi core CPU machines)

                Are there any plans to enhance commons-dbcp connecton pool manager?

                • 5. Configuring a custom connection pool manager in JBoss
                  cg2008

                  What is the Connection Provide implementation used in JBoss?

                   

                  commons-dbcp or C3P0 or JBoss own implementation?

                   

                  Thanks

                  Chandru