Search in sources :

Example 6 with ParticipantCompletionParticipantEngine

use of com.arjuna.wst11.messaging.engines.ParticipantCompletionParticipantEngine in project narayana by jbosstm.

the class BAParticipantProcessor method participantCompensationFail.

/**
 * Execute the ParticipantCompensationFail
 * @param map The current addressing context.
 *
 * @throws SoapFault11 for errors during processing
 */
public void participantCompensationFail(final CoordinationContextType coordinationContext, final MAP map) throws SoapFault11 {
    try {
        final FailedCompensateParticipant participant = new FailedCompensateParticipant();
        final ParticipantCompletionParticipantEngine engine = BAInteropUtil.registerParticipantCompletion(coordinationContext, participant, new Uid().toString());
        participant.setEngine(engine);
        participant.initialiseTimeout();
    } catch (final Throwable th) {
        throw new SoapFault11(th);
    }
}
Also used : Uid(com.arjuna.ats.arjuna.common.Uid) ParticipantCompletionParticipantEngine(com.arjuna.wst11.messaging.engines.ParticipantCompletionParticipantEngine) SoapFault11(com.arjuna.webservices11.SoapFault11) FailedCompensateParticipant(com.jboss.transaction.txinterop.webservices.bainterop.participant.FailedCompensateParticipant)

Example 7 with ParticipantCompletionParticipantEngine

use of com.arjuna.wst11.messaging.engines.ParticipantCompletionParticipantEngine in project narayana by jbosstm.

the class BAParticipantProcessor method participantCompleteClose.

/**
 * Execute the ParticipantCompleteClose
 * @param map The current addressing context.
 *
 * @throws SoapFault11 for errors during processing
 */
public void participantCompleteClose(final CoordinationContextType coordinationContext, final MAP map) throws SoapFault11 {
    try {
        final CompletedParticipant participant = new CompletedParticipant();
        final ParticipantCompletionParticipantEngine engine = BAInteropUtil.registerParticipantCompletion(coordinationContext, participant, new Uid().toString());
        participant.setEngine(engine);
        participant.initialiseTimeout();
    } catch (final Throwable th) {
        throw new SoapFault11(th);
    }
}
Also used : Uid(com.arjuna.ats.arjuna.common.Uid) ParticipantCompletionParticipantEngine(com.arjuna.wst11.messaging.engines.ParticipantCompletionParticipantEngine) CompletedParticipant(com.jboss.transaction.txinterop.webservices.bainterop.participant.CompletedParticipant) SoapFault11(com.arjuna.webservices11.SoapFault11)

Example 8 with ParticipantCompletionParticipantEngine

use of com.arjuna.wst11.messaging.engines.ParticipantCompletionParticipantEngine in project narayana by jbosstm.

the class BAParticipantProcessor method compensate.

/**
 * Execute the Compensate
 * @param map The current addressing context.
 *
 * @throws SoapFault11 for errors during processing
 */
public void compensate(final CoordinationContextType coordinationContext, final MAP map) throws SoapFault11 {
    try {
        final CompletedParticipant participant = new CompletedParticipant();
        final ParticipantCompletionParticipantEngine engine = BAInteropUtil.registerParticipantCompletion(coordinationContext, participant, new Uid().toString());
        participant.setEngine(engine);
        participant.initialiseTimeout();
    } catch (final Throwable th) {
        throw new SoapFault11(th);
    }
}
Also used : Uid(com.arjuna.ats.arjuna.common.Uid) ParticipantCompletionParticipantEngine(com.arjuna.wst11.messaging.engines.ParticipantCompletionParticipantEngine) CompletedParticipant(com.jboss.transaction.txinterop.webservices.bainterop.participant.CompletedParticipant) SoapFault11(com.arjuna.webservices11.SoapFault11)

Example 9 with ParticipantCompletionParticipantEngine

use of com.arjuna.wst11.messaging.engines.ParticipantCompletionParticipantEngine in project narayana by jbosstm.

the class BAInteropUtil method registerParticipantCompletion.

/**
 * Register a participant completion participant in the specified coordination context.
 * @param context The coordination context.
 * @param participant The durable 2PC participant
 * @param id The participant id.
 * @return The participant engine.
 * @throws Exception for errors.
 */
