Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

EJBHome getEJBhome():narrowing is required here?

 
Prashant Neginahal
Ranch Hand
Posts: 77
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

Is narrowing required on return object(EJBHome) when we call getEJBHome() on EJBObject stub?

I assume this method usage is much less with stateless bean when compared to statefull bean and entity bean. Because we have different way of creating beans here which is NOT in statless bean.Hope i m right. If somebody has more information about this method usage, please share with me.

Thanks,
Prashant
 
sawan parihar
Ranch Hand
Posts: 250
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
The narrow() method is used when a remote reference to an EJB home or EJB object is returned without a specific Remote interface type. That means in following cases:

1) when you do lookup
2) when getting home or remote interface from the handles.
3) Get the home from EJBMetaData
4)When getting EJB object in a collection returned by a Home interface finder method
5) EJB object is returned from any business method


Except these cases you don't ned narrow.

sawan
[ April 23, 2005: Message edited by: sawan parihar ]
 
Prashant Neginahal
Ranch Hand
Posts: 77
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Sawan. But, any examples where this method is used for Stateless session bean.

Thanks,
Prashant
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic