-
1. Re: value-object and ejb:finder?
dhartford Feb 3, 2003 12:52 PM (in response to dhartford)Having a finder/ejbselect optionally return a Value-Object instead of the local (entity object) would make integration with Struts much simpler, smoother, and easier.
However, in thinking ahead I'm not sure if extending the finder to return value-objects would be best - would value-objects be able to take advantage of an entity cache for performance.....comments? -
2. Re: value-object and ejb:finder?
jcordes Feb 4, 2003 2:32 AM (in response to dhartford)Hi !
How would you achieve to extend the finder, as it can only return references to the entity the query is bound to (or some field of it) ? Only ejbSelect can return other objects !
That's how I do it: Create a session-facade, then execute the query, construct the value-object inside the entity (as per business-method), return the result. If your using the right commit-option (A) this benefits from the entity-cache, otherwise each finder-method goes straight to the database ...
These are only my thoughts, then ;-)
Bye,
Jochen.