[hibernate-dev] Keeping context in the scope of a transaction

andrea boriero dreborier at gmail.com
Thu Apr 30 05:02:33 EDT 2015


Hi Gunnar,

 at the moment I cannot figure out any problem or anything you are missing,
the solution seems good :)





On 30 April 2015 at 09:08, Gunnar Morling <gunnar at hibernate.org> wrote:

> Steve, Andrea,
>
> For OGM we need to store certain data in the scope of a transaction;
> specifically this is the list of applied "grid dialect operations", so we
> can present these to the user upon failures (and thus "rollbacks") on
> non-transactional backends.
>
> Until now we used a custom org.hibernate.Transaction impl for keeping this
> data. I am now looking into using the new TransactionCoordinator approach
> instead. Is it a save route to initialise the required context upon first
> invocation of MyTransactionCoordinator#getTransactionDriverControl() and
> clear it via TransactionObserver#afterCompletion()?
>
> It works fine for me in our tests, but I'd like to make sure I am not
> missing anything :)
>
> Thanks,
>
> --Gunnar
> _______________________________________________
> 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