|
From: Juergen H. <ju...@in...> - 2006-11-24 09:32:34
|
Hi Jeppe, =20 Atomikos is a very decent product overall, as far as my experience goes, = but I would not recommend to use it within a J2EE server. While it is technically possible, it raises the question of why you're running in a = J2EE server in the first place then - since you're bypassing one of its = central value-adds: the built-in transaction coordinator. =20 JTA providers such as Atomikos support a nested transaction simply = through another "UserTransaction.begin()" call within an ongoing transaction, = BTW. The JTA specification itself already hints at this: It declares a NotSupportedException for that method, to be thrown "if the thread is already associated with a transaction and the transaction manager implementation does not support nested transactions". So this would be = the correct API to use (which Spring's JtaTransactionManager does), if the underlying JTA provider actually supports nested transactions... =20 Juergen =20 _____ =20 From: spr...@li... [mailto:spr...@li...] On = Behalf Of Jeppe Cramon Sent: Monday, November 20, 2006 10:59 AM To: spr...@li... Subject: Re: [Springframework-developer] JTA and JDBC 3.0 SavePoints Hi J=FCrgen Thanks for you answer and sorry for the late reply. What's your experience with Atomikos. Is it stable? FYI: We finally got around to testing SavePoints under WebSphere 6.1 JTA controller trx. against SQL Server 2005. We found, as you wrote, that it doesn't work, and additionally found the following reference links that states the same. http://publib.boulder.ibm.com/infocenter/wxdinfo/v6r0/index.jsp?topic=3D/= com.i bm.websphere.messages.doc/com.ibm.IBMDataStoreAdapterNLS.html DSRA9350E: Operation {0} is not allowed during a global transaction.=20 Problem The user is not allowed to call commit, rollback, setSavepoint = or releaseSavepoint on the Connection while a global transaction is active. User response Do not call commit, rollback, setSavepoint or releaseSavepoint on the Connection while in a global transaction. =09 =20 =20 <http://publib.boulder.ibm.com/infocenter/iseries/v5r3/index.jsp?topic=3D= /rzah h/jdbcsavepoint.htm> http://publib.boulder.ibm.com/infocenter/iseries/v5r3/index.jsp?topic=3D/= rzahh /jdbcsavepoint.htm (kunne ikke finde en tilsvarende v6 resource) Savepoints are not valid across XA connections. Using an XA connection = with savepoints throws an exception. /Jeppe Juergen Hoeller wrote:=20 To the best of my understanding, a combination of JTA transaction = control and explicit JDBC savepoint management can't be expected to work = properly. While it *may* be allowed to call the JDBC savepoint methods, the end = result is very likely not what you expect, since the underlying JDBC connection = is in XA mode, where the DBMS is essentially in a very different mode of transactional operation. =20 Some JTA providers do support nested transactions through the *JTA API* itself: simply accepting another begin-commit/rollback pair within an = active JTA transaction. This is essentially what our JtaTransactionManager = relies on when it encounters PROPAGATION_NESTED. For example, the recently open-sourced Atomikos Transactions (http://www.atomikos.com/home.html) explicitly supports that model. =20 Juergen =20 _____ =20 From: spr...@li... [mailto:spr...@li...] On = Behalf Of Jeppe Cramon Sent: Thursday, September 21, 2006 11:33 PM To: spr...@li... Subject: Re: [Springframework-developer] JTA and JDBC 3.0 SavePoints Hi Thomas As I understand it, SavePoints doesn't directly change the JDBC = transaction, you use the JDBC Connection methods to merely issue SQL statements that inform the DB (and it's transaction) that it needs to remember = savepoints during it's transaction? But again, it's just a guess based on my assumptions (naive perhaps) on = the implementations below. Have anyone tried using SavePoints under JTA? /Jeppe Thomas Risberg wrote:=20 I'll go the other way - just because the methods are part of the API doesn't mean that you can use them whenever you want. My guess is that your JTA implementation will throw an exception if you mess with any method that manages the JDBC transactions. Thomas Jeppe Cramon wrote: =20 Hi Rod Thanks for the quick reply. My interpretation is that since it's standard JDBC it's (of course) supported under JTA. But since no one on the team could find anything that stated that it was = or wasn't supported, then most unfortunately assumed that it wasn't = supported, which is why I went to ask here. The reason why we're looking at JTA is that we want to be able to use XA when the need arises (which it will because we at a point need to use = MQ). But since Spring emulated nested transactions aren't available using the JTATransactionManager (or the WebSphere counterpart of it), we were considering writing our own nested trx simulation using SavePoints = (since the part where we control the nested transactions is well encapsulated). But since no = one had tried it before and since most had determined (without facts or at = least trying it) that SavePoints doesn't work under JTA we were kind of stuck. = But you helped us out of it ;-) Since we now know that SavePoints work under JTA, we should be able to = head in the direction, unless of course you have an idea on how we can reuse = the existing Spring nested trx. emulation code and still do XA/use MQ transactionally? Thanks :) /Jeppe =20 =20 Savepoints are on the JDBC API, aren't they? So they should be=20 supported, *within JTA transaction management*. So you cannot use=20 Spring's nested transaction emulation with a JTA environment. Why do you want to use JTA? =20 =20 -------------------------------------------------------------------------= Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share = your opinions on IT & business topics through brief surveys -- and earn cash http://www.techsay.com/default.php?page=3Djoin.php <http://www.techsay.com/default.php?page=3Djoin.php&p=3Dsourceforge&CID=3D= DEVDEV> &p=3Dsourceforge&CID=3DDEVDEV _______________________________________________ Springframework-developer mailing list Spr...@li... https://lists.sourceforge.net/lists/listinfo/springframework-developer =20 =20 -------------------------------------------------------------------------= Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share = your opinions on IT & business topics through brief surveys -- and earn cash http://www.techsay.com/default.php?page=3Djoin.php <http://www.techsay.com/default.php?page=3Djoin.php&p=3Dsourceforge&CID=3D= DEVDEV> &p=3Dsourceforge&CID=3DDEVDEV _______________________________________________ Springframework-developer mailing list Spr...@li... https://lists.sourceforge.net/lists/listinfo/springframework-developer =20 _____ =20 -------------------------------------------------------------------------= Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share = your opinions on IT & business topics through brief surveys -- and earn cash http://www.techsay.com/default.php?page=3Djoin.php <http://www.techsay.com/default.php?page=3Djoin.php&p=3Dsourceforge&CID=3D= DEVDEV> &p=3Dsourceforge&CID=3DDEVDEV _____ =20 _______________________________________________ Springframework-developer mailing list Spr...@li... https://lists.sourceforge.net/lists/listinfo/springframework-developer =20 |