Re: abort transaction causes TransactionNotInProgressException
yep I think so. (We don't have a test case for 'join()'. Please let me know if you detect side effects) regards, Armin - Original Message - From: "Joerg Lensing" <[EMAIL PROTECTED]> To: "OJB Users List" <[EMAIL PROTECTED]> Sent: Thursday, June 26, 2003 8:54 AM Subject: Re: abort transaction causes TransactionNotInProgressException > Joerg Lensing schrieb: > > > hi armin, > > i think my problem is, that "LocalTxManager.getCurrentTransaction()" > > doesn't succed, because the > > transaction is registred to different thread > > (tx_table.get(Thread.currentThread())---) . I'm using struts > > and the transaction is saved to the session. when the thread (here: > > the key used for tx_table)changes, the transaction > > can't be found. > > What is the correct handling? > > > > joerg > > > > > > - > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > hi armin, > i get it to work now. before commit()/checkpoint()/abort() i call > transaction.join(). > is this the right way? > > joerg > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: abort transaction causes TransactionNotInProgressException
Joerg Lensing schrieb: hi armin, i think my problem is, that "LocalTxManager.getCurrentTransaction()" doesn't succed, because the transaction is registred to different thread (tx_table.get(Thread.currentThread())---) . I'm using struts and the transaction is saved to the session. when the thread (here: the key used for tx_table)changes, the transaction can't be found. What is the correct handling? joerg - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] hi armin, i get it to work now. before commit()/checkpoint()/abort() i call transaction.join(). is this the right way? joerg - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: abort transaction causes TransactionNotInProgressException
hi armin, i think my problem is, that "LocalTxManager.getCurrentTransaction()" doesn't succed, because the transaction is registred to different thread (tx_table.get(Thread.currentThread())---) . I'm using struts and the transaction is saved to the session. when the thread (here: the key used for tx_table)changes, the transaction can't be found. What is the correct handling? joerg - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: abort transaction causes TransactionNotInProgressException
Hi Joerg, I made some tests but can not reproduce your problem. Maybe it's a synchronization problem of concurrent threads? A test case reproduce your problem will be helpful. > to release the locks. No changes were made since calling checkpoint()---) I checked this in a test, but all works fine tx.begin(); // store some objects storeObjects(tx, getNewODMGZoos(3, name)); tx.checkpoint(); tx.commit(); regards, Armin - Original Message - From: "Joerg Lensing" <[EMAIL PROTECTED]> To: "OJB Users List" <[EMAIL PROTECTED]> Sent: Monday, June 23, 2003 5:20 PM Subject: Re: abort transaction causes TransactionNotInProgressException > Armin Waibel schrieb: > > >Hi Joerg, > > > >could you post more stack trace? > >OJB version? standalone? > > > >regards, > >Armin > > > > > hi armin, > ojb-version is rc3. Now I tried to use "commit()" instead of > "abort"(---should result in the same state because I use it > to release the locks. No changes were made since calling checkpoint()---) > . But sometimes > objectEnvelopeTable in "TransactionImpl.doAbort()" is null (-> > NullpointerException) > > > > java.lang.NullPointerException > at org.apache.ojb.odmg.TransactionImpl.doClose(TransactionImpl.java:398) > at org.apache.ojb.odmg.TransactionImpl.commit(TransactionImpl.java:568) > at de.softcon.webcontrol.integration.data.ojb.OjbDAOTransactionHandler.comm itTransaction(OjbDAOTransactionHandler.java:54) > > > > TransactionImpl.doAbort > > joerg > > > > > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: abort transaction causes TransactionNotInProgressException
Armin Waibel schrieb: Hi Joerg, could you post more stack trace? OJB version? standalone? regards, Armin hi armin, ojb-version is rc3. Now I tried to use "commit()" instead of "abort"(---should result in the same state because I use it to release the locks. No changes were made since calling checkpoint()---) . But sometimes objectEnvelopeTable in "TransactionImpl.doAbort()" is null (-> NullpointerException) java.lang.NullPointerException at org.apache.ojb.odmg.TransactionImpl.doClose(TransactionImpl.java:398) at org.apache.ojb.odmg.TransactionImpl.commit(TransactionImpl.java:568) at de.softcon.webcontrol.integration.data.ojb.OjbDAOTransactionHandler.commitTransaction(OjbDAOTransactionHandler.java:54) TransactionImpl.doAbort joerg - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: abort transaction causes TransactionNotInProgressException
I just tried this using ODMG with RC3 and it worked fine if I just create a new transaction and call tx.isOpen, it returns false. I jumped the gun a little because I thought I had the same issue before but never got around to troubleshooting it. Eric -Original Message- From: Eric Northam [mailto:[EMAIL PROTECTED] Sent: Monday, June 23, 2003 9:05 AM To: 'OJB Users List' Subject: RE: abort transaction causes TransactionNotInProgressException Actually just make sure tx.begin() is actually called. -Original Message- From: Eric Northam [mailto:[EMAIL PROTECTED] Sent: Monday, June 23, 2003 9:03 AM To: 'OJB Users List' Subject: RE: abort transaction causes TransactionNotInProgressException I know, but I wouldn't rule it out as a bug. Just double check to make sure. -Original Message- From: Joerg Lensing [mailto:[EMAIL PROTECTED] Sent: Monday, June 23, 2003 8:53 AM To: OJB Users List Subject: Re: abort transaction causes TransactionNotInProgressException Eric Northam schrieb: >Are you certain that tx.begin() was called and not followed by a >tx.commit()? > > > if the javadocs are right, then this cannot be true: javadoc: transaction.isOpen(): "A transaction is open if a call has been made to |begin|, but a subsequent call to either |commit| or |abort| has *not* been made." joerg - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] DISCLAIMER: The information contained in this e-mail is, unless otherwise indicated, confidential and is intended solely for the use of the named addressee. Access, copying or re-use of the e-mail or any information contained therein by any other person is not authorized. If you are not the intended recipient please notify us immediately by returning the e-mail to the originator. DISCLAIMER: The information contained in this e-mail is, unless otherwise indicated, confidential and is intended solely for the use of the named addressee. Access, copying or re-use of the e-mail or any information contained therein by any other person is not authorized. If you are not the intended recipient please notify us immediately by returning the e-mail to the originator. DISCLAIMER: The information contained in this e-mail is, unless otherwise indicated, confidential and is intended solely for the use of the named addressee. Access, copying or re-use of the e-mail or any information contained therein by any other person is not authorized. If you are not the intended recipient please notify us immediately by returning the e-mail to the originator.
RE: abort transaction causes TransactionNotInProgressException
Actually just make sure tx.begin() is actually called. -Original Message- From: Eric Northam [mailto:[EMAIL PROTECTED] Sent: Monday, June 23, 2003 9:03 AM To: 'OJB Users List' Subject: RE: abort transaction causes TransactionNotInProgressException I know, but I wouldn't rule it out as a bug. Just double check to make sure. -Original Message- From: Joerg Lensing [mailto:[EMAIL PROTECTED] Sent: Monday, June 23, 2003 8:53 AM To: OJB Users List Subject: Re: abort transaction causes TransactionNotInProgressException Eric Northam schrieb: >Are you certain that tx.begin() was called and not followed by a >tx.commit()? > > > if the javadocs are right, then this cannot be true: javadoc: transaction.isOpen(): "A transaction is open if a call has been made to |begin|, but a subsequent call to either |commit| or |abort| has *not* been made." joerg - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] DISCLAIMER: The information contained in this e-mail is, unless otherwise indicated, confidential and is intended solely for the use of the named addressee. Access, copying or re-use of the e-mail or any information contained therein by any other person is not authorized. If you are not the intended recipient please notify us immediately by returning the e-mail to the originator. DISCLAIMER: The information contained in this e-mail is, unless otherwise indicated, confidential and is intended solely for the use of the named addressee. Access, copying or re-use of the e-mail or any information contained therein by any other person is not authorized. If you are not the intended recipient please notify us immediately by returning the e-mail to the originator.
RE: abort transaction causes TransactionNotInProgressException
I know, but I wouldn't rule it out as a bug. Just double check to make sure. -Original Message- From: Joerg Lensing [mailto:[EMAIL PROTECTED] Sent: Monday, June 23, 2003 8:53 AM To: OJB Users List Subject: Re: abort transaction causes TransactionNotInProgressException Eric Northam schrieb: >Are you certain that tx.begin() was called and not followed by a >tx.commit()? > > > if the javadocs are right, then this cannot be true: javadoc: transaction.isOpen(): "A transaction is open if a call has been made to |begin|, but a subsequent call to either |commit| or |abort| has *not* been made." joerg - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] DISCLAIMER: The information contained in this e-mail is, unless otherwise indicated, confidential and is intended solely for the use of the named addressee. Access, copying or re-use of the e-mail or any information contained therein by any other person is not authorized. If you are not the intended recipient please notify us immediately by returning the e-mail to the originator.
Re: abort transaction causes TransactionNotInProgressException
Hi Joerg, could you post more stack trace? OJB version? standalone? regards, Armin - Original Message - From: "Joerg Lensing" <[EMAIL PROTECTED]> To: "OJB Users List" <[EMAIL PROTECTED]> Sent: Monday, June 23, 2003 2:53 PM Subject: Re: abort transaction causes TransactionNotInProgressException > Eric Northam schrieb: > > >Are you certain that tx.begin() was called and not followed by a > >tx.commit()? > > > > > > > if the javadocs are right, then this cannot be true: > javadoc: transaction.isOpen(): > "A transaction is open if a call has been made to |begin|, but a > subsequent call to either |commit| or |abort| has *not* been made." > > joerg > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: abort transaction causes TransactionNotInProgressException
Eric Northam schrieb: Are you certain that tx.begin() was called and not followed by a tx.commit()? if the javadocs are right, then this cannot be true: javadoc: transaction.isOpen(): "A transaction is open if a call has been made to |begin|, but a subsequent call to either |commit| or |abort| has *not* been made." joerg - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: abort transaction causes TransactionNotInProgressException
Are you certain that tx.begin() was called and not followed by a tx.commit()? -Original Message- From: Joerg Lensing [mailto:[EMAIL PROTECTED] Sent: Monday, June 23, 2003 7:54 AM To: OJB Users List Subject: abort transaction causes TransactionNotInProgressException Hello, pleas look at this code: Transaction tx = getActiveTransaction(); if(tx.isOpen()) { tx.abort(); } this causes : [org.apache.ojb.odmg.TransactionImpl] INFO: Abort transaction was called on tx [EMAIL PROTECTED], associated PB was [EMAIL PROTECTED] 2003-06-23 13:47:58,031 WARN - Unhandled Exception thrown: class org.odmg.TransactionNotInProgressException what am I doing wrong? joerg - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] DISCLAIMER: The information contained in this e-mail is, unless otherwise indicated, confidential and is intended solely for the use of the named addressee. Access, copying or re-use of the e-mail or any information contained therein by any other person is not authorized. If you are not the intended recipient please notify us immediately by returning the e-mail to the originator.
abort transaction causes TransactionNotInProgressException
Hello, pleas look at this code: Transaction tx = getActiveTransaction(); if(tx.isOpen()) { tx.abort(); } this causes : [org.apache.ojb.odmg.TransactionImpl] INFO: Abort transaction was called on tx [EMAIL PROTECTED], associated PB was [EMAIL PROTECTED] 2003-06-23 13:47:58,031 WARN - Unhandled Exception thrown: class org.odmg.TransactionNotInProgressException what am I doing wrong? joerg - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]