Prepare method is not getting called due to code issue in TransactionInHandler 
class for AtomicTransaction
----------------------------------------------------------------------------------------------------------

                 Key: KAND-7
                 URL: https://issues.apache.org/jira/browse/KAND-7
             Project: Kandula
          Issue Type: Bug
         Environment: Tomcat server, Axis2, Kandula2, JDK1.6
            Reporter: Jayanta Sarkar
            Priority: Blocker


Two participant services have been hosted in two tomcat servers which are 
inserting data in two different tables in the same database.

The main service calls these two participant services one by one within same 
transaction.

In tcpmon it has been observed that all the call flow works fine but when the 
prepare message goes to the participant services the prepare method does not 
get executed. After going through the source code that the following code fix 
inside TransactionInHandler class under org.apache.kandula.participant package. 
The code to be addes is marked after "//added by Jayanta".

public InvocationResponse invoke(MessageContext msgContext) throws AxisFault {
KandulaResource resource;

String wsaAction = msgContext.getWSAAction();


if (!(Constants.WS_COOR_CREATE_COORDINATIONCONTEXT.equals(wsaAction)) 
&& !(Constants.

WS_COOR_REGISTER.equals(wsaAction)) 
&& !(Constants.

WS_AT_COMMIT.equals(wsaAction)) && 
!(Constants.WS_AT_ROLLBACK.equals(wsaAction)) 

//added by Jayanta 
&&!(Constants.WS_AT_PREPARE.equals(wsaAction))){

If the above line is added then it works fine. The prepare method gets called. 
Then the commit method gets called. In case exception the rollback method also 
works fine.


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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to