Good points. When are these two case happening: - no UT nor TM => looks like a config issue. Other reasons? - UNKNOWN => aren't things about to hit the fan in this case? Or is there some acceptable use cases?
On 28 sept. 2010, at 18:53, Steve Ebersole wrote: > In that case what would you like to see happen when say > Transaction.isActive() is called but the UserTransaction or > TransactionManager cannot be found? Or when they report that the status > is UNKOWN? Currently we throw exceptions in both of those cases which > is do not think is uber-useful. > > In the case of isActive() specifically, UNKNOWN is probably ok to > interpret as false. But I don't think that makes sense in the case of > wasCommitted() or wasRolledBack(). > > > On Tue, 2010-09-28 at 11:20 +0200, Emmanuel Bernard wrote: >> Getting the underlying tx state is more useful to me. >> >> On 28 sept. 2010, at 05:49, Steve Ebersole wrote: >> >>> Currently there is a big discrepancy between the documentation for some >>> of the methods on org.hibernate.Transaction and the actual code. >>> Specifically the methods isActive(), wasRolledBack() and wasCommitted() >>> explicitly state that they only account for the "local state" of the >>> transaction object, not the underlying transaction. >>> >>> However, the code explicitly checks the current status of JTA >>> transactions to responded to these methods. >>> >>> We need to fix one or the other. Personally I do not follow the use of >>> these methods too much, so asking for feedback on which way is more >>> useful. >>> >>> -- >>> Steve Ebersole <st...@hibernate.org> >>> http://hibernate.org >>> >>> _______________________________________________ >>> hibernate-dev mailing list >>> hibernate-dev@lists.jboss.org >>> https://lists.jboss.org/mailman/listinfo/hibernate-dev >> > > -- > Steve Ebersole <st...@hibernate.org> > http://hibernate.org > _______________________________________________ hibernate-dev mailing list hibernate-dev@lists.jboss.org https://lists.jboss.org/mailman/listinfo/hibernate-dev