On Wed, 5 Dec 2001, Vincent Harcq wrote:

> OK, I just wanted to kill this data-object problem.

[snip]

> With ejb2.0 you can use local access and play with entity beans between
> them, via session and mdb in same jvm (gooood)
> They are still needed for client (web,swing,soap, ...) access to the ejb
> container to "maintain" entities : create-read-update-delete.
> This raises a tons of critics to data-object.

yep, fair enough

> If I have a Struts form that have 3 fields(day-month-year) for a date
> that need to be stored in the entity bean why should the entity be aware
> of that, and why should I not be able to create these 3 fields by
> xdoclet in an automatic way if I have a web client but only one field if
> I have a swing client
> If I need a Collection of order data-object to show a list to the user
> why should I need to put the lines inside this object if I don't show
> them, but when I see one order then I need its order lines, so 2
> different data-objects
> Etc....

understood

> If this off topic for you all on this list, I will shut up :-)

not for me... I was more worried about what I was saying being too ot (o:

> > the way I see it, I dont see why the container isn't able to 
> > provide this sort of query support.  
> 
> Yep, a real Persistance Manager inside a EJB container, my dream ;-)

absoluelty (o:

> Jboss (hey that's the only where we can see the internals) is not far
> from that,
> You can avoid n+1 problem with read-ahead
> You can cache entity bean with commit-option A
> But it will hit the database for the query
> And I still need to transform my collection of entity beans to a
> collection of data-object to send to the client.  If I early-load this
> data-object inside the entity bean I can avoid the overhead, so come to
> something as fast as direct sql.

but you still then lock the beans... am I being overly worried about this
you think?  I was looking for a way to do a pure query of the "last known
state" and have that provided by the container... what you have below
looks good though...

> I Agree completely.
> I have done that :-)

thankyou!  I will spend more time looking at it at some stage... going
into purist mode though - this ought to be done by the container
yes?  back into real world mode, who cares who does it as long as you dont
_write_ the code yourself, yeah?  (o:

[code snipped]

> > my real problem though is what to do with relationships... 
> > should I try to be super clever and do the sql for the joins, 
> > or should I just wear the performance hit of having to do 
> > multiple queries?  
> 
> I don't have that :(

hehe... any thoughts?

> Imnsho telling that we need an sql remapping for finder method is the
> same as telling that entity bean is bullshit.

but entity bean isn't everything... if I want to display the catalogue of
products, I dont want to have to lock every item in the catalogue to
extract data...  you have done it as a home interface method right?  so
have I, but the code is in the container.  I agree that I should be able
to re-use the data in the jboss cache, but dont know enough to do it, so
went the re-use of sql approach instead...

> With a good container, finder methods should be as fast as writing sql
> by hand
> Does entity developement still need sql ? Yes
> Will it make entity bean survive ? No
> The developer should forget that a database is behind, should even not
> know that a database is behind
> The deployer have db knowledge and do the sql query with the info the
> developer gives him.

agree agree agree agree 

> > personally I think something like this would go a long way 
> > towards removing criticism of entity beans... I suppose the 
> > reason I'm writing this here is that you guys seem to have 
> > different view of the whole data object thing, so I'm 
> > wondering if some of that might show me a better option.
> 
> I tried to look at how externalize Jboss JAWS on my spare time to be
> able to reuse it outside EJB.
> If days could have 48 hours...

hehe...

> I think again MVCSoft/Daniel O'Connor (respect!) is going this way

must look...

> Another way could be JDO as persitance maneger (inside ejb container)

yes... when its finally available... I mean, _properly_ available... 

anyway, thanks for the feedback and code - much appreciated.

cheers, and g'night
dim




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

Reply via email to