> First is whether or not data objects are enabled by default. > Since the > momentum already exists around data objects, I'm in no position to > recommend more work for people. (I just hope I can get the > behavior to > work defining the "@ejb:data-object container=false" in a > base class and > all the subclass entities listen to that.) I'll go to the work of > turning it off in all my code, and it won't affect my endorsement of > xdoclet to my team. No biggie.
I agree the data-object as itself is not really helpful when trying to build more and more ejb with relationships between them and having to return different kinds of data-object. The spec even recommends that client view of an entity is not related to the internal of the entity itself, what could simply says that data-object sucks. If you have an Order and OrderLine ejb (and a Product and a Pricing, and ...), you can have a lot of data object to maintain by hand, xdoclet could find a place here to help build automatically this data-objects. First I would say that generation of data-objects should be separated from entity bean design. Then if you use HashMap/XML to build them, a solution could be found. Then a "mix" task could mix generated data-object (or HashMap inside session or ...) and the entity bean to avoid re-coding everywhere. Do you agree here ? I tried to do that using custom tags but I am very far from a good solution. I can only generate as much as data-object as I want when getter/setter name on data-object match a getter method on entity bean. I did not take relationship into account yet. I can also say that a special detail object is constructed by direct sql inside a "catalog" home method to avoid finder method overhead. Discussing that on a public list like this is really needed to be sure to take all developers wishes into account. Be sure it will be a long and painful way ;) Be sure also we will be able to do 'anything' with that like optimistic locking on field level, lazy/early load on related beans, ... I was in the starting block, you started the countdown. I would begin first by a new Tag to create data-object, a JavaBean really. This could (but couldn't) be related to a EntityBean in which a tag on a getter method says that this attribute must be redefine in this data-object. Then we need Factory method on this data-object, i listen to your proposal here as I personnally create a get765thDataObject() on the entity bean, but this seems no more a good thing with service facade around entity beans called by local interfaces. Regards. Vincent. _______________________________________________ Xdoclet-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/xdoclet-devel
