Hi Perry,

I don't know who are you talking to ;), but I had to face a similar
problem so...
We recently developed an application using the Model2 approach following
aproximately the same pattern you described and using EJB. Our first
straight forward implementation used to put the resulting EJBeans in the
request so the JSP page would be able to use them. But then we were
getting in trouble because every call to the EJBean from the JSP page to
retrieve the name, address... whatever was being translated into an RMI
call so we were having too much useless RMI traffic. So we ended up
creating a lightweight version of the EJBeans, called VOBean (ViewOnly)
that just has the get methods and produces no RMI traffic. We created a
small utility to fill up this VOBeans automatically through reflexion
and alehop!
I wish there were something in EJB to avoid having to go through the
network when you are in the same JVM, but...
Regards,
Dan
-------------------------------------------
Daniel Lopez Janariz ([EMAIL PROTECTED])
Web Services
Computer Center
Balearic Islands University
-------------------------------------------

Perry Hoekstra wrote:
>
> Yes, in the general "design patterns" sense.  My bean classes have no
> knowledge
> that they are being used in a servlet/JSP environment (that is, they have no
> imports for javax.servlet.* or javax.servlet.http.*).  The beans can in fact
> be
> custom JavaBeans, or remote references to EJB entity and session beans.
>
> Through this conversation, it was my impression that in your world:
>
> 1. A form comes in (use the standard e-Commerce Customer form) through a
> HTTP request.
>
> 2. The ControllerServlet determines what needs to be done and invokes the
> appropriate action procedure.
>
> 3. The action procedure sets the properties of the Customer JavaBean and
> calls validate.
>
> 4. Things churn and you get the thumbs-up/thumbs-down sign from Customer
> JavaBean.
>
> 5. In either case, it is necessary to pass the results of the processing (in
> this case: customer data) to the next page (either results page or data
> entry error page) through session/request beans.  My question is: is the
> Customer JavaBean that was just used in the validation processed embedded
> into the session that will be passed or a lighter-weight subset?
>
> The reason I ask is that Customer JavaBean used by the Adapter/Action
> procedure would be a heavy object (poor term I know) with business logic,
> reference to EJBs/or database, etc.  I was wondering if you passed an
> immutable Customer JavaBean that just implemented getXXX methods because the
> JSP page would only displaying the results? Or doesn't it matter?
>
> Perry Hoekstra

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
FAQs on JSP can be found at:
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html

Reply via email to