db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mamta Satoor <msat...@gmail.com>
Subject Re: [jira] Commented: (DERBY-339) Network client XA should only keep XA state for transaction branch association, to track whether to send commit in autocommit mode. All other state and state related decisions should be deferred to the server.
Date Tue, 07 Jun 2005 05:18:34 GMT
Hi Kathey,

First of all, let me admit, I am no XA expert but here are my comments on 
the review package anyways.(I used the patch attached to the Jira. That's 
the latest patch, correct?)
1)I noticed that you added a new sql state to SqlState.java as follows
+ public final static SqlState CANNOT_CLOSE_ACTIVE_XA_CONNECTION = new 
SqlState("XJ059.S");
But while throwing exception in ClientXAConnection::checkXANotAssociated(), 
"XJ059.S" is hard coded rather than using CANNOT_CLOSE_ACTIVE_XA_CONNECTION.
+ throw new SqlException(logWriter_,
+ "Cannot close a connection while a global transaction is still active.",
+ "XJ059.S", 20000); 
 2)SqlState.java has following comment
// Unless otherwise architected by PROTOCOL, all client-side generated SQL 
States should be
// Dnc architected codes in the range "46600" to "466ZZ".
But the new state added in this patch is is not in that range. I think you 
may have done this in order to have embedded and network server match to 
each other. May be some comment change in the SqlState will be useful to 
indicate when it is ok to violate the range "46600" to "466ZZ".
 3)ClientXAConnection::checkXANotAssociated() is new to this patch but call 
to this method in the same java class from getConnection() has been 
commented out. This change must be for Derby-341 and looks like that is why 
it is commented out.
 4)The patch has new file xaSimplePositive_derby.properties but everything 
in that file is commented out. Is it a place holder for future properties? 
Also, I am not too fluent with svn, but I don't see svn add for that file in 
the patch? Maybe committer of the patch needs to be in manually?

5)Maybe this a silly question, but why has the code to associate the 
connection to Connection.XA_T0_NOT_ASSOCIATED been moved from 
NetXAResource::commit() to NetXAResource::end()?

6)In NetXAResource::throwXAException(int rc), it looks like following is 
added but it looks incomplete since there is nothing inside switch(rc)
+ // Set transaction association appropriately for the error.
+ switch (rc){
+ 
+ }

7)In NetXAResource, a new method by name setXaStateForXAException(int rc) 
has been added but I don't see any call to this method.
 8)There is no new test for this patch but that may be because the code is 
cleaning up existing code and not adding/changing any existing 
functionality.

thanks,
Mamta


On 6/6/05, Kathey Marsden (JIRA) <derby-dev@db.apache.org> wrote: 
> 
> [ 
> http://issues.apache.org/jira/browse/DERBY-339?page=comments#action_12312792]
> 
> Kathey Marsden commented on DERBY-339:
> --------------------------------------
> 
> Note:
> The XA+ specification can be found at:
> 
> http://www.opengroup.org/bookstore/catalog/s423.htm
> 
> > Network client XA should only keep XA state for transaction branch 
> association, to track whether to send commit in autocommit mode. All other 
> state and state related decisions should be deferred to the server.
> > 
> ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
> >
> > Key: DERBY-339
> > URL: http://issues.apache.org/jira/browse/DERBY-339
> > Project: Derby
> > Type: Bug
> > Components: Network Client
> > Versions: 10.1.0.0 <http://10.1.0.0>
> > Reporter: Kathey Marsden
> > Assignee: Kathey Marsden
> > Fix For: 10.1.0.0 <http://10.1.0.0>
> > Attachments: derby339.diff
> >
> > Network client XA should only keep XA state for transaction branch 
> association, to track whether to send commit in autocommit mode. All other 
> state and state related decisions should be defered to the server.
> > The client tries to track XA state to make decisions based on current XA 
> state. Most of this state handling was removed with DERBY246, but it still 
> was not being handled properly. This is evidenced by multiple failures in 
> xaSimplePostive that now that it gets past DERBY-246.
> > This fix will have the client track only branch association as outlined 
> in the XA+ specification. Table 6-2, State Table for Transaction Branch 
> Association. The client will track only
> > XA_TO_NOT_ASSOCIATED
> > XA_T1_ASSOCIATED
> > Association Suspended (T2) will map to XA_TO_NOT_ASSOCIATED for the 
> client's pupurposes.
> > The client commit in autocommit mode only for
> > XA_TO_NOT_ASSOCIATED.
> 
> --
> 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
> 
>

Mime
View raw message