[ 
http://issues.apache.org/jira/browse/DERBY-1025?page=comments#action_12374444 ] 

Deepa Remesh commented on DERBY-1025:
-------------------------------------

I looked into this a bit more and found that embedded and client are actually 
returning the same XA error code (XAER_DUPID). I printed out the error code in 
the test to verify this. The test just calls getMessage() on the XAException 
and prints it out. In case of embedded, I think the message is null. Whereas, 
in case of client, I see that the method NetXAResource.xaRetValErrorAccumSQL 
creates a message as follows: 
---------------------------------------------------------------------------------------------------------------------------------------------------
if (rc != XAResource.XA_OK) { // error was detected
            // create an SqlException to report this error within
            String xaRetValStr = "Error executing a " +
                    getXAFuncStr(callInfo.xaFunction_) + ", " +
                    "Server returned " + getXAExceptionText(rc);

---------------------------------------------------------------------------------------------------------------------------------------------------

This accounts for the difference in embedded and client messages. 

However, it is not clear to me what the purpose of this test is. If it is meant 
to check for XAER_DUPID, it does not seem to fit into the remaining tests.  I 
need to look into this some more. 
---------------------------------------------------------------------------------------------------------------------------------------------------
               try {
                        xac4.getXAResource().start(xid4a, XAResource.TMNOFLAGS);
                } catch (XAException xae) {
                        showXAException("autocommitxastart expected ", xae);
                }

---------------------------------------------------------------------------------------------------------------------------------------------------

> [xa] client XAResource.start() does not commit an active local transaction 
> when auto commit is true
> ---------------------------------------------------------------------------------------------------
>
>          Key: DERBY-1025
>          URL: http://issues.apache.org/jira/browse/DERBY-1025
>      Project: Derby
>         Type: Bug

>   Components: Network Client
>     Reporter: Daniel John Debrunner
>     Assignee: Deepa Remesh
>  Attachments: derby-1025-draft1.diff, derby-1025-draft1.status
>
> Embedded XAResource.start() implementation commits the active local 
> transaction on the Connection associated with the XAResource if the 
> connection is auto-commit mode.
> Client incorrectly throws an XAException with the XAER_RMFAIL error code (see 
> DERBY-1024)
> XATest contains a work-around for client (calling commit) with a comment with 
> this bug number.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira

Reply via email to