EJB programming & troubleshooting: EJB 2.0: CMR between Entity Beans in different Jars

  1. Hi All,<p>
    Quickish Question: EJB 2.0: Are Container Managed Relationships possible between entity beans which are deployed in different jars but running in the same application in the same JVM ? <b> In an intermediate draft of EJB 2.0, it was possible to use the <ejb-entity-ref> tag within the <relationships> tag to reference the Entity bean in the second jar. However this appears to now be gone in the finalized version of EJB 2.0. <b>The relationship may be Customer-Accounts and my second jar file may contain a specialized type of account.<p>I believe that I could get around this by adding all the beans etc from the second jar into the first and updating the deployment descriptor. Hence I get my relationship (dirty). However, if I later want to update my specialized type of account, I'll end up disturbing everything in the first jar... hacking, I realize ;-)<b><b>Is this type of behaviour/relationship excluded as being regarded as breaking the rules of a true Component Model ?

  2. G'Day,

    With respect to the first part of your question,the unfortunate answer is "No". CMR's arn't possible between beans that are defined in separate ejb-jar.xml files, regardless of their physically deployed location.