db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kristian Waagan (JIRA)" <j...@apache.org>
Subject [jira] Commented: (DERBY-2532) Client does not return SQLException on XAConnection.getXAResource() on a closed connection, Embedded does
Date Mon, 29 Dec 2008 16:12:47 GMT

    [ https://issues.apache.org/jira/browse/DERBY-2532?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12659574#action_12659574
] 

Kristian Waagan commented on DERBY-2532:
----------------------------------------

Thanks for the patch and the repro, Sabari.

I had a look at the patch and have the following comments;
 a) There is no SQLState associated with the exception being thrown. It would be wise to use
the existing framework to throw an exception with the SQLState specified by SQLState.NO_CURRENT_CONNECTION
(08003). This would also match the embedded driver. You should find examples of this in the
client code, otherwise just ask.

 b) Can you regenerate the patch using 'svn diff'? To make it easier for everyone to apply
the patch, this should be done from the root directory of the source tree (i.e. /my/home/trunk).

 c) The community has agreed to use spaces (4) instead of tabs for indentation.

 d) (Tiny nit) If you want to use the full name for physicalConnection, it makes more sense
to me to use 'super' instead of 'this'. What do you think?

Have you run the regression tests? BTW, they do take some hours to run.
I think the patch will be ready for commit when the mentioned issues have been addressed.

Regards,

> Client does not return SQLException on XAConnection.getXAResource() on a closed connection,
Embedded does
> ---------------------------------------------------------------------------------------------------------
>
>                 Key: DERBY-2532
>                 URL: https://issues.apache.org/jira/browse/DERBY-2532
>             Project: Derby
>          Issue Type: Bug
>          Components: Network Client
>    Affects Versions: 10.3.1.4
>            Reporter: Myrna van Lunteren
>            Assignee: Sabari S Kumar
>         Attachments: ClientXAConnection.diff, Simple.java
>
>
> In the following scenario from converted test DataSourceTest:
> (non-tested code based on the test code)
> ----------------
>         ClientXADataSource dsx = new ClientXADataSource();
>         dsx.setDatabaseName("tstdb");
>         XAConnection xac = dsx.getXAConnection();
>         XAConnection xac2 = dsx.getXAConnection();
>         XAResource xar2 = xac2.getXAResource();
>         xac2.close();
>         // allow close on already closed XAConnection
>         xac2.close();
>         try {
>             xac2.getXAResource();
>             // Network Server does not think this is worth an exception.
>         } catch (SQLException sqle) {
>             System.out.println("expect a 08003 as with Embedded");
>         }
> ------------------
> With DerbyNetClient, the xac2.getXAResource() does not return an SQLException.
> This ought to be documented if expected, or fixed.

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