• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Bear Bibeault
  • Henry Wong
  • Devaka Cooray
Saloon Keepers:
  • salvin francis
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Frits Walraven
Bartenders:
  • Jj Roberts
  • Carey Brown
  • Scott Selikoff

Confusion regarding EJBObject??

 
Ranch Hand
Posts: 10198
3
Mac PPC Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Guys,

There is a method in the EJBObject interface that says EJBHome getEJBHome(), I'm not able to understand how we can do this. How will the bean give a reference to its Home...Please anyone explain me.

Thanks in advance.
 
Ranch Hand
Posts: 502
jQuery Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Think about it, you got reference to EJBObject(component interface) through EJBHome. now you are in the middle of executing business method in that bean using EJBObject. Now think that you have lost reference to your EJBHome and you want to create another bean to do someother business operation. In this scenario, if this helper(getEJBHome()) method isn't there, again you need to go through JNDI to get reference to EJBHome. Intead you can use getEJBHome() method. This is the reason why? EJBObject has this getEJBHome() method.
 
Joe San
Ranch Hand
Posts: 10198
3
Mac PPC Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Prabhu,

Thanks for the explanation, could you please explain it using an example as I'm just a beginner in EJB. I would be very thankful to you if you can give me an exampled version of your above explanation.

Thanks in advance.
 
These are the worst of times and these are the best of times. And this is the best tiny ad:
the value of filler advertising in 2021
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic