users@glassfish.java.net

Re: Glassfish Oracle Mystery

From: <glassfish_at_javadesktop.org>
Date: Sat, 27 Oct 2007 19:40:50 PDT

em.getTransaction() is intended for Java SE environment. You shouldn't use em.getTransaction() in your session beans. Your session bean by default uses container managed transaction so each business method already executes in the context of a JTA transaction. If this method is invoked via its webservice endpoint, the container will wrap the method body with a transaction. Not sure why the tx is not committed. You may want to try add a em.flush() after merge, though it is not really needed.

-cheng
[Message sent by forum member 'cf126330' (cf126330)]

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