users@glassfish.java.net

Logic in entity beans - a design question

From: <glassfish_at_javadesktop.org>
Date: Wed, 17 Dec 2008 08:11:57 PST

Hello,

I was thinking of having two entity beans - called them "sources", implementing the same interface - "source", both holding one-to-many relations to other entity beans.
One method in the "source" interface updates the "sources" entities, but each source has to be updated in a less or more different way.

I would like to use the same stateless session bean (SourcesManager) method (updateSource(...)) to do the updates for all the "source" implementing entities out there but I'm not sure how to handle the different update methods... One way would be to have the update code in the entity classes but this does not sounds right...

So could someone please help me on this issue? Probably is a common thing...

Thank you,
[Message sent by forum member 'coboo' (coboo)]

http://forums.java.net/jive/thread.jspa?messageID=322164