It would appear to be much easier just to make a call the JDBC to retrieve the
data, and send the relevent (or subset of the )data back to the client, i.e name
and description (and PK). This is a read-only JDBC call, and will not effect
container managed persisitence. This data could be sent back in some simple
class representing such properties. The client side code obviously want's to
contain the elements in a client side list (or display them is a list/table in
the GUI).

Once a individual entity's full data (as opposed to the data that is required in
a list) is required then the EJB Home interface can provide a reference to the
actual bean entity (then behind the scenes the object may be activated from the
pool). This means you go through the bean and not JDBC to get all the relevant
information from the database.  Remember it should not just be performant for a
1000 items but  10,000, 100,000 or whatever.

Ed.

Eric Yu wrote:

> But at the end of the day, when Daniel is populating his list of 1000 found
> items for the user to choose from, I'm assuming he still needs to invoke a
> method on each and every found EJB object to get, e.g. a Description --
> which would still cause an EJB object activation/instantiation/or whatever ?
>
> One could have a separate EJBean which just manages retrieval of these
> display properties with mapping to a PK (e.g. a Session bean which others
> have suggested).  But if you only want to use the finder methods and need
> some info from each bean to display, I can't see how you get around some
> sort of bean-by-bean activation (even if the container is smart enough to do
> "lightweight" activations).
>
> - Eric Yu
>
> > -----Original Message-----
> > From: A mailing list for Enterprise JavaBeans development
> > [mailto:[EMAIL PROTECTED]]On Behalf Of Imre Kifor
> > Sent: Tuesday, May 11, 1999 10:13 AM
> > To: [EMAIL PROTECTED]
> > Subject: Re: Is something missing in the actual EJB
> > SPECS?Willthenextversion solve this?
> >
> >
> > Daniel,
> >
> > >In spec 1.1, we can read at 9.3.2 p135
> > >
> >
> > ...
> > >If the ejbFind<METHOD> method returns a collection of
> > primary keys, the
> > >implementation of the find<METHOD>(...) method must create a
> > collection of
> > EJB
> > >objects for the primary keys, and return the collection to
> > the client.
> >
> >
> > It is not required that all objects be created when the collection is
> > returned. The idea behind collection iterators is that they allow lazy
> > creation of element references.
> >
> > Imre Kifor
> > Valto Systems
> >
>
> ===========================================================================
> 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".

Reply via email to