As far as i have read , you will need to use PortableRemoteObject.narrow in order to
CORBA apps. As Corbas does not support Casting.
Errol Fernandes - x2924
( Netstar Group. )
>>> "Tye, Tim" <[EMAIL PROTECTED]> 12/01 9:48 AM >>>
-----Original Message-----
From: Vlada Matena [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, November 30, 1999 11:50 PM
To: [EMAIL PROTECTED]
Subject: Re: PortableRemoteObject.narrow
With EJB 1.1, you will need to use PortableRemoteObject.narrow to
convert the objects in the collection to the remote interface type. A direct
Java cast may work on some vendors' products but a portable client should
use the PortableRemoteObject.narrow for type narrowing of the objects
returned in the collection.
We understand that the use of PortableRemoteObject.narrow is not the
most natural programming style for a Java programmer, and hope to find
a better solution in a later EJB release.
Vlada
----- Original Message -----
From: Richard Monson-Haefel <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, November 30, 1999 1:16 PM
Subject: Re: PortableRemoteObject.narrow
> 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".
>
>
===========================================================================
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".
===========================================================================
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".
===========================================================================
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".