• 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

doubt on EJB Home

 
Ranch Hand
Posts: 86
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Guys,
i have just stared to understand the EJB architecture. and what i gained is that whole idea of Home interface is to create/instantiate the bean(stateful) , EJBObject and give back the stub(in serialized form) of EJBObject to the client , so that client can make a call on business methods using that stub.

My question is why we need home interface at all? why cant it be designed with just one interface(EJBObject) , we can register that object of interface with JNDI and client can look up ,get the stub of EJBObject from JNDI and then that stub can be used to create/instantiate the beans with the help of services from container???
 
Ranch Hand
Posts: 62
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Ravi Bansal:
Hi Guys,

My question is why we need home interface at all? why cant it be designed with just one interface(EJBObject) , we can register that object of interface with JNDI and client can look up ,get the stub of EJBObject from JNDI and then that stub can be used to create/instantiate the beans with the help of services from container???




You are absolutely right. As in EJB 3 we don���t have home interface, only we have business interface (almost similar to EJBObject ) and we can do the look up by same only and even we can inject directly by dependency injection (extra rich feature of EJB 3 )

so start exploring EJB 3 instead of EJB2/2.1 .
 
The harder you work, the luckier you get. This tiny ad brings luck - just not good luck or bad luck.
the value of filler advertising in 2020
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic