Search in sources :

Example 11 with InitiatorProcessor

use of com.jboss.transaction.wstf.webservices.sc007.processors.InitiatorProcessor 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 InitiatorProcessor initiator = InitiatorProcessor.getInitiator();
    initiator.registerCallback(messageId, callback);
    try {
        AsyncParticipantClient.getClient().sendReplayCommit(coordinationContext, map);
        callback.waitUntilTriggered(15000);
    } finally {
        initiator.removeCallback(messageId);
    }
    handleCallback(callback);
}
Also used : InitiatorProcessor(com.jboss.transaction.wstf.webservices.sc007.processors.InitiatorProcessor) MAP(org.jboss.ws.api.addressing.MAP)

Example 12 with InitiatorProcessor

use of com.jboss.transaction.wstf.webservices.sc007.processors.InitiatorProcessor 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 InitiatorProcessor initiator = InitiatorProcessor.getInitiator();
    initiator.registerCallback(messageId, callback);
    try {
        AsyncParticipantClient.getClient().sendCompletionRollback(map, coordinatorURI);
        callback.waitUntilTriggered(15000);
    } finally {
        initiator.removeCallback(messageId);
    }
    handleCallback(callback);
}
Also used : InitiatorProcessor(com.jboss.transaction.wstf.webservices.sc007.processors.InitiatorProcessor) MAP(org.jboss.ws.api.addressing.MAP)

Example 13 with InitiatorProcessor

use of com.jboss.transaction.wstf.webservices.sc007.processors.InitiatorProcessor in project narayana by jbosstm.

the class AsyncParticipantStub method preparedAfterTimeout.

/**
 * Send a preparedAfterTimeout 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 preparedAfterTimeout(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 InitiatorProcessor initiator = InitiatorProcessor.getInitiator();
    initiator.registerCallback(messageId, callback);
    try {
        AsyncParticipantClient.getClient().sendPreparedAfterTimeout(coordinationContext, map);
        callback.waitUntilTriggered(15000);
    } finally {
        initiator.removeCallback(messageId);
    }
    handleCallback(callback);
}
Also used : InitiatorProcessor(com.jboss.transaction.wstf.webservices.sc007.processors.InitiatorProcessor) MAP(org.jboss.ws.api.addressing.MAP)

Example 14 with InitiatorProcessor

use of com.jboss.transaction.wstf.webservices.sc007.processors.InitiatorProcessor 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 InitiatorProcessor initiator = InitiatorProcessor.getInitiator();
    initiator.registerCallback(messageId, callback);
    try {
        AsyncParticipantClient.getClient().sendEarlyReadonly(coordinationContext, map);
        callback.waitUntilTriggered(15000);
    } finally {
        initiator.removeCallback(messageId);
    }
    handleCallback(callback);
}
Also used : InitiatorProcessor(com.jboss.transaction.wstf.webservices.sc007.processors.InitiatorProcessor) MAP(org.jboss.ws.api.addressing.MAP)

Example 15 with InitiatorProcessor

use of com.jboss.transaction.wstf.webservices.sc007.processors.InitiatorProcessor in project narayana by jbosstm.

the class AsyncParticipantStub method earlyAborted.

/**
 * Send a earlyAborted 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 earlyAborted(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 InitiatorProcessor initiator = InitiatorProcessor.getInitiator();
    initiator.registerCallback(messageId, callback);
    try {
        AsyncParticipantClient.getClient().sendEarlyAborted(coordinationContext, map);
        callback.waitUntilTriggered(15000);
    } finally {
        initiator.removeCallback(messageId);
    }
    handleCallback(callback);
}
Also used : InitiatorProcessor(com.jboss.transaction.wstf.webservices.sc007.processors.InitiatorProcessor) MAP(org.jboss.ws.api.addressing.MAP)

Aggregations

InitiatorProcessor (com.jboss.transaction.wstf.webservices.sc007.processors.InitiatorProcessor)15 MAP (org.jboss.ws.api.addressing.MAP)15