Hi again,

-So the performance hit you're trying to overcome is that of having a db r/w 
for each field? -And use a transaction for the setData/getData method so 
that all fields are read/written in one shot? If that's it, I'm with you.

I think the problem of having the generated data objects support relations 
is that all data must be loaded into them. What if you have a long chain of 
relations between beans/tables. How far do you go? You might end up loading 
the entire database into the dataobjects, and that would be a pretty nasty 
performance hit ;-)

The way I see it there are two solutions if you absolutely have to do 
everything in one transaction:

1) Do it the way you're doing it today, with a helper class to establish 
relationships on the dataobjects. Perhaps XDoclet could generate such 
classes?

2) Have multiple setData/getData methods accepting different structures of 
data objects. (Not possible in today's XDoclet). It would be like this:

setDataEmployeeOnly( EmployeeData d );
setDataEmployeeAndDepartments( EmployeeData d );
setDataEmployeeAndDepartmentsAndProjects( EmployeeData d );

Likewise for getters. It seems like a difficult one to implement if you ask 
me.

Am I making any sense at all?

Aslak


>From: "Glenn R. Kronschnabl" <[EMAIL PROTECTED]>
>To: [EMAIL PROTECTED]
>Subject: Re: [Xdoclet-user] Data Objects and CMR
>Date: 13 Dec 2001 11:32:45 -0600
>
>I wonder if this is "the right way".  If you use EJBLocal's without
>dataobjects via JSP/taglibs, what transaction type do you use?  If you
>use "required" on each of the fine grained getter methods, each fine
>grained get method will result in a database read/write.  If you use
>"supports" then the result is vendor specific.  Under weblogic, an
>unspecified tx results in a local tx on the entity bean, again, a db
>r/w.
>
>Given the performance hit, I think we're always going to need value
>objects... unless I'm missing something or I don't understand tx's.
>
>Glenn
>
>On Thu, 2001-12-13 at 07:40, rinkrank clob wrote:
> > My understanding of the EJB 2.0 spec is that remote entity beans are
> > "deprecated". You should only use local entity beans.
> >
> > Data objects were invented mainly to avoid calling remote entity beans 
>and
> > reduce network traffic. Therefore, if remote entity beans are not used, 
>I
> > don't see the reason to use data objects either. Just use the local 
>entity
> > beans (which have the CMR support, right?).
> >
> > In other words, my understanding of EJB 2.0 is that data objects go down 
>the
> > drain with remote entity beans. You'll never need them again. Would this
> > work for you? I know you're a local-fan ;-)
> >
> > My 2 cents on J2EE patterns ;-)
> >
> > Aslak
> >
> > >From: "James Higginbotham" <[EMAIL PROTECTED]>
> > >To: <[EMAIL PROTECTED]>
> > >Subject: [Xdoclet-user] Data Objects and CMR
> > >Date: Wed, 12 Dec 2001 20:23:28 -0600
> > >
> > >Anyone out there using CMP 2.0 and container managed relationships 
>(CMRs)
> > >with XDoclet? How are you handling the data objects being generated 
>without
> > >relationships? My guess is that I would write a simple class to wrap my
> > >master and detail objects, but this somehow seems wrong.
> > >
> > >For example, I have a UserAccountData, UserPhoneData, and 
>UserAddressData.
> > >Right now, it is a 1-1 mapping, so I would create a UserAccountModel, 
>which
> > >held 1 reference to an instance of each. My stateless session bean 
>would
> > >then accept the model in its createAccount() method and create the 3 
>CMPs
> > >appropriately.
> > >
> > >Anyone have any suggestions on this?
> > >
> > >Thanks,
> > >James
> >
> >
> > _________________________________________________________________
> > Get your FREE download of MSN Explorer at 
>http://explorer.msn.com/intl.asp.
> >
> >
> > _______________________________________________
> > Xdoclet-user mailing list
> > [EMAIL PROTECTED]
> > https://lists.sourceforge.net/lists/listinfo/xdoclet-user
>
>
>
>_______________________________________________
>Xdoclet-user mailing list
>[EMAIL PROTECTED]
>https://lists.sourceforge.net/lists/listinfo/xdoclet-user


_________________________________________________________________
Send and receive Hotmail on your mobile device: http://mobile.msn.com


_______________________________________________
Xdoclet-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/xdoclet-user

Reply via email to