3 Replies Latest reply on Nov 15, 2002 5:01 PM by mschoning

    several connection to Oracle

    grighi

      jboss 303, oracle 9i
      I have several application and each need own connection (different username and password). I use oracle-service.xml (below) and when one connection - very well.
      Copy oracle-service to oracle-service-one.xml, change it, run jboss and bound only one.
      What should I do, to have two and more connection?






      <depends optional-attribute-name="ManagedConnectionFactoryName">
      <!--embedded mbean-->


      OracleDS



      <config-property name="ConnectionURL" type="java.lang.String">jdbc:oracle:thin:@host:1521:orcl</config-property>
      <config-property name="DriverClass" type="java.lang.String">oracle.jdbc.driver.OracleDriver</config-property>
      <!--set these only if you want only default logins, not through JAAS -->
      <config-property name="UserName" type="java.lang.String">name</config-property>
      <config-property name="Password" type="java.lang.String">pass</config-property>




      <!--Below here are advanced properties -->
      <!--hack-->
      <depends optional-attribute-name="OldRarDeployment">jboss.jca:service=RARDeployment,name=JBoss LocalTransaction JDBC Wrapper



      <depends optional-attribute-name="ManagedConnectionPool">
      <!--embedded mbean-->


      0
      50
      5000
      15
      <!--criteria indicates if Subject (from security domain) or app supplied
      parameters (such as from getConnection(user, pw)) are used to distinguish
      connections in the pool. Choices are
      ByContainerAndApplication (use both),
      ByContainer (use Subject),
      ByApplication (use app supplied params only),
      ByNothing (all connections are equivalent, usually if adapter supports
      reauthentication)-->
      ByContainer



      <depends optional-attribute-name="CachedConnectionManager">jboss.jca:service=CachedConnectionManager

      <depends optional-attribute-name="JaasSecurityManagerService">jboss.security:service=JaasSecurityManager

      java:/TransactionManager

      <!--make the rar deploy! hack till better deployment-->
      jboss.jca:service=RARDeployer





        • 1. Re: several connection to Oracle
          mschoning

          In my oracle-service.xml within the server tag I defined several mbean tags, it seems to work for me artleast I can find my data sources in my jmx-console. I still have to write code to use the though.

          like this


          ....



          ....




          good luck

          • 2. Re: several connection to Oracle
            jleech

            What version of JBoss did you get this working on? For me, it works on JBoss3.0.0, but not for 3.0.3 or 3.0.4. I see the following in my server.log file:
            10:18:06,602 ERROR [URLDeploymentScanner] MBeanException: Exception in MBean operation 'checkIncompleteDeployments()'
            Cause: Incomplete Deployment listing:
            Packages waiting for a deployer:

            Incompletely deployed packages:

            MBeans waiting for classes:

            MBeans waiting for other MBeans:
            [ObjectName: jboss.jca:service=LocalTxCM,name=reportDS
            state: CONFIGURED
            I Depend On: jboss.jca:service=LocalTxDS,name=reportDS
            jboss.jca:service=LocalTxPool,name=reportDS
            jboss.jca:service=CachedConnectionManager
            jboss.security:name=JaasSecurityManager
            jboss.jca:service=RARDeployer

            Depends On Me: , ObjectName: jboss.jca:service=LocalTxCM,name=vviewDS
            state: CONFIGURED
            I Depend On: jboss.jca:service=LocalTxDS,name=vviewDS
            jboss.jca:service=LocalTxPool,name=vviewDS
            jboss.jca:service=CachedConnectionManager
            jboss.security:name=JaasSecurityManager
            jboss.jca:service=RARDeployer

            Depends On Me: ]

            • 3. Re: several connection to Oracle
              mschoning

              I am using Jboss 3.0.4 and it works there for me.
              I really can't say what could be the problem from your listing, My adice is to double check the xml file.

              Michael