2 Replies Latest reply on May 18, 2005 5:16 PM by Frank Langelage

    CMR accross individually deployed ejb jars in the same JVM

    Jure Lodrant Newbie

      Hi, all

      I have a modular application built on JBoss. I have several ejb jars and ears deployed in the same single server instance. I'm just developing a new module containing a CMP Entity been that needs to make a relation to and existing CMP entity bean in a different module (ejb jar or ear).

      I have been trying to accomplish this for a couple of days now, with zero success.

      My first question regarding this matter is whether this is at all possible: Can JBoss (using v. 3.2.7.) handle a CMR relationship accross ejb-jars deployed in the same server instance. I want an unidirectional relationship (don't want to touch the existing entity bean)

      I have managed to set xdoclet tags for @ejb.ejb-external-ref and @jboss.ejb-local-ref, and the link seems to show up properly in JNDIView (jmx-console). At the same time I always get a deployment time exception:

      17:50:37,506 DEBUG [JDBCStoreManager.DiaryEntry] Initializing CMP plugin for DiaryEntry
      17:50:37,509 ERROR [ejb.EntityContainer] Starting failed jboss.j2ee:jndiName=ejb/dd/local/DiaryEntry,service=EJB
      org.jboss.deployment.DeploymentException: Entity: User not found for relation: diaryentry-employee
       at org.jboss.ejb.plugins.cmp.jdbc.metadata.JDBCRelationshipRoleMetaData.<init>(JDBCRelationshipRoleMetaData.java:103)
       at org.jboss.ejb.plugins.cmp.jdbc.metadata.JDBCRelationMetaData.<init>(JDBCRelationMetaData.java:139)
       at org.jboss.ejb.plugins.cmp.jdbc.metadata.JDBCApplicationMetaData.<init>(JDBCApplicationMetaData.java:175)
       at org.jboss.ejb.plugins.cmp.jdbc.metadata.JDBCXmlFileLoader.load(JDBCXmlFileLoader.java:52)
       at org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.loadJDBCEntityMetaData(JDBCStoreManager.java:721)
       at org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.initStoreManager(JDBCStoreManager.java:409)
      

      which says to me that the entity in question (User) can't be located by the container.
      If answer to question 1 is affirmative, than it's just me doing something wrong.

      I had no problem accessing the entity in existing ejb-jar from a session bean in the new ejb-jar via local interfaces, so it seems using beans accross ejb-jars is possible, just the relation stuff don't seem to work.

      Please somebody explain this stuff to me a little...

      Thanks in advance,

      Jure