db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Daniel John Debrunner (JIRA)" <j...@apache.org>
Subject [jira] Commented: (DERBY-2220) Uncommitted transactions executed throught XAResource will held locks after the application terminates (or crashes during the transaction).
Date Thu, 22 Feb 2007 15:46:05 GMT

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

Daniel John Debrunner commented on DERBY-2220:
----------------------------------------------

Julius wrote: "When I wrote a test I tried it to run also using the embedded driver and it
fails with the XAER_PROTO exception. However, I do not see any reason why this test should
not succeed since closing the socket on network connection and closing an embedded connection
should behave the same from this point of view. "

I'm a little lost here as I'm still unclear of what you intend the patch to do (see my first
comment on 19th feb).
For the network server I thought this was addressing the case when the socket became closed
due to unexpected behaviour, like the client application quitting, or the network link going
down.
For embedded however, the physical connection cannot break that way (?), so the code seems
to be addressing the case where an explicit close is performed by the application or the transaction
manager. Is this the intention? Does the network client work the same way? Should this infact
be a protocol error as it is a violation of the api by the transaction manager?

A quick summary of what you intend the patch to do would be great.




> Uncommitted transactions executed throught XAResource will held locks after the application
terminates (or crashes during the transaction).
> -------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: DERBY-2220
>                 URL: https://issues.apache.org/jira/browse/DERBY-2220
>             Project: Derby
>          Issue Type: Bug
>    Affects Versions: 10.3.0.0
>         Environment: Solaris Nevada build 49, Sun's JDK1.6
>            Reporter: Julius Stroffek
>         Assigned To: Julius Stroffek
>         Attachments: d2220_beta.diff, d2220_beta2.diff, d2220_try1.diff, d2220_try1.stat,
d2220_try2.diff, d2220_try2.stat, XATranTest.java, xxx.sql
>
>
> Using this piece of code derby will not release a table lock of 'dummy' table.
>             String query = "insert into dummy (field1) values ('" + Integer.toString(value)
+ "')";
>             XAConnection xaConnection = createXAConnection("jdbc:derby://localhost:1527/TestDB",
"", "");
>             XAResource xaResource = xaConnection.getXAResource();
>             conn = xaConnection.getConnection();
>             
>             Xid xid = createXid(value);        
>             xaResource.setTransactionTimeout(10);
>             xaResource.start(xid, XAResource.TMNOFLAGS);
>             
>             Statement statement = conn.createStatement();
>             statement.execute(query);        
>             
>             // terminate the client application
>             // this will not release any locks
>             System.exit(0);

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