3 Replies Latest reply on Feb 25, 2004 7:15 AM by alaveth

    Datasource  link to  -> java:/DefaultDS

    ralph1 Newbie

      Hi *

      still fighting with a problem reported may time, but i am looking for a solution.

      I am using jboss3.2.3 with an oracle 9i.

      1) i created an oracle-xa-ds.xml file in the default/deploy dir :


      2.) i modified the standardjbosscmp-jdbc.xml in the default/conf dir


      3.) I copied ojdbc14.jar to lib dir.

      4.) my ejb-jar.xml looks like


      5.) my jboss.xml looks like
      <resource-manager res-class="org.jboss.ejb.deployment.JDBCResource">



      6.) my bean code fpr dbconnection is
      DataSource source = ( DataSource )new InitialContext().lookup( "java:comp/env/jdbc/XAOracleDS" );
      return source.getConnection();

      if i deploy the ear file to jboss and have a look to the jmx-console i get
      java:comp namespace of the ProjManager bean:

      +- env (class: org.jnp.interfaces.NamingContext)
      | +- jdbc (class: org.jnp.interfaces.NamingContext)
      | | +- XAOracleDS[link -> java:/DefaultDS] (class: javax.naming.LinkRef)

      as datasource i expect the XAOracleDS and not the DefaultDS

      the only place where i find the DefaultDS is the hsqldb-ds.xml in the deploy directory.

      If i run the bean i get a JDBC not bound.

      Whats wrong with my code ??

      Kind regards