public static ParticipantCompletionParticipantEngine registerParticipantCompletion(final CoordinationContextType context, final BusinessAgreementWithParticipantCompletionParticipant participant, final String id) throws Exception {
    final W3CEndpointReference coordinator = RegistrationCoordinator.register(context, MessageId.getMessageId(), getParticipantCompletionParticipant(id), BusinessActivityConstants.WSBA_SUB_PROTOCOL_PARTICIPANT_COMPLETION);
    final ParticipantCompletionParticipantEngine engine = new ParticipantCompletionParticipantEngine(id, coordinator, participant);
    ParticipantCompletionParticipantProcessor.getProcessor().activateParticipant(engine, id);
    return engine;
}
Also used : ParticipantCompletionParticipantEngine(com.arjuna.wst11.messaging.engines.ParticipantCompletionParticipantEngine) W3CEndpointReference(javax.xml.ws.wsaddressing.W3CEndpointReference)

Example 10 with ParticipantCompletionParticipantEngine

use of com.arjuna.wst11.messaging.engines.ParticipantCompletionParticipantEngine in project narayana by jbosstm.

the class TestInitialisation method setupTest.

public void setupTest() {
    final CompletionCoordinatorProcessor completionCoordinatorProcessor = CompletionCoordinatorProcessor.getProcessor();
    completionCoordinatorProcessor.activateParticipant(testNoExceptionCompletionCoordinatorParticipant, TestUtil.NOEXCEPTION_TRANSACTION_IDENTIFIER);
    completionCoordinatorProcessor.activateParticipant(testTransactionRolledExceptionCompletionCoordinatorParticipant, TestUtil.TRANSACTIONROLLEDBACKEXCEPTION_TRANSACTION_IDENTIFIER);
    completionCoordinatorProcessor.activateParticipant(testUnknownTransactionExceptionCompletionCoordinatorParticipant, TestUtil.UNKNOWNTRANSACTIONEXCEPTION_TRANSACTION_IDENTIFIER);
    completionCoordinatorProcessor.activateParticipant(testSystemExceptionCompletionCoordinatorParticipant, TestUtil.SYSTEMEXCEPTION_TRANSACTION_IDENTIFIER);
    final ParticipantProcessor participantProcessor = ParticipantProcessor.getProcessor();
    testPreparedVoteParticipantEngine = new ParticipantEngine(testPreparedVoteParticipant, TestUtil.PREPAREDVOTE_PARTICIPANT_IDENTIFIER, getCoordinatorEndpoint(TestUtil.PREPAREDVOTE_PARTICIPANT_IDENTIFIER));
    testAbortedVoteParticipantEngine = new ParticipantEngine(testAbortedVoteParticipant, TestUtil.ABORTEDVOTE_PARTICIPANT_IDENTIFIER, getCoordinatorEndpoint(TestUtil.ABORTEDVOTE_PARTICIPANT_IDENTIFIER));
    testReadOnlyParticipantEngine = new ParticipantEngine(testReadOnlyParticipant, TestUtil.READONLYVOTE_PARTICIPANT_IDENTIFIER, getCoordinatorEndpoint(TestUtil.READONLYVOTE_PARTICIPANT_IDENTIFIER));
    testNoExceptionParticipantEngine = new ParticipantEngine(testNoExceptionParticipant, TestUtil.NOEXCEPTION_PARTICIPANT_IDENTIFIER, getCoordinatorEndpoint(TestUtil.NOEXCEPTION_PARTICIPANT_IDENTIFIER));
    testTransactionRolledBackExceptionParticipantEngine = new ParticipantEngine(testTransactionRolledBackExceptionParticipant, TestUtil.TRANSACTIONROLLEDBACKEXCEPTION_PARTICIPANT_IDENTIFIER, getCoordinatorEndpoint(TestUtil.TRANSACTIONROLLEDBACKEXCEPTION_PARTICIPANT_IDENTIFIER));
    testWrongStateExceptionParticipantEngine = new ParticipantEngine(testWrongStateExceptionParticipant, TestUtil.WRONGSTATEEXCEPTION_PARTICIPANT_IDENTIFIER, getCoordinatorEndpoint(TestUtil.WRONGSTATEEXCEPTION_PARTICIPANT_IDENTIFIER));
    testSystemExceptionParticipantEngine = new ParticipantEngine(testSystemExceptionParticipant, TestUtil.SYSTEMEXCEPTION_PARTICIPANT_IDENTIFIER, getCoordinatorEndpoint(TestUtil.SYSTEMEXCEPTION_PARTICIPANT_IDENTIFIER));
    participantProcessor.activateParticipant(testPreparedVoteParticipantEngine, TestUtil.PREPAREDVOTE_PARTICIPANT_IDENTIFIER);
    participantProcessor.activateParticipant(testAbortedVoteParticipantEngine, TestUtil.ABORTEDVOTE_PARTICIPANT_IDENTIFIER);
    participantProcessor.activateParticipant(testReadOnlyParticipantEngine, TestUtil.READONLYVOTE_PARTICIPANT_IDENTIFIER);
    participantProcessor.activateParticipant(testNoExceptionParticipantEngine, TestUtil.NOEXCEPTION_PARTICIPANT_IDENTIFIER);
    participantProcessor.activateParticipant(testTransactionRolledBackExceptionParticipantEngine, TestUtil.TRANSACTIONROLLEDBACKEXCEPTION_PARTICIPANT_IDENTIFIER);
    participantProcessor.activateParticipant(testWrongStateExceptionParticipantEngine, TestUtil.WRONGSTATEEXCEPTION_PARTICIPANT_IDENTIFIER);
    participantProcessor.activateParticipant(testSystemExceptionParticipantEngine, TestUtil.SYSTEMEXCEPTION_PARTICIPANT_IDENTIFIER);
    final ParticipantCompletionParticipantProcessor participantCompletionParticipantProcessor = ParticipantCompletionParticipantProcessor.getProcessor();
    testSystemExceptionBusinessAgreementWithParticipantCompletionParticipantEngine = new ParticipantCompletionParticipantEngine(TestUtil.SYSTEMEXCEPTION_PARTICIPANT_IDENTIFIER, getParticipantCompletionCoordinatorEndpoint(TestUtil.SYSTEMEXCEPTION_PARTICIPANT_IDENTIFIER), testSystemExceptionBusinessAgreementWithParticipantCompletionParticipant);
    testWrongStateExceptionBusinessAgreementWithParticipantCompletionParticipantEngine = new ParticipantCompletionParticipantEngine(TestUtil.WRONGSTATEEXCEPTION_PARTICIPANT_IDENTIFIER, getParticipantCompletionCoordinatorEndpoint(TestUtil.WRONGSTATEEXCEPTION_PARTICIPANT_IDENTIFIER), testWrongStateExceptionBusinessAgreementWithParticipantCompletionParticipant);
    testNoExceptionBusinessAgreementWithParticipantCompletionParticipantEngine = new ParticipantCompletionParticipantEngine(TestUtil.NOEXCEPTION_PARTICIPANT_IDENTIFIER, getParticipantCompletionCoordinatorEndpoint(TestUtil.NOEXCEPTION_PARTICIPANT_IDENTIFIER), testNoExceptionBusinessAgreementWithParticipantCompletionParticipant);
    testFaultedExceptionBusinessAgreementWithParticipantCompletionParticipantEngine = new ParticipantCompletionParticipantEngine(TestUtil.FAULTEDEXCEPTION_PARTICIPANT_IDENTIFIER, getParticipantCompletionCoordinatorEndpoint(TestUtil.FAULTEDEXCEPTION_PARTICIPANT_IDENTIFIER), testFaultedExceptionBusinessAgreementWithParticipantCompletionParticipant);
    participantCompletionParticipantProcessor.activateParticipant(testSystemExceptionBusinessAgreementWithParticipantCompletionParticipantEngine, TestUtil.SYSTEMEXCEPTION_PARTICIPANT_IDENTIFIER);
    participantCompletionParticipantProcessor.activateParticipant(testWrongStateExceptionBusinessAgreementWithParticipantCompletionParticipantEngine, TestUtil.WRONGSTATEEXCEPTION_PARTICIPANT_IDENTIFIER);
    participantCompletionParticipantProcessor.activateParticipant(testNoExceptionBusinessAgreementWithParticipantCompletionParticipantEngine, TestUtil.NOEXCEPTION_PARTICIPANT_IDENTIFIER);
    participantCompletionParticipantProcessor.activateParticipant(testFaultedExceptionBusinessAgreementWithParticipantCompletionParticipantEngine, TestUtil.FAULTEDEXCEPTION_PARTICIPANT_IDENTIFIER);
    final CoordinatorCompletionParticipantProcessor coordinatorCompletionParticipantProcessor = CoordinatorCompletionParticipantProcessor.getProcessor();
    testSystemExceptionBusinessAgreementWithCoordinatorCompletionParticipantEngine = new CoordinatorCompletionParticipantEngine(TestUtil.SYSTEMEXCEPTION_PARTICIPANT_IDENTIFIER, getCoordinatorCompletionCoordinatorEndpoint(TestUtil.SYSTEMEXCEPTION_PARTICIPANT_IDENTIFIER), testSystemExceptionBusinessAgreementWithCoordinatorCompletionParticipant);
    testWrongStateExceptionBusinessAgreementWithCoordinatorCompletionParticipantEngine = new CoordinatorCompletionParticipantEngine(TestUtil.WRONGSTATEEXCEPTION_PARTICIPANT_IDENTIFIER, getCoordinatorCompletionCoordinatorEndpoint(TestUtil.WRONGSTATEEXCEPTION_PARTICIPANT_IDENTIFIER), testWrongStateExceptionBusinessAgreementWithCoordinatorCompletionParticipant);
    testNoExceptionBusinessAgreementWithCoordinatorCompletionParticipantEngine = new CoordinatorCompletionParticipantEngine(TestUtil.NOEXCEPTION_PARTICIPANT_IDENTIFIER, getCoordinatorCompletionCoordinatorEndpoint(TestUtil.NOEXCEPTION_PARTICIPANT_IDENTIFIER), testNoExceptionBusinessAgreementWithCoordinatorCompletionParticipant);
    testFaultedExceptionBusinessAgreementWithCoordinatorCompletionParticipantEngine = new CoordinatorCompletionParticipantEngine(TestUtil.FAULTEDEXCEPTION_PARTICIPANT_IDENTIFIER, getCoordinatorCompletionCoordinatorEndpoint(TestUtil.FAULTEDEXCEPTION_PARTICIPANT_IDENTIFIER), testFaultedExceptionBusinessAgreementWithCoordinatorCompletionParticipant);
    coordinatorCompletionParticipantProcessor.activateParticipant(testSystemExceptionBusinessAgreementWithCoordinatorCompletionParticipantEngine, TestUtil.SYSTEMEXCEPTION_PARTICIPANT_IDENTIFIER);
    coordinatorCompletionParticipantProcessor.activateParticipant(testWrongStateExceptionBusinessAgreementWithCoordinatorCompletionParticipantEngine, TestUtil.WRONGSTATEEXCEPTION_PARTICIPANT_IDENTIFIER);
    coordinatorCompletionParticipantProcessor.activateParticipant(testNoExceptionBusinessAgreementWithCoordinatorCompletionParticipantEngine, TestUtil.NOEXCEPTION_PARTICIPANT_IDENTIFIER);
    coordinatorCompletionParticipantProcessor.activateParticipant(testFaultedExceptionBusinessAgreementWithCoordinatorCompletionParticipantEngine, TestUtil.FAULTEDEXCEPTION_PARTICIPANT_IDENTIFIER);
    // final ParticipantManagerParticipantProcessor participantManagerParticipantProcessor = ParticipantManagerParticipantProcessor.getParticipant() ;
    // participantManagerParticipantProcessor.activateParticipant(testNoExceptionBAPMParticipant, TestUtil.NOEXCEPTION_PARTICIPANT_IDENTIFIER);
    // participantManagerParticipantProcessor.activateParticipant(testWrongStateExceptionBAPMParticipant, TestUtil.WRONGSTATEEXCEPTION_PARTICIPANT_IDENTIFIER);
    // participantManagerParticipantProcessor.activateParticipant(testSystemExceptionBAPMParticipant, TestUtil.SYSTEMEXCEPTION_PARTICIPANT_IDENTIFIER);
    final TerminationCoordinatorProcessor terminatorParticipantProcessor = TerminationCoordinatorProcessor.getProcessor();
    terminatorParticipantProcessor.activateParticipant(testNoExceptionBusinessActivityTerminator, TestUtil.NOEXCEPTION_PARTICIPANT_IDENTIFIER);
    terminatorParticipantProcessor.activateParticipant(testTransactionRolledBackExceptionBusinessActivityTerminator, TestUtil.TRANSACTIONROLLEDBACKEXCEPTION_TRANSACTION_IDENTIFIER);
    terminatorParticipantProcessor.activateParticipant(testUnknownTransactionExceptionBusinessActivityTerminator, TestUtil.UNKNOWNTRANSACTIONEXCEPTION_TRANSACTION_IDENTIFIER);
    terminatorParticipantProcessor.activateParticipant(testSystemExceptionBusinessActivityTerminator, TestUtil.SYSTEMEXCEPTION_PARTICIPANT_IDENTIFIER);
}
Also used : ParticipantCompletionParticipantProcessor(com.arjuna.webservices11.wsba.processors.ParticipantCompletionParticipantProcessor) ParticipantCompletionParticipantEngine(com.arjuna.wst11.messaging.engines.ParticipantCompletionParticipantEngine) CoordinatorCompletionParticipantEngine(com.arjuna.wst11.messaging.engines.CoordinatorCompletionParticipantEngine) CoordinatorCompletionParticipantProcessor(com.arjuna.webservices11.wsba.processors.CoordinatorCompletionParticipantProcessor) TerminationCoordinatorProcessor(com.arjuna.webservices11.wsarjtx.processors.TerminationCoordinatorProcessor) CompletionCoordinatorProcessor(com.arjuna.webservices11.wsat.processors.CompletionCoordinatorProcessor) ParticipantCompletionParticipantProcessor(com.arjuna.webservices11.wsba.processors.ParticipantCompletionParticipantProcessor) CoordinatorCompletionParticipantProcessor(com.arjuna.webservices11.wsba.processors.CoordinatorCompletionParticipantProcessor) ParticipantProcessor(com.arjuna.webservices11.wsat.processors.ParticipantProcessor) CoordinatorCompletionParticipantEngine(com.arjuna.wst11.messaging.engines.CoordinatorCompletionParticipantEngine) ParticipantEngine(com.arjuna.wst11.messaging.engines.ParticipantEngine) ParticipantCompletionParticipantEngine(com.arjuna.wst11.messaging.engines.ParticipantCompletionParticipantEngine)

