Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EclipseLink » JTA/XA
JTA/XA [message #916057] Tue, 18 September 2012 13:17 Go to next message
Tom Eugelink is currently offline Tom EugelinkFriend
Messages: 817
Registered: July 2009
Senior Member
I've been poking around on the internet and found almost no documentation about using Eclipselink in a JTA context. My current project involves Activiti and a business model using Eclipselink, both stored in separate databases and I need JTA/XA to sync the transactions.

Did I miss any documentation on setting up Eclipselink with, for example, Bitronix?

Tom
Re: JTA/XA [message #916095 is a reply to message #916057] Tue, 18 September 2012 14:17 Go to previous messageGo to next message
James Sutherland is currently offline James SutherlandFriend
Messages: 1939
Registered: July 2009
Location: Ottawa, Canada
Senior Member

There is some information on JPA and JTA here,

http://en.wikibooks.org/wiki/Java_Persistence/Transactions

JPA is part of the EJB specification which dictates integration with JTA.

What Java EE server are you using?

Normally JTA integration is set through the "eclipselink.target-server" persistence unit property. EclipseLink supports WebLogic, Glassfish, JBoss, WebSphere, OC4J, NetWeaver.
EclipseLink also has transaction support for Jotm.

If you are using another server, you will need to create your own ServerPlatform subclass.



James : Wiki : Book : Blog : Twitter
Re: JTA/XA [message #916143 is a reply to message #916095] Tue, 18 September 2012 15:55 Go to previous messageGo to next message
Tom Eugelink is currently offline Tom EugelinkFriend
Messages: 817
Registered: July 2009
Senior Member
On 2012-09-18 16:17, James Sutherland wrote:
> What Java EE server are you using?
>
> Normally JTA integration is set through the "eclipselink.target-server" persistence unit property. EclipseLink supports WebLogic, Glassfish, JBoss, WebSphere, OC4J, NetWeaver.
> EclipseLink also has transaction support for Jotm.
>
> If you are using another server, you will need to create your own ServerPlatform subclass.

LOL. Yes, well, ATM I'm developing in test driven mode, so I'm writing a unit test. Using Eclipselink in JTA in a unittest is even a bigger challenge, that could use some documentation as well.

But I've got a ServerPlatform and JTATransactionController. Getting the InitialContext setup was tough; I'm including parts of Glassfish to get a javaURLContextFactory set up. But I'm making progress, right now I'm stuck with IllegalStateException telling me I cannot use an EntityTransaction in JPA. Logical of course, so now I need to figure out how to start the transaction using Bitronix.

Slowly, but surely.

Tom
Re: JTA/XA [message #916152 is a reply to message #916143] Tue, 18 September 2012 16:08 Go to previous message
Tom Eugelink is currently offline Tom EugelinkFriend
Messages: 817
Registered: July 2009
Senior Member
On 2012-09-18 17:55, tbee wrote:
> LOL. Yes, well, ATM I'm developing in test driven mode, so I'm writing a unit test. Using Eclipselink in JTA in a unittest is even a bigger challenge, that could use some documentation as well.

Success. When I've got Activiti hooked up as well, I'll post my code. Probably someone else might find that interesting.

Tom
Previous Topic:Metadata Class not generated by CanonicalModelProcessor
Next Topic:Foreign key violation because jointable row is not removed
Goto Forum:
  


Current Time: Thu Mar 28 19:11:29 GMT 2024

Powered by FUDForum. Page generated in 0.02505 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top