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] Updated: (DERBY-2508) Implement the XA transaction support for embedded driver.
Date Tue, 03 Apr 2007 15:15:32 GMT

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

Julius Stroffek updated DERBY-2508:

    Attachment: d2432_beta1.stat

I have created a some patch for this issue.

I used Monitor.getMonitor().getTimerFactory().getCancellationTimer() to fire the cancellation
event. The time is measured from the transaction start (invoking XAResource.start() method)
with the corresponding Xid.

The cancellation task is called with the instances of the corresponding XATransactionState
and EmbedXAResource where the transaction was started. After the cancellation event is fired
the transaction state is checked. If the transaction is still associated with the same EmbedXAResource
instance it is disassociated first. If the transaction is associated with the different XAResource
instance we will wait for the transaction to be disassociated first.

Currently, I have the following problems/questions:

When the transaction is still associated with any resource there might be some running queries.
How can I safely cancel those running queries (of course from different thread)? Is there
any mechanism for that?

Currently, when the cancellation event finishes derby does not know anything about the transaction
and all the exceptions thrown after that are like the transaction was never known before.
It might be difficult for the user to find out what is going on. Would it make sense to perform
the cancellation in two phases. First phase would rollback the transaction but would not remove
the transaction state from the global transaction table. This would happen in the second phase.
However a new cancellation task would be required for this.

I ran derbyall and Suites.All without failures.

I appreciate any comments.

> Implement the XA transaction support for embedded driver.
> ---------------------------------------------------------
>                 Key: DERBY-2508
>                 URL: https://issues.apache.org/jira/browse/DERBY-2508
>             Project: Derby
>          Issue Type: Sub-task
>    Affects Versions:
>            Reporter: Julius Stroffek
>         Assigned To: Julius Stroffek
>             Fix For:
>         Attachments: d2432_beta1.diff, d2432_beta1.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.

View raw message