Arun Jain wrote:

> >
> >What about when a collection (or Enumeration) is returned from a finder
> >method?  Seems to me that this would also require explicit narrowing
> >using the PortableRemoteObject.narrow( ) method.  Can someone confirm?
>
> No you don't need to.
>

Just for clarification: Are you saying that the EJB 1.1 spec does not require
the use PortableRemoteObject.narrow( ) be used on objects returned from
collections generated by find methods?

This seems to contradict the natural assumption that you must explicitly narrow
remote references returned from collections. See example below:

Enumeration enum = customer.findWhereAgeIs( 35 );
while(enum.hasMoreElements()){
       Customer cust =
(Customer)PortableRemoteObject.narrow(enum.nextElement(),Customer.class);
       // do stuff with cust
}

Thanks,

Richard

--
Richard Monson-Haefel
EJB Expert for jGuru.com
( http://www.jguru.com  )

Author of Enterprise JavaBeans
Published by O'Reilly & Associates
( http://www.ejbnow.com )

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff EJB-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

Reply via email to