Win a copy of Practical SVG this week in the HTML/CSS/JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Why Home interface ?

 
Kaustubh Patil
Ranch Hand
Posts: 164
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Why do we have two remote interfaces for a remote bean viz. Home and Component ? Why cannot the client directly do a lookup on the component interface rather than a Home? And anyways the home is useless after the client gets hold of the EJB Object.
 
Peter Rooke
Ranch Hand
Posts: 852
1
Java Linux Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
A home interface is there to provide factory facilities. Component interfaces allow access to individual EJB�s.

A home interface typically returns one or more component interfaces. The home interface can still provide useful methods, which could not exist in each of the component interfaces.
 
Pradeep bhatt
Ranch Hand
Posts: 8933
Firefox Browser Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Why cannot the client directly do a lookup on the component interface rather than a Home


If that is the case , how are you going to create new instances ? Does lookup mean a new instance creation? No.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!