/** * Send the aborted message. * */ private void sendAborted() { final MAP responseAddressingContext = createContext() ; final InstanceIdentifier instanceIdentifier = new InstanceIdentifier(id) ; try { CoordinatorClient.getClient().sendAborted(coordinator, responseAddressingContext, instanceIdentifier) ; } catch (final Throwable th) { if (WSTLogger.logger.isTraceEnabled()) { WSTLogger.logger.tracev("Unexpected exception while sending Aborted", th) ; } } }
/** * Send a prepared request. * @param map addressing context initialised with to and message ID. * @param identifier The identifier of the initiator. * @throws com.arjuna.webservices.SoapFault For any SOAP errors. * @throws java.io.IOException for any transport errors. */ public void sendPrepared(final W3CEndpointReference endpoint, final MAP map, final InstanceIdentifier identifier) throws SoapFault, IOException { MAPEndpoint participant = getParticipant(endpoint, map); AddressingHelper.installFromFaultTo(map, participant, identifier); CoordinatorPortType port = getPort(endpoint, map, preparedAction); Notification prepared = new Notification(); port.preparedOperation(prepared); }
/** * Send the committed message. * */ private void sendCommitted() { final MAP responseAddressingContext = createContext() ; final InstanceIdentifier instanceIdentifier = new InstanceIdentifier(id) ; try { CoordinatorClient.getClient().sendCommitted(coordinator, responseAddressingContext, instanceIdentifier) ; } catch (final Throwable th) { if (WSTLogger.logger.isTraceEnabled()) { WSTLogger.logger.tracev("Unexpected exception while sending Committed", th) ; } } }
/** * Send the read only message. * */ private void sendReadOnly() { final MAP responseAddressingContext = createContext() ; final InstanceIdentifier instanceIdentifier = new InstanceIdentifier(id) ; try { CoordinatorClient.getClient().sendReadOnly(coordinator, responseAddressingContext, instanceIdentifier) ; } catch (final Throwable th) { if (WSTLogger.logger.isTraceEnabled()) { WSTLogger.logger.tracev("Unexpected exception while sending ReadOnly", th) ; } } }
/** * Send the prepared message. * * @param timedOut true if this is in response to a comms timeout */ private void sendPrepared(boolean timedOut) { final MAP responseAddressingContext = createContext() ; final InstanceIdentifier instanceIdentifier = new InstanceIdentifier(id) ; try { CoordinatorClient.getClient().sendPrepared(coordinator, responseAddressingContext, instanceIdentifier) ; } catch (final Throwable th) { if (WSTLogger.logger.isTraceEnabled()) { WSTLogger.logger.tracev("Unexpected exception while sending Prepared", th) ; } } updateResendPeriod(timedOut); initiateTimer() ; }
/** * Send a fault. * @param map The addressing context. * @param soapFault The SOAP fault. * @param identifier The arjuna instance identifier. * @throws com.arjuna.webservices.SoapFault For any SOAP errors. * @throws java.io.IOException for any transport errors. */ public void sendSoapFault(final W3CEndpointReference endpoint, final MAP map, final SoapFault soapFault, final InstanceIdentifier identifier) throws SoapFault, IOException { CoordinatorPortType port = getPort(endpoint, map, faultAction); // convert fault to the wire format and dispatch it to the initiator soapFault.setAction(faultAction) ; Fault fault = ((SoapFault11)soapFault).toFault(); port.soapFault(fault); }
/** * Send the read only message. * */ private void sendReadOnly() { final MAP responseAddressingContext = createContext() ; final InstanceIdentifier instanceIdentifier = new InstanceIdentifier(id) ; try { CoordinatorClient.getClient().sendReadOnly(coordinator, responseAddressingContext, instanceIdentifier) ; } catch (final Throwable th) { if (WSTLogger.logger.isTraceEnabled()) { WSTLogger.logger.tracev("Unexpected exception while sending ReadOnly", th) ; } } }
/** * Send the prepared message. * * @param timedOut true if this is in response to a comms timeout */ private void sendPrepared(boolean timedOut) { final MAP responseAddressingContext = createContext() ; final InstanceIdentifier instanceIdentifier = new InstanceIdentifier(id) ; try { CoordinatorClient.getClient().sendPrepared(coordinator, responseAddressingContext, instanceIdentifier) ; } catch (final Throwable th) { if (WSTLogger.logger.isTraceEnabled()) { WSTLogger.logger.tracev("Unexpected exception while sending Prepared", th) ; } } updateResendPeriod(timedOut); initiateTimer() ; }
/** * Send a fault. * @param map The addressing context. * @param soapFault The SOAP fault. * @param identifier The arjuna instance identifier. * @throws com.arjuna.webservices.SoapFault For any SOAP errors. * @throws java.io.IOException for any transport errors. */ public void sendSoapFault(final W3CEndpointReference endpoint, final MAP map, final SoapFault soapFault, final InstanceIdentifier identifier) throws SoapFault, IOException { CoordinatorPortType port = getPort(endpoint, map, faultAction); // convert fault to the wire format and dispatch it to the initiator soapFault.setAction(faultAction) ; Fault fault = ((SoapFault11)soapFault).toFault(); port.soapFault(fault); }
/** * Send a prepared request. * @param map addressing context initialised with to and message ID. * @param identifier The identifier of the initiator. * @throws com.arjuna.webservices.SoapFault For any SOAP errors. * @throws java.io.IOException for any transport errors. */ public void sendPrepared(final W3CEndpointReference endpoint, final MAP map, final InstanceIdentifier identifier) throws SoapFault, IOException { MAPEndpoint participant = getParticipant(endpoint, map); AddressingHelper.installFromFaultTo(map, participant, identifier); CoordinatorPortType port = getPort(endpoint, map, preparedAction); Notification prepared = new Notification(); port.preparedOperation(prepared); }
/** * Send the aborted message. * */ private void sendAborted() { final MAP responseAddressingContext = createContext() ; final InstanceIdentifier instanceIdentifier = new InstanceIdentifier(id) ; try { CoordinatorClient.getClient().sendAborted(coordinator, responseAddressingContext, instanceIdentifier) ; } catch (final Throwable th) { if (WSTLogger.logger.isTraceEnabled()) { WSTLogger.logger.tracev("Unexpected exception while sending Aborted", th) ; } } }
/** * Send the committed message. * */ private void sendCommitted() { final MAP responseAddressingContext = createContext() ; final InstanceIdentifier instanceIdentifier = new InstanceIdentifier(id) ; try { CoordinatorClient.getClient().sendCommitted(coordinator, responseAddressingContext, instanceIdentifier) ; } catch (final Throwable th) { if (WSTLogger.logger.isTraceEnabled()) { WSTLogger.logger.tracev("Unexpected exception while sending Committed", th) ; } } }
/** * Send the read only message. * */ private void sendReadOnly() { final MAP responseAddressingContext = createContext() ; final InstanceIdentifier instanceIdentifier = new InstanceIdentifier(id) ; try { CoordinatorClient.getClient().sendReadOnly(coordinator, responseAddressingContext, instanceIdentifier) ; } catch (final Throwable th) { if (WSTLogger.logger.isTraceEnabled()) { WSTLogger.logger.tracev("Unexpected exception while sending ReadOnly", th) ; } } }
/** * Send the prepared message. * * @param timedOut true if this is in response to a comms timeout */ private void sendPrepared(boolean timedOut) { final MAP responseAddressingContext = createContext() ; final InstanceIdentifier instanceIdentifier = new InstanceIdentifier(id) ; try { CoordinatorClient.getClient().sendPrepared(coordinator, responseAddressingContext, instanceIdentifier) ; } catch (final Throwable th) { if (WSTLogger.logger.isTraceEnabled()) { WSTLogger.logger.tracev("Unexpected exception while sending Prepared", th) ; } } updateResendPeriod(timedOut); initiateTimer() ; }
/** * Send a fault. * @param map The addressing context. * @param soapFault The SOAP fault. * @param identifier The arjuna instance identifier. * @throws com.arjuna.webservices.SoapFault For any SOAP errors. * @throws java.io.IOException for any transport errors. */ public void sendSoapFault(final W3CEndpointReference endpoint, final MAP map, final SoapFault soapFault, final InstanceIdentifier identifier) throws SoapFault, IOException { CoordinatorPortType port = getPort(endpoint, map, faultAction); // convert fault to the wire format and dispatch it to the initiator soapFault.setAction(faultAction) ; Fault fault = ((SoapFault11)soapFault).toFault(); port.soapFault(fault); }
/** * Send a read only request. * @param map addressing context initialised with to and message ID. * @param identifier The identifier of the initiator. * @throws com.arjuna.webservices.SoapFault For any SOAP errors. * @throws java.io.IOException for any transport errors. */ public void sendReadOnly(final W3CEndpointReference endpoint, final MAP map, final InstanceIdentifier identifier) throws SoapFault, IOException { MAPEndpoint participant = getParticipant(endpoint, map); AddressingHelper.installFaultTo(map, participant, identifier); CoordinatorPortType port = getPort(endpoint, map, readOnlyAction); Notification readOnly = new Notification(); port.readOnlyOperation(readOnly); }
/** * Send the aborted message. * */ private void sendAborted() { final MAP responseAddressingContext = createContext() ; final InstanceIdentifier instanceIdentifier = new InstanceIdentifier(id) ; try { CoordinatorClient.getClient().sendAborted(coordinator, responseAddressingContext, instanceIdentifier) ; } catch (final Throwable th) { if (WSTLogger.logger.isTraceEnabled()) { WSTLogger.logger.tracev("Unexpected exception while sending Aborted", th) ; } } }
/** * Send the committed message. * */ private void sendCommitted() { final MAP responseAddressingContext = createContext() ; final InstanceIdentifier instanceIdentifier = new InstanceIdentifier(id) ; try { CoordinatorClient.getClient().sendCommitted(coordinator, responseAddressingContext, instanceIdentifier) ; } catch (final Throwable th) { if (WSTLogger.logger.isTraceEnabled()) { WSTLogger.logger.tracev("Unexpected exception while sending Committed", th) ; } } }
/** * Send a prepared request. * @param map addressing context initialised with to and message ID. * @param identifier The identifier of the initiator. * @throws com.arjuna.webservices.SoapFault For any SOAP errors. * @throws java.io.IOException for any transport errors. */ public void sendPrepared(final W3CEndpointReference endpoint, final MAP map, final InstanceIdentifier identifier) throws SoapFault, IOException { MAPEndpoint participant = getParticipant(endpoint, map); AddressingHelper.installFromFaultTo(map, participant, identifier); CoordinatorPortType port = getPort(endpoint, map, preparedAction); Notification prepared = new Notification(); port.preparedOperation(prepared); }
/** * Send an aborted message. * * @param map The addressing context. * @param arjunaContext The arjuna context. * */ private void sendAborted(final MAP map, final ArjunaContext arjunaContext) { // KEV add check for recovery final String messageId = MessageId.getMessageId() ; final MAP responseMAP = AddressingHelper.createResponseContext(map, messageId) ; final InstanceIdentifier instanceIdentifier = arjunaContext.getInstanceIdentifier() ; try { CoordinatorClient.getClient().sendAborted(null, responseMAP, instanceIdentifier) ; } catch (final Throwable th) { if (WSTLogger.logger.isTraceEnabled()) { WSTLogger.logger.tracev("Unexpected exception while sending Aborted", th) ; } } } }