• Post Reply Bookmark Topic Watch Topic
  • New Topic

can an business interface have more than one EJB class

 
yogesh srinivasan
Ranch Hand
Posts: 55
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I tried it and deployment is successful but unable to trigger multiple ejb uniquely.
Please give my some information about this ?
 
Ram Narayan.M
Ranch Hand
Posts: 247
Chrome Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Its possible to refer more than one bean provided that separate entry should made for each bean in "ejb-jar.xml" ... Each bean will have an entry in JNDI.

Just for instance

With the same component or business interface "UserDetail" ... It can be implemented by BankSiteUsers and FimSiteUsers bean...

In ejb-jar.xml,

<enterprise-beans>
<session>
<display-name>StatefulSessionBean</display-name>
<ejb-name>Tester</ejb-name>
<home>ejb.session.UserDetailHome</home>
<remote>ejb.session.UserDetail</remote>
<ejb-class>ejb.session.BankSiteUsers</ejb-class>
<session-type>Stateless</session-type>
<transaction-type>Container</transaction-type>
</session>


<session>
<display-name>StatefulSessionBean</display-name>
<ejb-name>Tester</ejb-name>
<home>ejb.session.UserDetailHome</home>
<remote>ejb.session.UserDetail</remote>
<ejb-class>ejb.session.FilmSiteUsers</ejb-class>
<session-type>Stateless</session-type>
<transaction-type>Container</transaction-type>
</session>

</enterprise-beans>
 
yogesh srinivasan
Ranch Hand
Posts: 55
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks for the info
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!