Seems to me the real solution would be to put a session layer between the
entity and session beans.  The sesion layer would expose a serializable
JavaBean that the form could wrap, and the session bean would be
reponsible for building and processing the serialiable bean.  Trying to
get struts to do all thios for you prevents you from interjecting any
business logic into it at all.


Adam Young
Lead Programmer
RTZ Associates
510-986-6700


-----Original Message-----
From: "Brian Topping" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Date: Wed, 10 Jul 2002 19:36:02 -0400
Subject: RE: Re: Struts + EJB ?

> > -----Original Message-----
> > From: Manfred Wolff [mailto:[EMAIL PROTECTED]]
> > Subject: AW: Re: Struts + EJB ?
> > 
> > I use Struts, Tomcat, JBoss, XDoclett, PostgreSQL, Ant, Log4J 
> > in a 5 "person
> > year" project (not large but not small also) and it works really
> fine.
> 
> Manfred,
> 
> Are you using Xdoclet <strutsform/> tags?  If so, could you explain how
> you
> are using them with complex forms that manipulate many beans?  So far,
> I have
> been using the simple case of a single entity bean mapping to a single
> form,
> but this doesn't scale to more complex forms.  
> 
> Last night I was considering changes to Xdoclet allowing for a single
> form
> name to be referenced by multiple entity classes, and the form that is
> generated would have value objects for all of these classes in a
> containment
> therein.  Then, for every method-level @struts:form-field tag, the
> corresponding encapsulation would be generated into the form object. 
> The
> encapsulation would simply be a call-through to the correct class and
> method
> of the contained value objects.  If the FormAction is considered as a
> part of
> the controller, the pattern is maintained.
> 
> But your email has me considering that this might encourage bad design,
> that
> in fact the form should be sent in a valueobject down to a session, and
> have
> the session deal with the business logic of how to manage the form
> contents.
> This would imply that your designs are using @struts:form-field tags in
> the
> session object and having it do all of the entity manipulation.
> 
> Interested in your thoughts...
> 
> Brian
> 
> --
> To unsubscribe, e-mail:  
> <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
> <mailto:[EMAIL PROTECTED]>
> 



--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to