4 Replies Latest reply on Apr 8, 2005 3:45 PM by Vasudev Krishnamoorthy

    How do i set the depends for a mbean in user-service.xml

    Vasudev Krishnamoorthy Newbie

      I have a startup class which is defined in the user-service.xml. I also have a oracle-ds.xml which defines a datasource. My startup class depend on the datasource defined in the oracle-ds.xml.

      When the server starts up and is trying to invoke the user-service.xml it throws an error saying the datasource is not yet installed.

      The attributes for the Mbean are
      Domain=jboss.jca
      Service=DataSourceBinding
      name=xactly-dataSource-oraclePool

      How should i specify the depends in the user-service.xml

      ===== oracle-ds.xml ======

      <datasources>
       <local-tx-datasource>
       <jndi-name>xactly-dataSource-oraclePool</jndi-name>
       <use-java-context>false</use-java-context>
       <connection-url>jdbc:oracle:thin:@localhost:1521:SWDB</connection-url>
      
       <driver-class>oracle.jdbc.driver.OracleDriver</driver-class>
       <user-name>xactly</user-name>
       <password>xactly</password>
       <!-- Uses the pingDatabase method to check a connection is still valid before handing it out from the pool -->
       <!--valid-connection-checker-class-name>org.jboss.resource.adapter.jdbc.vendor.OracleValidConnectionChecker</valid-connection-checker-class-name-->
       <!-- Checks the Oracle error codes and messages for fatal errors -->
       <exception-sorter-class-name>org.jboss.resource.adapter.jdbc.vendor.OracleExceptionSorter</exception-sorter-class-name>
       <!-- sql to call when connection is created
       <new-connection-sql>some arbitrary sql</new-connection-sql>
       -->
      
       <!-- sql to call on an existing pooled connection when it is obtained from pool - the OracleValidConnectionChecker is prefered
       <check-valid-connection-sql>some arbitrary sql</check-valid-connection-sql>
       -->
      
       </local-tx-datasource>
      
      </datasources>



      ===== user-service.xml =======

      <server>
      
       <classpath codebase="." archives="xstartup.jar"/>
      
       <mbean code="com.xactly.startup.XStartup"
       name="user:service=XStartup">
       <depends>jboss.jca:service=DataSourceBinding</depends>
      
       </mbean>
      
      </server>