----- Original Message -----
From: "Jennifer Grechuk" <[EMAIL PROTECTED]>
To: "Orion-Interest" <[EMAIL PROTECTED]>
Sent: Monday, January 22, 2001 4:08 PM
Subject: Influencing the order that EJB jars are deployed
> Hello everyone,
>
> On friday I posted a question about the relationships between two
> ejb's. (it's at the bottom of this letter if you would like to read
> it). We have since determined that the problem we are having is in the
> order that Orion deploys the ejb-jars. Unfortunately we don't know of a
> way to influence this order, we have tried changing the order in
> orion-application.xml and application.xml with no luck....If anyone
> knows of a way to influence the order in which Orion deploys the
> ejb-jars, we would really love to hear it. Thanks very much.
>
> Jennifer Grechuk
> Canlink
As a colleague of Jennifer's, let me clarify a little - at the heart of this
problem in the fact that a Container-Managed Relationship was being declared
between two Entity EJBs in _different_ jar files. Upon deployment, an
exception indicating that the ejb in the other jar could not be found was
thrown. It was noted that the jar in which this declaration is made was
_always_ being deployed first, and it seemed that if Orion could be
convinced to deploy the other jar first, the ejb might be found. Alas, no
method of cajolling could be found that would influence the order in which
Orion deployed an application's ejb jars whatsoever.
However, this proved to be a proverbial red herring.
In actual fact, the problem is not related to the order of jar deployment,
but rather to the fact that a cross-jar Container-Managed Relationship needs
to be handled slightly differently in the ejb-jar.xml. As per page 464 of
the EJB 2.0 Draft, an ejb-entity-ref element needs to be specified within
the relationships element for any entity beans from outside of the jar that
will be participating in a relationship. Not indicated in the draft Spec but
required by Orion are ejb-ref-name & ejb-ref-type elements within the
ejb-entity-ref element.
One the deployment descriptor was modified accordingly, the desire to
influence the order in which Orion deploys an application's jars vaporized
along with Orion's inability to find the relationship participant.
P. Pontbriand
Canlink Interactive Technologies, Inc.