I don’t quite remember but looking at it, it looks like I needed something that 
would work on all cases: CMT or non CMT (excludes the use of UserTransaction), 
be able to start a transaction if none has been started already.
It’s rooted in https://hibernate.atlassian.net/browse/OGM-56 
<https://hibernate.atlassian.net/browse/OGM-56>


> On 14 Jan 2015, at 10:10, Gunnar Morling <gun...@hibernate.org> wrote:
> 
> 2015-01-14 9:27 GMT+01:00 Emmanuel Bernard <emman...@hibernate.org 
> <mailto:emman...@hibernate.org>>:
> Probably. Needs exploring.
> 
> https://hibernate.atlassian.net/browse/OGM-718 
> <https://hibernate.atlassian.net/browse/OGM-718>
> 
> Btw. why has OGM its own JTATransactionManagerTransaction instead of using 
> ORM's existing JtaTransaction?
> 
> 
> > On 13 Jan 2015, at 19:18, Gunnar Morling <gun...@hibernate.org 
> > <mailto:gun...@hibernate.org>> wrote:
> >
> > Hi,
> >
> > For a demo I have an OGM application which defines a persistence unit with
> > transaction type RESOURCE_LOCAL.
> >
> > I thus assumed I wouldn't have to add a JTA implementation to the class
> > path, but actually I'm getting a CNFE (see [1] for the complete trace):
> >
> >    ClassNotFoundException: Could not load requested class :
> > com.arjuna.ats.jta.TransactionManager
> >
> > Indeed Arjuna is what we use as TM by default. It is set by OGM's
> > JtaPlatform implementation which in turn is used by transactions created by
> > OGM's default TransactionFactory [2].
> >
> > Unless I'm doing something wrong configuration-wise, I feel that requiring
> > a JTA implementation for a non-transactional backend such as MongoDB is
> > confusing and may make users ask whether OGM is doing the right thing.
> >
> > Would it be feasible to to provide an "OGM local" TransactionImplementor +
> > TransactionFactory to be used in such cases where the store does not
> > support transactions (so no rollbacks etc.), but we'd "only" need a trigger
> > for writing out changes to the datastore?
> >
> > Any thoughts?
> >
> > --Gunnar
> >
> > [1] https://gist.github.com/gunnarmorling/ba193caecb7d5cdbd0a4 
> > <https://gist.github.com/gunnarmorling/ba193caecb7d5cdbd0a4>
> > [2]
> > https://github.com/hibernate/hibernate-ogm/blob/master/core/src/main/java/org/hibernate/ogm/transaction/impl/OgmTransactionFactoryInitiator.java#L42
> >  
> > <https://github.com/hibernate/hibernate-ogm/blob/master/core/src/main/java/org/hibernate/ogm/transaction/impl/OgmTransactionFactoryInitiator.java#L42>
> > _______________________________________________
> > hibernate-dev mailing list
> > hibernate-dev@lists.jboss.org <mailto:hibernate-dev@lists.jboss.org>
> > https://lists.jboss.org/mailman/listinfo/hibernate-dev 
> > <https://lists.jboss.org/mailman/listinfo/hibernate-dev>
> 
> 

_______________________________________________
hibernate-dev mailing list
hibernate-dev@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/hibernate-dev

Reply via email to