Search in sources :

Example 6 with ATInitiatorProcessor

use of com.jboss.transaction.txinterop.webservices.atinterop.processors.ATInitiatorProcessor 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);
}
Also used : ATInitiatorProcessor(com.jboss.transaction.txinterop.webservices.atinterop.processors.ATInitiatorProcessor) MAP(org.jboss.ws.api.addressing.MAP)

Example 7 with ATInitiatorProcessor

use of com.jboss.transaction.txinterop.webservices.atinterop.processors.ATInitiatorProcessor in project narayana by jbosstm.

the class AsyncParticipantStub method retryPreparedAbort.

/**
 * Send a retryPreparedAbort 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 retryPreparedAbort(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().sendRetryPreparedAbort(coordinationContext, map);
        callback.waitUntilTriggered(15000);
    } finally {
        initiator.removeCallback(messageId);
    }
    handleCallback(callback);
}
Also used : ATInitiatorProcessor(com.jboss.transaction.txinterop.webservices.atinterop.processors.ATInitiatorProcessor) MAP(org.jboss.ws.api.addressing.MAP)

Example 8 with ATInitiatorProcessor

use of com.jboss.transaction.txinterop.webservices.atinterop.processors.ATInitiatorProcessor in project narayana by jbosstm.

the class AsyncParticipantStub method retryPreparedCommit.

/**
 * Send a retryPreparedCommit 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 retryPreparedCommit(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().sendRetryPreparedCommit(coordinationContext, map);
        callback.waitUntilTriggered(15000);
    } finally {
        initiator.removeCallback(messageId);
    }
    handleCallback(callback);
}
Also used : ATInitiatorProcessor(com.jboss.transaction.txinterop.webservices.atinterop.processors.ATInitiatorProcessor) MAP(org.jboss.ws.api.addressing.MAP)

Example 9 with ATInitiatorProcessor

use of com.jboss.transaction.txinterop.webservices.atinterop.processors.ATInitiatorProcessor in project narayana by jbosstm.

the class AsyncParticipantStub method rollback.

/**
 * Send a rollback 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 rollback(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().sendRollback(coordinationContext, map);
        callback.waitUntilTriggered(15000);
    } finally {
        initiator.removeCallback(messageId);
    }
    handleCallback(callback);
}
Also used : ATInitiatorProcessor(com.jboss.transaction.txinterop.webservices.atinterop.processors.ATInitiatorProcessor) MAP(org.jboss.ws.api.addressing.MAP)

Example 10 with ATInitiatorProcessor

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

Aggregations

ATInitiatorProcessor (com.jboss.transaction.txinterop.webservices.atinterop.processors.ATInitiatorProcessor)15 MAP (org.jboss.ws.api.addressing.MAP)15