I solved the problem .
I've built a stateless Session bean that returns me the Collection
of Strings, taken from DB.
As a matter of fact when you use Entity beans whatever you
put in the Collection it will be converted to Stubs, so even if
you are allowed to return a Collection of Strings, when you
try to access that Collection on the client side you only
get the stubs and you cannot cast them to String!
Bye
Francesco
----- Original Message -----
From: francis pouatcha <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, November 21, 2000 4:29 PM
Subject: Re: A Find method with a "pure " Collection
> Hi,
>
> Is FindElements a method of the home or the remote interface? Can u send
> us your code.
>
> /Francis
>
> Francesco Marchioni wrote:
> >
> > Hi all,
> > I have the following problem: I've built a Find method which returns
> > a "pure" Collection of Strings: the Collection is built in this way:
> >
> > Collection FindElements() {
> > .........
> > Collection vec = new Vector();
> > vec.add(resultSet.getString(1));
> > vec.add(resultSet.getString(2));
> > .......
> > return vec;
> > }
> >
> > The problem is, when I try to browse the Collection on the client side,
> > I cannot cast back to String because the object inside the Collection
> > becomes a stub! at least that's what I got If I try to do a getClass()
> > with the elements of the Collection.
> > So it's not at all possible to return "pure" Collections, whose
> > elements are Strings, Integer ? do I need at any cost to return PK
objects?
> > thanks a lot
> > Francesco
> >
> >
===========================================================================
> > 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".
>
> --
> [EMAIL PROTECTED]
>
> MATHEMA Software GmbH
> N�gelsbachstra�e 25 b
> 91052 E r l a n g e n
> D e u t s c h l a n d
> Tel +49(0)9131/8903-0
> Fax +49(0)9131/8903-55
> http://www.mathema.de
>
>
===========================================================================
> 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".