5 Replies Latest reply on Sep 24, 2004 5:16 PM by Steven Whyte

    Jdbc connection pool in Jboss 3.2.3

    Bhavesh Shah Newbie

      Hi Jboss Gurus,
      I am Newbie to Jboss and planning to migrate from WebLogic 6.1 to Jboss 3.2.3. I Have couple of questions:
      With current weblogic we are using Oracle 8i Database.
      1) I have exsisting web.xml (weblogic ) has following parameters set:
      <init-param>
      <param-name>
      db.url
      </param-name>
      <param-value>
      jdbc:weblogic:pool:fteDBPool
      </param-value>
      </init-param>
      what will be the corrosponding Jboss db.url paramaeter?
      2) How do i setup Oracle DB connection pool in Jboss?
      3) I have configured oracle-ds.xml to point to correct DB SID and username/password and copied i to deploy directory under server/default as below:

      <local-tx-datasource>
      <jndi-name>fteDBSource</jndi-name>
      <connection-url>jdbc:oracle:thin:@qadb6x:1521:pnetqa1</connection-url>
      I have put jndi-name as fteDBSource as my weblogic config.xml shows:
      MaxCapacity="10" Name="fteDBPool"

      Is this correct? or any other place i have to setup jndi-name?
      Also where do i specify fteDBPool in Jboss?

      Any Help will be greatly appreciated. I just installed Jboss and preety much new to this. I would greatly appreciate if someone can guide me.
      Thanks in Advance
      B

        • 1. Re: Jdbc connection pool in Jboss 3.2.3
          Steven Whyte Newbie

          In your jbosscmp-jdbc you will need to define what datasource to use for any entity beans.

          <jbosscmp-jdbc>

          fteDBSource
          <datasource-mapping>Oracle8</datasource-mapping>
          <create-table>false</create-table>
          .......


          Then in your <server instance>/deploy dir you need to deploy a Oracle-ds.xml file that configures the connection pool in the container,

          Oracle-ds.xml

          <?xml version="1.0" encoding="UTF-8"?>

          <local-tx-datasource>
          <jndi-name>fteDBSource</jndi-name>
          <connection-url>jdbc:oracle:thin:@qadb6x:1521:pnetqa1</connection-url>
          <driver-class>jdbc drive name</driver-class>
          <user-name>username</user-name>
          password
          <!--pooling parameters-->

          <min-pool-size>minimun pool size</min-pool-size>
          <max-pool-size>maximun pool size</max-pool-size>
          <idle-timeout-minutes>15</idle-timeout-minutes>
          <exception-sorter-class-name>
          org.jboss.resource.adapter.jdbc.vendor.OracleExceptionSorter
          </exception-sorter-class-name>
          </local-tx-datasource>

          • 2. Re: Jdbc connection pool in Jboss 3.2.3
            Bhavesh Shah Newbie

            Hi
            Where do i find jbosscmp-jdbc.xml file?

            • 3. Re: Jdbc connection pool in Jboss 3.2.3
              Steven Whyte Newbie

              It is usually in your deployment unit (ear, jar) that you are deploying.

              • 4. Re: Jdbc connection pool in Jboss 3.2.3
                Bhavesh Shah Newbie

                I found one standardjbosscmp-jdbc.xml file
                under deploy/conf dir.
                I modified that as below:
                <jbosscmp-jdbc>

                java:/fteDBSource
                <datasource-mapping>Oracle8</datasource-mapping>
                <create-table>false</create-table>

                Does datasoruce is java:/fteDBSource or just fteDBSource without java:/
                Also where should i specify fteDBPool Name specified in web.xml of weblogic? and what should i replace with db.url from weblogic web.xml file which says:
                jdbc:weblogic:pool:fteDBPool ?
                Sorry for the trouble.
                Please Help.

                • 5. Re: Jdbc connection pool in Jboss 3.2.3
                  Steven Whyte Newbie

                  The standardjbosscmp-jdbc.xml file is where the DB type mappings are. You do not modify it. The jbosscmp-jdbc.xml is the jboss deployment descriptor that you put what DataSource your deploment unit is to use. This file is simular to the weblogic-cmp-jar.xml in weblogic.