Win a copy of OCP Oracle Certified Professional Java SE 11 Developer Practice Tests this week in the OCP forum!
  • 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Tim Cooke
Sheriffs:
  • Devaka Cooray
  • paul wheaton
  • Mark Herschberg
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Frits Walraven
  • Jj Roberts
Bartenders:
  • Carey Brown
  • salvin francis
  • Piet Souris

EJBHome getEJBhome():narrowing is required here?

 
Ranch Hand
Posts: 77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 250
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Sawan. But, any examples where this method is used for Stateless session bean.

Thanks,
Prashant
 
They weren't very bright, but they were very, very big. Ad contrast:
the value of filler advertising in 2021
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic