[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [eclipselink-users] Seamless transaction mode switching
|
Don't think so.
Mohsen Saboorian wrote:
>
> James, do you know if there is any change in JPA 2.0 for this issue?
>
> On Wed, Oct 22, 2008 at 6:17 PM, James Sutherland <jamesssss@xxxxxxxxx>
> wrote:
>>
>> What we do in our tests is just have a beginTransaction(EntityManager)
>> method
>> on some helper class, if using JTA this begins a JTA transaction,
>> otherwise
>> it begins a local transaction (also commit, rollback, close, etc.).
>>
>>
>>
>> Mohsen Saboorian wrote:
>>>
>>> Hi,
>>>
>>> This is not currently possible to switch between JTA and
>>> RESOURCE_LOCAL transaction modes seamlessly in an application with JPA
>>> 1.0. RESOURCE_LOCAL requires
>>> javax.persistence.EntityTransaction.begin() or commit() for
>>> translation lifecycle management. JTA on the other side is managed
>>> through container and the persistence context. The API to ensure that
>>> your code is joined to the enclosing persistence context is
>>> EntityManager.joinTransaction().
>>>
>>> How can I use a unified transaction management model to run my code on
>>> a Java SE and Java EE environments seamlessly? I know that Spring
>>> helps here, but I'm looking for a pure-EclipseLink solution.
>>>
>>> Thanks,
>>> Mohsen.
>
>
-----
---
http://wiki.eclipse.org/User:James.sutherland.oracle.com James Sutherland
http://www.eclipse.org/eclipselink/
EclipseLink , http://www.oracle.com/technology/products/ias/toplink/
TopLink
Wiki: http://wiki.eclipse.org/EclipseLink EclipseLink ,
http://wiki.oracle.com/page/TopLink TopLink
Forums: http://forums.oracle.com/forums/forum.jspa?forumID=48 TopLink ,
http://www.nabble.com/EclipseLink-f26430.html EclipseLink
Book: http://en.wikibooks.org/wiki/Java_Persistence Java Persistence
--
View this message in context: http://www.nabble.com/Seamless-transaction-mode-switching-tp20108808p20131023.html
Sent from the EclipseLink - Users mailing list archive at Nabble.com.