8 Replies Latest reply on Dec 13, 2001 10:06 AM by Jason McNeil

    Strange things are afoot with more than one app?

    Jason McNeil Newbie

      Hi List,
      I'm hoping someone might be able to help me?

      I have two applications deployed in JBoss-2.4.3_Tomcat-3.2.3, both with CMP working great. Except, they both have a CMP Entity Bean called User and a Stateless Session Bean called UserCollection (closly based on the CD Example).

      My problem is that the user table seams to be shared between the two seperate apps, athough they are in seperate packages.

      I have included jboss.xml and ejb-jar.xml for both apps.

      TIA,
      Jason McNeil

      App A jboss.xml
      ---------------

      <?xml version="1.0" encoding="Cp1252"?>


      false
      <container-configurations />
      <resource-managers />
      <enterprise-beans>

      <ejb-name>UserCollectionBean</ejb-name>
      <jndi-name>ams/UserCollection</jndi-name>
      <configuration-name></configuration-name>


      <ejb-name>UserBean</ejb-name>
      <jndi-name>ams/User</jndi-name>
      <configuration-name></configuration-name>

      </enterprise-beans>


      App A - ejb-jar
      ---------------

      <?xml version="1.0"?>

      <!DOCTYPE ejb-jar PUBLIC "-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 1.1//EN" "http://java.sun.com/j2ee/dtds/ejb-jar_1_1.dtd">

      <ejb-jar>
      <display-name>Assets</display-name>
      <enterprise-beans>

      Models a User
      <ejb-name>UserBean</ejb-name>
      <ejb-class>uk.co.mosaic.ams.users.ejb.UserBean</ejb-class>
      uk.co.mosaic.ams.users.ejb.UserHome
      uk.co.mosaic.ams.users.ejb.User
      <persistence-type>Container</persistence-type>
      <prim-key-class>java.lang.String</prim-key-class>
      False
      <cmp-field><field-name>coreId</field-name></cmp-field>
      <cmp-field><field-name>complexity</field-name></cmp-field>
      <cmp-field><field-name>umts</field-name></cmp-field>
      <cmp-field><field-name>onex</field-name></cmp-field>
      <primkey-field>coreId</primkey-field>



      Models a User collection
      <ejb-name>UserCollectionBean</ejb-name>
      <ejb-class>uk.co.mosaic.ams.users.ejb.UserCollectionBean</ejb-class>
      uk.co.mosaic.ams.users.ejb.UserCollectionHome
      uk.co.mosaic.ams.users.ejb.UserCollection
      <session-type>Stateless</session-type>
      <transaction-type>Container</transaction-type>
      <ejb-ref>
      <ejb-ref-name>ejb/User</ejb-ref-name>
      <ejb-ref-type>Entity</ejb-ref-type>
      uk.co.mosaic.ams.ejb.users.UserHome
      uk.co.mosaic.ams.ejb.users.User
      <ejb-link>UserBean</ejb-link>
      </ejb-ref>


      </enterprise-beans>

      <assembly-descriptor>
      <container-transaction>

      <ejb-name>UserBean</ejb-name>
      <method-name>*</method-name>

      <trans-attribute>Required</trans-attribute>
      </container-transaction>
      </assembly-descriptor>
      </ejb-jar>


      App B - jboss.jar
      -----------------
      <?xml version="1.0" encoding="Cp1252"?>


      false
      <container-configurations />
      <resource-managers />
      <enterprise-beans>

      <ejb-name>LinkBudgetBean</ejb-name>
      <jndi-name>link_budget_calc_3-0</jndi-name>
      <configuration-name></configuration-name>


      <ejb-name>UserBean</ejb-name>
      <jndi-name>saturn/User</jndi-name>
      <configuration-name></configuration-name>


      <ejb-name>UserCollectionBean</ejb-name>
      <jndi-name>saturn/UserCollection</jndi-name>
      <configuration-name></configuration-name>

      </enterprise-beans>



      App B ejb-jar
      -------------

      <?xml version="1.0"?>

      <!DOCTYPE ejb-jar PUBLIC "-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 1.1//EN" "http://java.sun.com/j2ee/dtds/ejb-jar_1_1.dtd">

      <ejb-jar>
      <display-name>SaturnJar</display-name>
      <enterprise-beans>

      no description
      <display-name>LinkBudgetBean</display-name>
      <ejb-name>LinkBudgetBean</ejb-name>
      com.mot.cig.ecid.saturn.ejb.session.linkbudget.LinkBudgetHome
      com.mot.cig.ecid.saturn.ejb.session.linkbudget.LinkBudget
      <ejb-class>com.mot.cig.ecid.saturn.ejb.session.linkbudget.LinkBudgetBean</ejb-class>
      <session-type>Stateless</session-type>
      <transaction-type>Container</transaction-type>



      Models a User
      <ejb-name>UserBean</ejb-name>
      com.mot.cig.ecid.saturn.ejb.entity.users.UserHome
      com.mot.cig.ecid.saturn.ejb.entity.users.User
      <ejb-class>com.mot.cig.ecid.saturn.ejb.entity.users.UserBean</ejb-class>
      <persistence-type>Container</persistence-type>
      <prim-key-class>java.lang.String</prim-key-class>
      False
      <cmp-field><field-name>coreId</field-name></cmp-field>
      <cmp-field><field-name>complexity</field-name></cmp-field>
      <cmp-field><field-name>umts</field-name></cmp-field>
      <cmp-field><field-name>onex</field-name></cmp-field>
      <primkey-field>coreId</primkey-field>



      Models a User collection
      <ejb-name>UserCollectionBean</ejb-name>
      com.mot.cig.ecid.saturn.ejb.entity.users.UserCollectionHome
      com.mot.cig.ecid.saturn.ejb.entity.users.UserCollection
      <ejb-class>com.mot.cig.ecid.saturn.ejb.entity.users.UserCollectionBean</ejb-class>
      <session-type>Stateless</session-type>
      <transaction-type>Container</transaction-type>
      <ejb-ref>
      <ejb-ref-name>ejb/User</ejb-ref-name>
      <ejb-ref-type>Entity</ejb-ref-type>
      com.mot.cig.ecid.saturn.ejb.entity.users.UserHome
      com.mot.cig.ecid.saturn.ejb.entity.users.User
      <ejb-link>UserBean</ejb-link>
      </ejb-ref>


      </enterprise-beans>

      <assembly-descriptor>
      <container-transaction>

      <ejb-name>LinkBudgetBean</ejb-name>
      <method-name>*</method-name>

      <trans-attribute>Required</trans-attribute>
      </container-transaction>

      <container-transaction>

      <ejb-name>UserBean</ejb-name>
      <method-name>*</method-name>

      <trans-attribute>Required</trans-attribute>
      </container-transaction>


      <container-transaction>

      <ejb-name>UserCollectionBean</ejb-name>
      <method-name>*</method-name>

      <trans-attribute>Required</trans-attribute>
      </container-transaction>


      </assembly-descriptor>
      </ejb-jar>