0 Replies Latest reply on Dec 14, 2004 10:37 AM by ralph

    2 classes with same name in 2 ear files

    ralph

      Hi *

      i have 2 ears(each with a class DBConnection) running under JBOSS

      1.) Ear1 running with jndi ref in JBOSS.XML as follows

      <resource-managers>
      <resource-manager res-class="org.jboss.ejb.deployment.JDBCResource">
      <res-name>nvgOraDB</res-name>
      <!-- this is the test database -->
      <res-jndi-name>MYOracleDS</res-jndi-name>
      </resource-manager>
      </resource-managers>

      the jndi refs to an ds.xml file (lets say db1-ds.xml)
      in my ear i got an DBConnection class that does a lookup to ( "java:MYOracleDS" );

      if i deploy an run everything is fine.

      2.) Ear2 running with jndi ref in JBOSS.XML as follows

      <resource-managers>
      <resource-manager res-class="org.jboss.ejb.deployment.JDBCResource">
      <res-name>myOraDB</res-name>
      <!-- this is the test database -->
      <res-jndi-name>XAOracleDS</res-jndi-name>
      </resource-manager>
      </resource-managers>

      the jndi refs to another ds.xml file (lets say db2-ds.xml)
      in my ear i got an DBConnection class that does a lookup to ( "java:XAOracleDS" );

      if i deploy this second ear file and run i got the DBConnection class from ear1.

      if i delete ear1 and run ear2 it works fine. if i rename the DBConnection class in one of the ear files everthing works fine.


      So i assume it must be the same name class DBConnection in the 2 ear files. If i check the class in each ear file i got the 2 different DBConnection class context.
      The res-ref-name in the ejb-jar.xml file seems also correct for each ear file.

      Any ideas ??


      Kind regards
      Ralph