• Post Reply Bookmark Topic Watch Topic
  • New Topic

ejb-ref  RSS feed

 
Hari babu
Ranch Hand
Posts: 208
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I read in Haefal book that <ejb-ref> is used to access the ejb by eliminating network specific and implementation specific use of JNDI to obtain reference.
What do we mean by the "eliminating network specific and implementation specific use of JNDI to obtain reference".
2nd question
Suppose i have an EJB "A" deployed in weblogic, which in turn wants to access the EJB "B" deployed in Websphere. how do i do that ? Can i use <ejb-ref> in this case and how does the code in "A" access the "B" ?
Please help
Hari
 
Chris Mathews
Ranch Hand
Posts: 2712
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The <ejb-ref> tag is used so that you don't have to hardcode the JNDI name of your EJBs. That's it. I find that I rarely hardcode this information anyways because I normaly use the fully qualified name of the class as the JNDI name and use reflection to perform the lookup. Best of both worlds: no hardcoding and no messing with descriptors.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!