users@glassfish.java.net

Local SLSB and PersistenceContext

From: <glassfish_at_javadesktop.org>
Date: Sat, 28 Jun 2008 06:30:09 PDT

I am using an injected Local SLSB in a JSF managed bean and using JTA transaction with hibernate provider. The EntityManger is injected via persistencecontext annotation and I am using Transaction Attribute Required. The problem I have is that the the entitymanager is NOT destroyed once the JTA transaction is completed. Hibernate logs show proper transaction syncronization but the session is not closed as the result the session remains open. Subsequent calls show (in debug) the same entitymanager but not a new one. Is this expected behaviour for local SLSB . I could use the hibernate auto close session on transaction but it still does not give me a new entitymanager.
[Message sent by forum member 'tshark' (tshark)]

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