You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-dev@db.apache.org by "Myrna van Lunteren (JIRA)" <ji...@apache.org> on 2007/04/09 07:54:32 UTC

[jira] Created: (DERBY-2532) 'XAConnection.getXAResource() on a closed connection

'XAConnection.getXAResource() on a closed connection 
-----------------------------------------------------

                 Key: DERBY-2532
                 URL: https://issues.apache.org/jira/browse/DERBY-2532
             Project: Derby
          Issue Type: Bug
            Reporter: Myrna van Lunteren




-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (DERBY-2532) Client does not return SQLException on XAConnection.getXAResource() on a closed connection, Embedded does

Posted by "Kristian Waagan (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DERBY-2532?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12650924#action_12650924 ] 

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

Calling close on a connection that has already been closed is not a problem for java.sql.Connection, according to the Java SE 6 API JavaDoc:
"Calling the method close on a Connection object that is already closed is a no-op."

I couldn't find any other information in the JavaDoc for XAConnection or PooledConnection. I know XAConnection doesn't implement java.sql.Connection, but maybe it can be used as a guideline?

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


[jira] Commented: (DERBY-2532) Client does not return SQLException on XAConnection.getXAResource() on a closed connection, Embedded does

Posted by "Kristian Waagan (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DERBY-2532?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12650932#action_12650932 ] 

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

I'm confused.

I thought the problem is that XAConnection.getXAResource() doesn't thrown an exception if the XAConnection is closed?
As far as I understand, it should be allowed to call XAConnection.close() several times, and doing this should not result in an exception.

So maybe adding a check to see if the connection has been closed in getXAResource would be a fix? This would match the behavior of the embedded driver.

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


[jira] Commented: (DERBY-2532) Client does not return SQLException on XAConnection.getXAResource() on a closed connection, Embedded does

