Win a copy of The Business Blockchain this week in the Cloud forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Relationships doubt

 
William Silva
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Folks,
I have a EJB named EJB1 that is in a jar file named ejb1.jar
I have a EJB named EJB2 that is in a jar file named ejb2.jar
I need to do a relationship between EJB1 and EJB2. Then I have to do
jar file with EJB1 and EJB2 named relationship1.jar, for example.
Now I have another EJB named EJB3 and I need to do a relation with EJB1.
MUST I put ALL the EJBs in the same jar file ???
Thanks,
William.
 
Dean Oso
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
yes
 
William Silva
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I think that it is serious a problem.
If I have a big system named S1, with a big ejb-jar.xml and another named S2. I will have a very big ejb-jar.xml if I make a relation between two EJBs, one from S1 and the other from S2.
Thanks,
William.
 
Aleks V. Pascoal
Ranch Hand
Posts: 73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think there is no way out of this, because the relationship must be declared in the ejb-jar.xml so all the beans must be in the same jar.
Well, in the ejb-ref, ejb-link you can refer to beans in another jar, so maybe you can do the same with relationships.
Ex:
<ejb-ref>
<description/>
<ejb-ref-name>Bean</ejb-ref-name>
<ejb-ref-type>Session<ejb-ref-type>
<home>BeanHome</home>
<remote>BeanRemote</remote>
<ejb-link>../aleks/outrosBeans/bean.jar#BeanName</ejb-link>
</ejb-ref>
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic