Package com.arjuna.webservices11.wsarj

Examples of com.arjuna.webservices11.wsarj.InstanceIdentifier


     * @message com.arjuna.wst11.messaging.ParticipantProcessorImpl.rollback_5 [com.arjuna.wst11.messaging.ParticipantProcessorImpl.rollback_5] - Rollback request dropped pending registration of application-specific recovery module for WS-AT participant: {0}
     */
    public void rollback(final Notification rollback, final AddressingProperties addressingProperties,
        final ArjunaContext arjunaContext)
    {
        final InstanceIdentifier instanceIdentifier = arjunaContext.getInstanceIdentifier() ;

        /**
         * ensure the AT participant recovery manager is running
         */
        XTSATRecoveryManager recoveryManager = XTSATRecoveryManager.getRecoveryManager();

        if (recoveryManager == null) {
            // log warning and drop this message -- it will be resent
            if (WSTLogger.arjLoggerI18N.isWarnEnabled())
            {
                WSTLogger.arjLoggerI18N.warn("com.arjuna.wst11.messaging.ParticipantProcessorImpl.rollback_3", new Object[] {instanceIdentifier}) ;
            }

        }

        final ParticipantInboundEvents participant = getParticipant(instanceIdentifier) ;

        if (participant != null)
        {
            try
            {
                participant.rollback(rollback, addressingProperties, arjunaContext) ;
            }
            catch (final Throwable th)
            {
                if (WSTLogger.arjLoggerI18N.isWarnEnabled())
                {
                    WSTLogger.arjLoggerI18N.warn("com.arjuna.wst11.messaging.ParticipantProcessorImpl.rollback_1", th) ;
                }
            }
        }
        else if (!recoveryManager.isParticipantRecoveryStarted())
        {
            if (WSTLogger.arjLoggerI18N.isWarnEnabled())
            {
                WSTLogger.arjLoggerI18N.warn("com.arjuna.wst11.messaging.ParticipantProcessorImpl.rollback_4", new Object[] {instanceIdentifier}) ;
            }
        }
        else if (recoveryManager.findParticipantRecoveryRecord(instanceIdentifier.getInstanceIdentifier()) != null)
        {
            if (WSTLogger.arjLoggerI18N.isWarnEnabled())
            {
                WSTLogger.arjLoggerI18N.warn("com.arjuna.wst11.messaging.ParticipantProcessorImpl.rollback_5", new Object[] {instanceIdentifier}) ;
            }
View Full Code Here


     * @message com.arjuna.wst11.messaging.ParticipantProcessorImpl.soapFault_2 [com.arjuna.wst11.messaging.ParticipantProcessorImpl.soapFault_2] - SoapFault called on unknown participant: {0}
     */
    public void soapFault(final SoapFault fault, final AddressingProperties addressingProperties,
        final ArjunaContext arjunaContext)
    {
        final InstanceIdentifier instanceIdentifier = arjunaContext.getInstanceIdentifier() ;
        final ParticipantInboundEvents participant = getParticipant(instanceIdentifier) ;

        if (participant != null)
        {
            try
View Full Code Here

    }

    public void testRequestWithInstanceIdentifier()
        throws Exception
    {
        executeRequest("testRequestWithInstanceIdentifier", new InstanceIdentifier("identifier")) ;
    }
View Full Code Here

        final RequestCallback callback = new RequestCallback() ;
        final TerminationParticipantProcessor terminationParticipantProcessor = TerminationParticipantProcessor.getProcessor() ;
        terminationParticipantProcessor.registerCallback(_id, callback) ;
        try
        {
            TerminationCoordinatorClient.getClient().sendClose(_terminationCoordinator, addressingProperties, new InstanceIdentifier(_id)) ;
            callback.waitUntilTriggered() ;
        }
        catch (final Throwable th)
        {
            throw new SystemException() ;
View Full Code Here

        final RequestCallback callback = new RequestCallback() ;
        final TerminationParticipantProcessor terminationParticipantProcessor = TerminationParticipantProcessor.getProcessor() ;
        terminationParticipantProcessor.registerCallback(_id, callback) ;
        try
        {
            TerminationCoordinatorClient.getClient().sendCancel(_terminationCoordinator, addressingProperties, new InstanceIdentifier(_id)) ;
            callback.waitUntilTriggered() ;
        }
        catch (final Throwable th)
        {
            throw new SystemException() ;
View Full Code Here

        final RequestCallback callback = new RequestCallback() ;
        final TerminationParticipantProcessor terminationParticipantProcessor = TerminationParticipantProcessor.getProcessor() ;
        terminationParticipantProcessor.registerCallback(_id, callback) ;
        try
        {
            TerminationCoordinatorClient.getClient().sendComplete(_terminationCoordinator, addressingProperties, new InstanceIdentifier(_id)) ;
            callback.waitUntilTriggered() ;
        }
        catch (final Throwable th)
        {
            throw new SystemException() ;
View Full Code Here

        final AddressingProperties addressingProperties = AddressingHelper.createNotificationContext(MessageId.getMessageId()) ;
        final SoapFault soapFault = new SoapFault11(SoapFaultType.FAULT_SENDER, ArjunaTXConstants.UNKNOWNERROR_ERROR_CODE_QNAME,
                WSTLogger.log_mesg.getString("com.arjuna.wst11.stub.BusinessActivityTerminatorStub_1")) ;
        try
        {
            TerminationCoordinatorClient.getClient().sendSoapFault(_terminationCoordinator, addressingProperties, soapFault, new InstanceIdentifier(_id)) ;
        }
        catch (final Throwable th)
        {
            throw new SystemException() ;
        }
View Full Code Here

            if (registrar != null)
            {
                try
                {
                    final W3CEndpointReference participantProtocolService = register.getParticipantProtocolService() ;
                    final InstanceIdentifier instanceIdentifier = arjunaContext.getInstanceIdentifier();
                    final W3CEndpointReference coordinationProtocolService =
                            registrar.register(participantProtocolService, protocolIdentifier, instanceIdentifier, isSecure) ;
                    final RegisterResponseType response = new RegisterResponseType() ;

                    response.setCoordinatorProtocolService(coordinationProtocolService);
View Full Code Here

    protected boolean handleMessageOutbound(SOAPMessageContext context) throws ProtocolException
    {
        try {
            ArjunaContext arjunaContext = ArjunaContext.getCurrentContext(context);
            if (arjunaContext != null) {
                InstanceIdentifier instanceIdentifier = arjunaContext.getInstanceIdentifier();
                // insert a header into the current message containing the instance identifier as a text element
                final SOAPMessage soapMessage = context.getMessage();
                final SOAPEnvelope soapEnvelope = soapMessage.getSOAPPart().getEnvelope();
                SOAPHeader soapHeader = soapEnvelope.getHeader() ;
                if (soapHeader == null)
                {
                    soapHeader = soapEnvelope.addHeader() ;
                }
                final SOAPHeaderElement headerElement = soapHeader.addHeaderElement(ArjunaConstants.WSARJ_ELEMENT_INSTANCE_IDENTIFIER_QNAME);
                headerElement.setValue(instanceIdentifier.getInstanceIdentifier());
                headerElement.setMustUnderstand(true);
            }
        } catch (Exception se) {
            throw new ProtocolException(se);
        }
View Full Code Here

                    // context in the message context
                    headerElement.setMustUnderstand(false);
                    String identifierString = headerElement.getValue();
                    if (identifierString != null) {
                        ArjunaContext arjunaContext = ArjunaContext.getContext(context);
                        arjunaContext.setInstanceIdentifier(new InstanceIdentifier(identifierString));
                        break;
                    }
                }
            }
        } catch (Exception se) {
View Full Code Here

TOP

Related Classes of com.arjuna.webservices11.wsarj.InstanceIdentifier

Copyright © 2018 www.massapicom. 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.