[ https://issues.apache.org/jira/browse/DERBY-2508?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Julius Stroffek updated DERBY-2508: ----------------------------------- Attachment: d2508.stat d2508.diff I am attaching a patch that solves also the problem of the currently running statement. A brief explanation of changes in classes follows. I ran derbyall and suites.All without failures. Please review the patch. Any comments or suggestions are welcomed. ==================== The cancelation task is driven/maintaned in XATransactionState class instance. A brief explanation of changes in classes: EmbedConnection: --- Comments to xa_rollback/commit/prepare added stating that these functions should not be called directly but XATransactionState.xa_rollback/commit/prepare should be called instead because these do also timer task maintanance/cancallation. cancelRunningStatement - added a method to cancel the current running statement. EmbedXAResource: --- calling XATransactionState.xa_rollback/commit/prepare instead of XATransactionState.conn.xa_rollback/commit/prepare. The new methods call the original methods and also some more code related to timeouts was added. returnConnectionToResource, removeXATransaction - changed the visibility to package because we have to call the functions from XATransactionState to perform correct global transaction disassociation. set/getTransactionTimout - code added to support the transaction timeout. start - A scheduling of a cancellation task was added. XATransactionState: --- CancelXATransactionTask class - added and represents a timeout task to be executed. xa_rollback/commit/prepare - wrap calls to conn.xa_rollback/commit/prepare and contain timout task maintanance/cancellation code. scheduleTimeoutTask - method added to schedule a timout task. Property: --- derby.jdbc.xaTransactionTimeout - new property added which sets up the default value for XA transaction timeout. XATransactionTest: --- Added a test for XA transaction timeout behaviour in different stages/states of a global transaction including cancellation of a running statement. > Implement the XA transaction timeout support for embedded driver. > ----------------------------------------------------------------- > > Key: DERBY-2508 > URL: https://issues.apache.org/jira/browse/DERBY-2508 > Project: Derby > Issue Type: Sub-task > Affects Versions: 10.2.2.0 > Reporter: Julius Stroffek > Assigned To: Julius Stroffek > Fix For: 10.3.0.0 > > Attachments: d2432_beta1.diff, d2432_beta1.stat, d2508.diff, > d2508.stat > > > Implement the XA transaction support for embedded driver in EmbedXAResource. > Implement functions XAResource.setTransactionTimeout and > XAResource.getTransactionTimeout and add the code to cancel the transaction > after the specified period of time. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.