Good question Claire!
Here is the answer:
The narrow() method only needs to be used when a remote reference to an EJB home or EJB object is returned without a specific Remote interface type. This occurs in six circumstances:
a) When an EJB home reference is obtained using the javax.naming.Context.lookup() method:
b) When an EJB object reference is obtained using the javax.ejb.Handle.getEJBObject() method:
c) When an EJB home reference is obtained using the javax.ejb.HomeHandle.getEJBHome() method:
d) When an EJB home reference is obtained using the javax.ejb.EJBMetaData.getEJBHome() method:
e) When an EJB object reference is obtained from a collection returned by a Home interface finder method:
f) When a wide EJB object type is returned from any business method.
The PortableRemoteObject.narrow()method is not required when the remote type is specified in the method signature. This is true of the create() methods and find methods that return a single bean.
Please refer to the link: [ UD: removed link to copyrighted material ]
Thanks
-- Ravi
[ March 30, 2005: Message edited by: Ravindra Janapareddy ]
[ August 03, 2007: Message edited by: Ulf Dittmer ]