db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Julius Stroffek (JIRA)" <j...@apache.org>
Subject [jira] Commented: (DERBY-2508) Implement the XA transaction timeout support for embedded driver.
Date Thu, 03 May 2007 13:32:15 GMT

    [ https://issues.apache.org/jira/browse/DERBY-2508?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12493367
] 

Julius Stroffek commented on DERBY-2508:
----------------------------------------

Dan, I am sorry, I forgot to explain that. I was also not able to find anything in JDBC/JTA
spec except a small piece in XAResource.get/setTransactionTimeout javadoc.
---

The xa transaction timeout can by set up by calling XAResource.setTransactionTimeout, if the
value 0 is specified (or the setTransactionTimout function was not called for the XAResource
instance) the value of transaction timeout is the database default.

The database default value of xa transaction timeout can be specified in derby.jdbc.xaTransactionTimeout
system property. The value of timeout is in seconds and if it is equal to 0 the transaction
timeout feature is disabled.The default value of default xa transaction timeout is currently
300 seconds. I think that this might/should be changed to 0 because this would be consistent
with a previous behavior (no xa transaction timeout).

The timeout is measured since the application calls the XAResource.start method until XAResource.commit/rollback
is called. It does not matter whether the transaction is later associated or not associated
with any XAResource.

Once a transaction is rolled back due to timing out all the knowledge of the global transaction
is discarded. If it was associated with some XAResource instance, it would be disassociated.
If there was a running statement it would be canceled and the exception (SQLState.LANG_STATEMENT_CANCELLED_OR_TIMED_OUT)
would be thrown to the application.

An option would be to roll back the transaction when it times out and remember that transaction
for a while and throw the timeout related exceptions to the client and do the final cleanup
after some time. This might help when identifying a timeout related issues on a client.

Please, feel free to give any comments or suggestions to the behavior or implementation.


> 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.


Mime
View raw message