[hibernate-dev] Transaction
Steve Ebersole
steve at hibernate.org
Tue Apr 7 10:27:00 EDT 2015
Ok, not hearing any feedback on this so I will proceed as outlined here.
On Wed, Mar 25, 2015 at 3:15 PM, Steve Ebersole <steve at hibernate.org> wrote:
> We also identified needs for Status#ROLLING_BACK and Status#COMMITTING, so
> consider those in the enum as well.
>
> On Wed, Mar 25, 2015 at 12:19 PM, Steve Ebersole <steve at hibernate.org>
> wrote:
>
>> I thought I had asked this before, but maybe not. Andrea and I are
>> working through the transaction/jdbc changes and I really would like to
>> clean up the org.hibernate.Transaction API. But before I start cutting I
>> wanted to make sure noone is using the methods I plan on getting rid of...
>>
>> Here is the new proposed contract:
>>
>> public interface Transsaction {
>> public void begin();
>> public void commit();
>> public void rollback();
>> public void markRollbackOnly();
>>
>> public Status getStatus();
>>
>> public int getTimeout();
>> public void setTimeout(int seconds);
>>
>> public void registerSynchronization(Synchronization synchronization);
>> }
>>
>> public enum Status {
>> NOT_ACTIVE,
>> ACTIVE,
>> COMMITTED,
>> ROLLED_BACK,
>> FAILED_COMMIT
>> }
>>
>> Notes:
>> 1) isInitiator() has been removed with no real replacement. I could not
>> really see when that would be useful.
>> 2) isParticipating() has been removed with no real replacement.
>> 2) isActive(), wasCommitted() and wasRolledBack has all been removed with
>> call to getStatus() as replacement
>> 3) getLocalStatus() is gone. Who cares :) If users are asking us this,
>> we really should be checking the REAL state of the transaction
>> 4) Transaction is now a single impl. The distinctions are all handled
>> internally. TransactionImplementor is gone too.
>>
>> Thoughts? Concerns?
>>
>
>
More information about the hibernate-dev
mailing list