• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Narrowing.

 
Swamy Nathan
Ranch Hand
Posts: 187
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Narrowing is not done when we do Session/Entitycontext.getEJBObject().
Is it doene when we do Session/Entitycontext.getEJBHome()?

Narrowing is done when we do Handle.getEJBObject().
Is it also done when we do HomeHandle.getEJBHome()?
[ July 30, 2005: Message edited by: Swamy Nathan ]
 
Jim Janssens
Ranch Hand
Posts: 210
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Narrowing should be done:

- When you lookup the REMOTE home interface of a bean from JNDI
- After you performed a getEJBObject or getEJBHome on a handle/homeHandle
- If you retrieve the EJBObject stored in a collection which was the result from invoking a finder.

note: about the narrowing for the homeHandle, I'm not 100% sure. For the object handle its stated on page 65 in the spec, but I think I read somewhere you should also narrow when getting the home object from the home handle.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic