Folks,


Having read through the discussions here and on serverside I am still a bit
unsure on how to proceed.

I am designing an app that displays a list, allows the user to choose an
item from the list, and then allows creation, modification or deletion of
list items. Pretty standard stuff...

I have modelled the list items as an Entity Bean.


My questions are:

1. The list. How best to encapsulate a query that may be quite long (10,000
rows)?

   Should this be done in a Session Bean hitting the DB via a DAO?
   Or is there another "standard" way to do it?


2. Using SessionBeans as a facade to an EntityBean.

   The EntityBean has the standard Create, Read, Update, Delete
functionality.

   Taking the "session beans are actions, entity beans are objects"
paradigm, how should I wrap the entity beans?

   Should there be 1 SessionBean for each action. e.g. separate
"CreateItem", "DeleteItem" Session Beans?
   Or should there be one SessionBean with 4 methods?




Thanks in advance...



Adam




-----Original Message-----
From: A mailing list for Enterprise JavaBeans development
[mailto:[EMAIL PROTECTED]]On Behalf Of John Harby
Sent: 22 June 2001 14:16
To: [EMAIL PROTECTED]
Subject: Re: Why Shd i lookup Entity Bean through Session Bean


There is a good deal of discussion on this at
http://www.theserverside.com/patterns/thread.jsp?thread_id=625#23858

I think the session facade pattern is proving more and more useful
especially with the local reference addition.

>From: Sanjay Saluja <[EMAIL PROTECTED]>
>Reply-To: Sanjay Saluja <[EMAIL PROTECTED]>
>To: [EMAIL PROTECTED]
>Subject: Why Shd i lookup Entity Bean through Session Bean
>Date: Thu, 21 Jun 2001 23:40:58 -0700
>
>Hi All
>
>I have a simple architecture where in my JSP has to insert a record in DB.
>I do a lookup on Session Bean first in my JSP.
>I do lookup on EntityBean in my session bean.
>I insert a record through EB.
>
>In this whole flow, i am adding one more layer of overhead by using Session
>Bean.
>I can directly lookup for EB in my JSP and enter a record.
>
>Is there any advantage of using SessionBean in between.
>
>Thanks
>Sanjay Saluja
>

_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.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".

Reply via email to