2 Replies Latest reply on Mar 27, 2007 3:11 AM by kgrjb

    Unable to locate current JTA transaction

    nituxx

      Hi

      I have jboss jboss-4.0.3SP1 Hibernate 3.

      When attempt to recover the getCurrentSession() , gives the exception


      org.hibernate.HibernateException: Unable to locate current JTA transaction


      Somebody knows the solution? I have found that the problem is in JTA transaction but not like forming my correctly jboss.


      Thank you very much.

        • 1. Re: Unable to locate current JTA transaction
          fernandroide

          Hi:

          I have exactly the same problem, do you solve it???

          Can any body help me, please???

          Thanks in advance...

          • 2. Re: Unable to locate current JTA transaction
            kgrjb

            hibernate 3.2.*
            jboss 4.0.5.GA

            im getting the same "unable to locate jta transaction" @TransactionAttributeType.SUPPORTS but not with @TransactionAttributeType.REQUIRED on ejb 3 session bean[slsb].

            i use getCurrentSession().

            i understand hibernate session needs a transaction but what happens when you need to mark something as read only.

            as i understand the only way to mark this is by using @TransactionAttributeType.SUPPORTS.

            is there a way to tell a hibernate session that it should be readonly so that the session doesnot look for a transaction? any work around this if you really need to use @TransactionAttributeType.SUPPORTS?