[hibernate-dev] Transaction

Gunnar Morling gunnar at hibernate.org
Tue Apr 7 11:17:37 EDT 2015


> 4) Transaction is now a single impl.  The distinctions are all handled
internally.  TransactionImplementor is gone too

Can OGM still register a custom TransactionFactory? We'd need that in order
to return our "NoSQL-local" transaction implementation.



2015-04-07 16:27 GMT+02:00 Steve Ebersole <steve at hibernate.org>:

> 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?
> >>
> >
> >
> _______________________________________________
> hibernate-dev mailing list
> hibernate-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/hibernate-dev
>


More information about the hibernate-dev mailing list