in src/org/apache/kandula/participant/TransactionInHandler.java [46:88]
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))){
ParticipantContext context = new ParticipantContext();
SOAPHeader header = msgContext.getEnvelope().getHeader();
OMElement coordinationElement = header
.getFirstChildWithName(new QName(Constants.WS_COOR,
"CoordinationContext"));
if (coordinationElement == null) {
throw new AxisFault(
"Transaction Handler engaged.. No Coordination Context found");
}
CoordinationContext coorContext = new SimpleCoordinationContext(
coordinationElement);
context.setCoordinationContext(coorContext);
StorageUtils.putContext(context,context.getID(),msgContext);
msgContext.setProperty(AbstractContext.REQUESTER_ID,context.getID());
msgContext.getOperationContext().setProperty(AbstractContext.REQUESTER_ID,context.getID());
Parameter resourceFile = msgContext.getParameter(Constants.KANDULA_RESOURCE);
//Resource not given. Registration delayed to the business logic
if (resourceFile != null) {
try {
resource = (KandulaResource) Class.forName((String) resourceFile.getValue())
.newInstance();
context.setResource(resource);
} catch (Exception e) {
log.fatal("TransactionInHandler: Activity ID :"+context.getCoordinationContext().getActivityID()+" : "+e);
throw AxisFault.makeFault(e);
}
try{
ParticipantUtility.registerParticipant(context,msgContext);
}catch (Exception e ){
System.out.println(e);
}
}
}
return InvocationResponse.CONTINUE;
}