How can I make a clone or duplicate of an entity bean? Also, can I do so within another EJB which does not have any knowledge about the entity bean it is referring to? I need to build an EJB which will take an(y) entity bean as input, make a copy and return the copy.

Robert Castaneda

You cannot make a clone of an Entity Bean. This is like inserting the same row into a database twice.

What you may want to do is to make a copy of the values inside an Entity Bean, using the Details Object design pattern. See the pattern Description for more details.

0 Comments  (click to add your comment)
Comment and Contribute






(Maximum characters: 1200). You have 1200 characters left.



About | Sitemap | Contact