Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
RE: [eclipselink-users] Using JTA

Your transactions in case of JTA would be controlled by an external
transaction controller which has hold on transactions on various
datasources. There are various JTA transaction controllers; one being
atomikos which is open source and used widely.

Regards,
Shashi

-----Original Message-----
From: eclipselink-users-bounces@xxxxxxxxxxx
[mailto:eclipselink-users-bounces@xxxxxxxxxxx] On Behalf Of njr
Sent: Saturday, April 10, 2010 4:05 AM
To: eclipselink-users@xxxxxxxxxxx
Subject: [eclipselink-users] Using JTA


I have to deploy my WebApplication which uses Eclipselink.

When I'm using RESOURCE_LOCAL as my Transaction type, I'm controlling my
transactions using,
em.getTransaction().begin();
//---do Someting()
em.getTransaction().commit();

But, I may need to go with JTA, since that is the standard for JavaEE
applications...
But when I'm using JTA, it is not allowing me use em.getTransaction()
api.
instead I may need to define my EntityManager using
    @PersistenceContext(unitName="example",
type=PersistenceContextType.TRANSACTION)    
    private EntityManager em;

In that case, how to control the transactions?
I'm not using any EJB stuff in my code... So, how to embed my code in
the
transaction boundary?
-- 
View this message in context:
http://old.nabble.com/Using-JTA-tp28188849p28188849.html
Sent from the EclipseLink - Users mailing list archive at Nabble.com.

_______________________________________________
eclipselink-users mailing list
eclipselink-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/eclipselink-users


Back to the top