use of com.jboss.transaction.txinterop.webservices.atinterop.processors.ATInitiatorProcessor in project narayana by jbosstm.
the class AsyncParticipantStub method commit.
/**
* Send a commit 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 commit(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().sendCommit(coordinationContext, map);
callback.waitUntilTriggered(15000);
} finally {
initiator.removeCallback(messageId);
}
handleCallback(callback);
}
use of com.jboss.transaction.txinterop.webservices.atinterop.processors.ATInitiatorProcessor in project narayana by jbosstm.
the class AsyncParticipantStub method volatileAndDurable.
/**
* Send a volatileAndDurable 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 volatileAndDurable(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().sendVolatileAndDurable(coordinationContext, map);
callback.waitUntilTriggered(15000);
} finally {
initiator.removeCallback(messageId);
}
handleCallback(callback);
}
use of com.jboss.transaction.txinterop.webservices.atinterop.processors.ATInitiatorProcessor in project narayana by jbosstm.
the class AsyncParticipantStub method retryCommit.
/**
* Send a retryCommit 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 retryCommit(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().sendRetryCommit(coordinationContext, map);
callback.waitUntilTriggered(15000);
} finally {
initiator.removeCallback(messageId);
}
handleCallback(callback);
}
use of com.jboss.transaction.txinterop.webservices.atinterop.processors.ATInitiatorProcessor in project narayana by jbosstm.
the class AsyncParticipantStub method earlyReadonly.
/**
* Send an earlyReadonly 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 earlyReadonly(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().sendEarlyReadonly(coordinationContext, map);
callback.waitUntilTriggered(15000);
} finally {
initiator.removeCallback(messageId);
}
handleCallback(callback);
}
use of com.jboss.transaction.txinterop.webservices.atinterop.processors.ATInitiatorProcessor in project narayana by jbosstm.
the class AsyncParticipantStub method lostCommitted.
/**
* Send a lostCommitted 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 lostCommitted(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().sendLostCommitted(coordinationContext, map);
callback.waitUntilTriggered(15000);
} finally {
initiator.removeCallback(messageId);
}
handleCallback(callback);
}
Aggregations