struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Deadman, Hal" <>
Subject RE: Stupd question about Struts and EJB.
Date Tue, 27 Feb 2001 22:22:11 GMT
I use EJBs without using copyProperties although it's a matter of
preference. I have a set of JavaBeans that you could call "Data Beans"
because they are often similar to my Entity Beans and they don't contain any
business logic. They are struts free and I pass these data beans to some EJB
components. I often nest the data bean inside the ActionForm class as a
property and use the Struts nested property functionality to populate the
Data JavaBean directly. Sometimes I don't use a nested JavaBean and I just
pass the individual properties of the form to the EJB component. I like
using nested java beans better than calling copyproperties because if I have
a Databean anyway, I don't want to have to redefine lots of getters and
setters in the Struts form bean. 

-----Original Message-----
From: Nick Pellow []
Sent: Tuesday, February 27, 2001 5:23 PM
Subject: Re: Stupd question about Struts and EJB.


Robert Leland wrote:
> As far as struts 1.0, the Form bean is used only to redisplay
> information to the jsp page. Typically the EJB might be loaded/unloaded in
> action class. If you search,m Craig talked more about
this in detail.

My understanding is that with struts you should keep your EJBs entirely
independant of
anything to do with struts or servlets. You can and should however have
a standard naming
convention for the getters and setters across the EJB, the ActionForm
and the html form elements.
this allows you to call PropertyUtils.copyProperties(java.lang.Object
dest, java.lang.Object orig)
when you are ready to store the details entered by the user.

Please let me know if this does not sound right.


> In future version of struts this may be enhanced.
> -Rob
> > Cameron Ingram0 wrote:
> >
> > I am in the process of convincing my company to go with MVC and Struts.
As with any thing new,
> > people are sometimes resistant
> > to change. One of the opposition questions I am getting is, how will
this work with EJB(problem is
> > I don't know too much about EJB currently).  Do the EJB's references
just go in the Form and
> > Action Bean and every thing else behaves the same? Are there any obvious
points that I can bring
> > up on the subject?
> > Any help on this subject would be much appreciated!
> >
> > Thanks, Cameron Ingram

View raw message