Posted by "Kristian Waagan (JIRA)" <ji...@apache.org>.
    [ 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.


[jira] Updated: (DERBY-2532) Client does not return SQLException on XAConnection.getXAResource() on a closed connection, Embedded does

Posted by "Kristian Waagan (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-2532?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Kristian Waagan updated DERBY-2532:
-----------------------------------

    Issue & fix info: [Patch Available]

> 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, derby-2532-1a-getxares_on_closed_conn.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.


[jira] Updated: (DERBY-2532) Client does not return SQLException on XAConnection.getXAResource() on a closed connection, Embedded does

Posted by "Kristian Waagan (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-2532?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Kristian Waagan updated DERBY-2532:
-----------------------------------

    Derby Info:   (was: [Patch Available])

Reset the patch available flag, a new patch is expected.

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


[jira] Commented: (DERBY-2532) Client does not return SQLException on XAConnection.getXAResource() on a closed connection, Embedded does

Posted by "Sabari S Kumar (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DERBY-2532?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12650927#action_12650927 ] 

Sabari S Kumar commented on DERBY-2532:
---------------------------------------

as per the sourcecode of ClientXAConnection,
a close() call will call its super.close().
ie,the close() of ClientPooledConnection class.
now in CPC's close(),we check if the connection is
already closed in the log and only if the
connection is not closed already,it attempts to
close the connection.Else it simply returns.

So there is no scope of an SQL exception as 
stated in 2532.

Now if its required that there shud be an SQLEx
raised,we can simply do that by forcing an SQLEx 
using the 'throw' keyword, instead of returning normally.

The current implementation of close function is
as follows:



public synchronized void close() throws SQLException JavaDoc {
150         try
151         {
152             if (logWriter_ != null) {
153                 logWriter_.traceEntry(this, "close");
154             }
155
156             if (logicalConnection_ != null) {
157                 logicalConnection_.nullPhysicalConnection();
158                 logicalConnection_ = null;
159             }
160
161             if (physicalConnection_ == null) {
162                 return;
163             }
164
165             // Even if the physcial connection is marked closed (in the pool),
166 // this will close its underlying resources.
167 physicalConnection_.closeResources();
168         }
169         finally
170         {
171             physicalConnection_ = null;
172         }
173     }
174





So a possible fix is:


add a snippet:
if(logicalConnection_ == null)
{
	throw new SQLException("Connection already closed");
	}

as shown:


public synchronized void close() throws SQLException JavaDoc {
150         try
151         {
152             if (logWriter_ != null) {
153                 logWriter_.traceEntry(this, "close");
154             }
		
		if(logicalConnection_ == null)
		{
			throw new SQLException("Connection already closed");
		}
155
156             if (logicalConnection_ != null) {
157                 logicalConnection_.nullPhysicalConnection();
158                 logicalConnection_ = null;
159             }
160
161             if (physicalConnection_ == null) {
162                 return;
163             }
164
165             // Even if the physcial connection is marked closed (in the pool),
166 // this will close its underlying resources.
167 physicalConnection_.closeResources();
168         }
169         finally
170         {
171             physicalConnection_ = null;
172         }
173     }
174


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


[jira] Commented: (DERBY-2532) Client does not return SQLException on XAConnection.getXAResource() on a closed connection, Embedded does

Posted by "Sabari S Kumar (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DERBY-2532?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12650906#action_12650906 ] 

Sabari S Kumar commented on DERBY-2532:
---------------------------------------

do you think allowing a close on an already closed connection is also an issue?

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


[jira] Updated: (DERBY-2532) Client does not return SQLException on XAConnection.getXAResource() on a closed connection, Embedded does

Posted by "Myrna van Lunteren (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-2532?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Myrna van Lunteren updated DERBY-2532:
--------------------------------------

    Derby Info: [Patch Available]

checking the 'patch available' property so committers will get reminders about this patch available for review/commit.

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


[jira] Commented: (DERBY-2532) Client does not return SQLException on XAConnection.getXAResource() on a closed connection, Embedded does

Posted by "Sabari S Kumar (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DERBY-2532?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12650948#action_12650948 ] 

Sabari S Kumar commented on DERBY-2532:
---------------------------------------

Exactly..i just wanted to confirm that this connection closing is not an issue..i was confused with that comment in the problem statement ( // allow close on already closed XAConnection)...

And now about the "XAConnection.getXAResource() doesn't thrown an exception if the XAConnection is closed" issue:

        ClientXADataSource dsx = new ClientXADataSource();
        XAConnection xac = dsx.getXAConnection();

Here getXAConnection returns a ClientXAConnection.The getXAResource() method is implemented as:

public XAResource JavaDoc getXAResource() throws SQLException JavaDoc {
90         if (logWriter_ != null) {
91             logWriter_.traceExit(this, "getXAResource", xares_);
92         }
93
94         return xares_;
95     }

So will it be fine if we check whether the logical connection is still alive(can be done the very same way as we did in the previous case,ie the repeated connection closing issue),and if not alive we can force an SQLE .



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


[jira] Closed: (DERBY-2532) Client does not return SQLException on XAConnection.getXAResource() on a closed connection, Embedded does

Posted by "Kathey Marsden (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-2532?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Kathey Marsden closed DERBY-2532.
---------------------------------

    Resolution: Duplicate

Duplicate of DERBY-1018


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


[jira] Updated: (DERBY-2532) Client does not return SQLException on XAConnection.getXAResource() on a closed connection, Embedded does

Posted by "Kristian Waagan (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-2532?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Kristian Waagan updated DERBY-2532:
-----------------------------------

    Fix Version/s: 10.5.4.0
                   10.6.1.1

Backported to 10.5 with revision 954426 and to 10.6 with revision 954425.

> 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
>             Fix For: 10.5.4.0, 10.6.1.1, 10.7.0.0
>
>         Attachments: ClientXAConnection.diff, derby-2532-1a-getxares_on_closed_conn.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.


[jira] Updated: (DERBY-2532) Client does not return SQLException on XAConnection.getXAResource() on a closed connection, Embedded does

Posted by "Kristian Waagan (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-2532?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Kristian Waagan updated DERBY-2532:
-----------------------------------

    Attachment: derby-2532-1a-getxares_on_closed_conn.diff

Wrapped up Sabari's work in 'derby-2532-1a-getxares_on_closed_conn.diff'.
suites.All passed.

Patch ready for review, will commit shortly.

> 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, derby-2532-1a-getxares_on_closed_conn.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.


[jira] Updated: (DERBY-2532) Client does not return SQLException on XAConnection.getXAResource() on a closed connection, Embedded does

Posted by "Sabari S Kumar (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-2532?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Sabari S Kumar updated DERBY-2532:
----------------------------------

    Attachment: Simple.java

This file helps to test the issue

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


[jira] Updated: (DERBY-2532) Client does not return SQLException on XAConnection.getXAResource() on a closed connection, Embedded does

Posted by "Sabari S Kumar (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-2532?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Sabari S Kumar updated DERBY-2532:
----------------------------------

    Attachment: ClientXAConnection.diff

Please test this patch.It seems to resolve the issue.The change has to be made on ClientXAConnection.java
I have also uploaded a java file to test the issue

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


[jira] Commented: (DERBY-2532) Client does not return SQLException on XAConnection.getXAResource() on a closed connection, Embedded does

Posted by "Sabari S Kumar (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DERBY-2532?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12660786#action_12660786 ] 

Sabari S Kumar commented on DERBY-2532:
---------------------------------------


Will submit the new patch in a few days.


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


[jira] Reopened: (DERBY-2532) Client does not return SQLException on XAConnection.getXAResource() on a closed connection, Embedded does

Posted by "Kathey Marsden (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-2532?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Kathey Marsden reopened DERBY-2532:
-----------------------------------


accidentally closed wrong issue

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


[jira] Updated: (DERBY-2532) Client does not return SQLException on XAConnection.getXAResource() on a closed connection, Embedded does

Posted by "Knut Anders Hatlen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-2532?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Knut Anders Hatlen updated DERBY-2532:
--------------------------------------

    Bug behavior facts: [Embedded/Client difference]

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


[jira] Resolved: (DERBY-2532) Client does not return SQLException on XAConnection.getXAResource() on a closed connection, Embedded does

Posted by "Kristian Waagan (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-2532?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Kristian Waagan resolved DERBY-2532.
------------------------------------

    Issue & fix info:   (was: [Patch Available])
       Fix Version/s: 10.7.0.0
          Resolution: Fixed

Committed patch 1a to trunk with revision 951346.

If I don't get any pushback, I'll backport this simple fix.

> 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
>             Fix For: 10.7.0.0
>
>         Attachments: ClientXAConnection.diff, derby-2532-1a-getxares_on_closed_conn.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.


[jira] Updated: (DERBY-2532) Client does not return SQLException on XAConnection.getXAResource() on a closed connection, Embedded does

Posted by "Myrna van Lunteren (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-2532?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Myrna van Lunteren updated DERBY-2532:
--------------------------------------

          Component/s: Network Client
          Description: 
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.
    Affects Version/s: 10.3.0.0
              Summary: Client does not return SQLException on XAConnection.getXAResource() on a closed connection, Embedded does  (was: 'XAConnection.getXAResource() on a closed connection )

> 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.0.0
>            Reporter: Myrna van Lunteren
>
> 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.


[jira] Issue Comment Edited: (DERBY-2532) Client does not return SQLException on XAConnection.getXAResource() on a closed connection, Embedded does

Posted by "Sabari S Kumar (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DERBY-2532?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12659041#action_12659041 ] 

swordfish333 edited comment on DERBY-2532 at 12/23/08 9:01 PM:
-----------------------------------------------------------------

Please test this patch[ClientXAConnection.diff].It seems to resolve the issue.The change has to be made on ClientXAConnection.java
I have also uploaded a java file to test the issue

      was (Author: swordfish333):
    Please test this patch.It seems to resolve the issue.The change has to be made on ClientXAConnection.java
I have also uploaded a java file to test the issue
  
> 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.


[jira] Commented: (DERBY-2532) Client does not return SQLException on XAConnection.getXAResource() on a closed connection, Embedded does

Posted by "Sabari S Kumar (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DERBY-2532?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12659739#action_12659739 ] 

Sabari S Kumar commented on DERBY-2532:
---------------------------------------


Sure, I will do that.
Thanks a lot for the comment.


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


[jira] Issue Comment Edited: (DERBY-2532) Client does not return SQLException on XAConnection.getXAResource() on a closed connection, Embedded does

Posted by "Sabari S Kumar (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DERBY-2532?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12659042#action_12659042 ] 

swordfish333 edited comment on DERBY-2532 at 12/23/08 9:01 PM:
-----------------------------------------------------------------

This file[Simple.java] helps to test the issue

      was (Author: swordfish333):
    This file helps to test the issue
  
> 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.


[jira] Assigned: (DERBY-2532) Client does not return SQLException on XAConnection.getXAResource() on a closed connection, Embedded does

Posted by "Sabari S Kumar (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-2532?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Sabari S Kumar reassigned DERBY-2532:
-------------------------------------

    Assignee: Sabari S Kumar

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


[jira] Commented: (DERBY-2532) Client does not return SQLException on XAConnection.getXAResource() on a closed connection, Embedded does

Posted by "Sabari S Kumar (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DERBY-2532?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12650928#action_12650928 ] 

Sabari S Kumar commented on DERBY-2532:
---------------------------------------

And if u are interested i will attach the full source code...

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