[hibernate-issues] [Hibernate-JIRA] Created: (HHH-2259) autoflush and autoclose not longer occur in JTA environment with hibernate 3.2

Ulrich Winter (JIRA) noreply at atlassian.com
Tue Nov 21 13:20:04 EST 2006


autoflush and autoclose not longer occur in JTA environment with hibernate 3.2
------------------------------------------------------------------------------

         Key: HHH-2259
         URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-2259
     Project: Hibernate3
        Type: Bug

  Components: core  
    Versions: 3.2.0.ga, 3.2.1    
 Environment: jboss 4.0.5
    Reporter: Ulrich Winter


In a setup using JTASessionContext flush() and close() should occur automatically at the end of the transaction.

This works with hibernate 3.0.5 but does not with hibernate 3.2.0-ga and 3.2.1-ga.

Setup:
hibernate.transaction.manager_lookup_class=org.hibernate.transaction.JBossTransactionManagerLookup
hibernate.current_session_context_class=org.hibernate.context.JTASessionContext
hibernate.transaction.flush_before_completion=true
hibernate.transaction.auto_close_session=true

Usage:
    public void doSomeWork() throws Exception {
        TransactionManager tm = (TransactionManager) Locator.lookup("java:/TransactionManager");
        tm.begin();

        Session session = sf.getCurrentSession();
        PersistentObject data = new PersistentObject ();
        data.setXYZ("xyz");
        session.save(data);

        tm.commit();
    }

Symptom:
no inserts/updates/deletes, only "select xxx.nextval()" occur to the database.


-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira




More information about the hibernate-issues mailing list