Re: [hibernate-dev] Transaction API

2010-10-07 Thread Emmanuel Bernard
I would fence on the conservative side here, even for isActive and raise an exception. If it's UNKNOWN, well then we don't know and we can't answer true nor false. Kind of a Gödelian dilemma ;) On 29 sept. 2010, at 19:53, Steve Ebersole wrote: > On Wed, 2010-09-29 at 14:26 +0200, Emmanuel Berna

Re: [hibernate-dev] Transaction API

2010-09-29 Thread Steve Ebersole
On Wed, 2010-09-29 at 14:26 +0200, Emmanuel Bernard wrote: > When are these two case happening: > - no UT nor TM => looks like a config issue. Other reasons? For the TM, yes that is the reason in all cases I can think of. For UT, not necessarily; it depends on whether UT is treated per-thread or

Re: [hibernate-dev] Transaction API

2010-09-29 Thread Emmanuel Bernard
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

Re: [hibernate-dev] Transaction API

2010-09-28 Thread Steve Ebersole
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 th

Re: [hibernate-dev] Transaction API

2010-09-28 Thread Emmanuel Bernard
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