openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hans J. Prueller" <>
Subject state-of-the art attribute initialization in persistent pojos?
Date Thu, 12 Apr 2007 15:43:52 GMT


as you know I am switching from EJB2.1 CMP to JPA (OpenJPA). I'd like to
know the preferred way to perform attribute initialisation

of newly created entity instances, e.g. 


we initialized our EJB2.1 CMP entity beans with


ejbCreate(String cid, Integer someOtherValue)





//and ejbPostCreate optionally


as far as I know, the JPA spec requires a no-arg constructor - so when
providing a constructor with the same args that we

have used in ejbCreate before, we cannot ensure that some developer calls
the no-arg constructor by default.


is there any other-more elegant way to force new entity instance





virtually hanzz...


 <> (personal)


  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message