• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

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.
 
No prison can hold Chairface Chippendale. And on a totally different topic ... my stuff:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic