[hibernate-dev] Transaction API

Emmanuel Bernard emmanuel at hibernate.org
Thu Oct 7 09:01:05 EDT 2010


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 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
> globally I guess.
> 
>> - UNKNOWN => aren't things about to hit the fan in this case? Or is there some acceptable use cases?
> Don't know.  UNKOWN sort of means "not known" :)
> 
> The more general question is whether throwing exceptions here in
> response to general "query" methods is the most proper/reasonable course
> of action.
> 
> -- 
> Steve Ebersole <steve at hibernate.org>
> http://hibernate.org
> 





More information about the hibernate-dev mailing list