Search in sources :

Example 46 with InstanceIdentifier

use of com.arjuna.webservices11.wsarj.InstanceIdentifier in project narayana by jbosstm.

the class CoordinatorCompletionCoordinatorProcessorImpl method compensated.

/**
 * Compensated.
 * @param compensated The compensated notification.
 * @param map The addressing context.
 * @param arjunaContext The arjuna context.
 */
public void compensated(final NotificationType compensated, final MAP map, final ArjunaContext arjunaContext) {
    final InstanceIdentifier instanceIdentifier = arjunaContext.getInstanceIdentifier();
    final CoordinatorCompletionCoordinatorInboundEvents coordinator = getCoordinator(instanceIdentifier);
    if (coordinator != null) {
        try {
            coordinator.compensated(compensated, map, arjunaContext);
        } catch (final Throwable th) {
            if (WSTLogger.logger.isTraceEnabled()) {
                WSTLogger.logger.tracev("Unexpected exception thrown from compensated:", th);
            }
        }
    } else if (WSTLogger.logger.isTraceEnabled()) {
        WSTLogger.logger.tracev("Compensated called on unknown coordinator: {0}", new Object[] { instanceIdentifier });
    }
}
Also used : InstanceIdentifier(com.arjuna.webservices11.wsarj.InstanceIdentifier) CoordinatorCompletionCoordinatorInboundEvents(com.arjuna.webservices11.wsba.CoordinatorCompletionCoordinatorInboundEvents)

Example 47 with InstanceIdentifier

use of com.arjuna.webservices11.wsarj.InstanceIdentifier in project narayana by jbosstm.

the class CoordinatorCompletionCoordinatorProcessorImpl method fail.

/**
 * Fail.
 * @param fail The fail exceptionnotification.
 * @param map The addressing context.
 * @param arjunaContext The arjuna context.
 */
public void fail(final ExceptionType fail, final MAP map, final ArjunaContext arjunaContext) {
    final InstanceIdentifier instanceIdentifier = arjunaContext.getInstanceIdentifier();
    final CoordinatorCompletionCoordinatorInboundEvents coordinator = getCoordinator(instanceIdentifier);
    if (coordinator != null) {
        try {
            coordinator.fail(fail, map, arjunaContext);
        } catch (final Throwable th) {
            if (WSTLogger.logger.isTraceEnabled()) {
                WSTLogger.logger.tracev("Unexpected exception thrown from failed:", th);
            }
        }
    } else if (areRecoveryLogEntriesAccountedFor()) {
        // we can respond with a failed as the participant is not pending recovery
        if (WSTLogger.logger.isTraceEnabled()) {
            WSTLogger.logger.tracev("Failed called on unknown coordinator: {0}", new Object[] { instanceIdentifier });
        }
        sendFailed(map, arjunaContext);
    } else {
        // we must delay responding until we can be sure there is no participant pending recovery
        if (WSTLogger.logger.isTraceEnabled()) {
            WSTLogger.logger.tracev("Ignoring fail called on unidentified coordinator until recovery pass is complete: {0}", new Object[] { instanceIdentifier });
        }
    }
}
Also used : InstanceIdentifier(com.arjuna.webservices11.wsarj.InstanceIdentifier) CoordinatorCompletionCoordinatorInboundEvents(com.arjuna.webservices11.wsba.CoordinatorCompletionCoordinatorInboundEvents)

Example 48 with InstanceIdentifier

use of com.arjuna.webservices11.wsarj.InstanceIdentifier in project narayana by jbosstm.

the class CoordinatorCompletionCoordinatorProcessorImpl method completed.

/**
 * Completed.
 * @param completed The completed notification.
 * @param map The addressing context.
 * @param arjunaContext The arjuna context.
 */
public void completed(final NotificationType completed, final MAP map, final ArjunaContext arjunaContext) {
    final InstanceIdentifier instanceIdentifier = arjunaContext.getInstanceIdentifier();
    final CoordinatorCompletionCoordinatorInboundEvents coordinator = getCoordinator(instanceIdentifier);
    if (coordinator != null) {
        try {
            coordinator.completed(completed, map, arjunaContext);
        } catch (final Throwable th) {
            if (WSTLogger.logger.isTraceEnabled()) {
                WSTLogger.logger.tracev("Unexpected exception thrown from completed:", th);
            }
        }
    } else if (WSTLogger.logger.isTraceEnabled()) {
        if (areRecoveryLogEntriesAccountedFor()) {
            // this is a resend for a lost participant
            WSTLogger.logger.tracev("Completed called on unknown coordinator: {0}", new Object[] { instanceIdentifier });
        } else {
            // this may be a resend for a participant still pending recovery
            WSTLogger.logger.tracev("Ignoring completed called on unidentified coordinator until recovery pass is complete: {0}", new Object[] { instanceIdentifier });
        }
    }
}
Also used : InstanceIdentifier(com.arjuna.webservices11.wsarj.InstanceIdentifier) CoordinatorCompletionCoordinatorInboundEvents(com.arjuna.webservices11.wsba.CoordinatorCompletionCoordinatorInboundEvents)

Example 49 with InstanceIdentifier

use of com.arjuna.webservices11.wsarj.InstanceIdentifier in project narayana by jbosstm.

the class CoordinatorCompletionCoordinatorProcessorImpl method status.

/**
 * Status.
 * @param status The status.
 * @param map The addressing context.
 * @param arjunaContext The arjuna context.
 */
public void status(final StatusType status, final MAP map, final ArjunaContext arjunaContext) {
    final InstanceIdentifier instanceIdentifier = arjunaContext.getInstanceIdentifier();
    final CoordinatorCompletionCoordinatorInboundEvents coordinator = getCoordinator(instanceIdentifier);
    if (coordinator != null) {
        try {
            coordinator.status(status, map, arjunaContext);
        } catch (final Throwable th) {
            if (WSTLogger.logger.isTraceEnabled()) {
                WSTLogger.logger.tracev("Unexpected exception thrown from status:", th);
            }
        }
    } else if (WSTLogger.logger.isTraceEnabled()) {
        WSTLogger.logger.tracev("Status called on unknown coordinator: {0}", new Object[] { instanceIdentifier });
    }
}
Also used : InstanceIdentifier(com.arjuna.webservices11.wsarj.InstanceIdentifier) CoordinatorCompletionCoordinatorInboundEvents(com.arjuna.webservices11.wsba.CoordinatorCompletionCoordinatorInboundEvents)

Example 50 with InstanceIdentifier

use of com.arjuna.webservices11.wsarj.InstanceIdentifier in project narayana by jbosstm.

the class CoordinatorCompletionCoordinatorProcessorImpl method closed.

/**
 * Closed.
 * @param closed The closed notification.
 * @param map The addressing context.
 * @param arjunaContext The arjuna context.
 */
public void closed(final NotificationType closed, final MAP map, final ArjunaContext arjunaContext) {
    final InstanceIdentifier instanceIdentifier = arjunaContext.getInstanceIdentifier();
    final CoordinatorCompletionCoordinatorInboundEvents coordinator = getCoordinator(instanceIdentifier);
    if (coordinator != null) {
        try {
            coordinator.closed(closed, map, arjunaContext);
        } catch (final Throwable th) {
            if (WSTLogger.logger.isTraceEnabled()) {
                WSTLogger.logger.tracev("Unexpected exception thrown from closed:", th);
            }
        }
    } else if (WSTLogger.logger.isTraceEnabled()) {
        WSTLogger.logger.tracev("Closed called on unknown coordinator: {0}", new Object[] { instanceIdentifier });
    }
}
Also used : InstanceIdentifier(com.arjuna.webservices11.wsarj.InstanceIdentifier) CoordinatorCompletionCoordinatorInboundEvents(com.arjuna.webservices11.wsba.CoordinatorCompletionCoordinatorInboundEvents)

Aggregations

InstanceIdentifier (com.arjuna.webservices11.wsarj.InstanceIdentifier)130 MAP (org.jboss.ws.api.addressing.MAP)83 W3CEndpointReference (javax.xml.ws.wsaddressing.W3CEndpointReference)53 Test (org.junit.Test)51 SoapFault11 (com.arjuna.webservices11.SoapFault11)24 SoapFault (com.arjuna.webservices.SoapFault)20 ArjunaContext (com.arjuna.webservices11.wsarj.ArjunaContext)13 SystemException (com.arjuna.wst.SystemException)13 UnknownTransactionException (com.arjuna.wst.UnknownTransactionException)13 QName (javax.xml.namespace.QName)12 CoordinatorCompletionCoordinatorInboundEvents (com.arjuna.webservices11.wsba.CoordinatorCompletionCoordinatorInboundEvents)10 CoordinatorCompletionParticipantInboundEvents (com.arjuna.webservices11.wsba.CoordinatorCompletionParticipantInboundEvents)10 ParticipantCompletionCoordinatorInboundEvents (com.arjuna.webservices11.wsba.ParticipantCompletionCoordinatorInboundEvents)10 CoordinatorCompletionParticipantDetails (com.arjuna.wst.tests.arq.TestCoordinatorCompletionParticipantProcessor.CoordinatorCompletionParticipantDetails)10 ParticipantCompletionCoordinatorDetails (com.arjuna.wst.tests.arq.TestParticipantCompletionCoordinatorProcessor.ParticipantCompletionCoordinatorDetails)10 SoapFaultType (com.arjuna.webservices.SoapFaultType)9 ParticipantCompletionParticipantInboundEvents (com.arjuna.webservices11.wsba.ParticipantCompletionParticipantInboundEvents)9 CoordinatorCompletionCoordinatorDetails (com.arjuna.wst.tests.arq.TestCoordinatorCompletionCoordinatorProcessor.CoordinatorCompletionCoordinatorDetails)9 ParticipantCompletionParticipantDetails (com.arjuna.wst.tests.arq.TestParticipantCompletionParticipantProcessor.ParticipantCompletionParticipantDetails)9 ProtocolException (javax.xml.ws.ProtocolException)9