Hibernate in JBoss: You cannot commit during a managed transaction!

From: Carlo LF (carlo.lf_at_onlinehome.de)
Date: 12/20/04

  • Next message: Stan: "[ANN] DBPool : JDBC Connection Pooling - v4.7 released"
    Date: 20 Dec 2004 07:07:09 -0800
    
    

    >Are you getting an instance of Hibernate through JBoss or on your
    own.

    I bound the Hibernate SessionFactory into JBoss JNDI as Bauer/King
    adviced in their book 'Hibernate in Action', so I get a Hibernate
    Session by doing a lookup for the SessionFactory.

    If I understand the book from above, it says that Hibernate is smart
    enough to detect if it is running in a managed environment, where
    transactions are governed by a separate Transaction Manager (which,
    btw, you have to configure in Hibernate's global configuration). So I
    thought, that a statement which commits a Hibernate transaction,
    simply does nothing, but 'waits' until the JBoss TX manager commits
    the transaction.

    Carlo Luib-Finetti


  • Next message: Stan: "[ANN] DBPool : JDBC Connection Pooling - v4.7 released"

    Relevant Pages

    • Re: Hibernate in JBoss: You cannot commit during a managed transaction!
      ... > I bound the Hibernate SessionFactory into JBoss JNDI as Bauer/King ... > transactions are governed by a separate Transaction Manager (which, ...
      (comp.lang.java.databases)
    • JBoss, PostgreSQL, XDoclet, Serial primary keys in CMP
      ... I'm trying to get a simple container managed bean to work with JBoss ... assuming you know what you're doing) of getting a data access layer. ... I've also looked at Hibernate, but wonder about my Hibernate classes ... was with Data Access Object, but with added features such as versioning. ...
      (comp.lang.java.programmer)
    • Re: EJB 3.0 vs Spring
      ... or Spring with a Web Server ... EJB3 has improved things greatly, particularly with entity beans, but it still might be a bit early to depend on it. ... The JBoss implementation is in beta and is buggy. ... My experience with JBoss + Hibernate + EJB 3.0 was OK until I hit a bug that required an upgrade that quickly descended into a mess of seemingly irreconcilable inter-dependencies. ...
      (comp.lang.java.programmer)
    • Re: CMP without entity beans ?
      ... JBoss), so i've started studying "JBoss at work, a practial guide". ... the CMP chapter uses Hibernate ... instead of Entity Beans. ...
      (comp.lang.java.programmer)
    • MappingException with Hibernate and JBoss
      ... I am running JBoss 3.2.5 and have gone through all the tutorials that I ... least some of the Hibernate classes are accessible (they are being ...
      (comp.lang.java.databases)