Examples of BAInteropParticipantCompletedState


Examples of com.jboss.transaction.txinterop.interop.states.BAInteropParticipantCompletedState

     */
    public void testBA1_5()
        throws Exception
    {
        final String conversationId = getConversationId() ;
        final BAInteropParticipantCompletedState state = new BAInteropParticipantCompletedState(BusinessActivityConstants.WSBA_ACTION_CLOSED) ;
        ProxyConversation.setConversationState(conversationId, state) ;
        try
        {
            final String serviceURI = ProxyURIRewriting.rewriteURI(conversationId, getParticipantURI()) ;
            final CoordinationContextType context = BAInteropUtil.createAtomicOutcomeCoordinationContext(getSourceCoordinatorURI()) ;
            getParticipantStub().participantCompleteClose(serviceURI, context) ;

            assertTrue("Participant did not issue Completed", state.waitForParticipantCompleted(getTestTimeout())) ;
           
            final BusinessActivityTerminator terminator = BAInteropUtil.registerTerminator(context, context.getIdentifier().getValue()) ;
            terminator.close() ;
           
            state.waitForCompletion(0) ;
        }
        finally
        {
            ProxyConversation.clearConversationState(conversationId) ;
        }
        assertTrue("Conversation did not complete successfully", state.isSuccessful()) ;
    }
View Full Code Here

Examples of com.jboss.transaction.txinterop.interop.states.BAInteropParticipantCompletedState

     */
    public void testBA1_8()
        throws Exception
    {
        final String conversationId = getConversationId() ;
        final BAInteropParticipantCompletedState state = new BAInteropParticipantCompletedState(BusinessActivityConstants.WSBA_ACTION_COMPENSATED) ;
        ProxyConversation.setConversationState(conversationId, state) ;
        try
        {
            final String serviceURI = ProxyURIRewriting.rewriteURI(conversationId, getParticipantURI()) ;
            final CoordinationContextType context = BAInteropUtil.createAtomicOutcomeCoordinationContext(getSourceCoordinatorURI()) ;
            getParticipantStub().participantCompleteClose(serviceURI, context) ;

            assertTrue("Participant did not issue Completed", state.waitForParticipantCompleted(getTestTimeout())) ;
           
            final BusinessActivityTerminator terminator = BAInteropUtil.registerTerminator(context, context.getIdentifier().getValue()) ;
            terminator.cancel() ;
           
            state.waitForCompletion(0) ;
        }
        finally
        {
            ProxyConversation.clearConversationState(conversationId) ;
        }
        assertTrue("Conversation did not complete successfully", state.isSuccessful()) ;
    }
View Full Code Here

Examples of com.jboss.transaction.txinterop.interop.states.BAInteropParticipantCompletedState

     */
    public void testBA1_9()
        throws Exception
    {
        final String conversationId = getConversationId() ;
        final BAInteropParticipantCompletedState state = new BAInteropParticipantCompletedState(BusinessActivityConstants.WSBA_ACTION_FAILED) ;
        ProxyConversation.setConversationState(conversationId, state) ;
        try
        {
            final String serviceURI = ProxyURIRewriting.rewriteURI(conversationId, getParticipantURI()) ;
            final CoordinationContextType context = BAInteropUtil.createAtomicOutcomeCoordinationContext(getSourceCoordinatorURI()) ;
            getParticipantStub().compensationFail(serviceURI, context) ;

            assertTrue("Participant did not issue Completed", state.waitForParticipantCompleted(getTestTimeout())) ;
           
            final BusinessActivityTerminator terminator = BAInteropUtil.registerTerminator(context, context.getIdentifier().getValue()) ;
            terminator.cancel() ;
           
            state.waitForCompletion(getTestTimeout()) ;
        }
        finally
        {
            ProxyConversation.clearConversationState(conversationId) ;
        }
        assertTrue("Conversation did not complete successfully", state.isSuccessful()) ;
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.