users@glassfish.java.net

Re: Cannot persist entity in _at_Postconstruct SLSB container manager persiste

From: <glassfish_at_javadesktop.org>
Date: Mon, 13 Oct 2008 12:27:01 PDT

The PostConstruct method of a stateless session bean executes in an unspecified transaction context. Since a container-managed EntityManager requires a transaction for the persist() operation, the best alternative would be to move your code into a business method.
[Message sent by forum member 'ksak' (ksak)]

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