Win a copy of Java Mock Exams (software) this week in the Programmer Certification (OCPJP) forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

ejb name (5.0)

 
Mirko Bonasorte
Ranch Hand
Posts: 244
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi to everybody,

I'm studying EJB 5.0 with the O'Reilly Book.
At chapter 4, the x.y.TravelAgentBean (stateless session bean) is created.
Then, at the exercises section, a jboss.xml is created, and the ejb name specified is TravelAgentBean.
What decides that the bean name is TravelAgentBean and NOT the fully qualified class name?

Thanks in advances!
 
Mirko Bonasorte
Ranch Hand
Posts: 244
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I mean,
if I try using x.y.TravelAgentBean, the name is not valid.
If I had two SB, x.y.TravelAgentBean and w.z.TravelAgentBean, how can I distinguish the two?

Thanks!
 
Sundaram Karthick
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Refer chapter 14: JNDI ENC and injection, i think in your type of requirement, you will have to mix both anotations and xml declaration

<ejb-jar>
<enterprise-beans>
<session>
<ejb-name>TravelAgentBean</ejb-name>
<ejb-local-ref>
<ejb-ref-name>ejb/ProcessPayment
</ejb-ref-name>
<ejb-ref-type>Session</ejb-ref-type>
<local>com.titan.processpayment.ProcessPaymentLocal</local>
<ejb-link>ProcessPaymentBean</ejb-link>
</ejb-local-ref>
</enterprise-beans>
</ejb-jar>
 
Mirko Bonasorte
Ranch Hand
Posts: 244
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
thanks for the response!
I'm supposed to wait to arrive at chapter 14...
 
What are you doing? You are supposed to be reading this tiny ad!
the new thread boost feature brings a LOT of attention to your favorite threads
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!