This week's book giveaway is in the Kotlin forum.
We're giving away four copies of Kotlin in Action and have Dmitry Jemerov & Svetlana Isakova on-line!
See this thread for details.
Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Advantages/Functionalityes of Home Interface..  RSS feed

 
Gurumurthy Ramamurthy
Ranch Hand
Posts: 273
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Guys and Gals,
We all know that Home interface is for JNDI lookup for EJBObjects, creation, destroying and server side Proxy for the business objects. Is there any other functionalities/advantages of Home Interface?
Regds,
Guru
 
Lasse Koskela
author
Sheriff
Posts: 11962
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well, you can also write "home methods" into the interface.
 
Naveen Kuppili
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It acts as an object broker in a classic persistance pattern. So, it is factory for creating new instances of the EJBs. Some of the common functionality that Home interface provides is setting context for EJBs, doing security checks, etc. You can also use it for querying EJBs.
It DOES NOT act as a proxy for business objects. The business interface (remote / local interface if a BI is not present) is the proxy for the EJB.
Originally posted by Gurumurthy Ramamurthy:
Guys and Gals,
We all know that Home interface is for JNDI lookup for EJBObjects, creation, destroying and server side Proxy for the business objects. Is there any other functionalities/advantages of Home Interface?
Regds,
Guru
 
Gurumurthy Ramamurthy
Ranch Hand
Posts: 273
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dear Lasse Koskela,
What do you mean by home methods here?
Regards,
Guru
 
Lasse Koskela
author
Sheriff
Posts: 11962
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Home methods are methods defined in a bean's EJBHome interface that operate with multiple bean instances (versus "regular" EJB methods which operate only on the referenced bean instance). Here is a nice explanation with an example scenario.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!