3 Replies Latest reply on Feb 17, 2004 7:45 AM by alaveth

    EJB's keep using DefaultDS

    Anthony Ikeda Newbie

      I've configured an Oracle datasource on JBoss which works fine for the web modules of me ear file, but the EJB's insist on using DefaultDS.

      Here is my jboss.xml:

      <?xml version="1.0" encoding="UTF-8"?>
      <jboss>
       <enterprise-beans>
       <entity>
       <ejb-name>PatchEJB</ejb-name>
       <resource-ref>
       <res-ref-name>jdbc/ibbd</res-ref-name>
       <jndi-name>java:/OracleDS</jndi-name>
       <resource-name>DBResource</resource-name>
       </resource-ref>
       </entity>
       <session>
       <ejb-name>PatchSessionEJB</ejb-name>
       <resource-ref>
       <res-ref-name>jdbc/ibbd</res-ref-name>
       <jndi-name>java:/OracleDS</jndi-name>
       <resource-name>DBResource</resource-name>
       </resource-ref>
       </session>
       </enterprise-beans>
       <resource-managers>
       <resource-manager>
       <res-name>DBResource</res-name>
       <res-jndi-name>java:/OracleDS</res-jndi-name>
       </resource-manager>
       </resource-managers>
      </jboss>

      and my oracle-ds.xml:
      <?xml version="1.0" encoding="UTF-8"?>
      <datasources>
       <local-tx-datasource>
       <jndi-name>OracleDS</jndi-name>
       <connection-url>jdbc:oracle:thin:@{server}:1521:{sid}</connection-url>
       <driver-class>oracle.jdbc.driver.OracleDriver</driver-class>
       <user-name>{user}</user-name>
       <password>{password}</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>
       <security-domain>OracleDbRealm</security-domain>
       </local-tx-datasource>
      
      </datasources>


      Like I said, my war files are accessing the database without a problem. If I remove the hsqldb-ds.xml file I get the followin on startup:
      [EjbModule] Deploying PatchEJB
      [EjbModule] Deploying PatchSessionEJB
      [EntityContainer] No resource manager found for jdbc/ibbd
      [EntityInstancePool] Started jboss.j2ee:jndiName=PatchEJB,plugin=pool,service=EJB
      [EntityContainer] Started jboss.j2ee:jndiName=PatchEJB,service=EJB
      [StatelessSessionContainer] No resource manager found for jdbc/ibbd

      This is driving me insane, what have I overlooked? I'm using jboss 3.2.3 and an Oracle 8 database.

      [tone]