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-2420) XAConnection close method should throw an exception if it is called when the global transaction is associated with the connection.
Date Tue, 12 Jun 2007 15:26:27 GMT

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

Julius Stroffek commented on DERBY-2420:
----------------------------------------

There are two possible ways how the close method might behave when it should not be called:

1.) throw an exception and leave the connection in the unchaged state.
2.) close the connection, do cleanup and throw the exception.

For now, embedded driver (EmbeddedConnection) throws the exception does not perform all the
cleanup and leaves the connection in unusable state. The chain of function calls from EmbedPooledConnection.close
-> EmbedConnection.close.

People usually do not care much about the exceptions thrown by close method and expecting
that there is not much they can do if it is not possible to close the connection. Therefore
I think option 2 is a better choice. The exception about inproper usage would be thrown and
even after that it would not be possible to use that connection anymore.

> XAConnection close method should throw an exception if it is called when the global transaction
is associated with the connection.
> ----------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: DERBY-2420
>                 URL: https://issues.apache.org/jira/browse/DERBY-2420
>             Project: Derby
>          Issue Type: Bug
>          Components: Network Client
>            Reporter: Julius Stroffek
>            Assignee: Julius Stroffek
>            Priority: Minor
>             Fix For: 10.3.0.0
>
>
> As comments show in DERBY-2220 The Distributed Transaction Processing: The XA Specification
forbids for a transaction manager or an application to call XAConnection.close method when
there is a global transaction associated with the XA connection.
> Currently,
> Embedded driver throws the exception but the connection is left in a state when it cannot
be used anymore and the locks held by the transaction can not be released later.
> Network driver allows the call of the method and closes the connection.

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