Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Where we need to use ejb-ref?

 
Raghunath Nandyala
Ranch Hand
Posts: 64
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi
In which scenario we can use ejb-ref in dd.

I can directly go for jndi lookup to access ejb.

what makes the difference in the above usages?

Please let me know

thanks
Raghunath N
 
Raghunath Nandyala
Ranch Hand
Posts: 64
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi

Please any ideas please..

Thanks
Raghunath
 
Ugender Rekulampally
Ranch Hand
Posts: 135
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Raghunath,
yes, you are correct. you can access other beans by using just JNDI instead of mentioning ejb-ref in the DD.

But if you use ejb-ref in the DD, the deployer will know that the current bean depends on a particular bean so that he will get some idea about that. and its nice way to say that this bean tied with another bean instead of look in the code to figure that out.

and another reason is, Container will help calls response faster by tying together.

but you still have to use JNDI lookup to get the access to the bean you mentioned in ejb-ref.

Thanks,
Ugender
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic