David,

yeah, I see your point.

again I'm not 100% sure, but I think that value objects do (or at least
there's no technical reason why they couldn't) support the requirement you
put for pulling part of the cmr's data.

However, as you obviously prefer having the value object creation done in a
SLSB factory (and I can see the merits in your argument) that shouldn't be
too hard to do.  The real question is what would drive the design.  Would
you have a SLSB that you create, and have abstract methods like this:

/**
 * @ejb:interface-method
 * @ejb:value-object-factory-method ...... [some params] ......
 * @ejb:value-object-field name="make" entityhomeField="carHome"
entityFindByMethod="findByCarId" entityFindByParameters="carId"
 * @ejb:value-object-field name="manufacturer"
entityhomeField="manufacturerHome" entityFindByMethod="findByManufacturerId"
entityFindByParmaters="manufacturerId"
 */
public abstract CarAndManufacturerValueObject getValueObject(int carId, int
manufacturerId);

the way I would see this work, is that in the slsb template, you would look
for these methods (matchin the ejb:value-object-factory-method tag) and
create the implementation of th emethod.  The template would then assume
that fields "carHome" and "manufacturerHome" existed in the SLSB and use
methods on those "findByCarId" and "findByManufacturerId" to retrieve the
entity component interfaces.  getter methods for the field names would be
used, and set in the value object.

value object creation would need to also be aware of what names and types
the data required.

I hope this (a) makes sense, and (b) is appropriate given your requirements.
I've cc'd this to dev so other ppl can join in the discussion.  As I've
written this, I see this as being a much simpler way of handling cmr
traversal, so it may be useful elsewhere too....

anyone else have any thoughts?

cheers
dim

ps - writing this at the train station, and this wont be sent for another 10
hours, so if there are replies in between that make this email seem out of
context, thats why.




-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
Xdoclet-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/xdoclet-user

Reply via email to