Hi

I was wodering if anybody can give me advice on a good
pattern or convention to retrieve large amounts of date
from a container.

To explain my current setup:
I have two entity beans called Contact and Organization
(used for a contact management system).  I have a jsp
frontend that makes use of the jakarta struts framework.
For each jsp page there is a model which is a simple
bean with get and set method.  For every action there
is a action bean that takes the model (bean) as a argument
and populates it with the required data.  This model is then
used by a jsp page in order to be displayed or edited.

It is fine if I only want to work with one enitity bean
for example Contact.  The request will simply specify
a Contact id, the Contact remote interface would be retrieved
and the Contact bean can be updated.  My problem is that what
happens if I want to see all the Contacts that belongs to
certain organizations.  I cannot return 100 remote interfaces
that I iterated through, for that will mean a RMI call each
time I want to access a row of data.  The alternative would
be to have a ContactUser session bean that directly qeuries
the database and construct an imutable list of all the data
found.  In this way, it's a pure data extracton operation.
If then one of the rows (entity beans) needs to be modified
I can use the primary key of that bean, retrieve the remote
interface, and set/get information.  The point I'm trying
to make is many times if a you list, lets say a 1000 records,
you do not need all the information in that entity bean, probably just
one field or a combination of fields from diffrent entity beans.

Is this a good way to do it or does the J2EE architecture
specify a convention or pattern for this situation.

Thanks in advance
Manie Coetzee



--
--------------------------------------------------------------
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
Problems?:           [EMAIL PROTECTED]

Reply via email to