Aggregations

ParticipantCompletionParticipantEngine (com.arjuna.wst11.messaging.engines.ParticipantCompletionParticipantEngine)10 Uid (com.arjuna.ats.arjuna.common.Uid)6 SoapFault11 (com.arjuna.webservices11.SoapFault11)6 CompletedParticipant (com.jboss.transaction.txinterop.webservices.bainterop.participant.CompletedParticipant)4 CoordinatorCompletionParticipantEngine (com.arjuna.wst11.messaging.engines.CoordinatorCompletionParticipantEngine)2 W3CEndpointReference (javax.xml.ws.wsaddressing.W3CEndpointReference)2 TxContextImple (com.arjuna.mwlabs.wst11.ba.context.TxContextImple)1 ServiceRegistry (com.arjuna.webservices11.ServiceRegistry)1 TerminationCoordinatorProcessor (com.arjuna.webservices11.wsarjtx.processors.TerminationCoordinatorProcessor)1 CompletionCoordinatorProcessor (com.arjuna.webservices11.wsat.processors.CompletionCoordinatorProcessor)1 ParticipantProcessor (com.arjuna.webservices11.wsat.processors.ParticipantProcessor)1 CoordinatorCompletionParticipantProcessor (com.arjuna.webservices11.wsba.processors.CoordinatorCompletionParticipantProcessor)1 ParticipantCompletionParticipantProcessor (com.arjuna.webservices11.wsba.processors.ParticipantCompletionParticipantProcessor)1 CannotRegisterException (com.arjuna.wsc.CannotRegisterException)1 BusinessAgreementWithCoordinatorCompletionParticipant (com.arjuna.wst.BusinessAgreementWithCoordinatorCompletionParticipant)1 ParticipantEngine (com.arjuna.wst11.messaging.engines.ParticipantEngine)1 BAParticipantCompletionParticipantManagerStub (com.arjuna.wst11.stub.BAParticipantCompletionParticipantManagerStub)1 FailParticipant (com.jboss.transaction.txinterop.webservices.bainterop.participant.FailParticipant)1 FailedCompensateParticipant (com.jboss.transaction.txinterop.webservices.bainterop.participant.FailedCompensateParticipant)1 QName (javax.xml.namespace.QName)1