Hi,
cut from the orion-ejb-jar.xml for the contact entity bean, notice that the entity-ref tag refers to salutation, not preferredLanguage as expected;
We have built an entity bean that simply describes
a lookup item, we have deployed it (the same classes) a number of times with
different ejb-names and all seemed good, however I have just traced the root of
an issue to the orion-ejb-jar.xml file, below illustrates whats
happening;
From the lookup beans deployment descriptor, notice
that the same classes are deployed twice with different names;
<entity>
<ejb-name>salutation</ejb-name>
<home>com.chryxus.ejb.lookup.LookupHome</home>
<remote>com.chryxus.ejb.lookup.Lookup</remote>
<ejb-class>com.chryxus.ejb.lookup.LookupEJB</ejb-class>
<reentrant>False</reentrant>
<persistence-type>Container</persistence-type>
<abstract-schema-name>.Lookup</abstract-schema-name>
<prim-key-class>java.lang.String</prim-key-class>
<primkey-field>uoid</primkey-field><cmp-field><field-name>uoid</field-name></cmp-field>
<cmp-field><field-name>value</field-name></cmp-field>
<cmp-field><field-name>lmd</field-name></cmp-field>
</entity><entity>
<ejb-name>preferredLanguage</ejb-name>
<home>com.chryxus.ejb.lookup.LookupHome</home>
<remote>com.chryxus.ejb.lookup.Lookup</remote>
<ejb-class>com.chryxus.ejb.lookup.LookupEJB</ejb-class>
<reentrant>False</reentrant>
<persistence-type>Container</persistence-type>
<abstract-schema-name>.Lookup</abstract-schema-name>
<prim-key-class>java.lang.String</prim-key-class>
<primkey-field>uoid</primkey-field><cmp-field><field-name>uoid</field-name></cmp-field>
<cmp-field><field-name>value</field-name></cmp-field>
<cmp-field><field-name>lmd</field-name></cmp-field>
</entity>
from the entity beans deployment descriptor
snippet describing the relationship between contact and its preferred
language;
<cmp-field><field-name>preferredLanguage</field-name></cmp-field>
<ejb-ref>
<ejb-ref-name>ejb/preferredLanguage</ejb-ref-name>
<ejb-ref-type>Entity</ejb-ref-type>
<home>com.chryxus.ejb.lookup.LookupHome</home>
<remote>com.chryxus.ejb.lookup.Lookup</remote></ejb-ref>
cut from the orion-ejb-jar.xml for the contact entity bean, notice that the entity-ref tag refers to salutation, not preferredLanguage as expected;
<cmp-field-mapping name="preferredLanguage">
<entity-ref home="salutation">
<cmp-field-mapping name="preferredLanguage" persistence-name="preferredLanguage" />
</entity-ref>
</cmp-field-mapping>
Has anyone else seen this problem?
Can anyone tell me if this is a real issue or are
we in the wrong for deploying the same classes multiple times (I hope not as it
save a lot of duplicated code)?
It can be resolved by editing the orion-ejb-jar.xml
file but I would prefer not to.
Regards
Evan