0 Replies Latest reply on Nov 3, 2004 6:57 PM by Peter Oxenham

    Hibernate + JBoss 4.0 + setRollBackOnly

    Peter Oxenham Newbie

      I have just started using Hibernate with JBoss 4.0 and have found a problem.

      I'm not sure if I should be posting this here or on sourceforge but here it is.

      When a SessionBean calls the setRollBackOnly() method of SessionContext, the Hibernate Session is NOT closed and the following log is displayed

      "Closing a connection for you. Please close them yourself ..."

      Looking at the code in org.jboss.hibernate.session.TransactionSynch, I can see that the session is only being closed in the beforeCompletion() method, and not in the afterCompletion() method.

      Can someone please confirm that this is a bug in JBoss, or should I be closing the session myself?