Transaction id within a trigger
"R.W. Shore" <[email protected]> Sat, 19 Feb 2005 05:53:37 -0500
| Newsgroups | gmane.comp.db.mckoi |
|---|---|
| Message-ID | <[email protected]> |
For some testing I'm doing, I need to be able to extract a reasonably unique transaction id from within a trigger, an id that changes after a commit (or rollback). I'm sending a .zip file containing the modified source classes to your private address, only to prevent the file from being reflected to everybody on the list. The base for the changes is a CVS sync done yesterday. The changes themselves are fairly simple and are marked with an RWS comment in the source: o Add a long transactionId attribute to DatabaseConnection o Increment the transaction id in the commit() and rollback() methods o Modify the inner class in DatabaseConnection used by ProcedureConnection with a getTransactionId() method that references its enclosing DatabaseConnection o Modify ProcedureConnection with a getTransactionId() method that a trigger can use I've tested this enough to be confident that there are no unfortunate side-effects, so I'm offering the mods to you.