it only throws something with JTA or CMT transactions and only
if the underlying system throws a javax.transaction.SystemException when calling getStatus() or if status is Status.STATUS_UNKNOWN - otherwise it will return true or false.

From JTA: SystemException - Thrown if the transaction manager encounters an unexpected error condition.

        STATUS_UNKNOWN
A transaction is associated with the target object but its current status cannot be determined.

So, to sum up - it only throw an exception if something is really screwed ;) Otherwise it will return
true IFF Status.COMMITTED

/max


I need to know when the described exception can happen in Transaction.java:

     /**
      * Check if this transaction was successfully committed. This method
      * could return <tt>false</tt> even after successful invocation
      * of <tt>commit()</tt>.
      *
      * @return boolean
      * @throws HibernateException
      */
     public boolean wasCommitted() throws HibernateException;


-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
hibernate-devel mailing list
hibernate-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/hibernate-devel



--
--
Max Rydahl Andersen
callto://max.rydahl.andersen

Hibernate
[EMAIL PROTECTED]
http://hibernate.org

JBoss Inc
[EMAIL PROTECTED]
http://www.jboss.com/events/jbossworld
JBoss World Barcelona 10-12 October


-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
hibernate-devel mailing list
hibernate-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/hibernate-devel

Reply via email to