Relations between entity beans in different jars

Discussions

EJB design: Relations between entity beans in different jars

  1. Relations between entity beans in different jars (1 messages)

    Is there a way to define a CMP relation between 2 entity beans which are described in two different jar files? The jar files reside in one ear file.
  2. Is there a way to define a CMP relation between 2 entity beans which are described in two different jar files? The jar files reside in one ear file.

    I guess you are talking about CMR relations. No you can´t The relation is described in the ejb-jar.xml and thus belongs to a jar.

    It would IMHO be quite a useless excercise anyway. Using CMR you can create a component like order-ejb hwich contains 2 EJB´s, order & orderitem using CMR. This should be a fully reusable component. Using CMR to couple for example Client to Order would mean you take away some of the reusability.

    my 2 cts