use of com.jboss.transaction.txinterop.webservices.atinterop.generated.ParticipantPortType in project narayana by jbosstm.
the class AsyncParticipantClient method sendEarlyAborted.
/**
* Send a earlyAborted request.
* @param coordinationContext The coordination context.
* @param map The addressing context initialised with to, message ID and relates to.
* @throws SoapFault For any errors.
* @throws IOException for any transport errors.
*/
public void sendEarlyAborted(final CoordinationContextType coordinationContext, final MAP map) throws SoapFault, IOException {
map.setReplyTo(initiator);
ParticipantPortType port = ATInteropClient.getParticipantPort(map, earlyAbortedAction);
CoordinationContextManager.setThreadContext(coordinationContext);
try {
port.earlyAborted();
} finally {
CoordinationContextManager.setThreadContext(null);
}
}
use of com.jboss.transaction.txinterop.webservices.atinterop.generated.ParticipantPortType in project narayana by jbosstm.
the class AsyncParticipantClient method sendVolatileAndDurable.
/**
* Send a volatileAndDurable request.
* @param coordinationContext The coordination context.
* @param map The addressing context initialised with to, message ID and relates to.
* @throws SoapFault For any errors.
* @throws IOException for any transport errors.
*/
public void sendVolatileAndDurable(final CoordinationContextType coordinationContext, final MAP map) throws SoapFault, IOException {
map.setReplyTo(initiator);
ParticipantPortType port = ATInteropClient.getParticipantPort(map, volatileAndDurableAction);
CoordinationContextManager.setThreadContext(coordinationContext);
try {
port.volatileAndDurable();
} finally {
CoordinationContextManager.setThreadContext(null);
}
}
use of com.jboss.transaction.txinterop.webservices.atinterop.generated.ParticipantPortType in project narayana by jbosstm.
the class AsyncParticipantClient method sendRetryPreparedAbort.
/**
* Send a retryPreparedAbort request.
* @param coordinationContext The coordination context.
* @param map The addressing context initialised with to, message ID and relates to.
* @throws SoapFault For any errors.
* @throws IOException for any transport errors.
*/
public void sendRetryPreparedAbort(final CoordinationContextType coordinationContext, final MAP map) throws SoapFault, IOException {
map.setReplyTo(initiator);
ParticipantPortType port = ATInteropClient.getParticipantPort(map, retryPreparedAbortAction);
CoordinationContextManager.setThreadContext(coordinationContext);
try {
port.retryPreparedAbort();
} finally {
CoordinationContextManager.setThreadContext(null);
}
}
use of com.jboss.transaction.txinterop.webservices.atinterop.generated.ParticipantPortType in project narayana by jbosstm.
the class AsyncParticipantClient method sendCommit.
/**
* Send a commit request.
* @param coordinationContext The coordination context.
* @param map The addressing context initialised with to, message ID and relates to.
* @throws SoapFault For any errors.
* @throws IOException for any transport errors.
*/
public void sendCommit(final CoordinationContextType coordinationContext, final MAP map) throws SoapFault, IOException {
map.setReplyTo(initiator);
ParticipantPortType port = ATInteropClient.getParticipantPort(map, commitAction);
CoordinationContextManager.setThreadContext(coordinationContext);
try {
port.commit();
} finally {
CoordinationContextManager.setThreadContext(null);
}
}
use of com.jboss.transaction.txinterop.webservices.atinterop.generated.ParticipantPortType in project narayana by jbosstm.
the class ATInteropClient method getParticipantPort.
// don't think we ever need this as we get a registration port from the endpoint ref returned by
// the activation port request
public static ParticipantPortType getParticipantPort(MAP map, String action) {
ParticipantService service = getParticipantService();
ParticipantPortType port = service.getPort(ParticipantPortType.class, new AddressingFeature(true, true));
BindingProvider bindingProvider = (BindingProvider) port;
String to = map.getTo();
List<Handler> customHandlerChain = new ArrayList<Handler>();
/*
* we need to add the coordination context handler in the case where we are passing a
* coordination context via a header element
*/
customHandlerChain.add(new CoordinationContextHandler());
/*
* we no longer have to add the JaxWS WSAddressingClientHandler because we can specify the WSAddressing feature
customHandlerChain.add(new WSAddressingClientHandler());
*/
bindingProvider.getBinding().setHandlerChain(customHandlerChain);
Map<String, Object> requestContext = bindingProvider.getRequestContext();
map.setAction(action);
map.setFrom(getInitiator());
AddressingHelper.configureRequestContext(requestContext, map, to, action);
return port;
}
Aggregations