Hello,
I hope someone can help me.  I am trying without any success to create a
relationship between two ejb's which are deployed in two different
jars.  Both of my ejb's are 2.0, what I would like is for my one ejb
InsiderEJB to have a relationship with OutsiderEJB.  The outsider ejb is
deployed in another jar.  So in the deployment descriptor where Insider
is deployed I have the Insider entity declared as following:

<entity>
            <cmp-version>2.x</cmp-version>
            <display-name>Insider_Component</display-name>
            <ejb-name>InsiderEJB</ejb-name>
            <home>com.canlink.components.model.party.InsiderHome</home>
            <remote>com.canlink.components.model.party.Insider</remote>

<ejb-class>com.canlink.components.model.party.bean.InsiderBean</ejb-class>

            <persistence-type>Container</persistence-type>

<prim-key-class>com.canlink.components.base.EntityPK</prim-key-class>
            <reentrant>False</reentrant>
            <cmp-field>
                <field-name>whocares</field-name>
            </cmp-field>
            <cmp-field>
                <field-name>whatever</field-name>
            </cmp-field>
            <cmp-field>
                <field-name>outsiders</field-name>
            </cmp-field>
            <ejb-ref>
                <ejb-ref-name>ejb/OutsiderEJB</ejb-ref-name>
                <ejb-ref-type>Entity</ejb-ref-type>
                <home>com.canlink.components.base.OutsiderHome</home>
                <remote>com.canlink.components.base.Outsider</remote>

<!--ejb-link>../phlox/common.jar#OutsiderEJB</ejb-link-->
            </ejb-ref>

Then in the relationships section I have the following code to describe
the relationship between the two of them:
<ejb-relation>
            <ejb-relation-name>Insider-Outsider</ejb-relation-name>
            <ejb-relationship-role>

<ejb-relationship-role-name>insider-has-outsiders</ejb-relationship-role-name>

                <multiplicity>one</multiplicity>
                <role-source>
                    <ejb-name>InsiderEJB</ejb-name>
                </role-source>
                <cmr-field>
                    <cmr-field-name>outsiders</cmr-field-name>

<cmr-field-type>java.util.Collection</cmr-field-type>
                </cmr-field>
            </ejb-relationship-role>
            <ejb-relationship-role>
                <ejb-relationship-role-name>outsiders-for
insiders</ejb-relationship-role-name>
                <multiplicity>many</multiplicity>
                <role-source>
                        <ejb-name>OutsiderEJB</ejb-name>
                        <!--ejb-link>OutsiderEJB</ejb-link-->
                 </role-source>
            </ejb-relationship-role>
        </ejb-relation>

However when Orion tries to auto-deploy the jar file containing the
Insider deployment descriptor I receive the following error message:
No ejb by the ejb-name OutsiderEJB as specified by the role-source in
ejb-relationship-role outsiders-for insiders  found.

I have tried putting in <ejb-link> tags here there and everywhere.  A
co-worker who knows more than I do about this sort of thing, just
mentioned to me that he thinks that Orion is trying to connect to the
OutsiderEJB before it has been deployed, despite the fact that we have
the Outsider.jar listed before the Insider.jar in our application.xml.
I would really appreciate any help, thanks very much.
--
Jennifer Grechuk
Canlink



Reply via email to