use of org.jboss.ws.api.addressing.MAP in project narayana by jbosstm.
the class AsyncParticipantStub method readonly.
/**
* Send a readonly request.
* @param serviceURI The target service URI.
* @param coordinationContext The coordination context.
* @throws SoapFault For any errors.
* @throws IOException for any transport errors.
*/
public void readonly(final String serviceURI, final CoordinationContextType coordinationContext) throws SoapFault, IOException {
final String messageId = MessageId.getMessageId();
final MAP map = AddressingHelper.createRequestContext(serviceURI, messageId);
final RequestCallback callback = new RequestCallback();
final ATInitiatorProcessor initiator = ATInitiatorProcessor.getInitiator();
initiator.registerCallback(messageId, callback);
try {
AsyncParticipantClient.getClient().sendReadonly(coordinationContext, map);
callback.waitUntilTriggered(15000);
} finally {
initiator.removeCallback(messageId);
}
handleCallback(callback);
}
use of org.jboss.ws.api.addressing.MAP in project narayana by jbosstm.
the class AsyncParticipantStub method completionCommit.
/**
* Send a completion commit request.
* @param serviceURI The target service URI.
* @param coordinatorURI The coordinator URI.
* @throws SoapFault For any errors.
* @throws IOException for any transport errors.
*/
public void completionCommit(final String serviceURI, final String coordinatorURI) throws SoapFault, IOException {
final String messageId = MessageId.getMessageId();
final MAP map = AddressingHelper.createRequestContext(serviceURI, messageId);
final RequestCallback callback = new RequestCallback();
final ATInitiatorProcessor initiator = ATInitiatorProcessor.getInitiator();
initiator.registerCallback(messageId, callback);
try {
AsyncParticipantClient.getClient().sendCompletionCommit(map, coordinatorURI);
callback.waitUntilTriggered(15000);
} finally {
initiator.removeCallback(messageId);
}
handleCallback(callback);
}
use of org.jboss.ws.api.addressing.MAP in project narayana by jbosstm.
the class AsyncParticipantStub method phase2Rollback.
/**
* Send a phase2Rollback request.
* @param serviceURI The target service URI.
* @param coordinationContext The coordination context.
* @throws SoapFault For any errors.
* @throws IOException for any transport errors.
*/
public void phase2Rollback(final String serviceURI, final CoordinationContextType coordinationContext) throws SoapFault, IOException {
final String messageId = MessageId.getMessageId();
final MAP map = AddressingHelper.createRequestContext(serviceURI, messageId);
final RequestCallback callback = new RequestCallback();
final ATInitiatorProcessor initiator = ATInitiatorProcessor.getInitiator();
initiator.registerCallback(messageId, callback);
try {
AsyncParticipantClient.getClient().sendPhase2Rollback(coordinationContext, map);
callback.waitUntilTriggered(15000);
} finally {
initiator.removeCallback(messageId);
}
handleCallback(callback);
}
use of org.jboss.ws.api.addressing.MAP in project narayana by jbosstm.
the class AsyncParticipantStub method completionRollback.
/**
* Send a completion rollback request.
* @param serviceURI The target service URI.
* @param coordinatorURI The coordinator URI.
* @throws SoapFault For any errors.
* @throws IOException for any transport errors.
*/
public void completionRollback(final String serviceURI, final String coordinatorURI) throws SoapFault, IOException {
final String messageId = MessageId.getMessageId();
final MAP map = AddressingHelper.createRequestContext(serviceURI, messageId);
final RequestCallback callback = new RequestCallback();
final ATInitiatorProcessor initiator = ATInitiatorProcessor.getInitiator();
initiator.registerCallback(messageId, callback);
try {
AsyncParticipantClient.getClient().sendCompletionRollback(map, coordinatorURI);
callback.waitUntilTriggered(15000);
} finally {
initiator.removeCallback(messageId);
}
handleCallback(callback);
}
use of org.jboss.ws.api.addressing.MAP in project narayana by jbosstm.
the class AsyncParticipantStub method replayCommit.
/**
* Send a replayCommit request.
* @param serviceURI The target service URI.
* @param coordinationContext The coordination context.
* @throws SoapFault For any errors.
* @throws IOException for any transport errors.
*/
public void replayCommit(final String serviceURI, final CoordinationContextType coordinationContext) throws SoapFault, IOException {
final String messageId = MessageId.getMessageId();
final MAP map = AddressingHelper.createRequestContext(serviceURI, messageId);
final RequestCallback callback = new RequestCallback();
final ATInitiatorProcessor initiator = ATInitiatorProcessor.getInitiator();
initiator.registerCallback(messageId, callback);
try {
AsyncParticipantClient.getClient().sendReplayCommit(coordinationContext, map);
callback.waitUntilTriggered(15000);
} finally {
initiator.removeCallback(messageId);
}
handleCallback(callback);
}
Aggregations