[jboss-svn-commits] JBL Code SVN: r14200 - in labs/jbosstm/workspace/XTS_TX11: WS-C/dev/src/com/arjuna/webservices/wscoor11 and 56 other directories.

jboss-svn-commits at lists.jboss.org jboss-svn-commits at lists.jboss.org
Tue Aug 14 08:43:41 EDT 2007


Author: kevin.conner at jboss.com
Date: 2007-08-14 08:43:41 -0400 (Tue, 14 Aug 2007)
New Revision: 14200

Added:
   labs/jbosstm/workspace/XTS_TX11/WS-C/dev/src/com/arjuna/webservices/wscoor11/
   labs/jbosstm/workspace/XTS_TX11/WS-C/dev/src/com/arjuna/webservices/wscoor11/AttributedUnsignedIntType.java
   labs/jbosstm/workspace/XTS_TX11/WS-C/dev/src/com/arjuna/webservices/wscoor11/CoordinationConstants.java
   labs/jbosstm/workspace/XTS_TX11/WS-C/dev/src/com/arjuna/webservices/wscoor11/CoordinationContext.java
   labs/jbosstm/workspace/XTS_TX11/WS-C/dev/src/com/arjuna/webservices/wscoor11/CoordinationContextType.java
   labs/jbosstm/workspace/XTS_TX11/WS-C/dev/src/com/arjuna/webservices/wscoor11/CreateCoordinationContextResponseType.java
   labs/jbosstm/workspace/XTS_TX11/WS-C/dev/src/com/arjuna/webservices/wscoor11/CreateCoordinationContextType.java
   labs/jbosstm/workspace/XTS_TX11/WS-C/dev/src/com/arjuna/webservices/wscoor11/RegisterResponseType.java
   labs/jbosstm/workspace/XTS_TX11/WS-C/dev/src/com/arjuna/webservices/wscoor11/RegisterType.java
   labs/jbosstm/workspace/XTS_TX11/WS-C/dev/src/com/arjuna/webservices/wscoor11/client/
   labs/jbosstm/workspace/XTS_TX11/WS-C/dev/src/com/arjuna/webservices/wscoor11/client/ActivationCoordinatorClient.java
   labs/jbosstm/workspace/XTS_TX11/WS-C/dev/src/com/arjuna/webservices/wscoor11/client/ActivationRequesterClient.java
   labs/jbosstm/workspace/XTS_TX11/WS-C/dev/src/com/arjuna/webservices/wscoor11/client/RegistrationCoordinatorClient.java
   labs/jbosstm/workspace/XTS_TX11/WS-C/dev/src/com/arjuna/webservices/wscoor11/client/RegistrationRequesterClient.java
   labs/jbosstm/workspace/XTS_TX11/WS-C/dev/src/com/arjuna/webservices/wscoor11/handlers/
   labs/jbosstm/workspace/XTS_TX11/WS-C/dev/src/com/arjuna/webservices/wscoor11/handlers/ActivationRequesterSoapFaultHandler.java
   labs/jbosstm/workspace/XTS_TX11/WS-C/dev/src/com/arjuna/webservices/wscoor11/handlers/CoordinationContextHandler.java
   labs/jbosstm/workspace/XTS_TX11/WS-C/dev/src/com/arjuna/webservices/wscoor11/handlers/CreateCoordinationContextHandler.java
   labs/jbosstm/workspace/XTS_TX11/WS-C/dev/src/com/arjuna/webservices/wscoor11/handlers/CreateCoordinationContextResponseHandler.java
   labs/jbosstm/workspace/XTS_TX11/WS-C/dev/src/com/arjuna/webservices/wscoor11/handlers/RegisterHandler.java
   labs/jbosstm/workspace/XTS_TX11/WS-C/dev/src/com/arjuna/webservices/wscoor11/handlers/RegisterResponseHandler.java
   labs/jbosstm/workspace/XTS_TX11/WS-C/dev/src/com/arjuna/webservices/wscoor11/handlers/RegistrationRequesterSoapFaultHandler.java
   labs/jbosstm/workspace/XTS_TX11/WS-C/dev/src/com/arjuna/webservices/wscoor11/policy/
   labs/jbosstm/workspace/XTS_TX11/WS-C/dev/src/com/arjuna/webservices/wscoor11/policy/ActivationCoordinatorPolicy.java
   labs/jbosstm/workspace/XTS_TX11/WS-C/dev/src/com/arjuna/webservices/wscoor11/policy/ActivationRequesterPolicy.java
   labs/jbosstm/workspace/XTS_TX11/WS-C/dev/src/com/arjuna/webservices/wscoor11/policy/CoordinationContextPolicy.java
   labs/jbosstm/workspace/XTS_TX11/WS-C/dev/src/com/arjuna/webservices/wscoor11/policy/RegistrationCoordinatorPolicy.java
   labs/jbosstm/workspace/XTS_TX11/WS-C/dev/src/com/arjuna/webservices/wscoor11/policy/RegistrationRequesterPolicy.java
   labs/jbosstm/workspace/XTS_TX11/WS-C/dev/src/com/arjuna/webservices/wscoor11/processors/
   labs/jbosstm/workspace/XTS_TX11/WS-C/dev/src/com/arjuna/webservices/wscoor11/processors/ActivationCoordinatorProcessor.java
   labs/jbosstm/workspace/XTS_TX11/WS-C/dev/src/com/arjuna/webservices/wscoor11/processors/ActivationRequesterCallback.java
   labs/jbosstm/workspace/XTS_TX11/WS-C/dev/src/com/arjuna/webservices/wscoor11/processors/ActivationRequesterProcessor.java
   labs/jbosstm/workspace/XTS_TX11/WS-C/dev/src/com/arjuna/webservices/wscoor11/processors/RegistrationCoordinatorProcessor.java
   labs/jbosstm/workspace/XTS_TX11/WS-C/dev/src/com/arjuna/webservices/wscoor11/processors/RegistrationRequesterCallback.java
   labs/jbosstm/workspace/XTS_TX11/WS-C/dev/src/com/arjuna/webservices/wscoor11/processors/RegistrationRequesterProcessor.java
   labs/jbosstm/workspace/XTS_TX11/WS-C/dev/src/com/arjuna/webservices/wscoor11/server/
   labs/jbosstm/workspace/XTS_TX11/WS-C/dev/src/com/arjuna/webservices/wscoor11/server/ActivationCoordinatorInitialisation.java
   labs/jbosstm/workspace/XTS_TX11/WS-C/dev/src/com/arjuna/webservices/wscoor11/server/ActivationRequesterInitialisation.java
   labs/jbosstm/workspace/XTS_TX11/WS-C/dev/src/com/arjuna/webservices/wscoor11/server/RegistrationCoordinatorInitialisation.java
   labs/jbosstm/workspace/XTS_TX11/WS-C/dev/src/com/arjuna/webservices/wscoor11/server/RegistrationRequesterInitialisation.java
   labs/jbosstm/workspace/XTS_TX11/WS-C/dev/src/com/arjuna/webservices/wscoor11/wscoor.xsd
   labs/jbosstm/workspace/XTS_TX11/WS-C/dev/src/com/arjuna/webservices/wsjboss/
   labs/jbosstm/workspace/XTS_TX11/WS-C/dev/src/com/arjuna/webservices/wsjboss/InstanceIdentifier.java
   labs/jbosstm/workspace/XTS_TX11/WS-C/dev/src/com/arjuna/webservices/wsjboss/JBossConstants.java
   labs/jbosstm/workspace/XTS_TX11/WS-C/dev/src/com/arjuna/webservices/wsjboss/JBossContext.java
   labs/jbosstm/workspace/XTS_TX11/WS-C/dev/src/com/arjuna/webservices/wsjboss/handler/
   labs/jbosstm/workspace/XTS_TX11/WS-C/dev/src/com/arjuna/webservices/wsjboss/handler/InstanceIdentifierHandler.java
   labs/jbosstm/workspace/XTS_TX11/WS-C/dev/src/com/arjuna/webservices/wsjboss/policy/
   labs/jbosstm/workspace/XTS_TX11/WS-C/dev/src/com/arjuna/webservices/wsjboss/policy/JBossPolicy.java
   labs/jbosstm/workspace/XTS_TX11/WS-C/dev/src/com/arjuna/webservices/wsjboss/processor/
   labs/jbosstm/workspace/XTS_TX11/WS-C/dev/src/com/arjuna/webservices/wsjboss/processor/BaseNotificationProcessor.java
   labs/jbosstm/workspace/XTS_TX11/WS-C/dev/src/com/arjuna/wsc/ActivationCoordinator11.java
   labs/jbosstm/workspace/XTS_TX11/WS-C/dev/src/com/arjuna/wsc/CannotRegisterParticipantException.java
   labs/jbosstm/workspace/XTS_TX11/WS-C/dev/src/com/arjuna/wsc/ContextFactory11.java
   labs/jbosstm/workspace/XTS_TX11/WS-C/dev/src/com/arjuna/wsc/ContextFactoryMapper11.java
   labs/jbosstm/workspace/XTS_TX11/WS-C/dev/src/com/arjuna/wsc/Registrar11.java
   labs/jbosstm/workspace/XTS_TX11/WS-C/dev/src/com/arjuna/wsc/RegistrarMapper11.java
   labs/jbosstm/workspace/XTS_TX11/WS-C/dev/src/com/arjuna/wsc/RegistrationCoordinator11.java
   labs/jbosstm/workspace/XTS_TX11/WS-C/dev/src/com/arjuna/wsc/messaging/ActivationCoordinator11ProcessorImpl.java
   labs/jbosstm/workspace/XTS_TX11/WS-C/dev/src/com/arjuna/wsc/messaging/RegistrationCoordinator11ProcessorImpl.java
   labs/jbosstm/workspace/XTS_TX11/WS-C/dev/src/com/arjuna/wsc/messaging/deploy/Coordination11Initialisation.java
   labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsat11/
   labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsat11/AtomicTransactionConstants.java
   labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsat11/CoordinatorInboundEvents.java
   labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsat11/NotificationType.java
   labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsat11/ParticipantInboundEvents.java
   labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsat11/State.java
   labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsat11/client/
   labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsat11/client/CompletionCoordinatorClient.java
   labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsat11/client/CompletionInitiatorClient.java
   labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsat11/client/CoordinatorClient.java
   labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsat11/client/ParticipantClient.java
   labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsat11/handlers/
   labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsat11/handlers/CompletionCoordinatorCommitHandler.java
   labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsat11/handlers/CompletionCoordinatorRollbackHandler.java
   labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsat11/handlers/CompletionInitiatorAbortedHandler.java
   labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsat11/handlers/CompletionInitiatorCommittedHandler.java
   labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsat11/handlers/CompletionInitiatorSoapFaultHandler.java
   labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsat11/handlers/CoordinatorAbortedHandler.java
   labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsat11/handlers/CoordinatorCommittedHandler.java
   labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsat11/handlers/CoordinatorPreparedHandler.java
   labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsat11/handlers/CoordinatorReadOnlyHandler.java
   labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsat11/handlers/CoordinatorSoapFaultHandler.java
   labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsat11/handlers/ParticipantCommitHandler.java
   labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsat11/handlers/ParticipantPrepareHandler.java
   labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsat11/handlers/ParticipantRollbackHandler.java
   labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsat11/handlers/ParticipantSoapFaultHandler.java
   labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsat11/policy/
   labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsat11/policy/CompletionCoordinatorPolicy.java
   labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsat11/policy/CompletionInitiatorPolicy.java
   labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsat11/policy/CoordinatorPolicy.java
   labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsat11/policy/ParticipantPolicy.java
   labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsat11/processors/
   labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsat11/processors/CompletionCoordinatorProcessor.java
   labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsat11/processors/CompletionInitiatorCallback.java
   labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsat11/processors/CompletionInitiatorProcessor.java
   labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsat11/processors/CoordinatorProcessor.java
   labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsat11/processors/ParticipantProcessor.java
   labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsat11/server/
   labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsat11/server/CompletionCoordinatorInitialisation.java
   labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsat11/server/CompletionInitiatorInitialisation.java
   labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsat11/server/CoordinatorInitialisation.java
   labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsat11/server/ParticipantInitialisation.java
   labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsat11/wsat.xsd
   labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/
   labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/BusinessActivityConstants.java
   labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/CoordinatorCompletionCoordinatorInboundEvents.java
   labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/CoordinatorCompletionParticipantInboundEvents.java
   labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/ExceptionIdentifierType.java
   labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/ExceptionType.java
   labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/NotificationType.java
   labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/ParticipantCompletionCoordinatorInboundEvents.java
   labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/ParticipantCompletionParticipantInboundEvents.java
   labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/State.java
   labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/StateType.java
   labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/StatusType.java
   labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/client/
   labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/client/CoordinatorCompletionCoordinatorClient.java
   labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/client/CoordinatorCompletionParticipantClient.java
   labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/client/ParticipantCompletionCoordinatorClient.java
   labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/client/ParticipantCompletionParticipantClient.java
   labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/handlers/
   labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/handlers/CoordinatorCompletionCoordinatorCancelledHandler.java
   labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/handlers/CoordinatorCompletionCoordinatorCannotCompleteHandler.java
   labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/handlers/CoordinatorCompletionCoordinatorClosedHandler.java
   labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/handlers/CoordinatorCompletionCoordinatorCompensatedHandler.java
   labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/handlers/CoordinatorCompletionCoordinatorCompletedHandler.java
   labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/handlers/CoordinatorCompletionCoordinatorExitHandler.java
   labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/handlers/CoordinatorCompletionCoordinatorFailHandler.java
   labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/handlers/CoordinatorCompletionCoordinatorFaultHandler.java
   labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/handlers/CoordinatorCompletionCoordinatorGetStatusHandler.java
   labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/handlers/CoordinatorCompletionCoordinatorStatusHandler.java
   labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/handlers/CoordinatorCompletionParticipantCancelHandler.java
   labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/handlers/CoordinatorCompletionParticipantCloseHandler.java
   labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/handlers/CoordinatorCompletionParticipantCompensateHandler.java
   labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/handlers/CoordinatorCompletionParticipantCompleteHandler.java
   labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/handlers/CoordinatorCompletionParticipantExitedHandler.java
   labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/handlers/CoordinatorCompletionParticipantFailedHandler.java
   labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/handlers/CoordinatorCompletionParticipantFaultHandler.java
   labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/handlers/CoordinatorCompletionParticipantGetStatusHandler.java
   labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/handlers/CoordinatorCompletionParticipantNotCompletedHandler.java
   labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/handlers/CoordinatorCompletionParticipantStatusHandler.java
   labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/handlers/ParticipantCompletionCoordinatorCancelledHandler.java
   labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/handlers/ParticipantCompletionCoordinatorCannotCompleteHandler.java
   labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/handlers/ParticipantCompletionCoordinatorClosedHandler.java
   labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/handlers/ParticipantCompletionCoordinatorCompensatedHandler.java
   labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/handlers/ParticipantCompletionCoordinatorCompletedHandler.java
   labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/handlers/ParticipantCompletionCoordinatorExitHandler.java
   labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/handlers/ParticipantCompletionCoordinatorFailHandler.java
   labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/handlers/ParticipantCompletionCoordinatorFaultHandler.java
   labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/handlers/ParticipantCompletionCoordinatorGetStatusHandler.java
   labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/handlers/ParticipantCompletionCoordinatorStatusHandler.java
   labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/handlers/ParticipantCompletionParticipantCancelHandler.java
   labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/handlers/ParticipantCompletionParticipantCloseHandler.java
   labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/handlers/ParticipantCompletionParticipantCompensateHandler.java
   labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/handlers/ParticipantCompletionParticipantExitedHandler.java
   labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/handlers/ParticipantCompletionParticipantFailedHandler.java
   labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/handlers/ParticipantCompletionParticipantFaultHandler.java
   labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/handlers/ParticipantCompletionParticipantGetStatusHandler.java
   labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/handlers/ParticipantCompletionParticipantNotCompletedHandler.java
   labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/handlers/ParticipantCompletionParticipantStatusHandler.java
   labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/policy/
   labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/policy/CoordinatorCompletionCoordinatorPolicy.java
   labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/policy/CoordinatorCompletionParticipantPolicy.java
   labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/policy/ParticipantCompletionCoordinatorPolicy.java
   labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/policy/ParticipantCompletionParticipantPolicy.java
   labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/processors/
   labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/processors/CoordinatorCompletionCoordinatorProcessor.java
   labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/processors/CoordinatorCompletionParticipantProcessor.java
   labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/processors/ParticipantCompletionCoordinatorProcessor.java
   labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/processors/ParticipantCompletionParticipantProcessor.java
   labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/server/
   labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/server/CoordinatorCompletionCoordinatorInitialisation.java
   labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/server/CoordinatorCompletionParticipantInitialisation.java
   labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/server/ParticipantCompletionCoordinatorInitialisation.java
   labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/server/ParticipantCompletionParticipantInitialisation.java
   labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/wsba.xsd
   labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsjbosstx/
   labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsjbosstx/JBossTXConstants.java
   labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsjbosstx/NotificationType.java
   labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsjbosstx/client/
   labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsjbosstx/client/TerminationCoordinatorClient.java
   labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsjbosstx/handlers/
   labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsjbosstx/handlers/TerminationCoordinatorCancelHandler.java
   labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsjbosstx/handlers/TerminationCoordinatorCloseHandler.java
   labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsjbosstx/handlers/TerminationCoordinatorCompleteHandler.java
   labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsjbosstx/handlers/TerminationParticipantCancelledHandler.java
   labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsjbosstx/handlers/TerminationParticipantClosedHandler.java
   labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsjbosstx/handlers/TerminationParticipantCompletedHandler.java
   labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsjbosstx/handlers/TerminationParticipantSoapFaultHandler.java
   labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsjbosstx/policy/
   labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsjbosstx/policy/TerminationCoordinatorPolicy.java
   labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsjbosstx/policy/TerminationParticipantPolicy.java
   labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsjbosstx/processors/
   labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsjbosstx/processors/TerminationCoordinatorProcessor.java
   labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsjbosstx/processors/TerminationParticipantCallback.java
   labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsjbosstx/processors/TerminationParticipantProcessor.java
   labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsjbosstx/server/
   labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsjbosstx/server/TerminationCoordinatorInitialisation.java
   labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsjbosstx/server/TerminationParticipantInitialisation.java
   labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/wst/BA11ParticipantManager.java
   labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/wst/messaging/CompletionCoordinator11ProcessorImpl.java
   labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/wst/messaging/Coordinator11ProcessorImpl.java
   labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/wst/messaging/CoordinatorCompletionCoordinator11ProcessorImpl.java
   labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/wst/messaging/CoordinatorCompletionParticipant11ProcessorImpl.java
   labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/wst/messaging/Participant11ProcessorImpl.java
   labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/wst/messaging/ParticipantCompletionCoordinator11ProcessorImpl.java
   labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/wst/messaging/ParticipantCompletionParticipant11ProcessorImpl.java
   labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/wst/messaging/TerminatorParticipant11ProcessorImpl.java
   labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/wst/messaging/deploy/Transaction11Initialisation.java
   labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/wst/messaging/engines/Coordinator11Engine.java
   labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/wst/messaging/engines/CoordinatorCompletionCoordinator11Engine.java
   labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/wst/messaging/engines/CoordinatorCompletionParticipant11Engine.java
   labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/wst/messaging/engines/Participant11Engine.java
   labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/wst/messaging/engines/ParticipantCompletionCoordinator11Engine.java
   labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/wst/messaging/engines/ParticipantCompletionParticipant11Engine.java
   labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/wst/stub/BACoordinatorCompletionParticipantManager11Stub.java
   labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/wst/stub/BAParticipantCompletionParticipantManager11Stub.java
   labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/wst/stub/BusinessActivityTerminator11Stub.java
   labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/wst/stub/BusinessAgreementWithCoordinatorCompletion11Stub.java
   labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/wst/stub/BusinessAgreementWithParticipantCompletion11Stub.java
   labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/wst/stub/Completion11Stub.java
   labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/wst/stub/Durable2PC11Stub.java
   labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/wst/stub/Participant11Stub.java
   labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/wst/stub/Volatile2PC11Stub.java
   labs/jbosstm/workspace/XTS_TX11/WSCF/classes/com/arjuna/mw/wsc/context/Context11.java
   labs/jbosstm/workspace/XTS_TX11/WSCF/classes/com/arjuna/mwlabs/wsc/ContextFactoryMapper11Imple.java
   labs/jbosstm/workspace/XTS_TX11/WSTX/classes/com/arjuna/mw/wst/BusinessActivity11Manager.java
   labs/jbosstm/workspace/XTS_TX11/WSTX/classes/com/arjuna/mw/wst/BusinessActivity11ManagerFactory.java
   labs/jbosstm/workspace/XTS_TX11/WSTX/classes/com/arjuna/mwlabs/wst/at/recovery/
   labs/jbosstm/workspace/XTS_TX11/WSTX/classes/com/arjuna/mwlabs/wst/at/recovery/Implementations.java
   labs/jbosstm/workspace/XTS_TX11/WSTX/classes/com/arjuna/mwlabs/wst/at/recovery/ParticipantRecordSetup.java
   labs/jbosstm/workspace/XTS_TX11/WSTX/classes/com/arjuna/mwlabs/wst/at/recovery/WSATRecoveryModule.java
   labs/jbosstm/workspace/XTS_TX11/WSTX/classes/com/arjuna/mwlabs/wst/at11/
   labs/jbosstm/workspace/XTS_TX11/WSTX/classes/com/arjuna/mwlabs/wst/at11/ContextFactoryImple.java
   labs/jbosstm/workspace/XTS_TX11/WSTX/classes/com/arjuna/mwlabs/wst/at11/ContextImple.java
   labs/jbosstm/workspace/XTS_TX11/WSTX/classes/com/arjuna/mwlabs/wst/at11/RegistrarImple.java
   labs/jbosstm/workspace/XTS_TX11/WSTX/classes/com/arjuna/mwlabs/wst/at11/context/
   labs/jbosstm/workspace/XTS_TX11/WSTX/classes/com/arjuna/mwlabs/wst/at11/context/DeploymentContextImple.java
   labs/jbosstm/workspace/XTS_TX11/WSTX/classes/com/arjuna/mwlabs/wst/at11/context/JBossContextImple.java
   labs/jbosstm/workspace/XTS_TX11/WSTX/classes/com/arjuna/mwlabs/wst/at11/context/TxContextImple.java
   labs/jbosstm/workspace/XTS_TX11/WSTX/classes/com/arjuna/mwlabs/wst/at11/coordinator/
   labs/jbosstm/workspace/XTS_TX11/WSTX/classes/com/arjuna/mwlabs/wst/at11/coordinator/TxState.java
   labs/jbosstm/workspace/XTS_TX11/WSTX/classes/com/arjuna/mwlabs/wst/at11/local/
   labs/jbosstm/workspace/XTS_TX11/WSTX/classes/com/arjuna/mwlabs/wst/at11/local/ContextManager.java
   labs/jbosstm/workspace/XTS_TX11/WSTX/classes/com/arjuna/mwlabs/wst/at11/local/LocalContextFactoryImple.java
   labs/jbosstm/workspace/XTS_TX11/WSTX/classes/com/arjuna/mwlabs/wst/at11/local/LocalRegistrarImple.java
   labs/jbosstm/workspace/XTS_TX11/WSTX/classes/com/arjuna/mwlabs/wst/at11/local/TransactionManagerImple.java
   labs/jbosstm/workspace/XTS_TX11/WSTX/classes/com/arjuna/mwlabs/wst/at11/local/UserTransactionImple.java
   labs/jbosstm/workspace/XTS_TX11/WSTX/classes/com/arjuna/mwlabs/wst/at11/participants/
   labs/jbosstm/workspace/XTS_TX11/WSTX/classes/com/arjuna/mwlabs/wst/at11/participants/CleanupSynchronization.java
   labs/jbosstm/workspace/XTS_TX11/WSTX/classes/com/arjuna/mwlabs/wst/at11/participants/CompletionCoordinatorImple.java
   labs/jbosstm/workspace/XTS_TX11/WSTX/classes/com/arjuna/mwlabs/wst/at11/participants/DurableTwoPhaseCommitParticipant.java
   labs/jbosstm/workspace/XTS_TX11/WSTX/classes/com/arjuna/mwlabs/wst/at11/participants/VolatileTwoPhaseCommitParticipant.java
   labs/jbosstm/workspace/XTS_TX11/WSTX/classes/com/arjuna/mwlabs/wst/at11/remote/
   labs/jbosstm/workspace/XTS_TX11/WSTX/classes/com/arjuna/mwlabs/wst/at11/remote/ContextManager.java
   labs/jbosstm/workspace/XTS_TX11/WSTX/classes/com/arjuna/mwlabs/wst/at11/remote/TransactionManagerImple.java
   labs/jbosstm/workspace/XTS_TX11/WSTX/classes/com/arjuna/mwlabs/wst/at11/remote/UserTransactionImple.java
   labs/jbosstm/workspace/XTS_TX11/WSTX/classes/com/arjuna/mwlabs/wst/ba/recovery/
   labs/jbosstm/workspace/XTS_TX11/WSTX/classes/com/arjuna/mwlabs/wst/ba/recovery/Implementations.java
   labs/jbosstm/workspace/XTS_TX11/WSTX/classes/com/arjuna/mwlabs/wst/ba/recovery/ParticipantRecordSetup.java
   labs/jbosstm/workspace/XTS_TX11/WSTX/classes/com/arjuna/mwlabs/wst/ba/recovery/WSBARecoveryModule.java
   labs/jbosstm/workspace/XTS_TX11/WSTX/classes/com/arjuna/mwlabs/wst/ba11/
   labs/jbosstm/workspace/XTS_TX11/WSTX/classes/com/arjuna/mwlabs/wst/ba11/BusinessActivityTerminatorImple.java
   labs/jbosstm/workspace/XTS_TX11/WSTX/classes/com/arjuna/mwlabs/wst/ba11/ContextFactoryImple.java
   labs/jbosstm/workspace/XTS_TX11/WSTX/classes/com/arjuna/mwlabs/wst/ba11/ContextImple.java
   labs/jbosstm/workspace/XTS_TX11/WSTX/classes/com/arjuna/mwlabs/wst/ba11/RegistrarImple.java
   labs/jbosstm/workspace/XTS_TX11/WSTX/classes/com/arjuna/mwlabs/wst/ba11/context/
   labs/jbosstm/workspace/XTS_TX11/WSTX/classes/com/arjuna/mwlabs/wst/ba11/context/DeploymentContextImple.java
   labs/jbosstm/workspace/XTS_TX11/WSTX/classes/com/arjuna/mwlabs/wst/ba11/context/JBossContextImple.java
   labs/jbosstm/workspace/XTS_TX11/WSTX/classes/com/arjuna/mwlabs/wst/ba11/context/TxContextImple.java
   labs/jbosstm/workspace/XTS_TX11/WSTX/classes/com/arjuna/mwlabs/wst/ba11/local/
   labs/jbosstm/workspace/XTS_TX11/WSTX/classes/com/arjuna/mwlabs/wst/ba11/local/BAParticipantManagerImple.java
   labs/jbosstm/workspace/XTS_TX11/WSTX/classes/com/arjuna/mwlabs/wst/ba11/local/BusinessActivityManagerImple.java
   labs/jbosstm/workspace/XTS_TX11/WSTX/classes/com/arjuna/mwlabs/wst/ba11/local/ContextManager.java
   labs/jbosstm/workspace/XTS_TX11/WSTX/classes/com/arjuna/mwlabs/wst/ba11/local/LocalContextFactoryImple.java
   labs/jbosstm/workspace/XTS_TX11/WSTX/classes/com/arjuna/mwlabs/wst/ba11/local/LocalRegistrarImple.java
   labs/jbosstm/workspace/XTS_TX11/WSTX/classes/com/arjuna/mwlabs/wst/ba11/local/UserBusinessActivityImple.java
   labs/jbosstm/workspace/XTS_TX11/WSTX/classes/com/arjuna/mwlabs/wst/ba11/participants/
   labs/jbosstm/workspace/XTS_TX11/WSTX/classes/com/arjuna/mwlabs/wst/ba11/participants/BusinessAgreementWithCoordinatorCompletionImple.java
   labs/jbosstm/workspace/XTS_TX11/WSTX/classes/com/arjuna/mwlabs/wst/ba11/participants/BusinessAgreementWithParticipantCompletionImple.java
   labs/jbosstm/workspace/XTS_TX11/WSTX/classes/com/arjuna/mwlabs/wst/ba11/participants/TerminationCoordinatorImple.java
   labs/jbosstm/workspace/XTS_TX11/WSTX/classes/com/arjuna/mwlabs/wst/ba11/remote/
   labs/jbosstm/workspace/XTS_TX11/WSTX/classes/com/arjuna/mwlabs/wst/ba11/remote/BAParticipantManagerImple.java
   labs/jbosstm/workspace/XTS_TX11/WSTX/classes/com/arjuna/mwlabs/wst/ba11/remote/BusinessActivityManagerImple.java
   labs/jbosstm/workspace/XTS_TX11/WSTX/classes/com/arjuna/mwlabs/wst/ba11/remote/ContextManager.java
   labs/jbosstm/workspace/XTS_TX11/WSTX/classes/com/arjuna/mwlabs/wst/ba11/remote/UserBusinessActivityImple.java
   labs/jbosstm/workspace/XTS_TX11/WSTX/xml/AtomicTransaction11.xml
   labs/jbosstm/workspace/XTS_TX11/WSTX/xml/BusinessActivity11.xml
Log:
Added XTS 1.1 code

Added: labs/jbosstm/workspace/XTS_TX11/WS-C/dev/src/com/arjuna/webservices/wscoor11/AttributedUnsignedIntType.java
===================================================================
--- labs/jbosstm/workspace/XTS_TX11/WS-C/dev/src/com/arjuna/webservices/wscoor11/AttributedUnsignedIntType.java	                        (rev 0)
+++ labs/jbosstm/workspace/XTS_TX11/WS-C/dev/src/com/arjuna/webservices/wscoor11/AttributedUnsignedIntType.java	2007-08-14 12:43:41 UTC (rev 14200)
@@ -0,0 +1,142 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag.  All rights reserved. 
+ * See the copyright.txt in the distribution for a full listing 
+ * of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU General Public License, v. 2.0.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A 
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+ * PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+ * You should have received a copy of the GNU General Public License,
+ * v. 2.0 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+ * MA  02110-1301, USA.
+ * 
+ * (C) 2005-2006,
+ * @author JBoss Inc.
+ */
+package com.arjuna.webservices.wscoor11;
+
+import java.text.MessageFormat;
+
+import javax.xml.stream.XMLStreamException;
+import javax.xml.stream.XMLStreamReader;
+import javax.xml.stream.XMLStreamWriter;
+
+import com.arjuna.webservices.logging.WSCLogger;
+import com.arjuna.webservices.stax.AnyAttributeSupport;
+
+/*
+ * <xsd:complexType>
+ *   <xsd:simpleContent>
+ *     <xsd:extension base="xsd:unsignedInt">
+ *       <xsd:anyAttribute namespace="##other"/>
+ *     </xsd:extension>
+ *   </xsd:simpleContent>
+ * </xsd:complexType>
+ */
+/**
+ * Representation of an attributed unsigned int type.
+ * @author kevin
+ */
+public class AttributedUnsignedIntType extends AnyAttributeSupport
+{
+    /**
+     * The maximum value of an unsigned int.
+     */
+    private static final long MAX_UNSIGNED_INT = (1L<<32)-1 ;
+    
+    /**
+     * Default constructor.
+     */
+    public AttributedUnsignedIntType()
+    {
+    }
+    
+    /**
+     * Construct the attributed unsigned int type with the specific value.
+     * @param value The unsigned int value.
+     */
+    public AttributedUnsignedIntType(final long value)
+    {
+        setValue(value) ;
+    }
+    
+    /**
+     * Construct the attributed unsigned int type from the input stream.
+     * @param in The input stream.
+     * @throws XMLStreamException for parsing errors.
+     */
+    public AttributedUnsignedIntType(final XMLStreamReader in)
+        throws XMLStreamException
+    {
+        parse(in) ;
+    }
+    
+    /**
+     * The value of this element.
+     */
+    private long value ;
+    
+    /**
+     * Set the text value of this element.
+     * @param in The current input stream.
+     * @param value The text value.
+     * @message com.arjuna.webservices.wscoor11.AttributedUnsignedIntType_1 [com.arjuna.webservices.wscoor11.AttributedUnsignedIntType_1] - non numerical value: {0}
+     */
+    protected void putValue(final XMLStreamReader in, final String value)
+        throws XMLStreamException
+    {
+        try
+        {
+            setValue(Long.parseLong(value.trim())) ;
+        }
+        catch (final NumberFormatException nfe)
+        {
+            final String pattern = WSCLogger.log_mesg.getString("com.arjuna.webservices.wscoor11.AttributedUnsignedIntType_1") ;
+            final String message = MessageFormat.format(pattern, new Object[] {value}) ;
+            throw new XMLStreamException(message) ;
+        }
+    }
+    
+    /**
+     * Set the unsigned int value of this element.
+     * @param value The unsigned int value of the element.
+     */
+    public void setValue(final long value)
+    {
+        this.value = value ;
+    }
+    
+    /**
+     * Get the unsigned int value of this element.
+     * @return The unsigned int value of the element.
+     */
+    public long getValue()
+    {
+        return value ;
+    }
+    
+    /**
+     * Write the child content of the element.
+     * @param out The output stream.
+     */
+    protected void writeChildContent(final XMLStreamWriter out)
+        throws XMLStreamException
+    {
+        out.writeCharacters(Long.toString(value)) ;
+    }
+    
+    
+    /**
+     * Is the configuration of this element valid?
+     * @return true if valid, false otherwise.
+     */
+    public boolean isValid()
+    {
+        return ((value >= 0) && (value <= MAX_UNSIGNED_INT)) ;
+    }
+}


Property changes on: labs/jbosstm/workspace/XTS_TX11/WS-C/dev/src/com/arjuna/webservices/wscoor11/AttributedUnsignedIntType.java
___________________________________________________________________
Name: svn:keywords
   + Rev Date
Name: svn:eol-style
   + native

Added: labs/jbosstm/workspace/XTS_TX11/WS-C/dev/src/com/arjuna/webservices/wscoor11/CoordinationConstants.java
===================================================================
--- labs/jbosstm/workspace/XTS_TX11/WS-C/dev/src/com/arjuna/webservices/wscoor11/CoordinationConstants.java	                        (rev 0)
+++ labs/jbosstm/workspace/XTS_TX11/WS-C/dev/src/com/arjuna/webservices/wscoor11/CoordinationConstants.java	2007-08-14 12:43:41 UTC (rev 14200)
@@ -0,0 +1,233 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag.  All rights reserved. 
+ * See the copyright.txt in the distribution for a full listing 
+ * of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU General Public License, v. 2.0.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A 
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+ * PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+ * You should have received a copy of the GNU General Public License,
+ * v. 2.0 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+ * MA  02110-1301, USA.
+ * 
+ * (C) 2005-2006,
+ * @author JBoss Inc.
+ */
+package com.arjuna.webservices.wscoor11;
+
+import javax.xml.namespace.QName;
+
+/**
+ * Interface containing WS-Coordination constants.
+ */
+public interface CoordinationConstants
+{
+    /**
+     * The activation coordinator service name.
+     */
+    public String SERVICE_ACTIVATION_COORDINATOR = "ActivationCoordinator11" ;
+    /**
+     * The activation requester service name.
+     */
+    public String SERVICE_ACTIVATION_REQUESTER = "ActivationRequester11" ;
+    /**
+     * The registration coordinator service name.
+     */
+    public String SERVICE_REGISTRATION_COORDINATOR = "RegistrationCoordinator11" ;
+    /**
+     * The registration requester service name.
+     */
+    public String SERVICE_REGISTRATION_REQUESTER = "RegistrationRequester11" ;
+    
+    /**
+     * The Namespace.
+     */
+    public String WSCOOR_NAMESPACE = "http://docs.oasis-open.org/ws-tx/wscoor/2006/06" ;
+    /**
+     * The namespace prefix.
+     */
+    public String WSCOOR_PREFIX = "wscoor" ;
+    
+    /**
+     * The Expires element.
+     */
+    public String WSCOOR_ELEMENT_EXPIRES = "Expires" ;
+    /**
+     * The Expires QName.
+     */
+    public QName WSCOOR_ELEMENT_EXPIRES_QNAME = new QName(WSCOOR_NAMESPACE, WSCOOR_ELEMENT_EXPIRES, WSCOOR_PREFIX) ;
+    
+    /**
+     * The Identifier element.
+     */
+    public String WSCOOR_ELEMENT_IDENTIFIER = "Identifier" ;
+    /**
+     * The Identifier QName.
+     */
+    public QName WSCOOR_ELEMENT_IDENTIFIER_QNAME = new QName(WSCOOR_NAMESPACE, WSCOOR_ELEMENT_IDENTIFIER, WSCOOR_PREFIX) ;
+    
+    /**
+     * The RegistrationService element.
+     */
+    public String WSCOOR_ELEMENT_REGISTRATION_SERVICE = "RegistrationService" ;
+    /**
+     * The RegistrationService QName.
+     */
+    public QName WSCOOR_ELEMENT_REGISTRATION_SERVICE_QNAME = new QName(WSCOOR_NAMESPACE, WSCOOR_ELEMENT_REGISTRATION_SERVICE, WSCOOR_PREFIX) ;
+    
+    /**
+     * The CoordinationContext element.
+     */
+    public String WSCOOR_ELEMENT_COORDINATION_CONTEXT = "CoordinationContext" ;
+    /**
+     * The CoordinationContext QName.
+     */
+    public QName WSCOOR_ELEMENT_COORDINATION_CONTEXT_QNAME = new QName(WSCOOR_NAMESPACE, WSCOOR_ELEMENT_COORDINATION_CONTEXT, WSCOOR_PREFIX) ;
+    
+    /**
+     * The CurrentContext element.
+     */
+    public String WSCOOR_ELEMENT_CURRENT_CONTEXT = "CurrentContext" ;
+    /**
+     * The CurrentContext QName.
+     */
+    public QName WSCOOR_ELEMENT_CURRENT_CONTEXT_QNAME = new QName(WSCOOR_NAMESPACE, WSCOOR_ELEMENT_CURRENT_CONTEXT, WSCOOR_PREFIX) ;
+    
+    /**
+     * The CoordinationType element.
+     */
+    public String WSCOOR_ELEMENT_COORDINATION_TYPE = "CoordinationType" ;
+    /**
+     * The CoordinationType QName.
+     */
+    public QName WSCOOR_ELEMENT_COORDINATION_TYPE_QNAME = new QName(WSCOOR_NAMESPACE, WSCOOR_ELEMENT_COORDINATION_TYPE, WSCOOR_PREFIX) ;
+    
+    /**
+     * The CreateCoordinationContext element.
+     */
+    public String WSCOOR_ELEMENT_CREATE_COORDINATION_CONTEXT = "CreateCoordinationContext" ;
+    /**
+     * The CreateCoordinationContext QName.
+     */
+    public QName WSCOOR_ELEMENT_CREATE_COORDINATION_CONTEXT_QNAME = new QName(WSCOOR_NAMESPACE, WSCOOR_ELEMENT_CREATE_COORDINATION_CONTEXT, WSCOOR_PREFIX) ;
+    /**
+     * The CreateCoordinationContext Action.
+     */
+    public String WSCOOR_ACTION_CREATE_COORDINATION_CONTEXT = WSCOOR_NAMESPACE + "/" + WSCOOR_ELEMENT_CREATE_COORDINATION_CONTEXT ;
+    
+    /**
+     * The CreateCoordinationContextResponse element.
+     */
+    public String WSCOOR_ELEMENT_CREATE_COORDINATION_CONTEXT_RESPONSE = "CreateCoordinationContextResponse" ;
+    /**
+     * The CreateCoordinationContextResponse QName.
+     */
+    public QName WSCOOR_ELEMENT_CREATE_COORDINATION_CONTEXT_RESPONSE_QNAME = new QName(WSCOOR_NAMESPACE, WSCOOR_ELEMENT_CREATE_COORDINATION_CONTEXT_RESPONSE, WSCOOR_PREFIX) ;
+    /**
+     * The CreateCoordinationContextResponse Action.
+     */
+    public String WSCOOR_ACTION_CREATE_COORDINATION_CONTEXT_RESPONSE = WSCOOR_NAMESPACE + "/" + WSCOOR_ELEMENT_CREATE_COORDINATION_CONTEXT_RESPONSE ;
+
+    /**
+     * The ProtocolIdentifier element.
+     */
+    public String WSCOOR_ELEMENT_PROTOCOL_IDENTIFIER = "ProtocolIdentifier" ;
+    /**
+     * The ProtocolIdentifier QName.
+     */
+    public QName WSCOOR_ELEMENT_PROTOCOL_IDENTIFIER_QNAME = new QName(WSCOOR_NAMESPACE, WSCOOR_ELEMENT_PROTOCOL_IDENTIFIER, WSCOOR_PREFIX) ;
+    
+    /**
+     * The ParticipantProtocolService element.
+     */
+    public String WSCOOR_ELEMENT_PARTICIPANT_PROTOCOL_SERVICE = "ParticipantProtocolService" ;
+    /**
+     * The ParticipantProtocolService QName.
+     */
+    public QName WSCOOR_ELEMENT_PARTICIPANT_PROTOCOL_SERVICE_QNAME = new QName(WSCOOR_NAMESPACE, WSCOOR_ELEMENT_PARTICIPANT_PROTOCOL_SERVICE, WSCOOR_PREFIX) ;
+    
+    /**
+     * The Register element.
+     */
+    public String WSCOOR_ELEMENT_REGISTER = "Register" ;
+    /**
+     * The Register QName.
+     */
+    public QName WSCOOR_ELEMENT_REGISTER_QNAME = new QName(WSCOOR_NAMESPACE, WSCOOR_ELEMENT_REGISTER, WSCOOR_PREFIX) ;
+    /**
+     * The Register Action.
+     */
+    public String WSCOOR_ACTION_REGISTER = WSCOOR_NAMESPACE + "/" + WSCOOR_ELEMENT_REGISTER ;
+    
+    /**
+     * The CoordinatorProtocolService element.
+     */
+    public String WSCOOR_ELEMENT_COORDINATOR_PROTOCOL_SERVICE = "CoordinatorProtocolService" ;
+    /**
+     * The CoordinatorProtocolService QName.
+     */
+    public QName WSCOOR_ELEMENT_COORDINATOR_PROTOCOL_SERVICE_QNAME = new QName(WSCOOR_NAMESPACE, WSCOOR_ELEMENT_COORDINATOR_PROTOCOL_SERVICE, WSCOOR_PREFIX) ;
+    
+    /**
+     * The RegisterResponse element.
+     */
+    public String WSCOOR_ELEMENT_REGISTER_RESPONSE = "RegisterResponse" ;
+    /**
+     * The RegisterResponse QName.
+     */
+    public QName WSCOOR_ELEMENT_REGISTER_RESPONSE_QNAME = new QName(WSCOOR_NAMESPACE, WSCOOR_ELEMENT_REGISTER_RESPONSE, WSCOOR_PREFIX) ;
+    /**
+     * The Register Action.
+     */
+    public String WSCOOR_ACTION_REGISTER_RESPONSE = WSCOOR_NAMESPACE + "/" + WSCOOR_ELEMENT_REGISTER_RESPONSE ;
+    
+    /**
+     * The Fault Action.
+     */
+    public String WSCOOR_ACTION_FAULT = WSCOOR_NAMESPACE + "/fault" ;
+    /**
+     * The InvalidParameters error code.
+     */
+    public String WSCOOR_ERROR_CODE_INVALID_PARAMETERS = "InvalidParameters" ;
+    /**
+     * The InvalidParameters error code QName.
+     */
+    public QName WSCOOR_ERROR_CODE_INVALID_PARAMETERS_QNAME = new QName(WSCOOR_NAMESPACE, WSCOOR_ERROR_CODE_INVALID_PARAMETERS, WSCOOR_PREFIX) ;
+    /**
+     * The InvalidProtocol error code.
+     */
+    public String WSCOOR_ERROR_CODE_INVALID_PROTOCOL = "InvalidProtocol" ;
+    /**
+     * The InvalidProtocol error code QName.
+     */
+    public QName WSCOOR_ERROR_CODE_INVALID_PROTOCOL_QNAME = new QName(WSCOOR_NAMESPACE, WSCOOR_ERROR_CODE_INVALID_PROTOCOL, WSCOOR_PREFIX) ;
+    /**
+     * The InvalidState error code.
+     */
+    public String WSCOOR_ERROR_CODE_INVALID_STATE = "InvalidState" ;
+    /**
+     * The InvalidState error code QName.
+     */
+    public QName WSCOOR_ERROR_CODE_INVALID_STATE_QNAME = new QName(WSCOOR_NAMESPACE, WSCOOR_ERROR_CODE_INVALID_STATE, WSCOOR_PREFIX) ;
+    /**
+     * The CannotCreateContext error code.
+     */
+    public String WSCOOR_ERROR_CODE_CANNOT_CREATE_CONTEXT = "CannotCreateContext" ;
+    /**
+     * The CannotCreateContext error code QName.
+     */
+    public QName WSCOOR_ERROR_CODE_CANNOT_CREATE_CONTEXT_QNAME = new QName(WSCOOR_NAMESPACE, WSCOOR_ERROR_CODE_CANNOT_CREATE_CONTEXT, WSCOOR_PREFIX) ;
+    /**
+     * The CannotRegisterParticipant error code.
+     */
+    public String WSCOOR_ERROR_CODE_CANNOT_REGISTER_PARTICIPANT = "CannotRegisterParticipant" ;
+    /**
+     * The CannotRegisterParticipant error code QName.
+     */
+    public QName WSCOOR_ERROR_CODE_CANNOT_REGISTER_PARTICIPANT_QNAME = new QName(WSCOOR_NAMESPACE, WSCOOR_ERROR_CODE_CANNOT_REGISTER_PARTICIPANT, WSCOOR_PREFIX) ;
+}


Property changes on: labs/jbosstm/workspace/XTS_TX11/WS-C/dev/src/com/arjuna/webservices/wscoor11/CoordinationConstants.java
___________________________________________________________________
Name: svn:keywords
   + Rev Date
Name: svn:eol-style
   + native

Added: labs/jbosstm/workspace/XTS_TX11/WS-C/dev/src/com/arjuna/webservices/wscoor11/CoordinationContext.java
===================================================================
--- labs/jbosstm/workspace/XTS_TX11/WS-C/dev/src/com/arjuna/webservices/wscoor11/CoordinationContext.java	                        (rev 0)
+++ labs/jbosstm/workspace/XTS_TX11/WS-C/dev/src/com/arjuna/webservices/wscoor11/CoordinationContext.java	2007-08-14 12:43:41 UTC (rev 14200)
@@ -0,0 +1,77 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag.  All rights reserved. 
+ * See the copyright.txt in the distribution for a full listing 
+ * of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU General Public License, v. 2.0.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A 
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+ * PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+ * You should have received a copy of the GNU General Public License,
+ * v. 2.0 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+ * MA  02110-1301, USA.
+ * 
+ * (C) 2005-2006,
+ * @author JBoss Inc.
+ */
+package com.arjuna.webservices.wscoor11;
+
+import com.arjuna.webservices.MessageContext;
+
+/**
+ * The coordination context.
+ * @author kevin
+ */
+public class CoordinationContext
+{
+    /**
+     * The key used for the coordination context within a message exchange.
+     */
+    private static final byte[] COORDINATION_CONTEXT_PROPERTY = new byte[0] ;
+    /**
+     * The coordination context associated with the thread.
+     */
+    private static final ThreadLocal THREAD_CONTEXT = new ThreadLocal() ;
+    
+    /**
+     * Get the coordination context from the message context if present.
+     * @param messageContext The message context.
+     * @return The coordination context or null if not present.
+     */
+    public static CoordinationContextType getContext(final MessageContext messageContext)
+    {
+        return (CoordinationContextType)messageContext.getProperty(COORDINATION_CONTEXT_PROPERTY) ;
+    }
+
+    /**
+     * Set the coordination context for the message context.
+     * @param messageContext The message context.
+     * @param coordinationContext The coordination context.
+     */
+    public static void setContext(final MessageContext messageContext, final CoordinationContextType coordinationContext)
+    {
+        messageContext.setProperty(COORDINATION_CONTEXT_PROPERTY, coordinationContext) ;
+    }
+    
+    /**
+     * Get the coordination context from the current thread if present.
+     * @return The coordination context or null if not present.
+     */
+    public static CoordinationContextType getThreadContext()
+    {
+        return (CoordinationContextType)THREAD_CONTEXT.get() ;
+    }
+
+    /**
+     * Set the coordination context for the current thread.
+     * @param coordinationContext The coordination context.
+     */
+    public static void setThreadContext(final CoordinationContextType coordinationContext)
+    {
+        THREAD_CONTEXT.set(coordinationContext) ;
+    }
+}


Property changes on: labs/jbosstm/workspace/XTS_TX11/WS-C/dev/src/com/arjuna/webservices/wscoor11/CoordinationContext.java
___________________________________________________________________
Name: svn:keywords
   + Rev Date
Name: svn:eol-style
   + native

Added: labs/jbosstm/workspace/XTS_TX11/WS-C/dev/src/com/arjuna/webservices/wscoor11/CoordinationContextType.java
===================================================================
--- labs/jbosstm/workspace/XTS_TX11/WS-C/dev/src/com/arjuna/webservices/wscoor11/CoordinationContextType.java	                        (rev 0)
+++ labs/jbosstm/workspace/XTS_TX11/WS-C/dev/src/com/arjuna/webservices/wscoor11/CoordinationContextType.java	2007-08-14 12:43:41 UTC (rev 14200)
@@ -0,0 +1,251 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag.  All rights reserved. 
+ * See the copyright.txt in the distribution for a full listing 
+ * of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU General Public License, v. 2.0.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A 
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+ * PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+ * You should have received a copy of the GNU General Public License,
+ * v. 2.0 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+ * MA  02110-1301, USA.
+ * 
+ * (C) 2005-2006,
+ * @author JBoss Inc.
+ */
+package com.arjuna.webservices.wscoor11;
+
+import java.text.MessageFormat;
+
+import javax.xml.namespace.QName;
+import javax.xml.stream.XMLStreamException;
+import javax.xml.stream.XMLStreamReader;
+import javax.xml.stream.XMLStreamWriter;
+
+import com.arjuna.webservices.logging.WSCLogger;
+import com.arjuna.webservices.stax.AnyContentAnyAttributeSupport;
+import com.arjuna.webservices.stax.URI;
+import com.arjuna.webservices.util.StreamHelper;
+import com.arjuna.webservices.wsaddr2005.AttributedURIType;
+import com.arjuna.webservices.wsaddr2005.EndpointReferenceType;
+
+/*
+ * <xsd:complexType name="CoordinationContextType">
+ *   <xsd:sequence>
+ *     <xsd:element name="Identifier">
+ *       <xsd:complexType>
+ *         <xsd:simpleContent>
+ *           <xsd:extension base="xsd:anyURI">
+ *             <xsd:anyAttribute namespace="##other"/>
+ *           </xsd:extension>
+ *         </xsd:simpleContent>
+ *       </xsd:complexType>
+ *     </xsd:element>
+ *     <xsd:element ref="wscoor:Expires" minOccurs="0"/>
+ *     <xsd:element name="CoordinationType" type="xsd:anyURI"/>
+ *     <xsd:element name="RegistrationService" type="wsa:EndpointReferenceType"/>
+ *   </xsd:sequence>
+ *   <xsd:anyAttribute namespace="##other" processContents="lax"/>
+ * </xsd:complexType>
+ * 
+ * Also added at the end of the sequence 
+ *   <xsd:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
+ */
+/**
+ * Representation of the Coordination Context type.
+ * @author kevin
+ */
+public class CoordinationContextType extends AnyContentAnyAttributeSupport
+{
+    /**
+     * The Identifier element.
+     */
+    private AttributedURIType identifier ;
+    /**
+     * The Expires element.
+     */
+    private AttributedUnsignedIntType expires ;
+    /**
+     * The Coordination Type uri.
+     */
+    private URI coordinationType ;
+    /**
+     * The registration service.
+     */
+    private EndpointReferenceType registrationService ;
+    
+    /**
+     * Default constructor.
+     */
+    public CoordinationContextType()
+    {
+    }
+    
+    /**
+     * Construct a coordination context from the input stream.
+     * 
+     * @param in The input stream.
+     * @throws XMLStreamException For errors during parsing.
+     */
+    public CoordinationContextType(final XMLStreamReader in)
+        throws XMLStreamException
+    {
+        parse(in) ;
+    }
+    
+    /**
+     * Get the identifier URI.
+     * @return The identifier URI.
+     */
+    public AttributedURIType getIdentifier()
+    {
+        return identifier ;
+    }
+    
+    /**
+     * Set the identifier URI.
+     * @param identifier The to URI.
+     */
+    public void setIdentifier(final AttributedURIType identifier)
+    {
+        this.identifier = identifier ;
+    }
+    
+    /**
+     * Get the expires data.
+     * @return The expires information or null if not present.
+     */
+    public AttributedUnsignedIntType getExpires()
+    {
+        return expires ;
+    }
+    
+    /**
+     * Set the expires data.
+     * @param expires The expires data.
+     */
+    public void setExpires(final AttributedUnsignedIntType expires)
+    {
+        this.expires = expires ;
+    }
+    
+    /**
+     * Get the coordination type.
+     * @return The coordination type.
+     */
+    public URI getCoordinationType()
+    {
+        return coordinationType ;
+    }
+    
+    /**
+     * Set the coordination type.
+     * @param coordinationType The coordination type.
+     */
+    public void setCoordinationType(final URI coordinationType)
+    {
+        this.coordinationType = coordinationType ;
+    }
+    
+    /**
+     * Get the registration service endpoint reference.
+     * @return The registration service endpoint reference.
+     */
+    public EndpointReferenceType getRegistrationService()
+    {
+        return registrationService ;
+    }
+    
+    /**
+     * Set the registration service endpoint reference.
+     * @param registrationService The registration service endpoint reference.
+     */
+    public void setRegistrationService(final EndpointReferenceType registrationService)
+    {
+        this.registrationService = registrationService ;
+    }
+    
+    /**
+     * Write the content of the context to the stream.
+     * @param out The current output stream.
+     * @message com.arjuna.webservices.wscoor11.CoordinationContextType_1 [com.arjuna.webservices.wscoor11.CoordinationContextType_1] - Coordination Context is not valid
+     */
+    public void writeChildContent(final XMLStreamWriter out)
+        throws XMLStreamException
+    {
+       if (!isValid())
+       {
+           throw new XMLStreamException(WSCLogger.log_mesg.getString("com.arjuna.webservices.wscoor11.CoordinationContextType_1")) ;
+       }
+       
+       StreamHelper.writeElement(out, CoordinationConstants.WSCOOR_ELEMENT_IDENTIFIER_QNAME, identifier) ;
+       if (expires != null)
+       {
+           StreamHelper.writeElement(out, CoordinationConstants.WSCOOR_ELEMENT_EXPIRES_QNAME, expires) ;
+       }
+       StreamHelper.writeElement(out, CoordinationConstants.WSCOOR_ELEMENT_COORDINATION_TYPE_QNAME, coordinationType) ;
+       StreamHelper.writeElement(out, CoordinationConstants.WSCOOR_ELEMENT_REGISTRATION_SERVICE_QNAME, registrationService) ;
+       
+       super.writeChildContent(out) ;
+    }
+
+    /**
+     * Add the element.
+     * @param in The current input stream.
+     * @param elementName The qualified element name.
+     * @message com.arjuna.webservices.wscoor11.CoordinationContextType_2 [com.arjuna.webservices.wscoor11.CoordinationContextType_2] - Unexpected element name: {0}
+     */
+    protected void putElement(final XMLStreamReader in,
+        final QName elementName)
+        throws XMLStreamException
+    {
+        final String namespace = elementName.getNamespaceURI() ;
+        if (CoordinationConstants.WSCOOR_NAMESPACE.equals(namespace))
+        {
+            final String localPart = elementName.getLocalPart() ;
+            if (CoordinationConstants.WSCOOR_ELEMENT_IDENTIFIER.equals(localPart))
+            {
+                setIdentifier(new AttributedURIType(in)) ;
+            }
+            else if (CoordinationConstants.WSCOOR_ELEMENT_EXPIRES.equals(localPart))
+            {
+                setExpires(new AttributedUnsignedIntType(in)) ;
+            }
+            else if (CoordinationConstants.WSCOOR_ELEMENT_COORDINATION_TYPE.equals(localPart))
+            {
+                setCoordinationType(new URI(in)) ;
+            }
+            else if (CoordinationConstants.WSCOOR_ELEMENT_REGISTRATION_SERVICE.equals(localPart))
+            {
+                setRegistrationService(new EndpointReferenceType(in)) ;
+            }
+            else
+            {
+                final String pattern = WSCLogger.log_mesg.getString("com.arjuna.webservices.wscoor11.CoordinationContextType_2") ;
+                final String message = MessageFormat.format(pattern, new Object[] {elementName}) ;
+                throw new XMLStreamException(message) ;
+            }
+        }
+        else
+        {
+            super.putElement(in, elementName) ;
+        }
+    }
+    
+    /**
+     * Is the configuration of this element valid?
+     * @return true if valid, false otherwise.
+     */
+    public boolean isValid()
+    {
+        return ((identifier != null) && identifier.isValid()) &&
+            ((expires == null) || expires.isValid()) &&
+            ((coordinationType != null) && coordinationType.isValid()) &&
+            ((registrationService != null) && registrationService.isValid()) ;
+    }
+}


Property changes on: labs/jbosstm/workspace/XTS_TX11/WS-C/dev/src/com/arjuna/webservices/wscoor11/CoordinationContextType.java
___________________________________________________________________
Name: svn:keywords
   + Rev Date
Name: svn:eol-style
   + native

Added: labs/jbosstm/workspace/XTS_TX11/WS-C/dev/src/com/arjuna/webservices/wscoor11/CreateCoordinationContextResponseType.java
===================================================================
--- labs/jbosstm/workspace/XTS_TX11/WS-C/dev/src/com/arjuna/webservices/wscoor11/CreateCoordinationContextResponseType.java	                        (rev 0)
+++ labs/jbosstm/workspace/XTS_TX11/WS-C/dev/src/com/arjuna/webservices/wscoor11/CreateCoordinationContextResponseType.java	2007-08-14 12:43:41 UTC (rev 14200)
@@ -0,0 +1,147 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag.  All rights reserved. 
+ * See the copyright.txt in the distribution for a full listing 
+ * of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU General Public License, v. 2.0.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A 
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+ * PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+ * You should have received a copy of the GNU General Public License,
+ * v. 2.0 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+ * MA  02110-1301, USA.
+ * 
+ * (C) 2005-2006,
+ * @author JBoss Inc.
+ */
+package com.arjuna.webservices.wscoor11;
+
+import java.text.MessageFormat;
+
+import javax.xml.namespace.QName;
+import javax.xml.stream.XMLStreamException;
+import javax.xml.stream.XMLStreamReader;
+import javax.xml.stream.XMLStreamWriter;
+
+import com.arjuna.webservices.logging.WSCLogger;
+import com.arjuna.webservices.stax.AnyContentAnyAttributeSupport;
+import com.arjuna.webservices.util.StreamHelper;
+
+/*
+ * <xsd:complexType name="CreateCoordinationContextResponseType">
+ *   <xsd:sequence>
+ *     <xsd:element ref="wscoor:CoordinationContext"/>
+ *     <xsd:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
+ *   </xsd:sequence>
+ *   <xsd:anyAttribute namespace="##other" processContents="lax"/>
+ * </xsd:complexType>
+ */
+/**
+ * Representation of the Create Coordination Context Reponse type.
+ * @author kevin
+ */
+public class CreateCoordinationContextResponseType extends AnyContentAnyAttributeSupport
+{
+    /**
+     * The CoordinationContext element.
+     */
+    private CoordinationContextType coordinationContext ;
+    
+    /**
+     * Default constructor.
+     */
+    public CreateCoordinationContextResponseType()
+    {
+    }
+    
+    /**
+     * Construct a create coordination context response from the input stream.
+     * 
+     * @param in The input stream.
+     * @throws XMLStreamException For errors during parsing.
+     */
+    public CreateCoordinationContextResponseType(final XMLStreamReader in)
+        throws XMLStreamException
+    {
+        parse(in) ;
+    }
+    
+    /**
+     * Get the coordination context.
+     * @return The coordination context.
+     */
+    public CoordinationContextType getCoordinationContext()
+    {
+        return coordinationContext ;
+    }
+    
+    /**
+     * Set the coordination context.
+     * @param coordinationContext The coordination context.
+     */
+    public void setCoordinationContext(final CoordinationContextType coordinationContext)
+    {
+        this.coordinationContext = coordinationContext ;
+    }
+    
+    /**
+     * Write the content of the context to the stream.
+     * @param out The current output stream.
+     * @message com.arjuna.webservices.wscoor11.CreateCoordinationContextResponseType_1 [com.arjuna.webservices.wscoor11.CreateCoordinationContextResponseType_1] - Create Coordination Context Response is not valid
+     */
+    public void writeChildContent(final XMLStreamWriter out)
+        throws XMLStreamException
+    {
+       if (!isValid())
+       {
+           throw new XMLStreamException(WSCLogger.log_mesg.getString("com.arjuna.webservices.wscoor11.CreateCoordinationContextResponseType_1")) ;
+       }
+       
+       StreamHelper.writeElement(out, CoordinationConstants.WSCOOR_ELEMENT_COORDINATION_CONTEXT_QNAME, coordinationContext) ;
+       
+       super.writeChildContent(out) ;
+    }
+
+    /**
+     * Add the element.
+     * @param in The current input stream.
+     * @param elementName The qualified element name.
+     * @message com.arjuna.webservices.wscoor11.CreateCoordinationContextResponseType_2 [com.arjuna.webservices.wscoor11.CreateCoordinationContextResponseType_2] - Unexpected element name: {0}
+     */
+    protected void putElement(final XMLStreamReader in,
+        final QName elementName)
+        throws XMLStreamException
+    {
+        if (CoordinationConstants.WSCOOR_NAMESPACE.equals(elementName.getNamespaceURI()))
+        {
+            final String localPart = elementName.getLocalPart() ;
+            if (CoordinationConstants.WSCOOR_ELEMENT_COORDINATION_CONTEXT.equals(localPart))
+            {
+                setCoordinationContext(new CoordinationContextType(in)) ;
+            }
+            else
+            {
+                final String pattern = WSCLogger.log_mesg.getString("com.arjuna.webservices.wscoor11.CreateCoordinationContextResponseType_2") ;
+                final String message = MessageFormat.format(pattern, new Object[] {elementName}) ;
+                throw new XMLStreamException(message) ;
+            }
+        }
+        else
+        {
+            super.putElement(in, elementName) ;
+        }
+    }
+    
+    /**
+     * Is the configuration of this element valid?
+     * @return true if valid, false otherwise.
+     */
+    public boolean isValid()
+    {
+        return ((coordinationContext != null) && coordinationContext.isValid()) ;
+    }
+}


Property changes on: labs/jbosstm/workspace/XTS_TX11/WS-C/dev/src/com/arjuna/webservices/wscoor11/CreateCoordinationContextResponseType.java
___________________________________________________________________
Name: svn:keywords
   + Rev Date
Name: svn:eol-style
   + native

Added: labs/jbosstm/workspace/XTS_TX11/WS-C/dev/src/com/arjuna/webservices/wscoor11/CreateCoordinationContextType.java
===================================================================
--- labs/jbosstm/workspace/XTS_TX11/WS-C/dev/src/com/arjuna/webservices/wscoor11/CreateCoordinationContextType.java	                        (rev 0)
+++ labs/jbosstm/workspace/XTS_TX11/WS-C/dev/src/com/arjuna/webservices/wscoor11/CreateCoordinationContextType.java	2007-08-14 12:43:41 UTC (rev 14200)
@@ -0,0 +1,222 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag.  All rights reserved. 
+ * See the copyright.txt in the distribution for a full listing 
+ * of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU General Public License, v. 2.0.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A 
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+ * PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+ * You should have received a copy of the GNU General Public License,
+ * v. 2.0 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+ * MA  02110-1301, USA.
+ * 
+ * (C) 2005-2006,
+ * @author JBoss Inc.
+ */
+package com.arjuna.webservices.wscoor11;
+
+import java.text.MessageFormat;
+
+import javax.xml.namespace.QName;
+import javax.xml.stream.XMLStreamException;
+import javax.xml.stream.XMLStreamReader;
+import javax.xml.stream.XMLStreamWriter;
+
+import com.arjuna.webservices.logging.WSCLogger;
+import com.arjuna.webservices.stax.AnyContentAnyAttributeSupport;
+import com.arjuna.webservices.stax.URI;
+import com.arjuna.webservices.util.StreamHelper;
+
+/*
+ * <xsd:complexType name="CreateCoordinationContextType">
+ *   <xsd:sequence>
+ *     <xsd:element ref="wscoor:Expires" minOccurs="0"/>
+ *     <xsd:element name="CurrentContext" minOccurs="0">
+ *       <xsd:complexType>
+ *         <xsd:complexContent>
+ *           <xsd:extension base="wscoor:CoordinationContextType">
+ *             <xsd:sequence>
+ *               <xsd:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
+ *             </xsd:sequence>
+ *           </xsd:extension>
+ *         </xsd:complexContent>
+ *       </xsd:complexType>
+ *     </xsd:element>
+ *     <xsd:element name="CoordinationType" type="xsd:anyURI"/>
+ *     <xsd:any namespace="##any" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
+ *   </xsd:sequence>
+ *   <xsd:anyAttribute namespace="##other" processContents="lax"/>
+ * </xsd:complexType>
+ */
+/**
+ * Representation of the Create Coordination Context type.
+ * @author kevin
+ */
+public class CreateCoordinationContextType extends AnyContentAnyAttributeSupport
+{
+    /**
+     * The Expires element.
+     */
+    private AttributedUnsignedIntType expires ;
+    /**
+     * The CurrentContext element.
+     */
+    private CoordinationContextType currentContext ;
+    /**
+     * The Coordination Type uri.
+     */
+    private URI coordinationType ;
+    
+    /**
+     * Default constructor.
+     */
+    public CreateCoordinationContextType()
+    {
+    }
+    
+    /**
+     * Construct a create coordination context from the input stream.
+     * 
+     * @param in The input stream.
+     * @throws XMLStreamException For errors during parsing.
+     */
+    public CreateCoordinationContextType(final XMLStreamReader in)
+        throws XMLStreamException
+    {
+        parse(in) ;
+    }
+    
+    /**
+     * Get the expires data.
+     * @return The expires information or null if not present.
+     */
+    public AttributedUnsignedIntType getExpires()
+    {
+        return expires ;
+    }
+    
+    /**
+     * Set the expires data.
+     * @param expires The expires data.
+     */
+    public void setExpires(final AttributedUnsignedIntType expires)
+    {
+        this.expires = expires ;
+    }
+    
+    /**
+     * Get the current context.
+     * @return The current context or null if not present.
+     */
+    public CoordinationContextType getCurrentContext()
+    {
+        return currentContext ;
+    }
+    
+    /**
+     * Set the current context.
+     * @param currentContext The current context.
+     */
+    public void setCurrentContext(final CoordinationContextType currentContext)
+    {
+        this.currentContext = currentContext ;
+    }
+    
+    /**
+     * Get the coordination type.
+     * @return The coordination type.
+     */
+    public URI getCoordinationType()
+    {
+        return coordinationType ;
+    }
+    
+    /**
+     * Set the coordination type.
+     * @param coordinationType The coordination type.
+     */
+    public void setCoordinationType(final URI coordinationType)
+    {
+        this.coordinationType = coordinationType ;
+    }
+    
+    /**
+     * Write the content of the context to the stream.
+     * @param out The current output stream.
+     * @message com.arjuna.webservices.wscoor11.CreateCoordinationContextType_1 [com.arjuna.webservices.wscoor11.CreateCoordinationContextType_1] - Create Coordination Context is not valid
+     */
+    public void writeChildContent(final XMLStreamWriter out)
+        throws XMLStreamException
+    {
+       if (!isValid())
+       {
+           throw new XMLStreamException(WSCLogger.log_mesg.getString("com.arjuna.webservices.wscoor11.CreateCoordinationContextType_1")) ;
+       }
+       
+       if (expires != null)
+       {
+           StreamHelper.writeElement(out, CoordinationConstants.WSCOOR_ELEMENT_EXPIRES_QNAME, expires) ;
+       }
+       if (currentContext != null)
+       {
+           StreamHelper.writeElement(out, CoordinationConstants.WSCOOR_ELEMENT_CURRENT_CONTEXT_QNAME, currentContext) ;
+       }
+       StreamHelper.writeElement(out, CoordinationConstants.WSCOOR_ELEMENT_COORDINATION_TYPE_QNAME, coordinationType) ;
+       
+       super.writeChildContent(out) ;
+    }
+
+    /**
+     * Add the element.
+     * @param in The current input stream.
+     * @param elementName The qualified element name.
+     * @message com.arjuna.webservices.wscoor11.CreateCoordinationContextType_2 [com.arjuna.webservices.wscoor11.CreateCoordinationContextType_2] - Unexpected element name: {0}
+     */
+    protected void putElement(final XMLStreamReader in,
+        final QName elementName)
+        throws XMLStreamException
+    {
+        if (CoordinationConstants.WSCOOR_NAMESPACE.equals(elementName.getNamespaceURI()))
+        {
+            final String localPart = elementName.getLocalPart() ;
+            if (CoordinationConstants.WSCOOR_ELEMENT_EXPIRES.equals(localPart))
+            {
+                setExpires(new AttributedUnsignedIntType(in)) ;
+            }
+            else if (CoordinationConstants.WSCOOR_ELEMENT_CURRENT_CONTEXT.equals(localPart))
+            {
+                setCurrentContext(new CoordinationContextType(in)) ;
+            }
+            else if (CoordinationConstants.WSCOOR_ELEMENT_COORDINATION_TYPE.equals(localPart))
+            {
+                setCoordinationType(new URI(in)) ;
+            }
+            else
+            {
+                final String pattern = WSCLogger.log_mesg.getString("com.arjuna.webservices.wscoor11.CreateCoordinationContextType_2") ;
+                final String message = MessageFormat.format(pattern, new Object[] {elementName}) ;
+                throw new XMLStreamException(message) ;
+            }
+        }
+        else
+        {
+            super.putElement(in, elementName) ;
+        }
+    }
+    
+    /**
+     * Is the configuration of this element valid?
+     * @return true if valid, false otherwise.
+     */
+    public boolean isValid()
+    {
+        return ((expires == null) || expires.isValid()) &&
+            ((currentContext == null) || currentContext.isValid()) &&
+            ((coordinationType != null) && coordinationType.isValid()) ;
+    }
+}


Property changes on: labs/jbosstm/workspace/XTS_TX11/WS-C/dev/src/com/arjuna/webservices/wscoor11/CreateCoordinationContextType.java
___________________________________________________________________
Name: svn:keywords
   + Rev Date
Name: svn:eol-style
   + native

Added: labs/jbosstm/workspace/XTS_TX11/WS-C/dev/src/com/arjuna/webservices/wscoor11/RegisterResponseType.java
===================================================================
--- labs/jbosstm/workspace/XTS_TX11/WS-C/dev/src/com/arjuna/webservices/wscoor11/RegisterResponseType.java	                        (rev 0)
+++ labs/jbosstm/workspace/XTS_TX11/WS-C/dev/src/com/arjuna/webservices/wscoor11/RegisterResponseType.java	2007-08-14 12:43:41 UTC (rev 14200)
@@ -0,0 +1,148 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag.  All rights reserved. 
+ * See the copyright.txt in the distribution for a full listing 
+ * of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU General Public License, v. 2.0.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A 
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+ * PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+ * You should have received a copy of the GNU General Public License,
+ * v. 2.0 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+ * MA  02110-1301, USA.
+ * 
+ * (C) 2005-2006,
+ * @author JBoss Inc.
+ */
+package com.arjuna.webservices.wscoor11;
+
+import java.text.MessageFormat;
+
+import javax.xml.namespace.QName;
+import javax.xml.stream.XMLStreamException;
+import javax.xml.stream.XMLStreamReader;
+import javax.xml.stream.XMLStreamWriter;
+
+import com.arjuna.webservices.logging.WSCLogger;
+import com.arjuna.webservices.stax.AnyContentAnyAttributeSupport;
+import com.arjuna.webservices.util.StreamHelper;
+import com.arjuna.webservices.wsaddr2005.EndpointReferenceType;
+
+/*
+ * <xsd:complexType name="RegisterResponseType">
+ *   <xsd:sequence>
+ *     <xsd:element name="CoordinatorProtocolService" type="wsa:EndpointReferenceType"/>
+ *     <xsd:any namespace="##any" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
+ *   </xsd:sequence>
+ *   <xsd:anyAttribute namespace="##other" processContents="lax"/>
+ * </xsd:complexType>
+ */
+/**
+ * Representation of the Register Response type.
+ * @author kevin
+ */
+public class RegisterResponseType extends AnyContentAnyAttributeSupport
+{
+    /**
+     * The coordinator protocol service.
+     */
+    private EndpointReferenceType coordinatorProtocolService ;
+    
+    /**
+     * Default constructor.
+     */
+    public RegisterResponseType()
+    {
+    }
+    
+    /**
+     * Construct a register response from the input stream.
+     * 
+     * @param in The input stream.
+     * @throws XMLStreamException For errors during parsing.
+     */
+    public RegisterResponseType(final XMLStreamReader in)
+        throws XMLStreamException
+    {
+        parse(in) ;
+    }
+    
+    /**
+     * Get the coordinator protocol service endpoint reference.
+     * @return The coordinator protocol service endpoint reference.
+     */
+    public EndpointReferenceType getCoordinatorProtocolService()
+    {
+        return coordinatorProtocolService ;
+    }
+    
+    /**
+     * Set the coordinator protocol service endpoint reference.
+     * @param coordinatorProtocolService The coordinator protocol service endpoint reference.
+     */
+    public void setCoordinatorProtocolService(final EndpointReferenceType coordinatorProtocolService)
+    {
+        this.coordinatorProtocolService = coordinatorProtocolService ;
+    }
+    
+    /**
+     * Write the content of the context to the stream.
+     * @param out The current output stream.
+     * @message com.arjuna.webservices.wscoor11.RegisterResponseType_1 [com.arjuna.webservices.wscoor11.RegisterResponseType_1] - Register is not valid
+     */
+    public void writeChildContent(final XMLStreamWriter out)
+        throws XMLStreamException
+    {
+       if (!isValid())
+       {
+           throw new XMLStreamException(WSCLogger.log_mesg.getString("com.arjuna.webservices.wscoor11.RegisterResponseType_1")) ;
+       }
+       
+       StreamHelper.writeElement(out, CoordinationConstants.WSCOOR_ELEMENT_COORDINATOR_PROTOCOL_SERVICE_QNAME, coordinatorProtocolService) ;
+       
+       super.writeChildContent(out) ;
+    }
+
+    /**
+     * Add the element.
+     * @param in The current input stream.
+     * @param elementName The qualified element name.
+     * @message com.arjuna.webservices.wscoor11.RegisterResponseType_2 [com.arjuna.webservices.wscoor11.RegisterResponseType_2] - Unexpected element name: {0}
+     */
+    protected void putElement(final XMLStreamReader in,
+        final QName elementName)
+        throws XMLStreamException
+    {
+        if (CoordinationConstants.WSCOOR_NAMESPACE.equals(elementName.getNamespaceURI()))
+        {
+            final String localPart = elementName.getLocalPart() ;
+            if (CoordinationConstants.WSCOOR_ELEMENT_COORDINATOR_PROTOCOL_SERVICE.equals(localPart))
+            {
+                setCoordinatorProtocolService(new EndpointReferenceType(in)) ;
+            }
+            else
+            {
+                final String pattern = WSCLogger.log_mesg.getString("com.arjuna.webservices.wscoor11.RegisterResponseType_2") ;
+                final String message = MessageFormat.format(pattern, new Object[] {elementName}) ;
+                throw new XMLStreamException(message) ;
+            }
+        }
+        else
+        {
+            super.putElement(in, elementName) ;
+        }
+    }
+    
+    /**
+     * Is the configuration of this element valid?
+     * @return true if valid, false otherwise.
+     */
+    public boolean isValid()
+    {
+        return ((coordinatorProtocolService != null) && coordinatorProtocolService.isValid()) ;
+    }
+}


Property changes on: labs/jbosstm/workspace/XTS_TX11/WS-C/dev/src/com/arjuna/webservices/wscoor11/RegisterResponseType.java
___________________________________________________________________
Name: svn:keywords
   + Rev Date
Name: svn:eol-style
   + native

Added: labs/jbosstm/workspace/XTS_TX11/WS-C/dev/src/com/arjuna/webservices/wscoor11/RegisterType.java
===================================================================
--- labs/jbosstm/workspace/XTS_TX11/WS-C/dev/src/com/arjuna/webservices/wscoor11/RegisterType.java	                        (rev 0)
+++ labs/jbosstm/workspace/XTS_TX11/WS-C/dev/src/com/arjuna/webservices/wscoor11/RegisterType.java	2007-08-14 12:43:41 UTC (rev 14200)
@@ -0,0 +1,178 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag.  All rights reserved. 
+ * See the copyright.txt in the distribution for a full listing 
+ * of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU General Public License, v. 2.0.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A 
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+ * PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+ * You should have received a copy of the GNU General Public License,
+ * v. 2.0 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+ * MA  02110-1301, USA.
+ * 
+ * (C) 2005-2006,
+ * @author JBoss Inc.
+ */
+package com.arjuna.webservices.wscoor11;
+
+import java.text.MessageFormat;
+
+import javax.xml.namespace.QName;
+import javax.xml.stream.XMLStreamException;
+import javax.xml.stream.XMLStreamReader;
+import javax.xml.stream.XMLStreamWriter;
+
+import com.arjuna.webservices.logging.WSCLogger;
+import com.arjuna.webservices.stax.AnyContentAnyAttributeSupport;
+import com.arjuna.webservices.stax.URI;
+import com.arjuna.webservices.util.StreamHelper;
+import com.arjuna.webservices.wsaddr2005.EndpointReferenceType;
+
+/*
+ * <xsd:complexType name="RegisterType">
+ *   <xsd:sequence>
+ *     <xsd:element name="ProtocolIdentifier" type="xsd:anyURI"/>
+ *     <xsd:element name="ParticipantProtocolService" type="wsa:EndpointReferenceType"/>
+ *     <xsd:any namespace="##any" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
+ *   </xsd:sequence>
+ *   <xsd:anyAttribute namespace="##other" processContents="lax"/>
+ * </xsd:complexType>
+ */
+/**
+ * Representation of the Register type.
+ * @author kevin
+ */
+public class RegisterType extends AnyContentAnyAttributeSupport
+{
+    /**
+     * The ProtocolIdentifier element.
+     */
+    private URI protocolIdentifier ;
+    /**
+     * The participant protocol service.
+     */
+    private EndpointReferenceType participantProtocolService ;
+    
+    /**
+     * Default constructor.
+     */
+    public RegisterType()
+    {
+    }
+    
+    /**
+     * Construct a register from the input stream.
+     * 
+     * @param in The input stream.
+     * @throws XMLStreamException For errors during parsing.
+     */
+    public RegisterType(final XMLStreamReader in)
+        throws XMLStreamException
+    {
+        parse(in) ;
+    }
+    
+    /**
+     * Get the procotol identifier URI.
+     * @return The proocol identifier URI.
+     */
+    public URI getProtocolIdentifier()
+    {
+        return protocolIdentifier ;
+    }
+    
+    /**
+     * Set the protocol identifier URI.
+     * @param protocolIdentifier The to URI.
+     */
+    public void setProtocolIdentifier(final URI protocolIdentifier)
+    {
+        this.protocolIdentifier = protocolIdentifier ;
+    }
+    
+    /**
+     * Get the participant protocol service endpoint reference.
+     * @return The participant protocol service endpoint reference.
+     */
+    public EndpointReferenceType getParticipantProtocolService()
+    {
+        return participantProtocolService ;
+    }
+    
+    /**
+     * Set the participant protocol service endpoint reference.
+     * @param participantProtocolService The participant protocol service endpoint reference.
+     */
+    public void setParticipantProtocolService(final EndpointReferenceType participantProtocolService)
+    {
+        this.participantProtocolService = participantProtocolService ;
+    }
+    
+    /**
+     * Write the content of the context to the stream.
+     * @param out The current output stream.
+     * @message com.arjuna.webservices.wscoor11.RegisterType_1 [com.arjuna.webservices.wscoor11.RegisterType_1] - Register is not valid
+     */
+    public void writeChildContent(final XMLStreamWriter out)
+        throws XMLStreamException
+    {
+       if (!isValid())
+       {
+           throw new XMLStreamException(WSCLogger.log_mesg.getString("com.arjuna.webservices.wscoor11.RegisterType_1")) ;
+       }
+       
+       StreamHelper.writeElement(out, CoordinationConstants.WSCOOR_ELEMENT_PROTOCOL_IDENTIFIER_QNAME, protocolIdentifier) ;
+       StreamHelper.writeElement(out, CoordinationConstants.WSCOOR_ELEMENT_PARTICIPANT_PROTOCOL_SERVICE_QNAME, participantProtocolService) ;
+       
+       super.writeChildContent(out) ;
+    }
+
+    /**
+     * Add the element.
+     * @param in The current input stream.
+     * @param elementName The qualified element name.
+     * @message com.arjuna.webservices.wscoor11.RegisterType_2 [com.arjuna.webservices.wscoor11.RegisterType_2] - Unexpected element name: {0}
+     */
+    protected void putElement(final XMLStreamReader in,
+        final QName elementName)
+        throws XMLStreamException
+    {
+        if (CoordinationConstants.WSCOOR_NAMESPACE.equals(elementName.getNamespaceURI()))
+        {
+            final String localPart = elementName.getLocalPart() ;
+            if (CoordinationConstants.WSCOOR_ELEMENT_PROTOCOL_IDENTIFIER.equals(localPart))
+            {
+                setProtocolIdentifier(new URI(in)) ;
+            }
+            else if (CoordinationConstants.WSCOOR_ELEMENT_PARTICIPANT_PROTOCOL_SERVICE.equals(localPart))
+            {
+                setParticipantProtocolService(new EndpointReferenceType(in)) ;
+            }
+            else
+            {
+                final String pattern = WSCLogger.log_mesg.getString("com.arjuna.webservices.wscoor11.RegisterType_2") ;
+                final String message = MessageFormat.format(pattern, new Object[] {elementName}) ;
+                throw new XMLStreamException(message) ;
+            }
+        }
+        else
+        {
+            super.putElement(in, elementName) ;
+        }
+    }
+    
+    /**
+     * Is the configuration of this element valid?
+     * @return true if valid, false otherwise.
+     */
+    public boolean isValid()
+    {
+        return ((protocolIdentifier != null) && protocolIdentifier.isValid()) &&
+            ((participantProtocolService != null) && participantProtocolService.isValid()) ;
+    }
+}


Property changes on: labs/jbosstm/workspace/XTS_TX11/WS-C/dev/src/com/arjuna/webservices/wscoor11/RegisterType.java
___________________________________________________________________
Name: svn:keywords
   + Rev Date
Name: svn:eol-style
   + native

Added: labs/jbosstm/workspace/XTS_TX11/WS-C/dev/src/com/arjuna/webservices/wscoor11/client/ActivationCoordinatorClient.java
===================================================================
--- labs/jbosstm/workspace/XTS_TX11/WS-C/dev/src/com/arjuna/webservices/wscoor11/client/ActivationCoordinatorClient.java	                        (rev 0)
+++ labs/jbosstm/workspace/XTS_TX11/WS-C/dev/src/com/arjuna/webservices/wscoor11/client/ActivationCoordinatorClient.java	2007-08-14 12:43:41 UTC (rev 14200)
@@ -0,0 +1,122 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag.  All rights reserved. 
+ * See the copyright.txt in the distribution for a full listing 
+ * of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU General Public License, v. 2.0.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A 
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+ * PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+ * You should have received a copy of the GNU General Public License,
+ * v. 2.0 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+ * MA  02110-1301, USA.
+ * 
+ * (C) 2005-2006,
+ * @author JBoss Inc.
+ */
+package com.arjuna.webservices.wscoor11.client;
+
+import java.io.IOException;
+
+import com.arjuna.webservices.HandlerRegistry;
+import com.arjuna.webservices.SoapBody;
+import com.arjuna.webservices.SoapFault;
+import com.arjuna.webservices.SoapRegistry;
+import com.arjuna.webservices.SoapService;
+import com.arjuna.webservices.base.policy.ClientPolicy;
+import com.arjuna.webservices.soap.SoapDetails;
+import com.arjuna.webservices.stax.NamedElement;
+import com.arjuna.webservices.stax.URI;
+import com.arjuna.webservices.wsaddr2005.AddressingContext;
+import com.arjuna.webservices.wsaddr2005.AttributedURIType;
+import com.arjuna.webservices.wsaddr2005.EndpointReferenceType;
+import com.arjuna.webservices.wsaddr2005.client.WSAddr2005Client;
+import com.arjuna.webservices.wsaddr2005.policy.AddressingPolicy;
+import com.arjuna.webservices.wscoor11.AttributedUnsignedIntType;
+import com.arjuna.webservices.wscoor11.CoordinationConstants;
+import com.arjuna.webservices.wscoor11.CoordinationContextType;
+import com.arjuna.webservices.wscoor11.CreateCoordinationContextType;
+
+/**
+ * The Client side of the Activation Coordinator.
+ * @author kevin
+ */
+public class ActivationCoordinatorClient
+{
+    /**
+     * The client singleton.
+     */
+    private static final ActivationCoordinatorClient CLIENT = new ActivationCoordinatorClient() ;
+    
+    /**
+     * The create coordination context action.
+     */
+    private final String createCoordinationContextAction = CoordinationConstants.WSCOOR_ACTION_CREATE_COORDINATION_CONTEXT ;
+    
+    /**
+     * The SOAP service representing the client.
+     */
+    private final SoapService soapService ;
+    /**
+     * The activation requester URI for replies.
+     */
+    private final EndpointReferenceType activationRequester ;
+    
+    /**
+     * Construct the activation coordinator client.
+     */
+    private ActivationCoordinatorClient()
+    {
+        final HandlerRegistry handlerRegistry = new HandlerRegistry() ;
+        
+        // Add WS-Addressing
+        AddressingPolicy.register(handlerRegistry) ;
+        // Add client policies
+        ClientPolicy.register(handlerRegistry) ;
+        
+        soapService = new SoapService(handlerRegistry) ;
+        final String activationRequesterURI = SoapRegistry.getRegistry().getServiceURI(CoordinationConstants.SERVICE_ACTIVATION_REQUESTER) ;
+        activationRequester = new EndpointReferenceType(new AttributedURIType(activationRequesterURI)) ;
+    }
+    
+    /**
+     * Send a create coordination request.
+     * @param addressingContext addressing context initialised with to and message ID.
+     * @param soapDetails The SOAP details.
+     * @param coordinationType The type of the coordination.
+     * @param expires The expiry interval of the context.
+     * @param currentContext The current coordination context.
+     * @throws SoapFault For any errors.
+     * @throws IOException for any transport errors.
+     */
+    public void sendCreateCoordination(final AddressingContext addressingContext, final SoapDetails soapDetails,
+        final String coordinationType, final AttributedUnsignedIntType expires, final CoordinationContextType currentContext)
+        throws SoapFault, IOException
+    {
+        final CreateCoordinationContextType request = new CreateCoordinationContextType() ;
+        request.setCoordinationType(new URI(coordinationType)) ;
+        request.setCurrentContext(currentContext) ;
+        request.setExpires(expires) ;
+        
+        final NamedElement contents = new NamedElement(CoordinationConstants.WSCOOR_ELEMENT_CREATE_COORDINATION_CONTEXT_QNAME, request) ;
+        final SoapBody soapBody = new SoapBody(contents, createCoordinationContextAction) ;
+        addressingContext.setAction(new AttributedURIType(createCoordinationContextAction)) ;
+        
+        addressingContext.setReplyTo(activationRequester) ;
+        
+        WSAddr2005Client.sendOneWay(soapBody, addressingContext, soapDetails, soapService) ;
+    }
+    
+    /**
+     * Get the Activation Coordinator client singleton.
+     * @return The Activation Coordinator client singleton.
+     */
+    public static ActivationCoordinatorClient getClient()
+    {
+        return CLIENT ;
+    }
+}


Property changes on: labs/jbosstm/workspace/XTS_TX11/WS-C/dev/src/com/arjuna/webservices/wscoor11/client/ActivationCoordinatorClient.java
___________________________________________________________________
Name: svn:keywords
   + Rev Date
Name: svn:eol-style
   + native

Added: labs/jbosstm/workspace/XTS_TX11/WS-C/dev/src/com/arjuna/webservices/wscoor11/client/ActivationRequesterClient.java
===================================================================
--- labs/jbosstm/workspace/XTS_TX11/WS-C/dev/src/com/arjuna/webservices/wscoor11/client/ActivationRequesterClient.java	                        (rev 0)
+++ labs/jbosstm/workspace/XTS_TX11/WS-C/dev/src/com/arjuna/webservices/wscoor11/client/ActivationRequesterClient.java	2007-08-14 12:43:41 UTC (rev 14200)
@@ -0,0 +1,128 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag.  All rights reserved. 
+ * See the copyright.txt in the distribution for a full listing 
+ * of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU General Public License, v. 2.0.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A 
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+ * PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+ * You should have received a copy of the GNU General Public License,
+ * v. 2.0 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+ * MA  02110-1301, USA.
+ * 
+ * (C) 2005-2006,
+ * @author JBoss Inc.
+ */
+package com.arjuna.webservices.wscoor11.client;
+
+import java.io.IOException;
+
+import com.arjuna.webservices.HandlerRegistry;
+import com.arjuna.webservices.SoapBody;
+import com.arjuna.webservices.SoapFault;
+import com.arjuna.webservices.SoapService;
+import com.arjuna.webservices.base.policy.ClientPolicy;
+import com.arjuna.webservices.soap.SoapDetails;
+import com.arjuna.webservices.stax.NamedElement;
+import com.arjuna.webservices.wsaddr2005.AddressingContext;
+import com.arjuna.webservices.wsaddr2005.AttributedURIType;
+import com.arjuna.webservices.wsaddr2005.client.WSAddr2005Client;
+import com.arjuna.webservices.wsaddr2005.policy.AddressingPolicy;
+import com.arjuna.webservices.wscoor11.CoordinationConstants;
+import com.arjuna.webservices.wscoor11.CoordinationContextType;
+import com.arjuna.webservices.wscoor11.CreateCoordinationContextResponseType;
+
+/**
+ * The Client side of the Activation Requester.
+ * @author kevin
+ */
+public class ActivationRequesterClient
+{
+    /**
+     * The client singleton.
+     */
+    private static final ActivationRequesterClient CLIENT = new ActivationRequesterClient() ;
+    
+    /**
+     * The create coordination context response action.
+     */
+    private final String createCoordinationContextResponseAction = CoordinationConstants.WSCOOR_ACTION_CREATE_COORDINATION_CONTEXT_RESPONSE ;
+    /**
+     * The fault action.
+     */
+    private final String faultAction = CoordinationConstants.WSCOOR_ACTION_FAULT ;
+    
+    /**
+     * The SOAP service representing the client.
+     */
+    private final SoapService soapService ;
+    
+    /**
+     * Construct the activition requester client.
+     */
+    private ActivationRequesterClient()
+    {
+        final HandlerRegistry handlerRegistry = new HandlerRegistry() ;
+        
+        // Add WS-Addressing
+        AddressingPolicy.register(handlerRegistry) ;
+        // Add client policies
+        ClientPolicy.register(handlerRegistry) ;
+        
+        soapService = new SoapService(handlerRegistry) ;
+    }
+
+    /**
+     * Send a create coordination response.
+     * @param addressingContext The addressing context initialised with to, message ID and relates to.
+     * @param soapDetails The SOAP details.
+     * @param coordinationContext The coordination context.
+     * @throws SoapFault For any errors.
+     * @throws IOException for any transport errors.
+     */
+    public void sendCreateCoordinationResponse(final AddressingContext addressingContext, final SoapDetails soapDetails,
+        final CoordinationContextType coordinationContext)
+        throws SoapFault, IOException
+    {
+        final CreateCoordinationContextResponseType response = new CreateCoordinationContextResponseType() ;
+        response.setCoordinationContext(coordinationContext) ;
+        
+        final NamedElement contents = new NamedElement(CoordinationConstants.WSCOOR_ELEMENT_CREATE_COORDINATION_CONTEXT_RESPONSE_QNAME, response) ;
+        final SoapBody soapBody = new SoapBody(contents, createCoordinationContextResponseAction) ;
+        addressingContext.setAction(new AttributedURIType(createCoordinationContextResponseAction)) ;
+        
+        WSAddr2005Client.sendOneWay(soapBody, addressingContext, soapDetails, soapService) ;
+    }
+
+    /**
+     * Send a fault.
+     * @param addressingContext The addressing context.
+     * @param soapDetails The SOAP details.
+     * @param soapFault The SOAP fault.
+     * @throws SoapFault For any errors.
+     * @throws IOException for any transport errors.
+     */
+    public void sendSoapFault(final AddressingContext addressingContext, final SoapDetails soapDetails,
+        final SoapFault soapFault)
+        throws SoapFault, IOException
+    {
+        soapFault.setAction(faultAction) ;
+        addressingContext.setAction(new AttributedURIType(faultAction)) ;
+        
+        WSAddr2005Client.sendSoapFault(soapFault, addressingContext, soapDetails, soapService) ;
+    }
+
+    /**
+     * Get the Activation Requester client singleton.
+     * @return The Activation Requester client singleton.
+     */
+    public static ActivationRequesterClient getClient()
+    {
+        return CLIENT ;
+    }
+}


Property changes on: labs/jbosstm/workspace/XTS_TX11/WS-C/dev/src/com/arjuna/webservices/wscoor11/client/ActivationRequesterClient.java
___________________________________________________________________
Name: svn:keywords
   + Rev Date
Name: svn:eol-style
   + native

Added: labs/jbosstm/workspace/XTS_TX11/WS-C/dev/src/com/arjuna/webservices/wscoor11/client/RegistrationCoordinatorClient.java
===================================================================
--- labs/jbosstm/workspace/XTS_TX11/WS-C/dev/src/com/arjuna/webservices/wscoor11/client/RegistrationCoordinatorClient.java	                        (rev 0)
+++ labs/jbosstm/workspace/XTS_TX11/WS-C/dev/src/com/arjuna/webservices/wscoor11/client/RegistrationCoordinatorClient.java	2007-08-14 12:43:41 UTC (rev 14200)
@@ -0,0 +1,118 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag.  All rights reserved. 
+ * See the copyright.txt in the distribution for a full listing 
+ * of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU General Public License, v. 2.0.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A 
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+ * PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+ * You should have received a copy of the GNU General Public License,
+ * v. 2.0 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+ * MA  02110-1301, USA.
+ * 
+ * (C) 2005-2006,
+ * @author JBoss Inc.
+ */
+package com.arjuna.webservices.wscoor11.client;
+
+import java.io.IOException;
+
+import com.arjuna.webservices.HandlerRegistry;
+import com.arjuna.webservices.SoapBody;
+import com.arjuna.webservices.SoapFault;
+import com.arjuna.webservices.SoapRegistry;
+import com.arjuna.webservices.SoapService;
+import com.arjuna.webservices.base.policy.ClientPolicy;
+import com.arjuna.webservices.soap.SoapDetails;
+import com.arjuna.webservices.stax.NamedElement;
+import com.arjuna.webservices.stax.URI;
+import com.arjuna.webservices.wsaddr2005.AddressingContext;
+import com.arjuna.webservices.wsaddr2005.AttributedURIType;
+import com.arjuna.webservices.wsaddr2005.EndpointReferenceType;
+import com.arjuna.webservices.wsaddr2005.client.WSAddr2005Client;
+import com.arjuna.webservices.wsaddr2005.policy.AddressingPolicy;
+import com.arjuna.webservices.wscoor11.CoordinationConstants;
+import com.arjuna.webservices.wscoor11.RegisterType;
+
+/**
+ * The Client side of the Registration Coordinator.
+ * @author kevin
+ */
+public class RegistrationCoordinatorClient
+{
+    /**
+     * The client singleton.
+     */
+    private static final RegistrationCoordinatorClient CLIENT = new RegistrationCoordinatorClient() ;
+    
+    /**
+     * The register action.
+     */
+    private final String registerAction = CoordinationConstants.WSCOOR_ACTION_REGISTER ;
+    
+    /**
+     * The SOAP service representing the client.
+     */
+    private final SoapService soapService ;
+    /**
+     * The registration requester URI for replies.
+     */
+    private final EndpointReferenceType registrationRequester ;
+    
+    /**
+     * Construct the registration coordinator client.
+     */
+    private RegistrationCoordinatorClient()
+    {
+        final HandlerRegistry handlerRegistry = new HandlerRegistry() ;
+        
+        // Add WS-Addressing
+        AddressingPolicy.register(handlerRegistry) ;
+        // Add client policies
+        ClientPolicy.register(handlerRegistry) ;
+        
+        soapService = new SoapService(handlerRegistry) ;
+        final String registrationRequesterURI = SoapRegistry.getRegistry().getServiceURI(CoordinationConstants.SERVICE_REGISTRATION_REQUESTER) ;
+        registrationRequester = new EndpointReferenceType(new AttributedURIType(registrationRequesterURI)) ;
+    }
+    
+    /**
+     * Send a register request.
+     * @param addressingContext addressing context initialised with to, message ID and endpoint context.
+     * @param soapDetails The SOAP details.
+     * @param protocolIdentifier The protocol identifier.
+     * @param participantProtocolService The participant protocol service endpoint reference.
+     * @throws SoapFault For any errors.
+     * @throws IOException for any transport errors.
+     */
+    public void sendRegister(final AddressingContext addressingContext, final SoapDetails soapDetails,
+        final String protocolIdentifier, final EndpointReferenceType participantProtocolService)
+        throws SoapFault, IOException
+    {
+        final RegisterType request = new RegisterType() ;
+        request.setProtocolIdentifier(new URI(protocolIdentifier)) ;
+        request.setParticipantProtocolService(participantProtocolService) ;
+        
+        final NamedElement contents = new NamedElement(CoordinationConstants.WSCOOR_ELEMENT_REGISTER_QNAME, request) ;
+        final SoapBody soapBody = new SoapBody(contents, registerAction) ;
+        addressingContext.setAction(new AttributedURIType(registerAction)) ;
+        
+        addressingContext.setReplyTo(registrationRequester) ;
+        
+        WSAddr2005Client.sendOneWay(soapBody, addressingContext, soapDetails, soapService) ;
+    }
+    
+    /**
+     * Get the Registration Coordinator client singleton.
+     * @return The Registration Coordinator client singleton.
+     */
+    public static RegistrationCoordinatorClient getClient()
+    {
+        return CLIENT ;
+    }
+}


Property changes on: labs/jbosstm/workspace/XTS_TX11/WS-C/dev/src/com/arjuna/webservices/wscoor11/client/RegistrationCoordinatorClient.java
___________________________________________________________________
Name: svn:keywords
   + Rev Date
Name: svn:eol-style
   + native

Added: labs/jbosstm/workspace/XTS_TX11/WS-C/dev/src/com/arjuna/webservices/wscoor11/client/RegistrationRequesterClient.java
===================================================================
--- labs/jbosstm/workspace/XTS_TX11/WS-C/dev/src/com/arjuna/webservices/wscoor11/client/RegistrationRequesterClient.java	                        (rev 0)
+++ labs/jbosstm/workspace/XTS_TX11/WS-C/dev/src/com/arjuna/webservices/wscoor11/client/RegistrationRequesterClient.java	2007-08-14 12:43:41 UTC (rev 14200)
@@ -0,0 +1,128 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag.  All rights reserved. 
+ * See the copyright.txt in the distribution for a full listing 
+ * of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU General Public License, v. 2.0.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A 
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+ * PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+ * You should have received a copy of the GNU General Public License,
+ * v. 2.0 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+ * MA  02110-1301, USA.
+ * 
+ * (C) 2005-2006,
+ * @author JBoss Inc.
+ */
+package com.arjuna.webservices.wscoor11.client;
+
+import java.io.IOException;
+
+import com.arjuna.webservices.HandlerRegistry;
+import com.arjuna.webservices.SoapBody;
+import com.arjuna.webservices.SoapFault;
+import com.arjuna.webservices.SoapService;
+import com.arjuna.webservices.base.policy.ClientPolicy;
+import com.arjuna.webservices.soap.SoapDetails;
+import com.arjuna.webservices.stax.NamedElement;
+import com.arjuna.webservices.wsaddr2005.AddressingContext;
+import com.arjuna.webservices.wsaddr2005.AttributedURIType;
+import com.arjuna.webservices.wsaddr2005.EndpointReferenceType;
+import com.arjuna.webservices.wsaddr2005.client.WSAddr2005Client;
+import com.arjuna.webservices.wsaddr2005.policy.AddressingPolicy;
+import com.arjuna.webservices.wscoor11.CoordinationConstants;
+import com.arjuna.webservices.wscoor11.RegisterResponseType;
+
+/**
+ * The Client side of the Registration Requester.
+ * @author kevin
+ */
+public class RegistrationRequesterClient
+{
+    /**
+     * The client singleton.
+     */
+    private static final RegistrationRequesterClient CLIENT = new RegistrationRequesterClient() ;
+    
+    /**
+     * The register response action.
+     */
+    private final String registerResponseAction = CoordinationConstants.WSCOOR_ACTION_REGISTER_RESPONSE ;
+    /**
+     * The fault action.
+     */
+    private final String faultAction = CoordinationConstants.WSCOOR_ACTION_FAULT ;
+    
+    /**
+     * The SOAP service representing the client.
+     */
+    private final SoapService soapService ;
+    
+    /**
+     * Construct the activition requester client.
+     */
+    private RegistrationRequesterClient()
+    {
+        final HandlerRegistry handlerRegistry = new HandlerRegistry() ;
+        
+        // Add WS-Addressing
+        AddressingPolicy.register(handlerRegistry) ;
+        // Add client policies
+        ClientPolicy.register(handlerRegistry) ;
+        
+        soapService = new SoapService(handlerRegistry) ;
+    }
+
+    /**
+     * Send a create coordination response.
+     * @param soapDetails The SOAP details.
+     * @param addressingContext The addressing context initialised with to, message ID and relates to.
+     * @param coordinationProtocolService The coordination protocol service endpoint reference.
+     * @throws SoapFault For any errors.
+     * @throws IOException for any transport errors.
+     */
+    public void sendRegisterResponse(final AddressingContext addressingContext, final SoapDetails soapDetails,
+        final EndpointReferenceType coordinationProtocolService)
+        throws SoapFault, IOException
+    {
+        final RegisterResponseType response = new RegisterResponseType() ;
+        response.setCoordinatorProtocolService(coordinationProtocolService) ;
+        
+        final NamedElement contents = new NamedElement(CoordinationConstants.WSCOOR_ELEMENT_REGISTER_RESPONSE_QNAME, response) ;
+        final SoapBody soapBody = new SoapBody(contents, registerResponseAction) ;
+        addressingContext.setAction(new AttributedURIType(registerResponseAction)) ;
+        
+        WSAddr2005Client.sendOneWay(soapBody, addressingContext, soapDetails, soapService) ;
+    }
+
+    /**
+     * Send a fault.
+     * @param addressingContext The addressing context.
+     * @param soapDetails The SOAP details.
+     * @param soapFault The SOAP fault.
+     * @throws SoapFault For any errors.
+     * @throws IOException for any transport errors.
+     */
+    public void sendSoapFault(final AddressingContext addressingContext, final SoapDetails soapDetails,
+        final SoapFault soapFault)
+        throws SoapFault, IOException
+    {
+        soapFault.setAction(faultAction) ;
+        addressingContext.setAction(new AttributedURIType(faultAction)) ;
+        
+        WSAddr2005Client.sendSoapFault(soapFault, addressingContext, soapDetails, soapService) ;
+    }
+    
+    /**
+     * Get the Activation Requester client singleton.
+     * @return The Activation Requester client singleton.
+     */
+    public static RegistrationRequesterClient getClient()
+    {
+        return CLIENT ;
+    }
+}


Property changes on: labs/jbosstm/workspace/XTS_TX11/WS-C/dev/src/com/arjuna/webservices/wscoor11/client/RegistrationRequesterClient.java
___________________________________________________________________
Name: svn:keywords
   + Rev Date
Name: svn:eol-style
   + native

Added: labs/jbosstm/workspace/XTS_TX11/WS-C/dev/src/com/arjuna/webservices/wscoor11/handlers/ActivationRequesterSoapFaultHandler.java
===================================================================
--- labs/jbosstm/workspace/XTS_TX11/WS-C/dev/src/com/arjuna/webservices/wscoor11/handlers/ActivationRequesterSoapFaultHandler.java	                        (rev 0)
+++ labs/jbosstm/workspace/XTS_TX11/WS-C/dev/src/com/arjuna/webservices/wscoor11/handlers/ActivationRequesterSoapFaultHandler.java	2007-08-14 12:43:41 UTC (rev 14200)
@@ -0,0 +1,60 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag.  All rights reserved. 
+ * See the copyright.txt in the distribution for a full listing 
+ * of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU General Public License, v. 2.0.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A 
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+ * PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+ * You should have received a copy of the GNU General Public License,
+ * v. 2.0 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+ * MA  02110-1301, USA.
+ * 
+ * (C) 2005-2006,
+ * @author JBoss Inc.
+ */
+package com.arjuna.webservices.wscoor11.handlers;
+
+import javax.xml.stream.XMLStreamException;
+import javax.xml.stream.XMLStreamReader;
+
+import com.arjuna.webservices.BodyHandler;
+import com.arjuna.webservices.MessageContext;
+import com.arjuna.webservices.SoapBody;
+import com.arjuna.webservices.SoapFault;
+import com.arjuna.webservices.soap.SoapDetails;
+import com.arjuna.webservices.wsaddr2005.AddressingContext;
+import com.arjuna.webservices.wscoor11.processors.ActivationRequesterProcessor;
+
+/**
+ * The activation requester fault handler.
+ * @author kevin
+ */
+public class ActivationRequesterSoapFaultHandler implements BodyHandler
+{
+    /**
+     * Handle the body element.
+     * @param soapDetails The SOAP details.
+     * @param context The current message context.
+     * @param responseContext The r message context.
+     * @param action The transport SOAP action.
+     * @param in The current stream reader.
+     * @throws XMLStreamException for parsing errors.
+     * @throws SoapFault for processing errors.
+     * @return The response elements or null if one way.
+     */
+    public SoapBody invoke(final SoapDetails soapDetails, final MessageContext context,
+        final MessageContext responseContext, final String action, final XMLStreamReader in)
+        throws XMLStreamException, SoapFault
+    {
+        final SoapFault soapFault = soapDetails.parseSoapFault(in) ;
+        final AddressingContext addressingContext = AddressingContext.getContext(context) ;
+        ActivationRequesterProcessor.getRequester().handleSoapFault(soapFault, addressingContext) ;
+        return null ;
+    }
+}


Property changes on: labs/jbosstm/workspace/XTS_TX11/WS-C/dev/src/com/arjuna/webservices/wscoor11/handlers/ActivationRequesterSoapFaultHandler.java
___________________________________________________________________
Name: svn:keywords
   + Rev Date
Name: svn:eol-style
   + native

Added: labs/jbosstm/workspace/XTS_TX11/WS-C/dev/src/com/arjuna/webservices/wscoor11/handlers/CoordinationContextHandler.java
===================================================================
--- labs/jbosstm/workspace/XTS_TX11/WS-C/dev/src/com/arjuna/webservices/wscoor11/handlers/CoordinationContextHandler.java	                        (rev 0)
+++ labs/jbosstm/workspace/XTS_TX11/WS-C/dev/src/com/arjuna/webservices/wscoor11/handlers/CoordinationContextHandler.java	2007-08-14 12:43:41 UTC (rev 14200)
@@ -0,0 +1,97 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag.  All rights reserved. 
+ * See the copyright.txt in the distribution for a full listing 
+ * of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU General Public License, v. 2.0.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A 
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+ * PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+ * You should have received a copy of the GNU General Public License,
+ * v. 2.0 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+ * MA  02110-1301, USA.
+ * 
+ * (C) 2005-2006,
+ * @author JBoss Inc.
+ */
+package com.arjuna.webservices.wscoor11.handlers;
+
+import javax.xml.namespace.QName;
+import javax.xml.stream.XMLStreamException;
+import javax.xml.stream.XMLStreamReader;
+import javax.xml.stream.XMLStreamWriter;
+
+import com.arjuna.webservices.HeaderHandler;
+import com.arjuna.webservices.MessageContext;
+import com.arjuna.webservices.SoapFault;
+import com.arjuna.webservices.soap.SoapDetails;
+import com.arjuna.webservices.util.StreamHelper;
+import com.arjuna.webservices.wsaddr.AddressingConstants;
+import com.arjuna.webservices.wsaddr.AddressingContext;
+import com.arjuna.webservices.wsaddr.AttributedURIType;
+import com.arjuna.webservices.wscoor11.CoordinationConstants;
+import com.arjuna.webservices.wscoor11.CoordinationContext;
+import com.arjuna.webservices.wscoor11.CoordinationContextType;
+
+/**
+ * Header handler for parsing the Coordination Context header.
+ * @author kevin
+ */
+public class CoordinationContextHandler implements HeaderHandler
+{
+    /**
+     * Handle the header element.
+     * @param in The current streamreader.
+     * @param messageContext The current message context.
+     * @throws XMLStreamException for parsing errors.
+     * @throws SoapFault for processing errors.
+     */
+    public void invoke(final XMLStreamReader in, final MessageContext messageContext)
+        throws XMLStreamException, SoapFault
+    {
+        final CoordinationContextType coordinationContext = new CoordinationContextType(in) ;
+        CoordinationContext.setContext(messageContext, coordinationContext) ;
+    }
+    
+    /**
+     * Write the header element in a response.
+     * @param out The output stream.
+     * @param headerElementName The name of the header element.
+     * @param context The current message context.
+     * @param soapDetails The SOAP details.
+     * @throws XMLStreamException 
+     */
+    public void writeContent(final XMLStreamWriter out, final QName headerElementName,
+        final MessageContext context, final SoapDetails soapDetails)
+        throws XMLStreamException
+    {
+        final CoordinationContextType coordinationContext = CoordinationContext.getThreadContext() ;
+        if (coordinationContext != null)
+        {
+            coordinationContext.putAttribute(soapDetails.getMustUnderstandQName(), soapDetails.getMustUnderstandValue()) ;
+            StreamHelper.writeElement(out, CoordinationConstants.WSCOOR_ELEMENT_COORDINATION_CONTEXT_QNAME, coordinationContext) ;
+        }
+    }
+    
+    /**
+     * Validate headers after processing.
+     * @param context The current message context.
+     * @throws SoapFault for validation errors.
+     */
+    public void headerValidate(final MessageContext context)
+        throws SoapFault
+    {
+    }
+    
+    /**
+     * Notification of a subsequent header processing fault.
+     * @param context The current message context.
+     */
+    public void headerFaultNotification(final MessageContext context)
+    {
+    }
+}


Property changes on: labs/jbosstm/workspace/XTS_TX11/WS-C/dev/src/com/arjuna/webservices/wscoor11/handlers/CoordinationContextHandler.java
___________________________________________________________________
Name: svn:keywords
   + Rev Date
Name: svn:eol-style
   + native

Added: labs/jbosstm/workspace/XTS_TX11/WS-C/dev/src/com/arjuna/webservices/wscoor11/handlers/CreateCoordinationContextHandler.java
===================================================================
--- labs/jbosstm/workspace/XTS_TX11/WS-C/dev/src/com/arjuna/webservices/wscoor11/handlers/CreateCoordinationContextHandler.java	                        (rev 0)
+++ labs/jbosstm/workspace/XTS_TX11/WS-C/dev/src/com/arjuna/webservices/wscoor11/handlers/CreateCoordinationContextHandler.java	2007-08-14 12:43:41 UTC (rev 14200)
@@ -0,0 +1,61 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag.  All rights reserved. 
+ * See the copyright.txt in the distribution for a full listing 
+ * of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU General Public License, v. 2.0.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A 
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+ * PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+ * You should have received a copy of the GNU General Public License,
+ * v. 2.0 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+ * MA  02110-1301, USA.
+ * 
+ * (C) 2005-2006,
+ * @author JBoss Inc.
+ */
+package com.arjuna.webservices.wscoor11.handlers;
+
+import javax.xml.stream.XMLStreamException;
+import javax.xml.stream.XMLStreamReader;
+
+import com.arjuna.webservices.BodyHandler;
+import com.arjuna.webservices.MessageContext;
+import com.arjuna.webservices.SoapBody;
+import com.arjuna.webservices.SoapFault;
+import com.arjuna.webservices.soap.SoapDetails;
+import com.arjuna.webservices.wsaddr2005.AddressingContext;
+import com.arjuna.webservices.wscoor11.CreateCoordinationContextType;
+import com.arjuna.webservices.wscoor11.processors.ActivationCoordinatorProcessor;
+
+/**
+ * The create coordination handler.
+ * @author kevin
+ */
+public class CreateCoordinationContextHandler implements BodyHandler
+{
+    /**
+     * Handle the body element.
+     * @param soapDetails The SOAP details.
+     * @param context The current message context.
+     * @param responseContext The response message context.
+     * @param action The transport SOAP action.
+     * @param in The current stream reader.
+     * @throws XMLStreamException for parsing errors.
+     * @throws SoapFault for processing errors.
+     * @return The response elements or null if one way.
+     */
+    public SoapBody invoke(final SoapDetails soapDetails, final MessageContext context,
+        final MessageContext responseContext, final String action, final XMLStreamReader in)
+        throws XMLStreamException, SoapFault
+    {
+        final CreateCoordinationContextType createCoordinationContext = new CreateCoordinationContextType(in) ;
+        final AddressingContext addressingContext = AddressingContext.getContext(context) ;
+        ActivationCoordinatorProcessor.getCoordinator().createCoordinationContext(createCoordinationContext, addressingContext) ;
+        return null ;
+    }
+}


Property changes on: labs/jbosstm/workspace/XTS_TX11/WS-C/dev/src/com/arjuna/webservices/wscoor11/handlers/CreateCoordinationContextHandler.java
___________________________________________________________________
Name: svn:keywords
   + Rev Date
Name: svn:eol-style
   + native

Added: labs/jbosstm/workspace/XTS_TX11/WS-C/dev/src/com/arjuna/webservices/wscoor11/handlers/CreateCoordinationContextResponseHandler.java
===================================================================
--- labs/jbosstm/workspace/XTS_TX11/WS-C/dev/src/com/arjuna/webservices/wscoor11/handlers/CreateCoordinationContextResponseHandler.java	                        (rev 0)
+++ labs/jbosstm/workspace/XTS_TX11/WS-C/dev/src/com/arjuna/webservices/wscoor11/handlers/CreateCoordinationContextResponseHandler.java	2007-08-14 12:43:41 UTC (rev 14200)
@@ -0,0 +1,61 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag.  All rights reserved. 
+ * See the copyright.txt in the distribution for a full listing 
+ * of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU General Public License, v. 2.0.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A 
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+ * PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+ * You should have received a copy of the GNU General Public License,
+ * v. 2.0 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+ * MA  02110-1301, USA.
+ * 
+ * (C) 2005-2006,
+ * @author JBoss Inc.
+ */
+package com.arjuna.webservices.wscoor11.handlers;
+
+import javax.xml.stream.XMLStreamException;
+import javax.xml.stream.XMLStreamReader;
+
+import com.arjuna.webservices.BodyHandler;
+import com.arjuna.webservices.MessageContext;
+import com.arjuna.webservices.SoapBody;
+import com.arjuna.webservices.SoapFault;
+import com.arjuna.webservices.soap.SoapDetails;
+import com.arjuna.webservices.wsaddr2005.AddressingContext;
+import com.arjuna.webservices.wscoor11.CreateCoordinationContextResponseType;
+import com.arjuna.webservices.wscoor11.processors.ActivationRequesterProcessor;
+
+/**
+ * The create coordination response handler.
+ * @author kevin
+ */
+public class CreateCoordinationContextResponseHandler implements BodyHandler
+{
+    /**
+     * Handle the body element.
+     * @param soapDetails The SOAP details.
+     * @param context The current message context.
+     * @param responseContext The response message context.
+     * @param action The transport SOAP action.
+     * @param in The current stream reader.
+     * @throws XMLStreamException for parsing errors.
+     * @throws SoapFault for processing errors.
+     * @return The response elements or null if one way.
+     */
+    public SoapBody invoke(final SoapDetails soapDetails, final MessageContext context,
+        final MessageContext responseContext, final String action, final XMLStreamReader in)
+        throws XMLStreamException, SoapFault
+    {
+        final CreateCoordinationContextResponseType createCoordinationContextResponse = new CreateCoordinationContextResponseType(in) ;
+        final AddressingContext addressingContext = AddressingContext.getContext(context) ;
+        ActivationRequesterProcessor.getRequester().handleCreateCoordinationContextResponse(createCoordinationContextResponse, addressingContext) ;
+        return null ;
+    }
+}


Property changes on: labs/jbosstm/workspace/XTS_TX11/WS-C/dev/src/com/arjuna/webservices/wscoor11/handlers/CreateCoordinationContextResponseHandler.java
___________________________________________________________________
Name: svn:keywords
   + Rev Date
Name: svn:eol-style
   + native

Added: labs/jbosstm/workspace/XTS_TX11/WS-C/dev/src/com/arjuna/webservices/wscoor11/handlers/RegisterHandler.java
===================================================================
--- labs/jbosstm/workspace/XTS_TX11/WS-C/dev/src/com/arjuna/webservices/wscoor11/handlers/RegisterHandler.java	                        (rev 0)
+++ labs/jbosstm/workspace/XTS_TX11/WS-C/dev/src/com/arjuna/webservices/wscoor11/handlers/RegisterHandler.java	2007-08-14 12:43:41 UTC (rev 14200)
@@ -0,0 +1,63 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag.  All rights reserved. 
+ * See the copyright.txt in the distribution for a full listing 
+ * of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU General Public License, v. 2.0.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A 
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+ * PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+ * You should have received a copy of the GNU General Public License,
+ * v. 2.0 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+ * MA  02110-1301, USA.
+ * 
+ * (C) 2005-2006,
+ * @author JBoss Inc.
+ */
+package com.arjuna.webservices.wscoor11.handlers;
+
+import javax.xml.stream.XMLStreamException;
+import javax.xml.stream.XMLStreamReader;
+
+import com.arjuna.webservices.BodyHandler;
+import com.arjuna.webservices.MessageContext;
+import com.arjuna.webservices.SoapBody;
+import com.arjuna.webservices.SoapFault;
+import com.arjuna.webservices.soap.SoapDetails;
+import com.arjuna.webservices.wsaddr2005.AddressingContext;
+import com.arjuna.webservices.wsjboss.JBossContext;
+import com.arjuna.webservices.wscoor11.RegisterType;
+import com.arjuna.webservices.wscoor11.processors.RegistrationCoordinatorProcessor;
+
+/**
+ * The register handler.
+ * @author kevin
+ */
+public class RegisterHandler implements BodyHandler
+{
+    /**
+     * Handle the body element.
+     * @param soapDetails The SOAP details.
+     * @param context The current message context.
+     * @param responseContext The response message context.
+     * @param action The transport SOAP action.
+     * @param in The current stream reader.
+     * @throws XMLStreamException for parsing errors.
+     * @throws SoapFault for processing errors.
+     * @return The response elements or null if one way.
+     */
+    public SoapBody invoke(final SoapDetails soapDetails, final MessageContext context,
+        final MessageContext responseContext, final String action, final XMLStreamReader in)
+        throws XMLStreamException, SoapFault
+    {
+        final RegisterType register = new RegisterType(in) ;
+        final AddressingContext addressingContext = AddressingContext.getContext(context) ;
+        final JBossContext arjunaContext = JBossContext.getContext(context) ;
+        RegistrationCoordinatorProcessor.getCoordinator().register(register, addressingContext, arjunaContext) ;
+        return null ;
+    }
+}


Property changes on: labs/jbosstm/workspace/XTS_TX11/WS-C/dev/src/com/arjuna/webservices/wscoor11/handlers/RegisterHandler.java
___________________________________________________________________
Name: svn:keywords
   + Rev Date
Name: svn:eol-style
   + native

Added: labs/jbosstm/workspace/XTS_TX11/WS-C/dev/src/com/arjuna/webservices/wscoor11/handlers/RegisterResponseHandler.java
===================================================================
--- labs/jbosstm/workspace/XTS_TX11/WS-C/dev/src/com/arjuna/webservices/wscoor11/handlers/RegisterResponseHandler.java	                        (rev 0)
+++ labs/jbosstm/workspace/XTS_TX11/WS-C/dev/src/com/arjuna/webservices/wscoor11/handlers/RegisterResponseHandler.java	2007-08-14 12:43:41 UTC (rev 14200)
@@ -0,0 +1,61 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag.  All rights reserved. 
+ * See the copyright.txt in the distribution for a full listing 
+ * of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU General Public License, v. 2.0.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A 
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+ * PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+ * You should have received a copy of the GNU General Public License,
+ * v. 2.0 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+ * MA  02110-1301, USA.
+ * 
+ * (C) 2005-2006,
+ * @author JBoss Inc.
+ */
+package com.arjuna.webservices.wscoor11.handlers;
+
+import javax.xml.stream.XMLStreamException;
+import javax.xml.stream.XMLStreamReader;
+
+import com.arjuna.webservices.BodyHandler;
+import com.arjuna.webservices.MessageContext;
+import com.arjuna.webservices.SoapBody;
+import com.arjuna.webservices.SoapFault;
+import com.arjuna.webservices.soap.SoapDetails;
+import com.arjuna.webservices.wsaddr2005.AddressingContext;
+import com.arjuna.webservices.wscoor11.RegisterResponseType;
+import com.arjuna.webservices.wscoor11.processors.RegistrationRequesterProcessor;
+
+/**
+ * The register response handler.
+ * @author kevin
+ */
+public class RegisterResponseHandler implements BodyHandler
+{
+    /**
+     * Handle the body element.
+     * @param soapDetails The SOAP details.
+     * @param context The current message context.
+     * @param responseContext The response message context.
+     * @param action The transport SOAP action.
+     * @param in The current stream reader.
+     * @throws XMLStreamException for parsing errors.
+     * @throws SoapFault for processing errors.
+     * @return The response elements or null if one way.
+     */
+    public SoapBody invoke(final SoapDetails soapDetails, final MessageContext context,
+        final MessageContext responseContext, final String action, final XMLStreamReader in)
+        throws XMLStreamException, SoapFault
+    {
+        final RegisterResponseType registerResponse = new RegisterResponseType(in) ;
+        final AddressingContext addressingContext = AddressingContext.getContext(context) ;
+        RegistrationRequesterProcessor.getRequester().handleRegisterResponse(registerResponse, addressingContext) ;
+        return null ;
+    }
+}


Property changes on: labs/jbosstm/workspace/XTS_TX11/WS-C/dev/src/com/arjuna/webservices/wscoor11/handlers/RegisterResponseHandler.java
___________________________________________________________________
Name: svn:keywords
   + Rev Date
Name: svn:eol-style
   + native

Added: labs/jbosstm/workspace/XTS_TX11/WS-C/dev/src/com/arjuna/webservices/wscoor11/handlers/RegistrationRequesterSoapFaultHandler.java
===================================================================
--- labs/jbosstm/workspace/XTS_TX11/WS-C/dev/src/com/arjuna/webservices/wscoor11/handlers/RegistrationRequesterSoapFaultHandler.java	                        (rev 0)
+++ labs/jbosstm/workspace/XTS_TX11/WS-C/dev/src/com/arjuna/webservices/wscoor11/handlers/RegistrationRequesterSoapFaultHandler.java	2007-08-14 12:43:41 UTC (rev 14200)
@@ -0,0 +1,60 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag.  All rights reserved. 
+ * See the copyright.txt in the distribution for a full listing 
+ * of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU General Public License, v. 2.0.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A 
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+ * PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+ * You should have received a copy of the GNU General Public License,
+ * v. 2.0 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+ * MA  02110-1301, USA.
+ * 
+ * (C) 2005-2006,
+ * @author JBoss Inc.
+ */
+package com.arjuna.webservices.wscoor11.handlers;
+
+import javax.xml.stream.XMLStreamException;
+import javax.xml.stream.XMLStreamReader;
+
+import com.arjuna.webservices.BodyHandler;
+import com.arjuna.webservices.MessageContext;
+import com.arjuna.webservices.SoapBody;
+import com.arjuna.webservices.SoapFault;
+import com.arjuna.webservices.soap.SoapDetails;
+import com.arjuna.webservices.wsaddr2005.AddressingContext;
+import com.arjuna.webservices.wscoor11.processors.RegistrationRequesterProcessor;
+
+/**
+ * The registration requester fault handler.
+ * @author kevin
+ */
+public class RegistrationRequesterSoapFaultHandler implements BodyHandler
+{
+    /**
+     * Handle the body element.
+     * @param soapDetails The SOAP details.
+     * @param context The current message context.
+     * @param responseContext The response message context.
+     * @param action The transport SOAP action.
+     * @param in The current stream reader.
+     * @throws XMLStreamException for parsing errors.
+     * @throws SoapFault for processing errors.
+     * @return The response elements or null if one way.
+     */
+    public SoapBody invoke(final SoapDetails soapDetails, final MessageContext context,
+        final MessageContext responseContext, final String action, final XMLStreamReader in)
+        throws XMLStreamException, SoapFault
+    {
+        final SoapFault soapFault = soapDetails.parseSoapFault(in) ;
+        final AddressingContext addressingContext = AddressingContext.getContext(context) ;
+        RegistrationRequesterProcessor.getRequester().handleSoapFault(soapFault, addressingContext) ;
+        return null ;
+    }
+}


Property changes on: labs/jbosstm/workspace/XTS_TX11/WS-C/dev/src/com/arjuna/webservices/wscoor11/handlers/RegistrationRequesterSoapFaultHandler.java
___________________________________________________________________
Name: svn:keywords
   + Rev Date
Name: svn:eol-style
   + native

Added: labs/jbosstm/workspace/XTS_TX11/WS-C/dev/src/com/arjuna/webservices/wscoor11/policy/ActivationCoordinatorPolicy.java
===================================================================
--- labs/jbosstm/workspace/XTS_TX11/WS-C/dev/src/com/arjuna/webservices/wscoor11/policy/ActivationCoordinatorPolicy.java	                        (rev 0)
+++ labs/jbosstm/workspace/XTS_TX11/WS-C/dev/src/com/arjuna/webservices/wscoor11/policy/ActivationCoordinatorPolicy.java	2007-08-14 12:43:41 UTC (rev 14200)
@@ -0,0 +1,53 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag.  All rights reserved. 
+ * See the copyright.txt in the distribution for a full listing 
+ * of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU General Public License, v. 2.0.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A 
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+ * PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+ * You should have received a copy of the GNU General Public License,
+ * v. 2.0 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+ * MA  02110-1301, USA.
+ * 
+ * (C) 2005-2006,
+ * @author JBoss Inc.
+ */
+package com.arjuna.webservices.wscoor11.policy;
+
+import com.arjuna.webservices.HandlerRegistry;
+import com.arjuna.webservices.base.handlers.LoggingFaultHandler;
+import com.arjuna.webservices.wscoor11.CoordinationConstants;
+import com.arjuna.webservices.wscoor11.handlers.CreateCoordinationContextHandler;
+
+/**
+ * Policy responsible for binding in the WS-Coordination server handlers.
+ * @author kevin
+ */
+public class ActivationCoordinatorPolicy
+{
+    /**
+     * Add this policy to the registry.
+     * @param registry The registry containing the policy.
+     */
+    public static void register(final HandlerRegistry registry)
+    {
+        registry.registerBodyHandler(CoordinationConstants.WSCOOR_ELEMENT_CREATE_COORDINATION_CONTEXT_QNAME, new CreateCoordinationContextHandler()) ;
+        registry.registerFaultHandler(new LoggingFaultHandler(CoordinationConstants.SERVICE_ACTIVATION_COORDINATOR)) ;
+    }
+
+    /**
+     * Remove this policy from the registry.
+     * @param registry The registry containing the policy.
+     */
+    public static void remove(final HandlerRegistry registry)
+    {
+        registry.registerFaultHandler(null) ;
+        registry.removeBodyHandler(CoordinationConstants.WSCOOR_ELEMENT_CREATE_COORDINATION_CONTEXT_QNAME) ;
+    }
+}


Property changes on: labs/jbosstm/workspace/XTS_TX11/WS-C/dev/src/com/arjuna/webservices/wscoor11/policy/ActivationCoordinatorPolicy.java
___________________________________________________________________
Name: svn:keywords
   + Rev Date
Name: svn:eol-style
   + native

Added: labs/jbosstm/workspace/XTS_TX11/WS-C/dev/src/com/arjuna/webservices/wscoor11/policy/ActivationRequesterPolicy.java
===================================================================
--- labs/jbosstm/workspace/XTS_TX11/WS-C/dev/src/com/arjuna/webservices/wscoor11/policy/ActivationRequesterPolicy.java	                        (rev 0)
+++ labs/jbosstm/workspace/XTS_TX11/WS-C/dev/src/com/arjuna/webservices/wscoor11/policy/ActivationRequesterPolicy.java	2007-08-14 12:43:41 UTC (rev 14200)
@@ -0,0 +1,53 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag.  All rights reserved. 
+ * See the copyright.txt in the distribution for a full listing 
+ * of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU General Public License, v. 2.0.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A 
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+ * PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+ * You should have received a copy of the GNU General Public License,
+ * v. 2.0 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+ * MA  02110-1301, USA.
+ * 
+ * (C) 2005-2006,
+ * @author JBoss Inc.
+ */
+package com.arjuna.webservices.wscoor11.policy;
+
+import com.arjuna.webservices.HandlerRegistry;
+import com.arjuna.webservices.wscoor11.CoordinationConstants;
+import com.arjuna.webservices.wscoor11.handlers.ActivationRequesterSoapFaultHandler;
+import com.arjuna.webservices.wscoor11.handlers.CreateCoordinationContextResponseHandler;
+
+/**
+ * Policy responsible for binding in the WS-Coordination client handlers.
+ * @author kevin
+ */
+public class ActivationRequesterPolicy
+{
+    /**
+     * Add this policy to the registry.
+     * @param registry The registry containing the policy.
+     */
+    public static void register(final HandlerRegistry registry)
+    {
+        registry.registerBodyHandler(CoordinationConstants.WSCOOR_ELEMENT_CREATE_COORDINATION_CONTEXT_RESPONSE_QNAME, new CreateCoordinationContextResponseHandler()) ;
+        registry.registerFaultHandler(new ActivationRequesterSoapFaultHandler()) ;
+    }
+
+    /**
+     * Remove this policy from the registry.
+     * @param registry The registry containing the policy.
+     */
+    public static void remove(final HandlerRegistry registry)
+    {
+        registry.registerFaultHandler(null) ;
+        registry.removeBodyHandler(CoordinationConstants.WSCOOR_ELEMENT_CREATE_COORDINATION_CONTEXT_RESPONSE_QNAME) ;
+    }
+}


Property changes on: labs/jbosstm/workspace/XTS_TX11/WS-C/dev/src/com/arjuna/webservices/wscoor11/policy/ActivationRequesterPolicy.java
___________________________________________________________________
Name: svn:keywords
   + Rev Date
Name: svn:eol-style
   + native

Added: labs/jbosstm/workspace/XTS_TX11/WS-C/dev/src/com/arjuna/webservices/wscoor11/policy/CoordinationContextPolicy.java
===================================================================
--- labs/jbosstm/workspace/XTS_TX11/WS-C/dev/src/com/arjuna/webservices/wscoor11/policy/CoordinationContextPolicy.java	                        (rev 0)
+++ labs/jbosstm/workspace/XTS_TX11/WS-C/dev/src/com/arjuna/webservices/wscoor11/policy/CoordinationContextPolicy.java	2007-08-14 12:43:41 UTC (rev 14200)
@@ -0,0 +1,50 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag.  All rights reserved. 
+ * See the copyright.txt in the distribution for a full listing 
+ * of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU General Public License, v. 2.0.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A 
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+ * PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+ * You should have received a copy of the GNU General Public License,
+ * v. 2.0 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+ * MA  02110-1301, USA.
+ * 
+ * (C) 2005-2006,
+ * @author JBoss Inc.
+ */
+package com.arjuna.webservices.wscoor11.policy;
+
+import com.arjuna.webservices.HandlerRegistry;
+import com.arjuna.webservices.wscoor11.CoordinationConstants;
+import com.arjuna.webservices.wscoor11.handlers.CoordinationContextHandler;
+
+/**
+ * Policy responsible for binding the WS-Coordination header handlers for a service.
+ * @author kevin
+ */
+public class CoordinationContextPolicy
+{
+    /**
+     * Add this policy to the registry.
+     * @param registry The registry containing the policy.
+     */
+    public static void register(final HandlerRegistry registry)
+    {
+        registry.registerHeaderHandler(CoordinationConstants.WSCOOR_ELEMENT_COORDINATION_CONTEXT_QNAME, new CoordinationContextHandler()) ;
+    }
+
+    /**
+     * Remove this policy from the registry.
+     * @param registry The registry containing the policy.
+     */
+    public static void remove(final HandlerRegistry registry)
+    {
+        registry.removeHeaderHandler(CoordinationConstants.WSCOOR_ELEMENT_COORDINATION_CONTEXT_QNAME) ;
+    }
+}
\ No newline at end of file


Property changes on: labs/jbosstm/workspace/XTS_TX11/WS-C/dev/src/com/arjuna/webservices/wscoor11/policy/CoordinationContextPolicy.java
___________________________________________________________________
Name: svn:keywords
   + Rev Date
Name: svn:eol-style
   + native

Added: labs/jbosstm/workspace/XTS_TX11/WS-C/dev/src/com/arjuna/webservices/wscoor11/policy/RegistrationCoordinatorPolicy.java
===================================================================
--- labs/jbosstm/workspace/XTS_TX11/WS-C/dev/src/com/arjuna/webservices/wscoor11/policy/RegistrationCoordinatorPolicy.java	                        (rev 0)
+++ labs/jbosstm/workspace/XTS_TX11/WS-C/dev/src/com/arjuna/webservices/wscoor11/policy/RegistrationCoordinatorPolicy.java	2007-08-14 12:43:41 UTC (rev 14200)
@@ -0,0 +1,53 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag.  All rights reserved. 
+ * See the copyright.txt in the distribution for a full listing 
+ * of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU General Public License, v. 2.0.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A 
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+ * PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+ * You should have received a copy of the GNU General Public License,
+ * v. 2.0 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+ * MA  02110-1301, USA.
+ * 
+ * (C) 2005-2006,
+ * @author JBoss Inc.
+ */
+package com.arjuna.webservices.wscoor11.policy;
+
+import com.arjuna.webservices.HandlerRegistry;
+import com.arjuna.webservices.base.handlers.LoggingFaultHandler;
+import com.arjuna.webservices.wscoor11.CoordinationConstants;
+import com.arjuna.webservices.wscoor11.handlers.RegisterHandler;
+
+/**
+ * Policy responsible for binding in the WS-Coordination server handlers.
+ * @author kevin
+ */
+public class RegistrationCoordinatorPolicy
+{
+    /**
+     * Add this policy to the registry.
+     * @param registry The registry containing the policy.
+     */
+    public static void register(final HandlerRegistry registry)
+    {
+        registry.registerBodyHandler(CoordinationConstants.WSCOOR_ELEMENT_REGISTER_QNAME, new RegisterHandler()) ;
+        registry.registerFaultHandler(new LoggingFaultHandler(CoordinationConstants.SERVICE_REGISTRATION_COORDINATOR)) ;
+    }
+
+    /**
+     * Remove this policy from the registry.
+     * @param registry The registry containing the policy.
+     */
+    public static void remove(final HandlerRegistry registry)
+    {
+        registry.registerFaultHandler(null) ;
+        registry.removeBodyHandler(CoordinationConstants.WSCOOR_ELEMENT_REGISTER_QNAME) ;
+    }
+}


Property changes on: labs/jbosstm/workspace/XTS_TX11/WS-C/dev/src/com/arjuna/webservices/wscoor11/policy/RegistrationCoordinatorPolicy.java
___________________________________________________________________
Name: svn:keywords
   + Rev Date
Name: svn:eol-style
   + native

Added: labs/jbosstm/workspace/XTS_TX11/WS-C/dev/src/com/arjuna/webservices/wscoor11/policy/RegistrationRequesterPolicy.java
===================================================================
--- labs/jbosstm/workspace/XTS_TX11/WS-C/dev/src/com/arjuna/webservices/wscoor11/policy/RegistrationRequesterPolicy.java	                        (rev 0)
+++ labs/jbosstm/workspace/XTS_TX11/WS-C/dev/src/com/arjuna/webservices/wscoor11/policy/RegistrationRequesterPolicy.java	2007-08-14 12:43:41 UTC (rev 14200)
@@ -0,0 +1,53 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag.  All rights reserved. 
+ * See the copyright.txt in the distribution for a full listing 
+ * of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU General Public License, v. 2.0.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A 
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+ * PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+ * You should have received a copy of the GNU General Public License,
+ * v. 2.0 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+ * MA  02110-1301, USA.
+ * 
+ * (C) 2005-2006,
+ * @author JBoss Inc.
+ */
+package com.arjuna.webservices.wscoor11.policy;
+
+import com.arjuna.webservices.HandlerRegistry;
+import com.arjuna.webservices.wscoor11.CoordinationConstants;
+import com.arjuna.webservices.wscoor11.handlers.RegisterResponseHandler;
+import com.arjuna.webservices.wscoor11.handlers.RegistrationRequesterSoapFaultHandler;
+
+/**
+ * Policy responsible for binding in the WS-Coordination client handlers.
+ * @author kevin
+ */
+public class RegistrationRequesterPolicy
+{
+    /**
+     * Add this policy to the registry.
+     * @param registry The registry containing the policy.
+     */
+    public static void register(final HandlerRegistry registry)
+    {
+        registry.registerBodyHandler(CoordinationConstants.WSCOOR_ELEMENT_REGISTER_RESPONSE_QNAME, new RegisterResponseHandler()) ;
+        registry.registerFaultHandler(new RegistrationRequesterSoapFaultHandler()) ;
+    }
+
+    /**
+     * Remove this policy from the registry.
+     * @param registry The registry containing the policy.
+     */
+    public static void remove(final HandlerRegistry registry)
+    {
+        registry.registerFaultHandler(null) ;
+        registry.removeBodyHandler(CoordinationConstants.WSCOOR_ELEMENT_REGISTER_RESPONSE_QNAME) ;
+    }
+}


Property changes on: labs/jbosstm/workspace/XTS_TX11/WS-C/dev/src/com/arjuna/webservices/wscoor11/policy/RegistrationRequesterPolicy.java
___________________________________________________________________
Name: svn:keywords
   + Rev Date
Name: svn:eol-style
   + native

Added: labs/jbosstm/workspace/XTS_TX11/WS-C/dev/src/com/arjuna/webservices/wscoor11/processors/ActivationCoordinatorProcessor.java
===================================================================
--- labs/jbosstm/workspace/XTS_TX11/WS-C/dev/src/com/arjuna/webservices/wscoor11/processors/ActivationCoordinatorProcessor.java	                        (rev 0)
+++ labs/jbosstm/workspace/XTS_TX11/WS-C/dev/src/com/arjuna/webservices/wscoor11/processors/ActivationCoordinatorProcessor.java	2007-08-14 12:43:41 UTC (rev 14200)
@@ -0,0 +1,65 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag.  All rights reserved. 
+ * See the copyright.txt in the distribution for a full listing 
+ * of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU General Public License, v. 2.0.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A 
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+ * PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+ * You should have received a copy of the GNU General Public License,
+ * v. 2.0 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+ * MA  02110-1301, USA.
+ * 
+ * (C) 2005-2006,
+ * @author JBoss Inc.
+ */
+package com.arjuna.webservices.wscoor11.processors;
+
+import com.arjuna.webservices.wsaddr2005.AddressingContext;
+import com.arjuna.webservices.wscoor11.CreateCoordinationContextType;
+
+/**
+ * The Activation Coordinator processor.
+ * @author kevin
+ */
+public abstract class ActivationCoordinatorProcessor
+{
+    /**
+     * The coordinator.
+     */
+    private static ActivationCoordinatorProcessor COORDINATOR  ;
+    
+    /**
+     * Get the coordinator.
+     * @return The coordinator.
+     */
+    public static ActivationCoordinatorProcessor getCoordinator()
+    {
+        return COORDINATOR ;
+    }
+    
+    /**
+     * Set the coordinator.
+     * @param coordinator The coordinator.
+     * @return The previous coordinator.
+     */
+    public static ActivationCoordinatorProcessor setCoordinator(final ActivationCoordinatorProcessor coordinator)
+    {
+        final ActivationCoordinatorProcessor origCoordinator = COORDINATOR ;
+        COORDINATOR = coordinator ;
+        return origCoordinator ;
+    }
+    
+    /**
+     * Create the coordination context.
+     * @param createCoordinationContext The create coordination context request.
+     * @param addressingContext The addressing context.
+     */
+    public abstract void createCoordinationContext(final CreateCoordinationContextType createCoordinationContext,
+        final AddressingContext addressingContext) ;
+}


Property changes on: labs/jbosstm/workspace/XTS_TX11/WS-C/dev/src/com/arjuna/webservices/wscoor11/processors/ActivationCoordinatorProcessor.java
___________________________________________________________________
Name: svn:keywords
   + Rev Date
Name: svn:eol-style
   + native

Added: labs/jbosstm/workspace/XTS_TX11/WS-C/dev/src/com/arjuna/webservices/wscoor11/processors/ActivationRequesterCallback.java
===================================================================
--- labs/jbosstm/workspace/XTS_TX11/WS-C/dev/src/com/arjuna/webservices/wscoor11/processors/ActivationRequesterCallback.java	                        (rev 0)
+++ labs/jbosstm/workspace/XTS_TX11/WS-C/dev/src/com/arjuna/webservices/wscoor11/processors/ActivationRequesterCallback.java	2007-08-14 12:43:41 UTC (rev 14200)
@@ -0,0 +1,48 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag.  All rights reserved. 
+ * See the copyright.txt in the distribution for a full listing 
+ * of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU General Public License, v. 2.0.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A 
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+ * PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+ * You should have received a copy of the GNU General Public License,
+ * v. 2.0 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+ * MA  02110-1301, USA.
+ * 
+ * (C) 2005-2006,
+ * @author JBoss Inc.
+ */
+package com.arjuna.webservices.wscoor11.processors;
+
+import com.arjuna.webservices.SoapFault;
+import com.arjuna.webservices.base.processors.Callback;
+import com.arjuna.webservices.wsaddr2005.AddressingContext;
+import com.arjuna.webservices.wscoor11.CreateCoordinationContextResponseType;
+
+/**
+ * The callback for the Activation Requester client.
+ * @author kevin
+ */
+public abstract class ActivationRequesterCallback extends Callback
+{
+    /**
+     * A create coordination context response.
+     * @param createCoordinationContextResponse The response.
+     * @param addressingContext The current addressing context.
+     */
+    public abstract void createCoordinationContextResponse(final CreateCoordinationContextResponseType createCoordinationContextResponse,
+        final AddressingContext addressingContext) ;
+
+    /**
+     * A SOAP fault response.
+     * @param soapFault The SOAP fault response.
+     * @param addressingContext The current addressing context.
+     */
+    public abstract void soapFault(final SoapFault soapFault, final AddressingContext addressingContext) ;
+}


Property changes on: labs/jbosstm/workspace/XTS_TX11/WS-C/dev/src/com/arjuna/webservices/wscoor11/processors/ActivationRequesterCallback.java
___________________________________________________________________
Name: svn:keywords
   + Rev Date
Name: svn:eol-style
   + native

Added: labs/jbosstm/workspace/XTS_TX11/WS-C/dev/src/com/arjuna/webservices/wscoor11/processors/ActivationRequesterProcessor.java
===================================================================
--- labs/jbosstm/workspace/XTS_TX11/WS-C/dev/src/com/arjuna/webservices/wscoor11/processors/ActivationRequesterProcessor.java	                        (rev 0)
+++ labs/jbosstm/workspace/XTS_TX11/WS-C/dev/src/com/arjuna/webservices/wscoor11/processors/ActivationRequesterProcessor.java	2007-08-14 12:43:41 UTC (rev 14200)
@@ -0,0 +1,87 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag.  All rights reserved. 
+ * See the copyright.txt in the distribution for a full listing 
+ * of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU General Public License, v. 2.0.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A 
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+ * PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+ * You should have received a copy of the GNU General Public License,
+ * v. 2.0 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+ * MA  02110-1301, USA.
+ * 
+ * (C) 2005-2006,
+ * @author JBoss Inc.
+ */
+package com.arjuna.webservices.wscoor11.processors;
+
+import com.arjuna.webservices.SoapFault;
+import com.arjuna.webservices.base.processors.Callback;
+import com.arjuna.webservices.wsaddr2005.AddressingContext;
+import com.arjuna.webservices.wsaddr2005.processor.BaseWSAddr2005ResponseProcessor;
+import com.arjuna.webservices.wscoor11.CreateCoordinationContextResponseType;
+
+/**
+ * The Activation Requester processor.
+ * @author kevin
+ */
+public class ActivationRequesterProcessor extends BaseWSAddr2005ResponseProcessor
+{
+    /**
+     * The requester singleton.
+     */
+    private static final ActivationRequesterProcessor REQUESTER = new ActivationRequesterProcessor() ;
+    
+    /**
+     * Get the requester singleton.
+     * @return The singleton.
+     */
+    public static ActivationRequesterProcessor getRequester()
+    {
+        return REQUESTER ;
+    }
+
+    /**
+     * Handle a create coordination context response.
+     * @param createCoordinationContextResponse The response.
+     * @param addressingContext The current addressing context.
+     */
+    public void handleCreateCoordinationContextResponse(final CreateCoordinationContextResponseType createCoordinationContextResponse,
+        final AddressingContext addressingContext)
+    {
+        handleCallbacks(new CallbackExecutorAdapter() {
+            public void execute(final Callback callback) {
+                ((ActivationRequesterCallback)callback).createCoordinationContextResponse(createCoordinationContextResponse, addressingContext) ;
+            }
+        }, getIDs(addressingContext)) ;
+    }
+
+    /**
+     * Register a SOAP fault response.
+     * @param soapFault The SOAP fault response.
+     * @param addressingContext The current addressing context.
+     */
+    public void handleSoapFault(final SoapFault soapFault, final AddressingContext addressingContext)
+    {
+        handleCallbacks(new CallbackExecutorAdapter() {
+            public void execute(final Callback callback) {
+                ((ActivationRequesterCallback)callback).soapFault(soapFault, addressingContext) ;
+            }
+        }, getIDs(addressingContext)) ;
+    }
+
+    /**
+     * Register a callback for the specific message id.
+     * @param messageID The message ID.
+     * @param callback The callback for the response.
+     */
+    public void registerCallback(final String messageID, final ActivationRequesterCallback callback)
+    {
+        register(messageID, callback) ;
+    }
+}


Property changes on: labs/jbosstm/workspace/XTS_TX11/WS-C/dev/src/com/arjuna/webservices/wscoor11/processors/ActivationRequesterProcessor.java
___________________________________________________________________
Name: svn:keywords
   + Rev Date
Name: svn:eol-style
   + native

Added: labs/jbosstm/workspace/XTS_TX11/WS-C/dev/src/com/arjuna/webservices/wscoor11/processors/RegistrationCoordinatorProcessor.java
===================================================================
--- labs/jbosstm/workspace/XTS_TX11/WS-C/dev/src/com/arjuna/webservices/wscoor11/processors/RegistrationCoordinatorProcessor.java	                        (rev 0)
+++ labs/jbosstm/workspace/XTS_TX11/WS-C/dev/src/com/arjuna/webservices/wscoor11/processors/RegistrationCoordinatorProcessor.java	2007-08-14 12:43:41 UTC (rev 14200)
@@ -0,0 +1,68 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag.  All rights reserved. 
+ * See the copyright.txt in the distribution for a full listing 
+ * of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU General Public License, v. 2.0.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A 
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+ * PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+ * You should have received a copy of the GNU General Public License,
+ * v. 2.0 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+ * MA  02110-1301, USA.
+ * 
+ * (C) 2005-2006,
+ * @author JBoss Inc.
+ */
+package com.arjuna.webservices.wscoor11.processors;
+
+import com.arjuna.webservices.wsaddr2005.AddressingContext;
+import com.arjuna.webservices.wsjboss.JBossContext;
+import com.arjuna.webservices.wscoor11.RegisterType;
+
+
+/**
+ * The Registration Coordinator processor.
+ * @author kevin
+ */
+public abstract class RegistrationCoordinatorProcessor
+{
+    /**
+     * The coordinator.
+     */
+    private static RegistrationCoordinatorProcessor COORDINATOR ;
+    
+    /**
+     * Get the coordinator.
+     * @return The coordinator.
+     */
+    public static RegistrationCoordinatorProcessor getCoordinator()
+    {
+        return COORDINATOR ;
+    }
+    
+    /**
+     * Set the coordinator.
+     * @param coordinator The coordinator.
+     * @return The orig coordinator.
+     */
+    public static RegistrationCoordinatorProcessor setCoordinator(final RegistrationCoordinatorProcessor coordinator)
+    {
+        final RegistrationCoordinatorProcessor origCoordinator = COORDINATOR ;
+        COORDINATOR = coordinator ;
+        return origCoordinator ;
+    }
+
+    /**
+     * Register the participant in the protocol.
+     * @param register The register request.
+     * @param addressingContext The addressing context.
+     * @param jbossContext The jboss context.
+     */
+    public abstract void register(final RegisterType register, final AddressingContext addressingContext,
+        final JBossContext jbossContext) ;
+}


Property changes on: labs/jbosstm/workspace/XTS_TX11/WS-C/dev/src/com/arjuna/webservices/wscoor11/processors/RegistrationCoordinatorProcessor.java
___________________________________________________________________
Name: svn:keywords
   + Rev Date
Name: svn:eol-style
   + native

Added: labs/jbosstm/workspace/XTS_TX11/WS-C/dev/src/com/arjuna/webservices/wscoor11/processors/RegistrationRequesterCallback.java
===================================================================
--- labs/jbosstm/workspace/XTS_TX11/WS-C/dev/src/com/arjuna/webservices/wscoor11/processors/RegistrationRequesterCallback.java	                        (rev 0)
+++ labs/jbosstm/workspace/XTS_TX11/WS-C/dev/src/com/arjuna/webservices/wscoor11/processors/RegistrationRequesterCallback.java	2007-08-14 12:43:41 UTC (rev 14200)
@@ -0,0 +1,48 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag.  All rights reserved. 
+ * See the copyright.txt in the distribution for a full listing 
+ * of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU General Public License, v. 2.0.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A 
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+ * PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+ * You should have received a copy of the GNU General Public License,
+ * v. 2.0 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+ * MA  02110-1301, USA.
+ * 
+ * (C) 2005-2006,
+ * @author JBoss Inc.
+ */
+package com.arjuna.webservices.wscoor11.processors;
+
+import com.arjuna.webservices.SoapFault;
+import com.arjuna.webservices.base.processors.Callback;
+import com.arjuna.webservices.wsaddr2005.AddressingContext;
+import com.arjuna.webservices.wscoor11.RegisterResponseType;
+
+/**
+ * The callback for the Registration Requester client.
+ * @author kevin
+ */
+public abstract class RegistrationRequesterCallback extends Callback
+{
+    /**
+     * A register response.
+     * @param registerResponse The response.
+     * @param addressingContext The current addressing context.
+     */
+    public abstract void registerResponse(final RegisterResponseType registerResponse,
+        final AddressingContext addressingContext) ;
+
+    /**
+     * A SOAP fault response.
+     * @param soapFault The SOAP fault response.
+     * @param addressingContext The current addressing context.
+     */
+    public abstract void soapFault(final SoapFault soapFault, final AddressingContext addressingContext) ;
+}


Property changes on: labs/jbosstm/workspace/XTS_TX11/WS-C/dev/src/com/arjuna/webservices/wscoor11/processors/RegistrationRequesterCallback.java
___________________________________________________________________
Name: svn:keywords
   + Rev Date
Name: svn:eol-style
   + native

Added: labs/jbosstm/workspace/XTS_TX11/WS-C/dev/src/com/arjuna/webservices/wscoor11/processors/RegistrationRequesterProcessor.java
===================================================================
--- labs/jbosstm/workspace/XTS_TX11/WS-C/dev/src/com/arjuna/webservices/wscoor11/processors/RegistrationRequesterProcessor.java	                        (rev 0)
+++ labs/jbosstm/workspace/XTS_TX11/WS-C/dev/src/com/arjuna/webservices/wscoor11/processors/RegistrationRequesterProcessor.java	2007-08-14 12:43:41 UTC (rev 14200)
@@ -0,0 +1,87 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag.  All rights reserved. 
+ * See the copyright.txt in the distribution for a full listing 
+ * of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU General Public License, v. 2.0.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A 
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+ * PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+ * You should have received a copy of the GNU General Public License,
+ * v. 2.0 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+ * MA  02110-1301, USA.
+ * 
+ * (C) 2005-2006,
+ * @author JBoss Inc.
+ */
+package com.arjuna.webservices.wscoor11.processors;
+
+import com.arjuna.webservices.SoapFault;
+import com.arjuna.webservices.base.processors.Callback;
+import com.arjuna.webservices.wsaddr2005.AddressingContext;
+import com.arjuna.webservices.wsaddr2005.processor.BaseWSAddr2005ResponseProcessor;
+import com.arjuna.webservices.wscoor11.RegisterResponseType;
+
+/**
+ * The Registration Requester processor.
+ * @author kevin
+ */
+public class RegistrationRequesterProcessor extends BaseWSAddr2005ResponseProcessor
+{
+    /**
+     * The requester singleton.
+     */
+    private static final RegistrationRequesterProcessor REQUESTER = new RegistrationRequesterProcessor() ;
+    
+    /**
+     * Get the requester singleton.
+     * @return The singleton.
+     */
+    public static RegistrationRequesterProcessor getRequester()
+    {
+        return REQUESTER ;
+    }
+
+    /**
+     * Handle a register response.
+     * @param registerResponse The response.
+     * @param addressingContext The current addressing context.
+     */
+    public void handleRegisterResponse(final RegisterResponseType registerResponse,
+        final AddressingContext addressingContext)
+    {
+        handleCallbacks(new CallbackExecutorAdapter() {
+            public void execute(final Callback callback) {
+                ((RegistrationRequesterCallback)callback).registerResponse(registerResponse, addressingContext) ;
+            }
+        }, getIDs(addressingContext)) ;
+    }
+
+    /**
+     * Register a SOAP fault response.
+     * @param soapFault The SOAP fault response.
+     * @param addressingContext The current addressing context.
+     */
+    public void handleSoapFault(final SoapFault soapFault, final AddressingContext addressingContext)
+    {
+        handleCallbacks(new CallbackExecutorAdapter() {
+            public void execute(final Callback callback) {
+                ((RegistrationRequesterCallback)callback).soapFault(soapFault, addressingContext) ;
+            }
+        }, getIDs(addressingContext)) ;
+    }
+
+    /**
+     * Register a callback for the specific message id.
+     * @param messageID The message ID.
+     * @param callback The callback for the response.
+     */
+    public void registerCallback(final String messageID, final RegistrationRequesterCallback callback)
+    {
+        register(messageID, callback) ;
+    }
+}


Property changes on: labs/jbosstm/workspace/XTS_TX11/WS-C/dev/src/com/arjuna/webservices/wscoor11/processors/RegistrationRequesterProcessor.java
___________________________________________________________________
Name: svn:keywords
   + Rev Date
Name: svn:eol-style
   + native

Added: labs/jbosstm/workspace/XTS_TX11/WS-C/dev/src/com/arjuna/webservices/wscoor11/server/ActivationCoordinatorInitialisation.java
===================================================================
--- labs/jbosstm/workspace/XTS_TX11/WS-C/dev/src/com/arjuna/webservices/wscoor11/server/ActivationCoordinatorInitialisation.java	                        (rev 0)
+++ labs/jbosstm/workspace/XTS_TX11/WS-C/dev/src/com/arjuna/webservices/wscoor11/server/ActivationCoordinatorInitialisation.java	2007-08-14 12:43:41 UTC (rev 14200)
@@ -0,0 +1,64 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag.  All rights reserved. 
+ * See the copyright.txt in the distribution for a full listing 
+ * of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU General Public License, v. 2.0.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A 
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+ * PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+ * You should have received a copy of the GNU General Public License,
+ * v. 2.0 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+ * MA  02110-1301, USA.
+ * 
+ * (C) 2005-2006,
+ * @author JBoss Inc.
+ */
+package com.arjuna.webservices.wscoor11.server;
+
+import javax.servlet.ServletContextEvent;
+import javax.servlet.ServletContextListener;
+
+import com.arjuna.webservices.HandlerRegistry;
+import com.arjuna.webservices.SoapRegistry;
+import com.arjuna.webservices.SoapService;
+import com.arjuna.webservices.wsaddr2005.policy.AddressingPolicy;
+import com.arjuna.webservices.wscoor11.CoordinationConstants;
+import com.arjuna.webservices.wscoor11.policy.ActivationCoordinatorPolicy;
+
+/**
+ * Activate the Activation Coordinator service
+ * @author kevin
+ */
+public class ActivationCoordinatorInitialisation implements ServletContextListener
+{
+    /**
+     * The context has been initialized.
+     * @param servletContextEvent The servlet context event.
+     */
+    public void contextInitialized(final ServletContextEvent servletContextEvent)
+    {
+        final HandlerRegistry handlerRegistry = new HandlerRegistry() ;
+        
+        // Add WS-Addressing
+        AddressingPolicy.register(handlerRegistry) ;
+        // Add Activation coordinator.
+        ActivationCoordinatorPolicy.register(handlerRegistry) ;
+        
+        final SoapRegistry soapRegistry = SoapRegistry.getRegistry() ;
+        soapRegistry.registerSoapService(CoordinationConstants.SERVICE_ACTIVATION_COORDINATOR,
+            new SoapService(handlerRegistry)) ;
+    }
+
+    /**
+     * The context is about to be destroyed.
+     * @param servletContextEvent The servlet context event.
+     */
+    public void contextDestroyed(final ServletContextEvent servletContextEvent)
+    {
+    }
+}


Property changes on: labs/jbosstm/workspace/XTS_TX11/WS-C/dev/src/com/arjuna/webservices/wscoor11/server/ActivationCoordinatorInitialisation.java
___________________________________________________________________
Name: svn:keywords
   + Rev Date
Name: svn:eol-style
   + native

Added: labs/jbosstm/workspace/XTS_TX11/WS-C/dev/src/com/arjuna/webservices/wscoor11/server/ActivationRequesterInitialisation.java
===================================================================
--- labs/jbosstm/workspace/XTS_TX11/WS-C/dev/src/com/arjuna/webservices/wscoor11/server/ActivationRequesterInitialisation.java	                        (rev 0)
+++ labs/jbosstm/workspace/XTS_TX11/WS-C/dev/src/com/arjuna/webservices/wscoor11/server/ActivationRequesterInitialisation.java	2007-08-14 12:43:41 UTC (rev 14200)
@@ -0,0 +1,64 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag.  All rights reserved. 
+ * See the copyright.txt in the distribution for a full listing 
+ * of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU General Public License, v. 2.0.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A 
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+ * PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+ * You should have received a copy of the GNU General Public License,
+ * v. 2.0 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+ * MA  02110-1301, USA.
+ * 
+ * (C) 2005-2006,
+ * @author JBoss Inc.
+ */
+package com.arjuna.webservices.wscoor11.server;
+
+import javax.servlet.ServletContextEvent;
+import javax.servlet.ServletContextListener;
+
+import com.arjuna.webservices.HandlerRegistry;
+import com.arjuna.webservices.SoapRegistry;
+import com.arjuna.webservices.SoapService;
+import com.arjuna.webservices.wsaddr2005.policy.AddressingPolicy;
+import com.arjuna.webservices.wscoor11.CoordinationConstants;
+import com.arjuna.webservices.wscoor11.policy.ActivationRequesterPolicy;
+
+/**
+ * Activate the Activation Requester service
+ * @author kevin
+ */
+public class ActivationRequesterInitialisation implements ServletContextListener
+{
+    /**
+     * The context has been initialized.
+     * @param servletContextEvent The servlet context event.
+     */
+    public void contextInitialized(final ServletContextEvent servletContextEvent)
+    {
+        final HandlerRegistry handlerRegistry = new HandlerRegistry() ;
+        
+        // Add WS-Addressing
+        AddressingPolicy.register(handlerRegistry) ;
+        // Add Activation coordinator.
+        ActivationRequesterPolicy.register(handlerRegistry) ;
+        
+        final SoapRegistry soapRegistry = SoapRegistry.getRegistry() ;
+        soapRegistry.registerSoapService(CoordinationConstants.SERVICE_ACTIVATION_REQUESTER,
+            new SoapService(handlerRegistry)) ;
+    }
+
+    /**
+     * The context is about to be destroyed.
+     * @param servletContextEvent The servlet context event.
+     */
+    public void contextDestroyed(final ServletContextEvent servletContextEvent)
+    {
+    }
+}


Property changes on: labs/jbosstm/workspace/XTS_TX11/WS-C/dev/src/com/arjuna/webservices/wscoor11/server/ActivationRequesterInitialisation.java
___________________________________________________________________
Name: svn:keywords
   + Rev Date
Name: svn:eol-style
   + native

Added: labs/jbosstm/workspace/XTS_TX11/WS-C/dev/src/com/arjuna/webservices/wscoor11/server/RegistrationCoordinatorInitialisation.java
===================================================================
--- labs/jbosstm/workspace/XTS_TX11/WS-C/dev/src/com/arjuna/webservices/wscoor11/server/RegistrationCoordinatorInitialisation.java	                        (rev 0)
+++ labs/jbosstm/workspace/XTS_TX11/WS-C/dev/src/com/arjuna/webservices/wscoor11/server/RegistrationCoordinatorInitialisation.java	2007-08-14 12:43:41 UTC (rev 14200)
@@ -0,0 +1,67 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag.  All rights reserved. 
+ * See the copyright.txt in the distribution for a full listing 
+ * of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU General Public License, v. 2.0.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A 
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+ * PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+ * You should have received a copy of the GNU General Public License,
+ * v. 2.0 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+ * MA  02110-1301, USA.
+ * 
+ * (C) 2005-2006,
+ * @author JBoss Inc.
+ */
+package com.arjuna.webservices.wscoor11.server;
+
+import javax.servlet.ServletContextEvent;
+import javax.servlet.ServletContextListener;
+
+import com.arjuna.webservices.HandlerRegistry;
+import com.arjuna.webservices.SoapRegistry;
+import com.arjuna.webservices.SoapService;
+import com.arjuna.webservices.wsaddr2005.policy.AddressingPolicy;
+import com.arjuna.webservices.wsjboss.policy.JBossPolicy;
+import com.arjuna.webservices.wscoor11.CoordinationConstants;
+import com.arjuna.webservices.wscoor11.policy.RegistrationCoordinatorPolicy;
+
+/**
+ * Activate the Registration Coordinator service
+ * @author kevin
+ */
+public class RegistrationCoordinatorInitialisation implements ServletContextListener
+{
+    /**
+     * The context has been initialized.
+     * @param servletContextEvent The servlet context event.
+     */
+    public void contextInitialized(final ServletContextEvent servletContextEvent)
+    {
+        final HandlerRegistry handlerRegistry = new HandlerRegistry() ;
+        
+        // Add WS-Addressing
+        AddressingPolicy.register(handlerRegistry) ;
+        // Add JBoss handlers
+        JBossPolicy.register(handlerRegistry) ;
+        // Add Registration coordinator.
+        RegistrationCoordinatorPolicy.register(handlerRegistry) ;
+        
+        final SoapRegistry soapRegistry = SoapRegistry.getRegistry() ;
+        soapRegistry.registerSoapService(CoordinationConstants.SERVICE_REGISTRATION_COORDINATOR,
+            new SoapService(handlerRegistry)) ;
+    }
+
+    /**
+     * The context is about to be destroyed.
+     * @param servletContextEvent The servlet context event.
+     */
+    public void contextDestroyed(final ServletContextEvent servletContextEvent)
+    {
+    }
+}


Property changes on: labs/jbosstm/workspace/XTS_TX11/WS-C/dev/src/com/arjuna/webservices/wscoor11/server/RegistrationCoordinatorInitialisation.java
___________________________________________________________________
Name: svn:keywords
   + Rev Date
Name: svn:eol-style
   + native

Added: labs/jbosstm/workspace/XTS_TX11/WS-C/dev/src/com/arjuna/webservices/wscoor11/server/RegistrationRequesterInitialisation.java
===================================================================
--- labs/jbosstm/workspace/XTS_TX11/WS-C/dev/src/com/arjuna/webservices/wscoor11/server/RegistrationRequesterInitialisation.java	                        (rev 0)
+++ labs/jbosstm/workspace/XTS_TX11/WS-C/dev/src/com/arjuna/webservices/wscoor11/server/RegistrationRequesterInitialisation.java	2007-08-14 12:43:41 UTC (rev 14200)
@@ -0,0 +1,64 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag.  All rights reserved. 
+ * See the copyright.txt in the distribution for a full listing 
+ * of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU General Public License, v. 2.0.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A 
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+ * PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+ * You should have received a copy of the GNU General Public License,
+ * v. 2.0 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+ * MA  02110-1301, USA.
+ * 
+ * (C) 2005-2006,
+ * @author JBoss Inc.
+ */
+package com.arjuna.webservices.wscoor11.server;
+
+import javax.servlet.ServletContextEvent;
+import javax.servlet.ServletContextListener;
+
+import com.arjuna.webservices.HandlerRegistry;
+import com.arjuna.webservices.SoapRegistry;
+import com.arjuna.webservices.SoapService;
+import com.arjuna.webservices.wsaddr2005.policy.AddressingPolicy;
+import com.arjuna.webservices.wscoor11.CoordinationConstants;
+import com.arjuna.webservices.wscoor11.policy.RegistrationRequesterPolicy;
+
+/**
+ * Activate the Registration Requester service
+ * @author kevin
+ */
+public class RegistrationRequesterInitialisation implements ServletContextListener
+{
+    /**
+     * The context has been initialized.
+     * @param servletContextEvent The servlet context event.
+     */
+    public void contextInitialized(final ServletContextEvent servletContextEvent)
+    {
+        final HandlerRegistry handlerRegistry = new HandlerRegistry() ;
+        
+        // Add WS-Addressing
+        AddressingPolicy.register(handlerRegistry) ;
+        // Add Registration coordinator.
+        RegistrationRequesterPolicy.register(handlerRegistry) ;
+        
+        final SoapRegistry soapRegistry = SoapRegistry.getRegistry() ;
+        soapRegistry.registerSoapService(CoordinationConstants.SERVICE_REGISTRATION_REQUESTER,
+            new SoapService(handlerRegistry)) ;
+    }
+
+    /**
+     * The context is about to be destroyed.
+     * @param servletContextEvent The servlet context event.
+     */
+    public void contextDestroyed(final ServletContextEvent servletContextEvent)
+    {
+    }
+}


Property changes on: labs/jbosstm/workspace/XTS_TX11/WS-C/dev/src/com/arjuna/webservices/wscoor11/server/RegistrationRequesterInitialisation.java
___________________________________________________________________
Name: svn:keywords
   + Rev Date
Name: svn:eol-style
   + native

Added: labs/jbosstm/workspace/XTS_TX11/WS-C/dev/src/com/arjuna/webservices/wscoor11/wscoor.xsd
===================================================================
--- labs/jbosstm/workspace/XTS_TX11/WS-C/dev/src/com/arjuna/webservices/wscoor11/wscoor.xsd	                        (rev 0)
+++ labs/jbosstm/workspace/XTS_TX11/WS-C/dev/src/com/arjuna/webservices/wscoor11/wscoor.xsd	2007-08-14 12:43:41 UTC (rev 14200)
@@ -0,0 +1,103 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--  
+OASIS takes no position regarding the validity or scope of any intellectual property or other rights that might be claimed to pertain to the implementation or use of the technology described in this document or the extent to which any license under such rights might or might not be available; neither does it represent that it has made any effort to identify any such rights. Information on OASIS's procedures with respect to rights in OASIS specifications can be found at the OASIS website. Copies of claims of rights made available for publication and any assurances of licenses to be made available, or the result of an attempt made to obtain a general license or permission for the use of such proprietary rights by implementors or users of this specification, can be obtained from the OASIS President.
+OASIS invites any interested party to bring to its attention any copyrights, patents or patent applications, or other proprietary rights which may cover technology that may be required to implement this specification. Please address the information to the OASIS President.
+Copyright OASIS Open 2006. All Rights Reserved.
+This document and translations of it may be copied and furnished to others, and derivative works that comment on or otherwise explain it or assist in its implementation may be prepared, copied, published and distributed, in whole or in part, without restriction of any kind, provided that the above copyright notice and this paragraph are included on all such copies and derivative works. However, this document itself does not be modified in any way, such as by removing the copyright notice or references to OASIS, except as needed for the purpose of developing OASIS specifications, in which case the procedures for copyrights defined in the OASIS Intellectual Property Rights document must be followed, or as required to translate it into languages other than English.
+The limited permissions granted above are perpetual and will not be revoked by OASIS or its successors or assigns.
+This document and the information contained herein is provided on an "AS IS" basis and OASIS DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
+-->
+<xsd:schema targetNamespace="http://docs.oasis-open.org/ws-tx/wscoor/2006/03" xmlns:wsa="http://www.w3.org/2005/08/addressing" xmlns:wscoor="http://docs.oasis-open.org/ws-tx/wscoor/2006/03" xmlns:xsd="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" attributeFormDefault="unqualified" version="1.0">
+  <xsd:import namespace="http://www.w3.org/2005/08/addressing" schemaLocation="http://www.w3.org/2006/03/addressing/ws-addr.xsd"/>
+  <xsd:element name="Expires">
+    <xsd:complexType>
+      <xsd:simpleContent>
+        <xsd:extension base="xsd:unsignedInt">
+          <xsd:anyAttribute namespace="##other" />
+        </xsd:extension>
+      </xsd:simpleContent>
+    </xsd:complexType>
+  </xsd:element>
+  <xsd:complexType name="CoordinationContextType">
+    <xsd:sequence>
+      <xsd:element name="Identifier">
+        <xsd:complexType>
+          <xsd:simpleContent>
+            <xsd:extension base="xsd:anyURI">
+              <xsd:anyAttribute namespace="##other" />
+            </xsd:extension>
+          </xsd:simpleContent>
+        </xsd:complexType>
+      </xsd:element>
+      <xsd:element ref="wscoor:Expires" minOccurs="0" />
+      <xsd:element name="CoordinationType" type="xsd:anyURI" />
+      <xsd:element name="RegistrationService" type="wsa:EndpointReferenceType" />
+    </xsd:sequence>
+    <xsd:anyAttribute namespace="##other" processContents="lax" />
+  </xsd:complexType>
+  <xsd:element name="CoordinationContext">
+    <xsd:complexType>
+      <xsd:complexContent>
+        <xsd:extension base="wscoor:CoordinationContextType">
+          <xsd:sequence>
+            <xsd:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded" />
+          </xsd:sequence>
+        </xsd:extension>
+      </xsd:complexContent>
+    </xsd:complexType>
+  </xsd:element>
+  <xsd:complexType name="CreateCoordinationContextType">
+    <xsd:sequence>
+      <xsd:element ref="wscoor:Expires" minOccurs="0" />
+      <xsd:element name="CurrentContext" minOccurs="0">
+        <xsd:complexType>
+          <xsd:complexContent>
+            <xsd:extension base="wscoor:CoordinationContextType">
+              <xsd:sequence>
+                <xsd:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded" />
+              </xsd:sequence>
+            </xsd:extension>
+          </xsd:complexContent>
+        </xsd:complexType>
+      </xsd:element>
+      <xsd:element name="CoordinationType" type="xsd:anyURI" />
+      <xsd:any namespace="##any" processContents="lax" minOccurs="0" maxOccurs="unbounded" />
+    </xsd:sequence>
+    <xsd:anyAttribute namespace="##other" processContents="lax" />
+  </xsd:complexType>
+  <xsd:element name="CreateCoordinationContext" type="wscoor:CreateCoordinationContextType" />
+  <xsd:complexType name="CreateCoordinationContextResponseType">
+    <xsd:sequence>
+      <xsd:element ref="wscoor:CoordinationContext" />
+      <xsd:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded" />
+    </xsd:sequence>
+    <xsd:anyAttribute namespace="##other" processContents="lax" />
+  </xsd:complexType>
+  <xsd:element name="CreateCoordinationContextResponse" type="wscoor:CreateCoordinationContextResponseType" />
+  <xsd:complexType name="RegisterType">
+    <xsd:sequence>
+      <xsd:element name="ProtocolIdentifier" type="xsd:anyURI" />
+      <xsd:element name="ParticipantProtocolService" type="wsa:EndpointReferenceType" />
+      <xsd:any namespace="##any" processContents="lax" minOccurs="0" maxOccurs="unbounded" />
+    </xsd:sequence>
+    <xsd:anyAttribute namespace="##other" processContents="lax" />
+  </xsd:complexType>
+  <xsd:element name="Register" type="wscoor:RegisterType" />
+  <xsd:complexType name="RegisterResponseType">
+    <xsd:sequence>
+      <xsd:element name="CoordinatorProtocolService" type="wsa:EndpointReferenceType" />
+      <xsd:any namespace="##any" processContents="lax" minOccurs="0" maxOccurs="unbounded" />
+    </xsd:sequence>
+    <xsd:anyAttribute namespace="##other" processContents="lax" />
+  </xsd:complexType>
+  <xsd:element name="RegisterResponse" type="wscoor:RegisterResponseType" />
+  <xsd:simpleType name="ErrorCodes">
+    <xsd:restriction base="xsd:QName">
+      <xsd:enumeration value="wscoor:InvalidParameters" />
+      <xsd:enumeration value="wscoor:InvalidProtocol" />
+      <xsd:enumeration value="wscoor:InvalidState" />
+      <xsd:enumeration value="wscoor:CannotCreateContext" />
+      <xsd:enumeration value="wscoor:CannotRegisterParticipant" />
+    </xsd:restriction>
+  </xsd:simpleType>
+</xsd:schema>
\ No newline at end of file


Property changes on: labs/jbosstm/workspace/XTS_TX11/WS-C/dev/src/com/arjuna/webservices/wscoor11/wscoor.xsd
___________________________________________________________________
Name: svn:mime-type
   + text/xml
Name: svn:keywords
   + Rev Date
Name: svn:eol-style
   + native

Added: labs/jbosstm/workspace/XTS_TX11/WS-C/dev/src/com/arjuna/webservices/wsjboss/InstanceIdentifier.java
===================================================================
--- labs/jbosstm/workspace/XTS_TX11/WS-C/dev/src/com/arjuna/webservices/wsjboss/InstanceIdentifier.java	                        (rev 0)
+++ labs/jbosstm/workspace/XTS_TX11/WS-C/dev/src/com/arjuna/webservices/wsjboss/InstanceIdentifier.java	2007-08-14 12:43:41 UTC (rev 14200)
@@ -0,0 +1,161 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag.  All rights reserved. 
+ * See the copyright.txt in the distribution for a full listing 
+ * of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU General Public License, v. 2.0.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A 
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+ * PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+ * You should have received a copy of the GNU General Public License,
+ * v. 2.0 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+ * MA  02110-1301, USA.
+ * 
+ * (C) 2005-2006,
+ * @author JBoss Inc.
+ */
+package com.arjuna.webservices.wsjboss;
+
+import javax.xml.namespace.QName;
+import javax.xml.stream.XMLStreamException;
+import javax.xml.stream.XMLStreamReader;
+import javax.xml.stream.XMLStreamWriter;
+
+import com.arjuna.webservices.logging.WSCLogger;
+import com.arjuna.webservices.stax.ElementContent;
+import com.arjuna.webservices.stax.NamedElement;
+import com.arjuna.webservices.wsaddr2005.EndpointReferenceType;
+
+/**
+ * Representation of an InstanceIdentifier element.
+ * @author kevin
+ */
+public class InstanceIdentifier extends ElementContent
+{
+    /**
+     * The instance identifier.
+     */
+    private String instanceIdentifier ;
+    
+    /**
+     * Default constructor.
+     */
+    public InstanceIdentifier()
+    {
+    }
+    
+    /**
+     * Construct an instance identifier with the specific identifier
+     * @param instanceIdentifier The instance identifier.
+     */
+    public InstanceIdentifier(final String instanceIdentifier)
+    {
+        this.instanceIdentifier = instanceIdentifier ;
+    }
+    
+    /**
+     * Construct the InstanceIdentifier from the input stream.
+     * @param in The input stream.
+     * @throws XMLStreamException for parsing errors.
+     */
+    public InstanceIdentifier(final XMLStreamReader in)
+        throws XMLStreamException
+    {
+        parse(in) ;
+    }
+    
+    /**
+     * Add the element.
+     * @param in The current input stream.
+     * @param elementName The qualified element name.
+     * @message com.arjuna.webservices.wsjboss.InstanceIdentifier_1 [com.arjuna.webservices.wsjboss.InstanceIdentifier_1] - InstanceIdentifier elements cannot have embedded elements.
+     */
+    protected void putElement(final XMLStreamReader in,
+        final QName elementName)
+        throws XMLStreamException
+    {
+        throw new XMLStreamException(WSCLogger.log_mesg.getString("com.arjuna.webservices.wsjboss.InstanceIdentifier_1")) ;
+    }
+    
+    /**
+     * Set the text value of this element.
+     * @param in The current input stream.
+     * @param value The text value of this element.
+     */
+    protected void putValue(final XMLStreamReader in, final String value)
+        throws XMLStreamException
+    {
+        instanceIdentifier = value ;
+    }
+    
+    /**
+     * Set the instance identifier of this element.
+     * @param instanceIdentifier The instance identifier of the element.
+     */
+    public void setInstanceIdentifier(final String instanceIdentifier)
+    {
+        this.instanceIdentifier = instanceIdentifier ;
+    }
+    
+    /**
+     * Get the instance identifier of this element.
+     * @return The instance identifier of the element or null if not set.
+     */
+    public String getInstanceIdentifier()
+    {
+        return instanceIdentifier ;
+    }
+    
+    /**
+     * Write the child content of the element.
+     * @param out The output stream.
+     */
+    protected void writeChildContent(final XMLStreamWriter out)
+        throws XMLStreamException
+    {
+        out.writeCharacters(instanceIdentifier) ;
+    }
+    
+    /**
+     * Is the configuration of this element valid?
+     * @return true if valid, false otherwise.
+     */
+    public boolean isValid()
+    {
+        return (instanceIdentifier != null) && (instanceIdentifier.trim().length() > 0)
+            && super.isValid() ;
+    }
+    
+    /**
+     * Get a string representation of this instance identifier.
+     * @return the string representation.
+     */
+    public String toString()
+    {
+        return (instanceIdentifier != null ? instanceIdentifier : "") ;
+    }
+    
+    /**
+     * Set the identifier on the endpoint reference.
+     * @param endpointReference The endpoint reference.
+     * @param identifier The identifier.
+     */
+    public static void setEndpointInstanceIdentifier(final EndpointReferenceType endpointReference, final String identifier)
+    {
+        setEndpointInstanceIdentifier(endpointReference, new InstanceIdentifier(identifier)) ;
+    }
+    
+    /**
+     * Set the identifier on the endpoint reference.
+     * @param endpointReference The endpoint reference.
+     * @param instanceIdentifier The identifier.
+     */
+    public static void setEndpointInstanceIdentifier(final EndpointReferenceType endpointReference, final InstanceIdentifier instanceIdentifier)
+    {
+        endpointReference.addReferenceParameter(new NamedElement(JBossConstants.WSJBOSS_ELEMENT_INSTANCE_IDENTIFIER_QNAME, instanceIdentifier)) ;
+    }
+}


Property changes on: labs/jbosstm/workspace/XTS_TX11/WS-C/dev/src/com/arjuna/webservices/wsjboss/InstanceIdentifier.java
___________________________________________________________________
Name: svn:keywords
   + Rev Date
Name: svn:eol-style
   + native

Added: labs/jbosstm/workspace/XTS_TX11/WS-C/dev/src/com/arjuna/webservices/wsjboss/JBossConstants.java
===================================================================
--- labs/jbosstm/workspace/XTS_TX11/WS-C/dev/src/com/arjuna/webservices/wsjboss/JBossConstants.java	                        (rev 0)
+++ labs/jbosstm/workspace/XTS_TX11/WS-C/dev/src/com/arjuna/webservices/wsjboss/JBossConstants.java	2007-08-14 12:43:41 UTC (rev 14200)
@@ -0,0 +1,55 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag.  All rights reserved. 
+ * See the copyright.txt in the distribution for a full listing 
+ * of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU General Public License, v. 2.0.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A 
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+ * PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+ * You should have received a copy of the GNU General Public License,
+ * v. 2.0 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+ * MA  02110-1301, USA.
+ * 
+ * (C) 2005-2006,
+ * @author JBoss Inc.
+ */
+package com.arjuna.webservices.wsjboss;
+
+import javax.xml.namespace.QName;
+
+/**
+ * Interface containing JBoss WS constants.
+ */
+public interface JBossConstants
+{
+    /**
+     * The Namespace.
+     */
+    public String WSJBOSS_NAMESPACE = "http://schemas.jboss.com/ws/2006/08/wsjboss" ;
+    /**
+     * The Attribute Namespace.
+     */
+    public String WSJBOSS_ATTRIBUTE_NAMESPACE = "" ;
+    /**
+     * The namespace prefix.
+     */
+    public String WSJBOSS_PREFIX = "wsjboss" ;
+    /**
+     * The attribute namespace prefix.
+     */
+    public String WSJBOSS_ATTRIBUTE_PREFIX = "" ;
+
+    /**
+     * The InstanceIdentifier element.
+     */
+    public String WSJBOSS_ELEMENT_INSTANCE_IDENTIFIER = "InstanceIdentifier" ;
+    /**
+     * The InstanceIdentifier QName.
+     */
+    public QName WSJBOSS_ELEMENT_INSTANCE_IDENTIFIER_QNAME = new QName(WSJBOSS_NAMESPACE, WSJBOSS_ELEMENT_INSTANCE_IDENTIFIER, WSJBOSS_PREFIX) ;
+}


Property changes on: labs/jbosstm/workspace/XTS_TX11/WS-C/dev/src/com/arjuna/webservices/wsjboss/JBossConstants.java
___________________________________________________________________
Name: svn:keywords
   + Rev Date
Name: svn:eol-style
   + native

Added: labs/jbosstm/workspace/XTS_TX11/WS-C/dev/src/com/arjuna/webservices/wsjboss/JBossContext.java
===================================================================
--- labs/jbosstm/workspace/XTS_TX11/WS-C/dev/src/com/arjuna/webservices/wsjboss/JBossContext.java	                        (rev 0)
+++ labs/jbosstm/workspace/XTS_TX11/WS-C/dev/src/com/arjuna/webservices/wsjboss/JBossContext.java	2007-08-14 12:43:41 UTC (rev 14200)
@@ -0,0 +1,174 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag.  All rights reserved. 
+ * See the copyright.txt in the distribution for a full listing 
+ * of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU General Public License, v. 2.0.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A 
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+ * PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+ * You should have received a copy of the GNU General Public License,
+ * v. 2.0 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+ * MA  02110-1301, USA.
+ * 
+ * (C) 2005-2006,
+ * @author JBoss Inc.
+ */
+package com.arjuna.webservices.wsjboss;
+
+import java.text.MessageFormat;
+
+import javax.xml.namespace.QName;
+import javax.xml.stream.XMLStreamException;
+import javax.xml.stream.XMLStreamReader;
+import javax.xml.stream.XMLStreamWriter;
+
+import com.arjuna.webservices.MessageContext;
+import com.arjuna.webservices.logging.WSCLogger;
+import com.arjuna.webservices.stax.AnyContentSupport;
+import com.arjuna.webservices.util.StreamHelper;
+
+/**
+ * The jboss context.
+ * @author kevin
+ */
+public class JBossContext extends AnyContentSupport
+{
+    /**
+     * The key used for the jboss context within a message exchange.
+     */
+    private static final byte[] JBOSS_CONTEXT_PROPERTY = new byte[0] ;
+    
+    /**
+     * The InstanceIdentifier header.
+     */
+    private InstanceIdentifier instanceIdentifier ;
+    
+    /**
+     * Default constructor.
+     */
+    private JBossContext()
+    {
+    }
+    
+    /**
+     * Construct a jboss context from the input stream.
+     * N.B. This method is for testing purposes only.
+     * 
+     * @param in The input stream.
+     * @throws XMLStreamException For errors during parsing.
+     */
+    public JBossContext(final XMLStreamReader in)
+        throws XMLStreamException
+    {
+        parse(in) ;
+    }
+    
+    /**
+     * Get the instance identifier.
+     * @return The instance identifier.
+     */
+    public InstanceIdentifier getInstanceIdentifier()
+    {
+        return instanceIdentifier ;
+    }
+    
+    /**
+     * Set the instance identifier.
+     * @param instanceIdentifier The instance identifier.
+     */
+    public void setInstanceIdentifier(final InstanceIdentifier instanceIdentifier)
+    {
+        this.instanceIdentifier = instanceIdentifier ;
+    }
+    
+    /**
+     * Write the content of the context to the stream.
+     * @param out The current output stream.
+     * @message com.arjuna.webservices.wsjboss.JBossContext_1 [com.arjuna.webservices.wsjboss.JBossContext_1] - JBoss context is not valid
+     */
+    public void writeChildContent(final XMLStreamWriter out)
+        throws XMLStreamException
+    {
+       if (!isValid())
+       {
+           throw new XMLStreamException(WSCLogger.log_mesg.getString("com.arjuna.webservices.wsjboss.JBossContext_1")) ;
+       }
+       
+       StreamHelper.writeElement(out, JBossConstants.WSJBOSS_ELEMENT_INSTANCE_IDENTIFIER_QNAME, instanceIdentifier) ;
+       
+       super.writeChildContent(out) ;
+    }
+
+    /**
+     * Add the element.
+     * @param in The current input stream.
+     * @param elementName The qualified element name.
+     * @message com.arjuna.webservices.wsjboss.JBossContext_2 [com.arjuna.webservices.wsjboss.JBossContext_2] - Unexpected element name: {0}
+     */
+    protected void putElement(final XMLStreamReader in,
+        final QName elementName)
+        throws XMLStreamException
+    {
+        if (JBossConstants.WSJBOSS_ATTRIBUTE_NAMESPACE.equals(elementName.getNamespaceURI()))
+        {
+            final String localPart = elementName.getLocalPart() ;
+            if (JBossConstants.WSJBOSS_ELEMENT_INSTANCE_IDENTIFIER.equals(localPart))
+            {
+                setInstanceIdentifier(new InstanceIdentifier(in)) ;
+            }
+            else
+            {
+                final String pattern = WSCLogger.log_mesg.getString("com.arjuna.webservices.wsjboss.JBossContext_2") ;
+                final String message = MessageFormat.format(pattern, new Object[] {elementName}) ;
+                throw new XMLStreamException(message) ;
+            }
+        }
+        else
+        {
+            final String pattern = WSCLogger.log_mesg.getString("com.arjuna.webservices.wsjboss.JBossContext_2") ;
+            final String message = MessageFormat.format(pattern, new Object[] {elementName}) ;
+            throw new XMLStreamException(message) ;
+        }
+    }
+    
+    /**
+     * Is the configuration of this element valid?
+     * @return true if valid, false otherwise.
+     */
+    public boolean isValid()
+    {
+        return ((instanceIdentifier != null) && instanceIdentifier.isValid()) ;
+    }
+
+    /**
+     * Get the jboss context from the message context if present.
+     * @param messageContext The message context.
+     * @return The jboss context or null if not present.
+     */
+    public static JBossContext getCurrentContext(final MessageContext messageContext)
+    {
+        return (JBossContext)messageContext.getProperty(JBOSS_CONTEXT_PROPERTY) ;
+    }
+
+    /**
+     * Get the jboss context from the message context.
+     * @param messageContext The message context.
+     * @return The jboss context.
+     */
+    public static JBossContext getContext(final MessageContext messageContext)
+    {
+        final JBossContext current = (JBossContext)messageContext.getProperty(JBOSS_CONTEXT_PROPERTY) ;
+        if (current != null)
+        {
+            return current ;
+        }
+        final JBossContext newContext = new JBossContext() ;
+        messageContext.setProperty(JBOSS_CONTEXT_PROPERTY, newContext) ;
+        return newContext ;
+    }
+}


Property changes on: labs/jbosstm/workspace/XTS_TX11/WS-C/dev/src/com/arjuna/webservices/wsjboss/JBossContext.java
___________________________________________________________________
Name: svn:keywords
   + Rev Date
Name: svn:eol-style
   + native

Added: labs/jbosstm/workspace/XTS_TX11/WS-C/dev/src/com/arjuna/webservices/wsjboss/handler/InstanceIdentifierHandler.java
===================================================================
--- labs/jbosstm/workspace/XTS_TX11/WS-C/dev/src/com/arjuna/webservices/wsjboss/handler/InstanceIdentifierHandler.java	                        (rev 0)
+++ labs/jbosstm/workspace/XTS_TX11/WS-C/dev/src/com/arjuna/webservices/wsjboss/handler/InstanceIdentifierHandler.java	2007-08-14 12:43:41 UTC (rev 14200)
@@ -0,0 +1,96 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag.  All rights reserved. 
+ * See the copyright.txt in the distribution for a full listing 
+ * of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU General Public License, v. 2.0.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A 
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+ * PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+ * You should have received a copy of the GNU General Public License,
+ * v. 2.0 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+ * MA  02110-1301, USA.
+ * 
+ * (C) 2005-2006,
+ * @author JBoss Inc.
+ */
+package com.arjuna.webservices.wsjboss.handler;
+
+import javax.xml.namespace.QName;
+import javax.xml.stream.XMLStreamException;
+import javax.xml.stream.XMLStreamReader;
+import javax.xml.stream.XMLStreamWriter;
+
+import com.arjuna.webservices.HeaderHandler;
+import com.arjuna.webservices.MessageContext;
+import com.arjuna.webservices.SoapFault;
+import com.arjuna.webservices.soap.SoapDetails;
+import com.arjuna.webservices.util.StreamHelper;
+import com.arjuna.webservices.wsjboss.JBossContext;
+import com.arjuna.webservices.wsjboss.InstanceIdentifier;
+
+/**
+ * Header handler for parsing the JBoss WS instance identifier header.
+ * @author kevin
+ */
+public class InstanceIdentifierHandler implements HeaderHandler
+{
+    /**
+     * Handle the header element.
+     * @param in The current streamreader.
+     * @param context The current message context.
+     * @throws XMLStreamException for parsing errors.
+     * @throws SoapFault for processing errors.
+     */
+    public void invoke(final XMLStreamReader in, final MessageContext context)
+        throws XMLStreamException, SoapFault
+    {
+        final InstanceIdentifier action = new InstanceIdentifier(in) ;
+        JBossContext.getContext(context).setInstanceIdentifier(action) ;
+    }
+    
+    /**
+     * Write the header element in a response.
+     * @param out The output stream.
+     * @param headerElementName The name of the header element.
+     * @param context The current message context.
+     * @param soapDetails The SOAP details.
+     * @throws XMLStreamException 
+     */
+    public void writeContent(final XMLStreamWriter out, final QName headerElementName,
+        final MessageContext context, final SoapDetails soapDetails)
+        throws XMLStreamException
+    {
+        final JBossContext arjunaContext = JBossContext.getCurrentContext(context) ;
+        if (arjunaContext != null)
+        {
+            final InstanceIdentifier instanceIdentifier = arjunaContext.getInstanceIdentifier() ;
+            if (instanceIdentifier != null)
+            {
+                StreamHelper.writeElement(out, headerElementName, instanceIdentifier) ;
+            }
+        }
+    }
+    
+    /**
+     * Validate headers after processing.
+     * @param context The current message context.
+     * @throws SoapFault for validation errors.
+     */
+    public void headerValidate(final MessageContext context)
+        throws SoapFault
+    {
+    }
+    
+    /**
+     * Notification of a subsequent header processing fault.
+     * @param context The current message context.
+     */
+    public void headerFaultNotification(final MessageContext context)
+    {
+    }
+}


Property changes on: labs/jbosstm/workspace/XTS_TX11/WS-C/dev/src/com/arjuna/webservices/wsjboss/handler/InstanceIdentifierHandler.java
___________________________________________________________________
Name: svn:keywords
   + Rev Date
Name: svn:eol-style
   + native

Added: labs/jbosstm/workspace/XTS_TX11/WS-C/dev/src/com/arjuna/webservices/wsjboss/policy/JBossPolicy.java
===================================================================
--- labs/jbosstm/workspace/XTS_TX11/WS-C/dev/src/com/arjuna/webservices/wsjboss/policy/JBossPolicy.java	                        (rev 0)
+++ labs/jbosstm/workspace/XTS_TX11/WS-C/dev/src/com/arjuna/webservices/wsjboss/policy/JBossPolicy.java	2007-08-14 12:43:41 UTC (rev 14200)
@@ -0,0 +1,50 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag.  All rights reserved. 
+ * See the copyright.txt in the distribution for a full listing 
+ * of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU General Public License, v. 2.0.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A 
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+ * PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+ * You should have received a copy of the GNU General Public License,
+ * v. 2.0 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+ * MA  02110-1301, USA.
+ * 
+ * (C) 2005-2006,
+ * @author JBoss Inc.
+ */
+package com.arjuna.webservices.wsjboss.policy;
+
+import com.arjuna.webservices.HandlerRegistry;
+import com.arjuna.webservices.wsjboss.JBossConstants;
+import com.arjuna.webservices.wsjboss.handler.InstanceIdentifierHandler;
+
+/**
+ * Policy responsible for binding in the JBoss header handlers.
+ * @author kevin
+ */
+public class JBossPolicy
+{
+    /**
+     * Add this policy to the registry.
+     * @param registry The registry containing the policy.
+     */
+    public static void register(final HandlerRegistry registry)
+    {
+        registry.registerHeaderHandler(JBossConstants.WSJBOSS_ELEMENT_INSTANCE_IDENTIFIER_QNAME, new InstanceIdentifierHandler()) ;
+    }
+
+    /**
+     * Remove this policy from the registry.
+     * @param registry The registry containing the policy.
+     */
+    public static void remove(final HandlerRegistry registry)
+    {
+        registry.removeHeaderHandler(JBossConstants.WSJBOSS_ELEMENT_INSTANCE_IDENTIFIER_QNAME) ;
+    }
+}


Property changes on: labs/jbosstm/workspace/XTS_TX11/WS-C/dev/src/com/arjuna/webservices/wsjboss/policy/JBossPolicy.java
___________________________________________________________________
Name: svn:keywords
   + Rev Date
Name: svn:eol-style
   + native

Added: labs/jbosstm/workspace/XTS_TX11/WS-C/dev/src/com/arjuna/webservices/wsjboss/processor/BaseNotificationProcessor.java
===================================================================
--- labs/jbosstm/workspace/XTS_TX11/WS-C/dev/src/com/arjuna/webservices/wsjboss/processor/BaseNotificationProcessor.java	                        (rev 0)
+++ labs/jbosstm/workspace/XTS_TX11/WS-C/dev/src/com/arjuna/webservices/wsjboss/processor/BaseNotificationProcessor.java	2007-08-14 12:43:41 UTC (rev 14200)
@@ -0,0 +1,52 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag.  All rights reserved. 
+ * See the copyright.txt in the distribution for a full listing 
+ * of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU General Public License, v. 2.0.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A 
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+ * PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+ * You should have received a copy of the GNU General Public License,
+ * v. 2.0 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+ * MA  02110-1301, USA.
+ * 
+ * (C) 2005-2006,
+ * @author JBoss Inc.
+ */
+package com.arjuna.webservices.wsjboss.processor;
+
+import com.arjuna.webservices.base.processors.BaseProcessor;
+import com.arjuna.webservices.wsaddr2005.AddressingContext;
+import com.arjuna.webservices.wsjboss.JBossContext;
+import com.arjuna.webservices.wsjboss.InstanceIdentifier;
+
+/**
+ * Utility class handling common response functionality.
+ * @author kevin
+ */
+public abstract class BaseNotificationProcessor extends BaseProcessor
+{
+    /**
+     * Get the callback ids.
+     * @param addressingContext The addressing context.
+     * @param jbossContext The jboss context.
+     * @return The callback ids.
+     */
+    protected String[] getIDs(final AddressingContext addressingContext, final JBossContext jbossContext)
+    {
+        if (jbossContext != null)
+        {
+            final InstanceIdentifier instanceIdentifier = jbossContext.getInstanceIdentifier() ;
+            if (instanceIdentifier != null)
+            {
+                return new String[] {instanceIdentifier.getInstanceIdentifier()} ;
+            }
+        }
+        return null ;
+    }
+}


Property changes on: labs/jbosstm/workspace/XTS_TX11/WS-C/dev/src/com/arjuna/webservices/wsjboss/processor/BaseNotificationProcessor.java
___________________________________________________________________
Name: svn:keywords
   + Rev Date
Name: svn:eol-style
   + native

Added: labs/jbosstm/workspace/XTS_TX11/WS-C/dev/src/com/arjuna/wsc/ActivationCoordinator11.java
===================================================================
--- labs/jbosstm/workspace/XTS_TX11/WS-C/dev/src/com/arjuna/wsc/ActivationCoordinator11.java	                        (rev 0)
+++ labs/jbosstm/workspace/XTS_TX11/WS-C/dev/src/com/arjuna/wsc/ActivationCoordinator11.java	2007-08-14 12:43:41 UTC (rev 14200)
@@ -0,0 +1,159 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag.  All rights reserved. 
+ * See the copyright.txt in the distribution for a full listing 
+ * of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU General Public License, v. 2.0.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A 
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+ * PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+ * You should have received a copy of the GNU General Public License,
+ * v. 2.0 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+ * MA  02110-1301, USA.
+ * 
+ * (C) 2005-2006,
+ * @author JBoss Inc.
+ */
+package com.arjuna.wsc;
+
+import java.io.IOException;
+
+import com.arjuna.webservices.SoapFault;
+import com.arjuna.webservices.SoapFaultType;
+import com.arjuna.webservices.logging.WSCLogger;
+import com.arjuna.webservices.wsaddr2005.AddressingContext;
+import com.arjuna.webservices.wscoor11.AttributedUnsignedIntType;
+import com.arjuna.webservices.wscoor11.CoordinationConstants;
+import com.arjuna.webservices.wscoor11.CoordinationContextType;
+import com.arjuna.webservices.wscoor11.CreateCoordinationContextResponseType;
+import com.arjuna.webservices.wscoor11.client.ActivationCoordinatorClient;
+import com.arjuna.webservices.wscoor11.processors.ActivationRequesterCallback;
+import com.arjuna.webservices.wscoor11.processors.ActivationRequesterProcessor;
+
+/**
+ * Wrapper around low level Activation Coordinator messaging.
+ * @author kevin
+ */
+public class ActivationCoordinator11
+{
+    /**
+     * Create the coordination context.
+     * @param activationCoordinatorURI The URI of the activation coordinator.
+     * @param messageID The messageID to use.
+     * @param coordinationTypeURI The coordination type.
+     * @param expires The expiry time or null.
+     * @param currentContext The currnt context or null.
+     * @return The coordination context.
+     * @throws InvalidCreateParametersException if the create parameters are invalid.
+     * @throws SoapFault for errors during processing.
+     * 
+     * @message com.arjuna.wsc.ActivationCoordinator11_1 [com.arjuna.wsc.ActivationCoordinator11_1] - Callback execution failed
+     * @message com.arjuna.wsc.ActivationCoordinator11_2 [com.arjuna.wsc.ActivationCoordinator11_2] - Callback wasn't triggered
+     */
+    public static CoordinationContextType createCoordinationContext(final String activationCoordinatorURI,
+        final String messageID, final String coordinationTypeURI, final Long expires,
+        final CoordinationContextType currentContext)
+        throws InvalidCreateParametersException, SoapFault
+    {
+        final AddressingContext addressingContext = AddressingContext.createRequestContext(activationCoordinatorURI, messageID) ;
+        
+        final AttributedUnsignedIntType expiresValue = (expires == null ? null : new AttributedUnsignedIntType(expires.longValue())) ;
+        final RequestCallback callback = new RequestCallback() ;
+        final ActivationRequesterProcessor activationRequester = ActivationRequesterProcessor.getRequester() ;
+        activationRequester.registerCallback(messageID, callback) ;
+        try
+        {
+            ActivationCoordinatorClient.getClient().sendCreateCoordination(addressingContext, null,
+                    coordinationTypeURI, expiresValue, null) ;
+            callback.waitUntilTriggered() ;
+        }
+        catch (final IOException ioe)
+        {
+            throw new SoapFault(ioe) ;
+        }
+        finally
+        {
+            activationRequester.removeCallback(messageID) ;
+        }
+        
+        if (callback.hasFailed())
+        {
+            throw new SoapFault(SoapFaultType.FAULT_RECEIVER, null, WSCLogger.log_mesg.getString("com.arjuna.wsc.ActivationCoordinator11_1")) ;
+        }
+        else if (!callback.hasTriggered())
+        {
+            throw new SoapFault(SoapFaultType.FAULT_RECEIVER, null, WSCLogger.log_mesg.getString("com.arjuna.wsc.ActivationCoordinator11_2")) ;
+        }
+        
+        final CreateCoordinationContextResponseType response = callback.getCreateCoordinationContextResponse() ;
+        if (response != null)
+        {
+            return response.getCoordinationContext() ;
+        }
+        final SoapFault soapFault = callback.getSoapFault() ;
+        if (CoordinationConstants.WSCOOR_ERROR_CODE_INVALID_PARAMETERS_QNAME.equals(soapFault.getSubcode()))
+        {
+            throw new InvalidCreateParametersException(soapFault.getReason()) ;
+        }
+        throw soapFault ;
+    }
+    
+    /**
+     * The request callback.
+     * @author kevin
+     */
+    private static final class RequestCallback extends ActivationRequesterCallback
+    {
+        /**
+         * The response.
+         */
+        private CreateCoordinationContextResponseType createCoordinationContextResponse ;
+        /**
+         * The SOAP fault.
+         */
+        private SoapFault soapFault ;
+        
+        /**
+         * A create coordination context response.
+         * @param createCoordinationContextResponse The response.
+         * @param addressingContext The current addressing context.
+         */
+        public void createCoordinationContextResponse(final CreateCoordinationContextResponseType createCoordinationContextResponse,
+            final AddressingContext addressingContext)
+        {
+            this.createCoordinationContextResponse = createCoordinationContextResponse ;
+        }
+
+        /**
+         * A SOAP fault response.
+         * @param soapFault The SOAP fault response.
+         * @param addressingContext The current addressing context.
+         */
+        public void soapFault(final SoapFault soapFault, final AddressingContext addressingContext)
+        {
+            this.soapFault = soapFault ;
+        }
+        
+        /**
+         * Get the create coordination context response.
+         * @return The create coordination context response.
+         */
+        CreateCoordinationContextResponseType getCreateCoordinationContextResponse()
+        {
+            return createCoordinationContextResponse ;
+        }
+        
+        /**
+         * Get the SOAP fault.
+         * @return The SOAP fault or null.
+         */
+        SoapFault getSoapFault()
+        {
+            return soapFault ;
+        }
+    }
+}


Property changes on: labs/jbosstm/workspace/XTS_TX11/WS-C/dev/src/com/arjuna/wsc/ActivationCoordinator11.java
___________________________________________________________________
Name: svn:keywords
   + Rev Date
Name: svn:eol-style
   + native

Added: labs/jbosstm/workspace/XTS_TX11/WS-C/dev/src/com/arjuna/wsc/CannotRegisterParticipantException.java
===================================================================
--- labs/jbosstm/workspace/XTS_TX11/WS-C/dev/src/com/arjuna/wsc/CannotRegisterParticipantException.java	                        (rev 0)
+++ labs/jbosstm/workspace/XTS_TX11/WS-C/dev/src/com/arjuna/wsc/CannotRegisterParticipantException.java	2007-08-14 12:43:41 UTC (rev 14200)
@@ -0,0 +1,39 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag.  All rights reserved. 
+ * See the copyright.txt in the distribution for a full listing 
+ * of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU General Public License, v. 2.0.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A 
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+ * PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+ * You should have received a copy of the GNU General Public License,
+ * v. 2.0 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+ * MA  02110-1301, USA.
+ * 
+ * (C) 2005-2006,
+ * @author JBoss Inc.
+ */
+/*
+ * Copyright (c) 2002, 2003, Arjuna Technologies Limited.
+ *
+ * InvalidCreateParametersException.java
+ */
+
+package com.arjuna.wsc;
+
+public class CannotRegisterParticipantException extends Exception
+{
+    public CannotRegisterParticipantException()
+    {
+    }
+
+    public CannotRegisterParticipantException(String message)
+    {
+        super(message);
+    }
+}


Property changes on: labs/jbosstm/workspace/XTS_TX11/WS-C/dev/src/com/arjuna/wsc/CannotRegisterParticipantException.java
___________________________________________________________________
Name: svn:keywords
   + Rev Date
Name: svn:eol-style
   + native

Added: labs/jbosstm/workspace/XTS_TX11/WS-C/dev/src/com/arjuna/wsc/ContextFactory11.java
===================================================================
--- labs/jbosstm/workspace/XTS_TX11/WS-C/dev/src/com/arjuna/wsc/ContextFactory11.java	                        (rev 0)
+++ labs/jbosstm/workspace/XTS_TX11/WS-C/dev/src/com/arjuna/wsc/ContextFactory11.java	2007-08-14 12:43:41 UTC (rev 14200)
@@ -0,0 +1,69 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag.  All rights reserved. 
+ * See the copyright.txt in the distribution for a full listing 
+ * of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU General Public License, v. 2.0.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A 
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+ * PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+ * You should have received a copy of the GNU General Public License,
+ * v. 2.0 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+ * MA  02110-1301, USA.
+ * 
+ * (C) 2005-2006,
+ * @author JBoss Inc.
+ */
+/*
+ * Copyright (c) 2002, 2003, Arjuna Technologies Limited.
+ *
+ * ContextFactory11.java
+ */
+
+package com.arjuna.wsc;
+
+import com.arjuna.webservices.wscoor11.CoordinationContextType;
+
+public interface ContextFactory11
+{
+    /**
+     * Called when a context factory is added to a context factory mapper. This method will be called multiple times
+     * if the context factory is added to multiple context factory mappers or to the same context mapper with different
+     * protocol identifiers.
+     *
+     * @param coordinationTypeURI the coordination type uri
+     */
+	
+    public void install(final String coordinationTypeURI);
+
+    /**
+     * Creates a coordination context.
+     *
+     * @param coordinationTypeURI the coordination type uri
+     * @param expires the expire date/time for the returned context, can be null
+     * @param currentContext the current coordination context, can be null
+     *
+     * @return the created coordination context
+     *
+     * @throws InvalidCreateParametersException if a parameter passed is invalid
+     *         this activity identifier
+     */
+	
+    public CoordinationContextType create(final String coordinationTypeURI,
+            final Long expires, final CoordinationContextType currentContext)
+        throws InvalidCreateParametersException;
+
+    /**
+     * Called when a context factory is removed from a context factory mapper. This method will be called multiple
+     * times if the context factory is removed from multiple context factory mappers or from the same context factory
+     * mapper with different coordination type uris.
+     *
+     * @param coordinationTypeURI the coordination type uri
+     */
+	
+    public void uninstall(final String coordinationTypeURI);
+}


Property changes on: labs/jbosstm/workspace/XTS_TX11/WS-C/dev/src/com/arjuna/wsc/ContextFactory11.java
___________________________________________________________________
Name: svn:keywords
   + Rev Date
Name: svn:eol-style
   + native

Added: labs/jbosstm/workspace/XTS_TX11/WS-C/dev/src/com/arjuna/wsc/ContextFactoryMapper11.java
===================================================================
--- labs/jbosstm/workspace/XTS_TX11/WS-C/dev/src/com/arjuna/wsc/ContextFactoryMapper11.java	                        (rev 0)
+++ labs/jbosstm/workspace/XTS_TX11/WS-C/dev/src/com/arjuna/wsc/ContextFactoryMapper11.java	2007-08-14 12:43:41 UTC (rev 14200)
@@ -0,0 +1,165 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag.  All rights reserved. 
+ * See the copyright.txt in the distribution for a full listing 
+ * of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU General Public License, v. 2.0.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A 
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+ * PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+ * You should have received a copy of the GNU General Public License,
+ * v. 2.0 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+ * MA  02110-1301, USA.
+ * 
+ * (C) 2005-2006,
+ * @author JBoss Inc.
+ */
+/*
+ * Copyright (c) 2002, 2003, Arjuna Technologies Limited.
+ *
+ * ContextFactoryMapper11.java
+ */
+
+package com.arjuna.wsc;
+
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ * The context factory mapper.
+ * @author kevin
+ */
+public class ContextFactoryMapper11
+{
+    /**
+     * The factory singleton.
+     */
+    private static final ContextFactoryMapper11 FACTORY = new ContextFactoryMapper11() ;
+    
+    /**
+     * The context factory map.
+     */
+    private final Map contextFactoryMap = new HashMap() ;
+    /**
+     * The subordinate context factory mapper.
+     */
+    private ContextFactoryMapper11 subordinateContextFactoryMapper ;
+    /**
+     * The default context factory.
+     */
+    private ContextFactory11 defaultContextFactory ;
+    
+    /**
+     * Get the context factory mapper singleton.
+     * @return The context factory mapper singleton.
+     */
+    public static ContextFactoryMapper11 getFactory()
+    {
+        return FACTORY ;
+    }
+    
+    /**
+     * Default constructor
+     */
+    protected ContextFactoryMapper11()
+    {
+    }
+    
+    /**
+     * Add a context factory for the specified coordination type.
+     * @param coordinationTypeURI The coordination type.
+     * @param contextFactory The context factory.
+     */
+    public void addContextFactory(final String coordinationTypeURI, final ContextFactory11 contextFactory)
+    {
+        synchronized(contextFactoryMap)
+        {
+            contextFactoryMap.put(coordinationTypeURI, contextFactory) ;
+        }
+        contextFactory.install(coordinationTypeURI) ;
+    }
+
+    /**
+     * Get the context factory for the specified coordination type.
+     * @param coordinationTypeURI The coordination type.
+     * @return The context factory.
+     */
+    public ContextFactory11 getContextFactory(final String coordinationTypeURI)
+    {
+        final Object localContextFactory ;
+        synchronized(contextFactoryMap)
+        {
+            localContextFactory = contextFactoryMap.get(coordinationTypeURI) ;
+        }
+        if (localContextFactory != null)
+        {
+            return (ContextFactory11)localContextFactory ;
+        }
+        if (subordinateContextFactoryMapper != null)
+        {
+            final ContextFactory11 subordinateContextFactory = subordinateContextFactoryMapper.getContextFactory(coordinationTypeURI) ;
+            if (subordinateContextFactory != null)
+            {
+                return subordinateContextFactory ;
+            }
+        }
+        return defaultContextFactory ;
+    }
+
+    /**
+     * Remove the context factory for the specified coordination type.
+     * @param coordinationTypeURI The coordination type.
+     */
+    public void removeContextFactory(final String coordinationTypeURI)
+    {
+        final Object localContextFactory ;
+        synchronized(contextFactoryMap)
+        {
+            localContextFactory = contextFactoryMap.remove(coordinationTypeURI) ;
+        }
+        if (localContextFactory != null)
+        {
+            ((ContextFactory11)localContextFactory).uninstall(coordinationTypeURI) ;
+        }
+    }
+
+    /**
+     * Get the subordinate coordination factory mapper.
+     * @return The subordinate coordination factory mapper.
+     */
+    public ContextFactoryMapper11 getSubordinateContextFactoryMapper()
+    {
+        return subordinateContextFactoryMapper ;
+    }
+
+    /**
+     * Set a subordinate coordination factory mapper.
+     * @param subordinateContextFactoryMapper The subordinate coordination factory mapper.
+     */
+    public void setSubordinateContextFactoryMapper(final ContextFactoryMapper11 subordinateContextFactoryMapper)
+    {
+        this.subordinateContextFactoryMapper = subordinateContextFactoryMapper ;
+    }
+
+    /**
+     * Get the default coordination factory.
+     * @return The default coordination factory.
+     */
+    public ContextFactory11 getDefaultContextFactory()
+    {
+        return defaultContextFactory ;
+    }
+
+    /**
+     * Set the default coordination factory.
+     * @param defaultContextFactory The default coordination factory.
+     */
+    public void setDefaultContextFactory(final ContextFactory11 defaultContextFactory)
+    {
+        this.defaultContextFactory = defaultContextFactory ;
+    }
+}


Property changes on: labs/jbosstm/workspace/XTS_TX11/WS-C/dev/src/com/arjuna/wsc/ContextFactoryMapper11.java
___________________________________________________________________
Name: svn:keywords
   + Rev Date
Name: svn:eol-style
   + native

Added: labs/jbosstm/workspace/XTS_TX11/WS-C/dev/src/com/arjuna/wsc/Registrar11.java
===================================================================
--- labs/jbosstm/workspace/XTS_TX11/WS-C/dev/src/com/arjuna/wsc/Registrar11.java	                        (rev 0)
+++ labs/jbosstm/workspace/XTS_TX11/WS-C/dev/src/com/arjuna/wsc/Registrar11.java	2007-08-14 12:43:41 UTC (rev 14200)
@@ -0,0 +1,72 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag.  All rights reserved. 
+ * See the copyright.txt in the distribution for a full listing 
+ * of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU General Public License, v. 2.0.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A 
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+ * PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+ * You should have received a copy of the GNU General Public License,
+ * v. 2.0 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+ * MA  02110-1301, USA.
+ * 
+ * (C) 2005-2006,
+ * @author JBoss Inc.
+ */
+/*
+ * Copyright (c) 2002, 2003, Arjuna Technologies Limited.
+ *
+ * Registrar11.java
+ */
+
+package com.arjuna.wsc;
+
+import com.arjuna.webservices.wsaddr2005.EndpointReferenceType;
+import com.arjuna.webservices.wsjboss.InstanceIdentifier;
+
+public interface Registrar11
+{
+    /**
+     * Called when a registrar is added to a register mapper. This method will be called multiple times if the
+     * registrar is added to multiple register mappers or to the same register mapper with different protocol
+     * identifiers.
+     *
+     * @param protocolIdentifier the protocol identifier
+     */
+    public void install(final String protocolIdentifier);
+
+    /**
+     * Registers the interest of participant in a particular protocol.
+     *
+     * @param participantProtocolServiceAddress the port reference of the participant protocol service
+     * @param protocolIdentifier the protocol identifier
+     * @param instanceIdentifier the instance identifier, this may be null
+     *
+     * @return the port reference of the coordinator protocol service
+     *
+     * @throws CannotRegisterParticipantException if the participant cannot be registered for this coordination protocol under
+     *         this activity identifier
+     * @throws InvalidProtocolException if the coordination protocol is not supported
+     * @throws InvalidStateException if the state of the coordinator no longer allows registration for this
+     *         coordination protocol
+     * @throws NoActivityException if the actvity does not exist
+     */
+    public EndpointReferenceType register(final EndpointReferenceType participantProtocolService,
+        final String protocolIdentifier, final InstanceIdentifier instanceIdentifier)
+        throws CannotRegisterParticipantException, InvalidProtocolException, InvalidStateException, NoActivityException;
+
+    /**
+     * Called when a registrar is removed from a register mapper. This method will be called multiple times if the
+     * registrar is removed from multiple register mappers or from the same register mapper with different protocol
+     * identifiers.
+     *
+     * @param serviceAddress the address of the service
+     * @param protocolIdentifier the protocol identifier
+     */
+    public void uninstall(final String protocolIdentifier);
+}


Property changes on: labs/jbosstm/workspace/XTS_TX11/WS-C/dev/src/com/arjuna/wsc/Registrar11.java
___________________________________________________________________
Name: svn:keywords
   + Rev Date
Name: svn:eol-style
   + native

Added: labs/jbosstm/workspace/XTS_TX11/WS-C/dev/src/com/arjuna/wsc/RegistrarMapper11.java
===================================================================
--- labs/jbosstm/workspace/XTS_TX11/WS-C/dev/src/com/arjuna/wsc/RegistrarMapper11.java	                        (rev 0)
+++ labs/jbosstm/workspace/XTS_TX11/WS-C/dev/src/com/arjuna/wsc/RegistrarMapper11.java	2007-08-14 12:43:41 UTC (rev 14200)
@@ -0,0 +1,109 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag.  All rights reserved. 
+ * See the copyright.txt in the distribution for a full listing 
+ * of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU General Public License, v. 2.0.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A 
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+ * PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+ * You should have received a copy of the GNU General Public License,
+ * v. 2.0 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+ * MA  02110-1301, USA.
+ * 
+ * (C) 2005-2006,
+ * @author JBoss Inc.
+ */
+/*
+ * Copyright (c) 2002, 2003, Arjuna Technologies Limited.
+ *
+ * RegistrarMapper11.java
+ */
+
+package com.arjuna.wsc;
+
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ * The registrar mapper.
+ * @author kevin
+ */
+public class RegistrarMapper11
+{
+    /**
+     * The factory singleton.
+     */
+    private static final RegistrarMapper11 FACTORY = new RegistrarMapper11() ;
+    
+    /**
+     * The registrar map.
+     */
+    private final Map registrarMap = new HashMap() ;
+    
+    /**
+     * Get the registrar mapper singleton.
+     * @return The registrar mapper singleton.
+     */
+    public static RegistrarMapper11 getFactory()
+    {
+        return FACTORY ;
+    }
+    
+    /**
+     * Default constructor
+     */
+    protected RegistrarMapper11()
+    {
+    }
+    
+    /**
+     * Add a registrar for the specified protocol identifier.
+     * @param protocolIdentifier The protocol identifier.
+     * @param registrar The registrar.
+     */
+    public void addRegistrar(final String protocolIdentifier, final Registrar11 registrar)
+    {
+        synchronized(registrarMap)
+        {
+            registrarMap.put(protocolIdentifier, registrar) ;
+        }
+        registrar.install(protocolIdentifier) ;
+    }
+
+    /**
+     * Get the registrar for the specified protocol identifier.
+     * @param protocolIdentifier The protocol identifier.
+     * @return The registrar.
+     */
+    public Registrar11 getRegistrar(final String protocolIdentifier)
+    {
+        final Object localRegistrar ;
+        synchronized(registrarMap)
+        {
+            localRegistrar = registrarMap.get(protocolIdentifier) ;
+        }
+        return (Registrar11)localRegistrar ;
+    }
+
+    /**
+     * Remove the registrar for the specified protocol identifier.
+     * @param protocolIdentifier The protocol identifier.
+     */
+    public void removeRegistrar(final String protocolIdentifier)
+    {
+        final Object localRegistrar ;
+        synchronized(registrarMap)
+        {
+            localRegistrar = registrarMap.remove(protocolIdentifier) ;
+        }
+        if (localRegistrar != null)
+        {
+            ((Registrar11)localRegistrar).uninstall(protocolIdentifier) ;
+        }
+    }
+}


Property changes on: labs/jbosstm/workspace/XTS_TX11/WS-C/dev/src/com/arjuna/wsc/RegistrarMapper11.java
___________________________________________________________________
Name: svn:keywords
   + Rev Date
Name: svn:eol-style
   + native

Added: labs/jbosstm/workspace/XTS_TX11/WS-C/dev/src/com/arjuna/wsc/RegistrationCoordinator11.java
===================================================================
--- labs/jbosstm/workspace/XTS_TX11/WS-C/dev/src/com/arjuna/wsc/RegistrationCoordinator11.java	                        (rev 0)
+++ labs/jbosstm/workspace/XTS_TX11/WS-C/dev/src/com/arjuna/wsc/RegistrationCoordinator11.java	2007-08-14 12:43:41 UTC (rev 14200)
@@ -0,0 +1,173 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag.  All rights reserved. 
+ * See the copyright.txt in the distribution for a full listing 
+ * of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU General Public License, v. 2.0.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A 
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+ * PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+ * You should have received a copy of the GNU General Public License,
+ * v. 2.0 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+ * MA  02110-1301, USA.
+ * 
+ * (C) 2005-2006,
+ * @author JBoss Inc.
+ */
+package com.arjuna.wsc;
+
+import java.io.IOException;
+
+import javax.xml.namespace.QName;
+
+import com.arjuna.webservices.SoapFault;
+import com.arjuna.webservices.SoapFaultType;
+import com.arjuna.webservices.logging.WSCLogger;
+import com.arjuna.webservices.wsaddr2005.AddressingContext;
+import com.arjuna.webservices.wsaddr2005.EndpointReferenceType;
+import com.arjuna.webservices.wscoor11.CoordinationConstants;
+import com.arjuna.webservices.wscoor11.CoordinationContextType;
+import com.arjuna.webservices.wscoor11.RegisterResponseType;
+import com.arjuna.webservices.wscoor11.client.RegistrationCoordinatorClient;
+import com.arjuna.webservices.wscoor11.processors.RegistrationRequesterCallback;
+import com.arjuna.webservices.wscoor11.processors.RegistrationRequesterProcessor;
+
+
+/**
+ * Wrapper around low level Registration Coordinator messaging.
+ * @author kevin
+ */
+public class RegistrationCoordinator11
+{
+    /**
+     * Register the participant in the protocol.
+     * @param coordinationContext The current coordination context
+     * @param messageID The messageID to use.
+     * @param participantProtocolService The participant protocol service.
+     * @param protocolIdentifier The protocol identifier.
+     * @return The endpoint reference of the coordinator protocol service.
+     * @throws CannotRegisterParticipantException If the participant cannot be registered. 
+     * @throws InvalidProtocolException If the protocol is unsupported.
+     * @throws InvalidStateException If the state is invalid
+     * @throws NoActivityException If there is to activity context active.
+     * @throws SoapFault for errors during processing.
+     * 
+     * @message com.arjuna.wsc.RegistrationCoordinator11_1 [com.arjuna.wsc.RegistrationCoordinator11_1] - Callback execution failed
+     * @message com.arjuna.wsc.RegistrationCoordinator11_2 [com.arjuna.wsc.RegistrationCoordinator11_2] - Callback wasn't triggered
+     */
+    public static EndpointReferenceType register(final CoordinationContextType coordinationContext,
+        final String messageID, final EndpointReferenceType participantProtocolService,
+        final String protocolIdentifier)
+        throws CannotRegisterParticipantException, InvalidProtocolException,
+            InvalidStateException, NoActivityException, SoapFault
+    {
+        final EndpointReferenceType endpointReference = coordinationContext.getRegistrationService() ;
+        final AddressingContext addressingContext = AddressingContext.createRequestContext(endpointReference, messageID) ;
+        
+        final RequestCallback callback = new RequestCallback() ;
+        final RegistrationRequesterProcessor registrationRequester = RegistrationRequesterProcessor.getRequester() ;
+        registrationRequester.registerCallback(messageID, callback) ;
+        try
+        {
+            RegistrationCoordinatorClient.getClient().sendRegister(addressingContext, null, protocolIdentifier, participantProtocolService) ;
+            callback.waitUntilTriggered() ;
+        }
+        catch (final IOException ioe)
+        {
+            throw new SoapFault(ioe) ;
+        }
+        finally
+        {
+            registrationRequester.removeCallback(messageID) ;
+        }
+        
+        if (callback.hasFailed())
+        {
+            throw new SoapFault(SoapFaultType.FAULT_RECEIVER, null, WSCLogger.log_mesg.getString("com.arjuna.wsc.RegistrationCoordinator_1")) ;
+        }
+        else if (!callback.hasTriggered())
+        {
+            throw new SoapFault(SoapFaultType.FAULT_RECEIVER, null, WSCLogger.log_mesg.getString("com.arjuna.wsc.RegistrationCoordinator_2")) ;
+        }
+        
+        final RegisterResponseType response = callback.getRegisterResponse() ;
+        if (response != null)
+        {
+            return response.getCoordinatorProtocolService() ;
+        }
+        final SoapFault soapFault = callback.getSoapFault() ;
+        final QName subcode = soapFault.getSubcode() ;
+        if (CoordinationConstants.WSCOOR_ERROR_CODE_CANNOT_REGISTER_PARTICIPANT_QNAME.equals(subcode))
+        {
+            throw new CannotRegisterParticipantException(soapFault.getReason()) ;
+        }
+        else if (CoordinationConstants.WSCOOR_ERROR_CODE_INVALID_PROTOCOL_QNAME.equals(subcode))
+        {
+            throw new InvalidProtocolException(soapFault.getReason()) ;
+        }
+        else if (CoordinationConstants.WSCOOR_ERROR_CODE_INVALID_STATE_QNAME.equals(subcode))
+        {
+            throw new InvalidStateException(soapFault.getReason()) ;
+        }
+        throw soapFault ;
+    }
+    
+    /**
+     * The request callback.
+     * @author kevin
+     */
+    private static final class RequestCallback extends RegistrationRequesterCallback
+    {
+        /**
+         * The response.
+         */
+        private RegisterResponseType registerResponse ;
+        /**
+         * The SOAP fault.
+         */
+        private SoapFault soapFault ;
+        
+        /**
+         * A register response.
+         * @param registerResponse The response.
+         * @param addressingContext The current addressing context.
+         */
+        public void registerResponse(final RegisterResponseType registerResponse,
+            final AddressingContext addressingContext)
+        {
+            this.registerResponse = registerResponse ;
+        }
+
+        /**
+         * A SOAP fault response.
+         * @param soapFault The SOAP fault response.
+         * @param addressingContext The current addressing context.
+         */
+        public void soapFault(final SoapFault soapFault, final AddressingContext addressingContext)
+        {
+            this.soapFault = soapFault ;
+        }
+        
+        /**
+         * Get the create coordination context response.
+         * @return The create coordination context response.
+         */
+        RegisterResponseType getRegisterResponse()
+        {
+            return registerResponse ;
+        }
+        
+        /**
+         * Get the SOAP fault.
+         * @return The SOAP fault or null.
+         */
+        SoapFault getSoapFault()
+        {
+            return soapFault ;
+        }
+    }
+}


Property changes on: labs/jbosstm/workspace/XTS_TX11/WS-C/dev/src/com/arjuna/wsc/RegistrationCoordinator11.java
___________________________________________________________________
Name: svn:keywords
   + Rev Date
Name: svn:eol-style
   + native

Added: labs/jbosstm/workspace/XTS_TX11/WS-C/dev/src/com/arjuna/wsc/messaging/ActivationCoordinator11ProcessorImpl.java
===================================================================
--- labs/jbosstm/workspace/XTS_TX11/WS-C/dev/src/com/arjuna/wsc/messaging/ActivationCoordinator11ProcessorImpl.java	                        (rev 0)
+++ labs/jbosstm/workspace/XTS_TX11/WS-C/dev/src/com/arjuna/wsc/messaging/ActivationCoordinator11ProcessorImpl.java	2007-08-14 12:43:41 UTC (rev 14200)
@@ -0,0 +1,113 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag.  All rights reserved. 
+ * See the copyright.txt in the distribution for a full listing 
+ * of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU General Public License, v. 2.0.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A 
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+ * PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+ * You should have received a copy of the GNU General Public License,
+ * v. 2.0 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+ * MA  02110-1301, USA.
+ * 
+ * (C) 2005-2006,
+ * @author JBoss Inc.
+ */
+package com.arjuna.wsc.messaging;
+
+import com.arjuna.webservices.SoapFault;
+import com.arjuna.webservices.SoapFaultType;
+import com.arjuna.webservices.logging.WSCLogger;
+import com.arjuna.webservices.wsaddr2005.AddressingContext;
+import com.arjuna.webservices.wscoor11.AttributedUnsignedIntType;
+import com.arjuna.webservices.wscoor11.CoordinationConstants;
+import com.arjuna.webservices.wscoor11.CoordinationContextType;
+import com.arjuna.webservices.wscoor11.CreateCoordinationContextType;
+import com.arjuna.webservices.wscoor11.client.ActivationRequesterClient;
+import com.arjuna.webservices.wscoor11.processors.ActivationCoordinatorProcessor;
+import com.arjuna.wsc.ContextFactory11;
+import com.arjuna.wsc.ContextFactoryMapper11;
+import com.arjuna.wsc.InvalidCreateParametersException;
+import com.arjuna.wsc.messaging.MessageId;
+
+/**
+ * The Activation Coordinator processor.
+ * @author kevin
+ */
+public class ActivationCoordinator11ProcessorImpl extends ActivationCoordinatorProcessor
+{
+    /**
+     * Create the coordination context.
+     * @param createCoordinationContext The create coordination context request.
+     * @param addressingContext The addressing context.
+     * @message com.arjuna.wsc.messaging.ActivationCoordinator11ProcessorImpl_1 [com.arjuna.wsc.messaging.ActivationCoordinator11ProcessorImpl_1] - Invalid create coordination context parameters
+     * @message com.arjuna.wsc.messaging.ActivationCoordinator11ProcessorImpl_2 [com.arjuna.wsc.messaging.ActivationCoordinator11ProcessorImpl_2] - Unexpected exception thrown from create: 
+     * @message com.arjuna.wsc.messaging.ActivationCoordinator11ProcessorImpl_3 [com.arjuna.wsc.messaging.ActivationCoordinator11ProcessorImpl_3] - CreateCoordinationContext called for unknown coordination type: {0}
+     * @message com.arjuna.wsc.messaging.ActivationCoordinator11ProcessorImpl_4 [com.arjuna.wsc.messaging.ActivationCoordinator11ProcessorImpl_4] - Cannot create context
+     */
+    public void createCoordinationContext(final CreateCoordinationContextType createCoordinationContext,
+        final AddressingContext addressingContext)
+    {
+        final ContextFactoryMapper11 contextFactoryMapper = ContextFactoryMapper11.getFactory() ;
+        try
+        {
+            final String coordinationType = createCoordinationContext.getCoordinationType().getValue() ;
+            final ContextFactory11 contextFactory = contextFactoryMapper.getContextFactory(coordinationType) ;
+            
+            if (contextFactory != null)
+            {
+                final CoordinationContextType coordinationContext ;
+                final AddressingContext responseAddressingContext ;
+                try
+                {
+                    final AttributedUnsignedIntType expiresElement = createCoordinationContext.getExpires() ;
+                    final Long expires = (expiresElement == null ? null : new Long(expiresElement.getValue())) ;
+                    
+                    coordinationContext = contextFactory.create(coordinationType, expires, createCoordinationContext.getCurrentContext()) ;
+                    responseAddressingContext = AddressingContext.createResponseContext(addressingContext, MessageId.getMessageId()) ;
+                }
+                catch (final InvalidCreateParametersException invalidCreateParametersException)
+                {
+                    final AddressingContext faultAddressingContext = AddressingContext.createFaultContext(addressingContext, MessageId.getMessageId()) ;
+                    final SoapFault soapFault = new SoapFault(SoapFaultType.FAULT_SENDER, CoordinationConstants.WSCOOR_ERROR_CODE_INVALID_PARAMETERS_QNAME,
+                        WSCLogger.log_mesg.getString("com.arjuna.wsc.messaging.ActivationCoordinator11ProcessorImpl_1")) ;
+                    ActivationRequesterClient.getClient().sendSoapFault(faultAddressingContext, null, soapFault) ;
+                    return ;
+                }
+                catch (final Throwable th)
+                {
+                    if (WSCLogger.arjLoggerI18N.isDebugEnabled())
+                    {
+                        WSCLogger.arjLoggerI18N.debug("com.arjuna.wsc.messaging.ActivationCoordinator11ProcessorImpl_2", th) ;
+                    }
+                    final AddressingContext faultAddressingContext = AddressingContext.createFaultContext(addressingContext, MessageId.getMessageId()) ;
+                    final SoapFault soapFault = new SoapFault(SoapFaultType.FAULT_SENDER, CoordinationConstants.WSCOOR_ERROR_CODE_CANNOT_CREATE_CONTEXT_QNAME,
+                            WSCLogger.log_mesg.getString("com.arjuna.wsc.messaging.ActivationCoordinator11ProcessorImpl_4")) ;
+                    ActivationRequesterClient.getClient().sendSoapFault(faultAddressingContext, null, soapFault) ;
+                    return ;
+                }
+                ActivationRequesterClient.getClient().sendCreateCoordinationResponse(responseAddressingContext, null, coordinationContext) ;
+            }
+            else
+            {
+                if (WSCLogger.arjLoggerI18N.isDebugEnabled())
+                {
+                    WSCLogger.arjLoggerI18N.debug("com.arjuna.wsc.messaging.ActivationCoordinator11ProcessorImpl_3", new Object[] {coordinationType}) ;
+                }
+                final AddressingContext faultAddressingContext = AddressingContext.createFaultContext(addressingContext, MessageId.getMessageId()) ;
+                final SoapFault soapFault = new SoapFault(SoapFaultType.FAULT_SENDER, CoordinationConstants.WSCOOR_ERROR_CODE_INVALID_PARAMETERS_QNAME,
+                    WSCLogger.log_mesg.getString("com.arjuna.wsc.messaging.ActivationCoordinator11ProcessorImpl_1")) ;
+                ActivationRequesterClient.getClient().sendSoapFault(faultAddressingContext, null, soapFault) ;
+            }
+        }
+        catch (Throwable throwable)
+        {
+            throwable.printStackTrace(System.err);
+        }
+    }
+}


Property changes on: labs/jbosstm/workspace/XTS_TX11/WS-C/dev/src/com/arjuna/wsc/messaging/ActivationCoordinator11ProcessorImpl.java
___________________________________________________________________
Name: svn:keywords
   + Rev Date
Name: svn:eol-style
   + native

Added: labs/jbosstm/workspace/XTS_TX11/WS-C/dev/src/com/arjuna/wsc/messaging/RegistrationCoordinator11ProcessorImpl.java
===================================================================
--- labs/jbosstm/workspace/XTS_TX11/WS-C/dev/src/com/arjuna/wsc/messaging/RegistrationCoordinator11ProcessorImpl.java	                        (rev 0)
+++ labs/jbosstm/workspace/XTS_TX11/WS-C/dev/src/com/arjuna/wsc/messaging/RegistrationCoordinator11ProcessorImpl.java	2007-08-14 12:43:41 UTC (rev 14200)
@@ -0,0 +1,144 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag.  All rights reserved. 
+ * See the copyright.txt in the distribution for a full listing 
+ * of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU General Public License, v. 2.0.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A 
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+ * PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+ * You should have received a copy of the GNU General Public License,
+ * v. 2.0 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+ * MA  02110-1301, USA.
+ * 
+ * (C) 2005-2006,
+ * @author JBoss Inc.
+ */
+package com.arjuna.wsc.messaging;
+
+import com.arjuna.webservices.SoapFault;
+import com.arjuna.webservices.SoapFaultType;
+import com.arjuna.webservices.logging.WSCLogger;
+import com.arjuna.webservices.wsaddr2005.AddressingContext;
+import com.arjuna.webservices.wsaddr2005.EndpointReferenceType;
+import com.arjuna.webservices.wsjboss.JBossContext;
+import com.arjuna.webservices.wsjboss.InstanceIdentifier;
+import com.arjuna.webservices.wscoor11.CoordinationConstants;
+import com.arjuna.webservices.wscoor11.RegisterType;
+import com.arjuna.webservices.wscoor11.client.RegistrationRequesterClient;
+import com.arjuna.webservices.wscoor11.processors.RegistrationCoordinatorProcessor;
+import com.arjuna.wsc.CannotRegisterParticipantException;
+import com.arjuna.wsc.InvalidProtocolException;
+import com.arjuna.wsc.InvalidStateException;
+import com.arjuna.wsc.NoActivityException;
+import com.arjuna.wsc.Registrar11;
+import com.arjuna.wsc.RegistrarMapper11;
+import com.arjuna.wsc.messaging.MessageId;
+
+
+/**
+ * The Registration Coordinator processor.
+ * @author kevin
+ * @message com.arjuna.wsc.messaging.RegistrationCoordinator11ProcessorImpl_1 [com.arjuna.wsc.messaging.RegistrationCoordinator11ProcessorImpl_1] - Participant already registered
+ * @message com.arjuna.wsc.messaging.RegistrationCoordinator11ProcessorImpl_2 [com.arjuna.wsc.messaging.RegistrationCoordinator11ProcessorImpl_2] - Invalid protocol identifier
+ * @message com.arjuna.wsc.messaging.RegistrationCoordinator11ProcessorImpl_3 [com.arjuna.wsc.messaging.RegistrationCoordinator11ProcessorImpl_3] - Invalid coordination context state
+ * @message com.arjuna.wsc.messaging.RegistrationCoordinator11ProcessorImpl_4 [com.arjuna.wsc.messaging.RegistrationCoordinator11ProcessorImpl_4] - Unknown activity identifier
+ * @message com.arjuna.wsc.messaging.RegistrationCoordinator11ProcessorImpl_5 [com.arjuna.wsc.messaging.RegistrationCoordinator11ProcessorImpl_5] - Unexpected exception thrown from create: 
+ * @message com.arjuna.wsc.messaging.RegistrationCoordinator11ProcessorImpl_6 [com.arjuna.wsc.messaging.RegistrationCoordinator11ProcessorImpl_6] - Register called for unknown protocol identifier: {0}
+ */
+public class RegistrationCoordinator11ProcessorImpl extends RegistrationCoordinatorProcessor
+{
+    /**
+     * Register the participant in the protocol.
+     * @param register The register request.
+     * @param addressingContext The addressing context.
+     * @param jbossContext The jboss context.
+     */
+    public void register(final RegisterType register, final AddressingContext addressingContext,
+        final JBossContext jbossContext)
+    {
+        final RegistrarMapper11 registrarMapper = RegistrarMapper11.getFactory() ;
+        try
+        {
+            final String protocolIdentifier = register.getProtocolIdentifier().getValue() ;
+            final Registrar11 registrar = registrarMapper.getRegistrar(protocolIdentifier) ;
+            
+            if (registrar != null)
+            {
+                final EndpointReferenceType coordinationProtocolService ;
+                final AddressingContext responseAddressingContext ;
+                try
+                {
+                    final EndpointReferenceType participantProtocolService = register.getParticipantProtocolService() ;
+                    final InstanceIdentifier instanceIdentifier = jbossContext.getInstanceIdentifier();
+                    coordinationProtocolService = registrar.register(participantProtocolService, protocolIdentifier, instanceIdentifier) ;
+                    
+                    responseAddressingContext = AddressingContext.createResponseContext(addressingContext, MessageId.getMessageId()) ;
+                }
+                catch (final CannotRegisterParticipantException cannotRegisterParticipantException)
+                {
+                    final AddressingContext faultAddressingContext = AddressingContext.createFaultContext(addressingContext, MessageId.getMessageId()) ;
+                    final SoapFault soapFault = new SoapFault(SoapFaultType.FAULT_SENDER, CoordinationConstants.WSCOOR_ERROR_CODE_CANNOT_REGISTER_PARTICIPANT_QNAME,
+                        WSCLogger.log_mesg.getString("com.arjuna.wsc.messaging.RegistrationCoordinator11ProcessorImpl_1")) ;
+                    RegistrationRequesterClient.getClient().sendSoapFault(faultAddressingContext, null, soapFault) ;
+                    return ;
+                }
+                catch (final InvalidProtocolException invalidProtocolException)
+                {
+                    final AddressingContext faultAddressingContext = AddressingContext.createFaultContext(addressingContext, MessageId.getMessageId()) ;
+                    final SoapFault soapFault = new SoapFault(SoapFaultType.FAULT_SENDER, CoordinationConstants.WSCOOR_ERROR_CODE_INVALID_PROTOCOL_QNAME,
+                        WSCLogger.log_mesg.getString("com.arjuna.wsc.messaging.RegistrationCoordinator11ProcessorImpl_2")) ;
+                    RegistrationRequesterClient.getClient().sendSoapFault(faultAddressingContext, null, soapFault) ;
+                    return ;
+                }
+                catch (final InvalidStateException InvalidStateException)
+                {
+                    final AddressingContext faultAddressingContext = AddressingContext.createFaultContext(addressingContext, MessageId.getMessageId()) ;
+                    final SoapFault soapFault = new SoapFault(SoapFaultType.FAULT_SENDER, CoordinationConstants.WSCOOR_ERROR_CODE_INVALID_STATE_QNAME,
+                        WSCLogger.log_mesg.getString("com.arjuna.wsc.messaging.RegistrationCoordinator11ProcessorImpl_3")) ;
+                    RegistrationRequesterClient.getClient().sendSoapFault(faultAddressingContext, null, soapFault) ;
+                    return ;
+                }
+                catch (final NoActivityException noActivityException)
+                {
+                    final AddressingContext faultAddressingContext = AddressingContext.createFaultContext(addressingContext, MessageId.getMessageId()) ;
+                    final SoapFault soapFault = new SoapFault(SoapFaultType.FAULT_SENDER, CoordinationConstants.WSCOOR_ERROR_CODE_INVALID_STATE_QNAME,
+                        WSCLogger.log_mesg.getString("com.arjuna.wsc.messaging.RegistrationCoordinator11ProcessorImpl_4")) ;
+                    RegistrationRequesterClient.getClient().sendSoapFault(faultAddressingContext, null, soapFault) ;
+                    return ;
+                }
+                catch (final Throwable th)
+                {
+                    if (WSCLogger.arjLoggerI18N.isDebugEnabled())
+                    {
+                        WSCLogger.arjLoggerI18N.debug("com.arjuna.wsc.messaging.RegistrationCoordinator11ProcessorImpl_5", th) ;
+                    }
+                    final AddressingContext faultAddressingContext = AddressingContext.createFaultContext(addressingContext, MessageId.getMessageId()) ;
+                    final SoapFault soapFault = new SoapFault(th) ;
+                    RegistrationRequesterClient.getClient().sendSoapFault(faultAddressingContext, null, soapFault) ;
+                    return ;
+                }
+                RegistrationRequesterClient.getClient().sendRegisterResponse(responseAddressingContext, null, coordinationProtocolService) ;
+            }
+            else
+            {
+                if (WSCLogger.arjLoggerI18N.isDebugEnabled())
+                {
+                    WSCLogger.arjLoggerI18N.debug("com.arjuna.wsc.messaging.RegistrationCoordinator11ProcessorImpl_6", new Object[] {protocolIdentifier}) ;
+                }
+                final AddressingContext faultAddressingContext = AddressingContext.createFaultContext(addressingContext, MessageId.getMessageId()) ;
+                final SoapFault soapFault = new SoapFault(SoapFaultType.FAULT_SENDER, CoordinationConstants.WSCOOR_ERROR_CODE_INVALID_PROTOCOL_QNAME,
+                    WSCLogger.log_mesg.getString("com.arjuna.wsc.messaging.RegistrationCoordinator11ProcessorImpl_2")) ;
+                RegistrationRequesterClient.getClient().sendSoapFault(faultAddressingContext, null, soapFault) ;
+            }
+        }
+        catch (Throwable throwable)
+        {
+            throwable.printStackTrace(System.err);
+        }
+    }
+}


Property changes on: labs/jbosstm/workspace/XTS_TX11/WS-C/dev/src/com/arjuna/wsc/messaging/RegistrationCoordinator11ProcessorImpl.java
___________________________________________________________________
Name: svn:keywords
   + Rev Date
Name: svn:eol-style
   + native

Added: labs/jbosstm/workspace/XTS_TX11/WS-C/dev/src/com/arjuna/wsc/messaging/deploy/Coordination11Initialisation.java
===================================================================
--- labs/jbosstm/workspace/XTS_TX11/WS-C/dev/src/com/arjuna/wsc/messaging/deploy/Coordination11Initialisation.java	                        (rev 0)
+++ labs/jbosstm/workspace/XTS_TX11/WS-C/dev/src/com/arjuna/wsc/messaging/deploy/Coordination11Initialisation.java	2007-08-14 12:43:41 UTC (rev 14200)
@@ -0,0 +1,54 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag.  All rights reserved. 
+ * See the copyright.txt in the distribution for a full listing 
+ * of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU General Public License, v. 2.0.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A 
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+ * PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+ * You should have received a copy of the GNU General Public License,
+ * v. 2.0 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+ * MA  02110-1301, USA.
+ * 
+ * (C) 2005-2006,
+ * @author JBoss Inc.
+ */
+package com.arjuna.wsc.messaging.deploy;
+
+import javax.servlet.ServletContextEvent;
+import javax.servlet.ServletContextListener;
+
+import com.arjuna.webservices.wscoor11.processors.ActivationCoordinatorProcessor;
+import com.arjuna.webservices.wscoor11.processors.RegistrationCoordinatorProcessor;
+import com.arjuna.wsc.messaging.ActivationCoordinator11ProcessorImpl;
+import com.arjuna.wsc.messaging.RegistrationCoordinator11ProcessorImpl;
+
+/**
+ * Initialise the coordination services.
+ * @author kevin
+ */
+public class Coordination11Initialisation implements ServletContextListener
+{
+    /**
+     * The context has been initialized.
+     * @param servletContextEvent The servlet context event.
+     */
+    public void contextInitialized(final ServletContextEvent servletContextEvent)
+    {
+        ActivationCoordinatorProcessor.setCoordinator(new ActivationCoordinator11ProcessorImpl()) ;
+        RegistrationCoordinatorProcessor.setCoordinator(new RegistrationCoordinator11ProcessorImpl()) ;
+    }
+
+    /**
+     * The context is about to be destroyed.
+     * @param servletContextEvent The servlet context event.
+     */
+    public void contextDestroyed(final ServletContextEvent servletContextEvent)
+    {
+    }
+}


Property changes on: labs/jbosstm/workspace/XTS_TX11/WS-C/dev/src/com/arjuna/wsc/messaging/deploy/Coordination11Initialisation.java
___________________________________________________________________
Name: svn:keywords
   + Rev Date
Name: svn:eol-style
   + native

Added: labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsat11/AtomicTransactionConstants.java
===================================================================
--- labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsat11/AtomicTransactionConstants.java	                        (rev 0)
+++ labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsat11/AtomicTransactionConstants.java	2007-08-14 12:43:41 UTC (rev 14200)
@@ -0,0 +1,185 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag.  All rights reserved. 
+ * See the copyright.txt in the distribution for a full listing 
+ * of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU General Public License, v. 2.0.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A 
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+ * PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+ * You should have received a copy of the GNU General Public License,
+ * v. 2.0 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+ * MA  02110-1301, USA.
+ * 
+ * (C) 2005-2006,
+ * @author JBoss Inc.
+ */
+package com.arjuna.webservices.wsat11;
+
+import javax.xml.namespace.QName;
+
+/**
+ * Interface containing WS-AtomicTransaction constants.
+ */
+public interface AtomicTransactionConstants
+{
+    /**
+     * The completion coordinator service name.
+     */
+    public String SERVICE_COMPLETION_COORDINATOR = "AT11CompletionCoordinator" ;
+    /**
+     * The completion initiator service name.
+     */
+    public String SERVICE_COMPLETION_INITIATOR = "AT11CompletionInitiator" ;
+    /**
+     * The coordinator service name.
+     */
+    public String SERVICE_COORDINATOR = "AT11Coordinator" ;
+    /**
+     * The participant service name.
+     */
+    public String SERVICE_PARTICIPANT = "AT11Participant" ;
+    /**
+     * The Namespace.
+     */
+    public String WSAT_NAMESPACE = "http://docs.oasis-open.org/ws-tx/wsat/2006/06" ;
+    /**
+     * The Attribute Namespace.
+     */
+    public String WSAT_ATTRIBUTE_NAMESPACE = "" ;
+    /**
+     * The namespace prefix.
+     */
+    public String WSAT_PREFIX = "wsat" ;
+    /**
+     * The attribute namespace prefix.
+     */
+    public String WSAT_ATTRIBUTE_PREFIX = "" ;
+    
+    /**
+     * The Prepare element.
+     */
+    public String WSAT_ELEMENT_PREPARE = "Prepare" ;
+    /**
+     * The Prepare QName.
+     */
+    public QName WSAT_ELEMENT_PREPARE_QNAME = new QName(WSAT_NAMESPACE, WSAT_ELEMENT_PREPARE, WSAT_PREFIX) ;
+    /**
+     * The Prepare Action.
+     */
+    public String WSAT_ACTION_PREPARE = WSAT_NAMESPACE + "/" + WSAT_ELEMENT_PREPARE ;
+    /**
+     * The Prepared element.
+     */
+    public String WSAT_ELEMENT_PREPARED = "Prepared" ;
+    /**
+     * The Prepared QName.
+     */
+    public QName WSAT_ELEMENT_PREPARED_QNAME = new QName(WSAT_NAMESPACE, WSAT_ELEMENT_PREPARED, WSAT_PREFIX) ;
+    /**
+     * The Prepared Action.
+     */
+    public String WSAT_ACTION_PREPARED = WSAT_NAMESPACE + "/" + WSAT_ELEMENT_PREPARED ;
+    /**
+     * The Aborted element.
+     */
+    public String WSAT_ELEMENT_ABORTED = "Aborted" ;
+    /**
+     * The Aborted QName.
+     */
+    public QName WSAT_ELEMENT_ABORTED_QNAME = new QName(WSAT_NAMESPACE, WSAT_ELEMENT_ABORTED, WSAT_PREFIX) ;
+    /**
+     * The Aborted Action.
+     */
+    public String WSAT_ACTION_ABORTED = WSAT_NAMESPACE + "/" + WSAT_ELEMENT_ABORTED ;
+    /**
+     * The ReadOnly element.
+     */
+    public String WSAT_ELEMENT_READ_ONLY = "ReadOnly" ;
+    /**
+     * The ReadOnly QName.
+     */
+    public QName WSAT_ELEMENT_READ_ONLY_QNAME = new QName(WSAT_NAMESPACE, WSAT_ELEMENT_READ_ONLY, WSAT_PREFIX) ;
+    /**
+     * The ReadOnly Action.
+     */
+    public String WSAT_ACTION_READ_ONLY = WSAT_NAMESPACE + "/" + WSAT_ELEMENT_READ_ONLY ;
+    /**
+     * The Commit element.
+     */
+    public String WSAT_ELEMENT_COMMIT = "Commit" ;
+    /**
+     * The Commit QName.
+     */
+    public QName WSAT_ELEMENT_COMMIT_QNAME = new QName(WSAT_NAMESPACE, WSAT_ELEMENT_COMMIT, WSAT_PREFIX) ;
+    /**
+     * The Commit Action.
+     */
+    public String WSAT_ACTION_COMMIT = WSAT_NAMESPACE + "/" + WSAT_ELEMENT_COMMIT ;
+    /**
+     * The Rollback element.
+     */
+    public String WSAT_ELEMENT_ROLLBACK = "Rollback" ;
+    /**
+     * The Rollback QName.
+     */
+    public QName WSAT_ELEMENT_ROLLBACK_QNAME = new QName(WSAT_NAMESPACE, WSAT_ELEMENT_ROLLBACK, WSAT_PREFIX) ;
+    /**
+     * The Rollback Action.
+     */
+    public String WSAT_ACTION_ROLLBACK = WSAT_NAMESPACE + "/" + WSAT_ELEMENT_ROLLBACK ;
+    /**
+     * The Committed element.
+     */
+    public String WSAT_ELEMENT_COMMITTED = "Committed" ;
+    /**
+     * The Committed QName.
+     */
+    public QName WSAT_ELEMENT_COMMITTED_QNAME = new QName(WSAT_NAMESPACE, WSAT_ELEMENT_COMMITTED, WSAT_PREFIX) ;
+    /**
+     * The Committed Action.
+     */
+    public String WSAT_ACTION_COMMITTED = WSAT_NAMESPACE + "/" + WSAT_ELEMENT_COMMITTED ;
+    /**
+     * The Fault Action.
+     */
+    public String WSAT_ACTION_FAULT = WSAT_NAMESPACE + "/fault" ;
+    
+    /**
+     * The InconsistentInternalState error code.
+     */
+    public String WSAT_ERROR_CODE_INCONSISTENT_INTERNAL_STATE = "InconsistentInternalState" ;
+    /**
+     * The InconsistentInternalState error code QName.
+     */
+    public QName WSAT_ERROR_CODE_INCONSISTENT_INTERNAL_STATE_QNAME = new QName(WSAT_NAMESPACE, WSAT_ERROR_CODE_INCONSISTENT_INTERNAL_STATE, WSAT_PREFIX) ;
+    /**
+     * The UnknownTransaction error code.
+     */
+    public String WSAT_ERROR_CODE_UNKNOWN_TRANSACTION = "UnknownTransaction" ;
+    /**
+     * The UnknownTransaction error code QName.
+     */
+    public QName WSAT_ERROR_CODE_UNKNOWN_TRANSACTION_QNAME = new QName(WSAT_NAMESPACE, WSAT_ERROR_CODE_UNKNOWN_TRANSACTION, WSAT_PREFIX) ;
+    
+    /**
+     * The atomic transaction protocol.
+     */
+    public String WSAT_PROTOCOL = WSAT_NAMESPACE ;
+    /**
+     * The atomic transaction completion protocol.
+     */
+    public String WSAT_SUB_PROTOCOL_COMPLETION = WSAT_NAMESPACE + "/Completion" ;
+    /**
+     * The atomic transaction durable 2PC protocol.
+     */
+    public String WSAT_SUB_PROTOCOL_DURABLE_2PC = WSAT_NAMESPACE + "/Durable2PC" ;
+    /**
+     * The atomic transaction volatile 2PC protocol.
+     */
+    public String WSAT_SUB_PROTOCOL_VOLATILE_2PC = WSAT_NAMESPACE + "/Volatile2PC" ;
+}


Property changes on: labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsat11/AtomicTransactionConstants.java
___________________________________________________________________
Name: svn:keywords
   + Rev Date
Name: svn:eol-style
   + native

Added: labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsat11/CoordinatorInboundEvents.java
===================================================================
--- labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsat11/CoordinatorInboundEvents.java	                        (rev 0)
+++ labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsat11/CoordinatorInboundEvents.java	2007-08-14 12:43:41 UTC (rev 14200)
@@ -0,0 +1,72 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag.  All rights reserved. 
+ * See the copyright.txt in the distribution for a full listing 
+ * of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU General Public License, v. 2.0.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A 
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+ * PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+ * You should have received a copy of the GNU General Public License,
+ * v. 2.0 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+ * MA  02110-1301, USA.
+ * 
+ * (C) 2005-2006,
+ * @author JBoss Inc.
+ */
+package com.arjuna.webservices.wsat11;
+
+import com.arjuna.webservices.SoapFault;
+import com.arjuna.webservices.wsaddr2005.AddressingContext;
+import com.arjuna.webservices.wsjboss.JBossContext;
+
+
+/**
+ * The Coordinator events.
+ */
+public interface CoordinatorInboundEvents
+{
+    /**
+     * Handle the aborted event.
+     * @param aborted The aborted notification.
+     * @param addressingContext The addressing context.
+     * @param arjunaContext The arjuna context.
+     */
+    public void aborted(final NotificationType aborted, final AddressingContext addressingContext, final JBossContext arjunaContext) ;
+    
+    /**
+     * Handle the committed event.
+     * @param committed The committed notification.
+     * @param addressingContext The addressing context.
+     * @param arjunaContext The arjuna context.
+     */
+    public void committed(final NotificationType committed, final AddressingContext addressingContext, final JBossContext arjunaContext) ;
+    
+    /**
+     * Handle the prepared event.
+     * @param prepared The prepared notification.
+     * @param addressingContext The addressing context.
+     * @param arjunaContext The arjuna context.
+     */
+    public void prepared(final NotificationType prepared, final AddressingContext addressingContext, final JBossContext arjunaContext) ;
+    
+    /**
+     * Handle the readOnly event.
+     * @param readOnly The readOnly notification.
+     * @param addressingContext The addressing context.
+     * @param arjunaContext The arjuna context.
+     */
+    public void readOnly(final NotificationType readOnly, final AddressingContext addressingContext, final JBossContext arjunaContext) ;
+    
+    /**
+     * Handle the soap fault event.
+     * @param soapFault The soap fault.
+     * @param addressingContext The addressing context.
+     * @param arjunaContext The arjuna context.
+     */
+    public void soapFault(final SoapFault soapFault, final AddressingContext addressingContext, final JBossContext arjunaContext) ;
+}


Property changes on: labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsat11/CoordinatorInboundEvents.java
___________________________________________________________________
Name: svn:keywords
   + Rev Date
Name: svn:eol-style
   + native

Added: labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsat11/NotificationType.java
===================================================================
--- labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsat11/NotificationType.java	                        (rev 0)
+++ labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsat11/NotificationType.java	2007-08-14 12:43:41 UTC (rev 14200)
@@ -0,0 +1,60 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag.  All rights reserved. 
+ * See the copyright.txt in the distribution for a full listing 
+ * of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU General Public License, v. 2.0.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A 
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+ * PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+ * You should have received a copy of the GNU General Public License,
+ * v. 2.0 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+ * MA  02110-1301, USA.
+ * 
+ * (C) 2005-2006,
+ * @author JBoss Inc.
+ */
+package com.arjuna.webservices.wsat11;
+
+import javax.xml.stream.XMLStreamException;
+import javax.xml.stream.XMLStreamReader;
+
+import com.arjuna.webservices.stax.AnyContentAnyAttributeSupport;
+
+/*
+ * <xsd:complexType name="Notification">
+ *   <xsd:sequence>
+ *     <xsd:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
+ *   </xsd:sequence>
+ *   <xsd:anyAttribute namespace="##other" processContents="lax"/>
+ * </xsd:complexType>
+ */
+/**
+ * Representation of the Notification type.
+ * @author kevin
+ */
+public class NotificationType extends AnyContentAnyAttributeSupport
+{
+    /**
+     * Default constructor.
+     */
+    public NotificationType()
+    {
+    }
+    
+    /**
+     * Construct a notification from the input stream.
+     * 
+     * @param in The input stream.
+     * @throws XMLStreamException For errors during parsing.
+     */
+    public NotificationType(final XMLStreamReader in)
+        throws XMLStreamException
+    {
+        parse(in) ;
+    }
+}


Property changes on: labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsat11/NotificationType.java
___________________________________________________________________
Name: svn:keywords
   + Rev Date
Name: svn:eol-style
   + native

Added: labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsat11/ParticipantInboundEvents.java
===================================================================
--- labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsat11/ParticipantInboundEvents.java	                        (rev 0)
+++ labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsat11/ParticipantInboundEvents.java	2007-08-14 12:43:41 UTC (rev 14200)
@@ -0,0 +1,64 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag.  All rights reserved. 
+ * See the copyright.txt in the distribution for a full listing 
+ * of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU General Public License, v. 2.0.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A 
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+ * PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+ * You should have received a copy of the GNU General Public License,
+ * v. 2.0 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+ * MA  02110-1301, USA.
+ * 
+ * (C) 2005-2006,
+ * @author JBoss Inc.
+ */
+package com.arjuna.webservices.wsat11;
+
+import com.arjuna.webservices.SoapFault;
+import com.arjuna.webservices.wsaddr2005.AddressingContext;
+import com.arjuna.webservices.wsjboss.JBossContext;
+
+
+/**
+ * The Participant events.
+ */
+public interface ParticipantInboundEvents
+{
+    /**
+     * Handle the commit event.
+     * @param commit The commit notification.
+     * @param addressingContext The addressing context.
+     * @param arjunaContext The arjuna context.
+     */
+    public void commit(final NotificationType commit, final AddressingContext addressingContext, final JBossContext arjunaContext) ;
+    
+    /**
+     * Handle the prepare event.
+     * @param prepare The prepare notification.
+     * @param addressingContext The addressing context.
+     * @param arjunaContext The arjuna context.
+     */
+    public void prepare(final NotificationType prepare, final AddressingContext addressingContext, final JBossContext arjunaContext) ;
+    
+    /**
+     * Handle the rollback event.
+     * @param rollback The rollback notification.
+     * @param addressingContext The addressing context.
+     * @param arjunaContext The arjuna context.
+     */
+    public void rollback(final NotificationType rollback, final AddressingContext addressingContext, final JBossContext arjunaContext) ;
+    
+    /**
+     * Handle the soap fault event.
+     * @param soapFault The soap fault.
+     * @param addressingContext The addressing context.
+     * @param arjunaContext The arjuna context.
+     */
+    public void soapFault(final SoapFault soapFault, final AddressingContext addressingContext, final JBossContext arjunaContext) ;
+}


Property changes on: labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsat11/ParticipantInboundEvents.java
___________________________________________________________________
Name: svn:keywords
   + Rev Date
Name: svn:eol-style
   + native

Added: labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsat11/State.java
===================================================================
--- labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsat11/State.java	                        (rev 0)
+++ labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsat11/State.java	2007-08-14 12:43:41 UTC (rev 14200)
@@ -0,0 +1,118 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag.  All rights reserved. 
+ * See the copyright.txt in the distribution for a full listing 
+ * of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU General Public License, v. 2.0.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A 
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+ * PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+ * You should have received a copy of the GNU General Public License,
+ * v. 2.0 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+ * MA  02110-1301, USA.
+ * 
+ * (C) 2005-2006,
+ * @author JBoss Inc.
+ */
+package com.arjuna.webservices.wsat11;
+
+import java.text.MessageFormat;
+import java.util.Map;
+
+import com.arjuna.webservices.logging.WSTLogger;
+import com.arjuna.webservices.util.Enumerated;
+import com.arjuna.webservices.util.InvalidEnumerationException;
+
+/**
+ * Class representing AT state enumerations.
+ * @author kevin
+ */
+public class State extends Enumerated
+{
+    /**
+     * The Active state.
+     */
+    public static final State STATE_ACTIVE = new State("Active") ;
+    /**
+     * The Preparing state.
+     */
+    public static final State STATE_PREPARING = new State("Preparing") ;
+    /**
+     * The Prepared state.
+     */
+    public static final State STATE_PREPARED = new State("Prepared") ;
+    /**
+     * The PreparedSuccess state.
+     */
+    public static final State STATE_PREPARED_SUCCESS = new State("PreparedSuccess") ;
+    /**
+     * The Committing state.
+     */
+    public static final State STATE_COMMITTING = new State("Committing") ;
+    /**
+     * The Aborting state.
+     */
+    public static final State STATE_ABORTING = new State("Aborting") ;
+    
+    /**
+     * The map of enumerations.
+     */
+    private static final Map ENUM_MAP = generateMap(new Enumerated[] {
+        STATE_ACTIVE, STATE_PREPARING, STATE_PREPARED, STATE_PREPARED_SUCCESS,
+        STATE_COMMITTING, STATE_ABORTING
+    }) ;
+    
+    /**
+     * Construct the state enumeration with the specified value.
+     * @param localName The localName of the state enumeration.
+     */
+    private State(final String value)
+    {
+        super(value) ;
+    }
+    
+    /**
+     * Get the value of this enumeration.
+     * @return the value.
+     */
+    public String getValue()
+    {
+        return (String)getKey() ;
+    }
+    
+    /**
+     * Resolve the enumeration for the specified value.
+     * @param value The value.
+     * @return The enumeration.
+     * @throws InvalidEnumerationException if the value is not valid.
+     */
+    protected Enumerated resolveEnum(final Object value)
+        throws InvalidEnumerationException
+    {
+        return toState((String)value) ;
+    }
+    
+    /**
+     * Return the enumeration for the specified value.
+     * @param value The value.
+     * @return The enumeration.
+     * @throws InvalidEnumerationException if the value is not valid.
+     * @message com.arjuna.webservices.wsat11.State_1 [com.arjuna.webservices.wsat11.State_1] - Invalid fault type enumeration: {0}
+     */
+    public static State toState(final String value)
+        throws InvalidEnumerationException
+    {
+        final Object state = ENUM_MAP.get(value) ;
+        if (state == null)
+        {
+            final String pattern = WSTLogger.log_mesg.getString("com.arjuna.webservices.wsat11.State_1") ;
+            final String message = MessageFormat.format(pattern, new Object[] {value}) ;
+            throw new InvalidEnumerationException(message) ;
+        }
+        return (State)state ;
+    }
+}


Property changes on: labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsat11/State.java
___________________________________________________________________
Name: svn:keywords
   + Rev Date
Name: svn:eol-style
   + native

Added: labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsat11/client/CompletionCoordinatorClient.java
===================================================================
--- labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsat11/client/CompletionCoordinatorClient.java	                        (rev 0)
+++ labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsat11/client/CompletionCoordinatorClient.java	2007-08-14 12:43:41 UTC (rev 14200)
@@ -0,0 +1,158 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag.  All rights reserved. 
+ * See the copyright.txt in the distribution for a full listing 
+ * of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU General Public License, v. 2.0.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A 
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+ * PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+ * You should have received a copy of the GNU General Public License,
+ * v. 2.0 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+ * MA  02110-1301, USA.
+ * 
+ * (C) 2005-2006,
+ * @author JBoss Inc.
+ */
+package com.arjuna.webservices.wsat11.client;
+
+import java.io.IOException;
+
+import com.arjuna.webservices.HandlerRegistry;
+import com.arjuna.webservices.SoapBody;
+import com.arjuna.webservices.SoapFault;
+import com.arjuna.webservices.SoapRegistry;
+import com.arjuna.webservices.SoapService;
+import com.arjuna.webservices.base.policy.ClientPolicy;
+import com.arjuna.webservices.stax.NamedElement;
+import com.arjuna.webservices.wsaddr2005.AddressingConstants;
+import com.arjuna.webservices.wsaddr2005.AddressingContext;
+import com.arjuna.webservices.wsaddr2005.AttributedURIType;
+import com.arjuna.webservices.wsaddr2005.EndpointReferenceType;
+import com.arjuna.webservices.wsaddr2005.client.WSAddr2005Client;
+import com.arjuna.webservices.wsaddr2005.policy.AddressingPolicy;
+import com.arjuna.webservices.wsjboss.InstanceIdentifier;
+import com.arjuna.webservices.wsat11.AtomicTransactionConstants;
+import com.arjuna.webservices.wsat11.NotificationType;
+
+/**
+ * The Client side of the Completion Coordinator.
+ * @author kevin
+ */
+public class CompletionCoordinatorClient
+{
+    /**
+     * The client singleton.
+     */
+    private static final CompletionCoordinatorClient CLIENT = new CompletionCoordinatorClient() ;
+    
+    /**
+     * The commit action.
+     */
+    private final String commitAction = AtomicTransactionConstants.WSAT_ACTION_COMMIT ;
+    /**
+     * The rollback action.
+     */
+    private final String rollbackAction = AtomicTransactionConstants.WSAT_ACTION_ROLLBACK ;
+    
+    /**
+     * The none ReplyTo endpoint reference.
+     */
+    private final EndpointReferenceType noneReplyTo = new EndpointReferenceType(new AttributedURIType(AddressingConstants.WSA_ADDRESS_NONE)) ;
+    
+    /**
+     * The SOAP service representing the client.
+     */
+    private final SoapService soapService ;
+    /**
+     * The completion initiator URI for replies.
+     */
+    private final AttributedURIType completionInitiator ;
+    
+    /**
+     * Construct the completion coordinator client.
+     */
+    private CompletionCoordinatorClient()
+    {
+        final HandlerRegistry handlerRegistry = new HandlerRegistry() ;
+        
+        // Add WS-Addressing
+        AddressingPolicy.register(handlerRegistry) ;
+        // Add client policies
+        ClientPolicy.register(handlerRegistry) ;
+        
+        soapService = new SoapService(handlerRegistry) ;
+        final String completionInitiatorURI =
+            SoapRegistry.getRegistry().getServiceURI(AtomicTransactionConstants.SERVICE_COMPLETION_INITIATOR) ;
+        completionInitiator = new AttributedURIType(completionInitiatorURI) ;
+    }
+    
+    /**
+     * Send a commit request.
+     * @param addressingContext addressing context initialised with to and message ID.
+     * @param identifier The identifier of the initiator.
+     * @throws SoapFault For any errors.
+     * @throws IOException for any transport errors.
+     */
+    public void sendCommit(final AddressingContext addressingContext, final InstanceIdentifier identifier)
+        throws SoapFault, IOException
+    {
+        final EndpointReferenceType endpointReference = getEndpointReference(identifier) ;
+        
+        final NamedElement contents = new NamedElement(AtomicTransactionConstants.WSAT_ELEMENT_COMMIT_QNAME, new NotificationType()) ;
+        final SoapBody soapBody = new SoapBody(contents, commitAction) ;
+        addressingContext.setAction(new AttributedURIType(commitAction)) ;
+        
+        addressingContext.setFrom(endpointReference) ;
+        addressingContext.setReplyTo(noneReplyTo) ;
+        
+        WSAddr2005Client.sendOneWay(soapBody, addressingContext, null, soapService) ;
+    }
+    
+    /**
+     * Send a rollback request.
+     * @param addressingContext addressing context initialised with to and message ID.
+     * @param identifier The identifier of the initiator.
+     * @throws SoapFault For any errors.
+     * @throws IOException for any transport errors.
+     */
+    public void sendRollback(final AddressingContext addressingContext, final InstanceIdentifier identifier)
+        throws SoapFault, IOException
+    {
+        final EndpointReferenceType endpointReference = getEndpointReference(identifier) ;
+        
+        final NamedElement contents = new NamedElement(AtomicTransactionConstants.WSAT_ELEMENT_ROLLBACK_QNAME, new NotificationType()) ;
+        final SoapBody soapBody = new SoapBody(contents, rollbackAction) ;
+        addressingContext.setAction(new AttributedURIType(rollbackAction)) ;
+        
+        addressingContext.setFrom(endpointReference) ;
+        addressingContext.setReplyTo(noneReplyTo) ;
+        
+        WSAddr2005Client.sendOneWay(soapBody, addressingContext, null, soapService) ;
+    }
+    
+    /**
+     * Get the endpoint reference for the specified identifier.
+     * @param identifier The endpoint reference identifier.
+     * @return The endpoint reference.
+     */
+    private EndpointReferenceType getEndpointReference(final InstanceIdentifier identifier)
+    {
+        final EndpointReferenceType completionInitiatorEndpoint = new EndpointReferenceType(completionInitiator) ;
+        InstanceIdentifier.setEndpointInstanceIdentifier(completionInitiatorEndpoint, identifier) ;
+        return completionInitiatorEndpoint ;
+    }
+    
+    /**
+     * Get the Completion Coordinator client singleton.
+     * @return The Completion Coordinator client singleton.
+     */
+    public static CompletionCoordinatorClient getClient()
+    {
+        return CLIENT ;
+    }
+}


Property changes on: labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsat11/client/CompletionCoordinatorClient.java
___________________________________________________________________
Name: svn:keywords
   + Rev Date
Name: svn:eol-style
   + native

Added: labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsat11/client/CompletionInitiatorClient.java
===================================================================
--- labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsat11/client/CompletionInitiatorClient.java	                        (rev 0)
+++ labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsat11/client/CompletionInitiatorClient.java	2007-08-14 12:43:41 UTC (rev 14200)
@@ -0,0 +1,149 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag.  All rights reserved. 
+ * See the copyright.txt in the distribution for a full listing 
+ * of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU General Public License, v. 2.0.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A 
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+ * PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+ * You should have received a copy of the GNU General Public License,
+ * v. 2.0 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+ * MA  02110-1301, USA.
+ * 
+ * (C) 2005-2006,
+ * @author JBoss Inc.
+ */
+package com.arjuna.webservices.wsat11.client;
+
+import java.io.IOException;
+
+import com.arjuna.webservices.HandlerRegistry;
+import com.arjuna.webservices.SoapBody;
+import com.arjuna.webservices.SoapFault;
+import com.arjuna.webservices.SoapService;
+import com.arjuna.webservices.base.policy.ClientPolicy;
+import com.arjuna.webservices.stax.NamedElement;
+import com.arjuna.webservices.wsaddr2005.AddressingConstants;
+import com.arjuna.webservices.wsaddr2005.AddressingContext;
+import com.arjuna.webservices.wsaddr2005.AttributedURIType;
+import com.arjuna.webservices.wsaddr2005.EndpointReferenceType;
+import com.arjuna.webservices.wsaddr2005.client.WSAddr2005Client;
+import com.arjuna.webservices.wsaddr2005.policy.AddressingPolicy;
+import com.arjuna.webservices.wsat11.AtomicTransactionConstants;
+import com.arjuna.webservices.wsat11.NotificationType;
+
+/**
+ * The Client side of the Completion Initiator.
+ * @author kevin
+ */
+public class CompletionInitiatorClient
+{
+    /**
+     * The client singleton.
+     */
+    private static final CompletionInitiatorClient CLIENT = new CompletionInitiatorClient() ;
+    
+    /**
+     * The committed action.
+     */
+    private final String committedAction = AtomicTransactionConstants.WSAT_ACTION_COMMITTED ;
+    /**
+     * The aborted action.
+     */
+    private final String abortedAction = AtomicTransactionConstants.WSAT_ACTION_ABORTED ;
+    /**
+     * The fault action.
+     */
+    private final String faultAction = AtomicTransactionConstants.WSAT_ACTION_FAULT ;
+    
+    /**
+     * The none ReplyTo endpoint reference.
+     */
+    private final EndpointReferenceType noneReplyTo = new EndpointReferenceType(new AttributedURIType(AddressingConstants.WSA_ADDRESS_NONE)) ;
+    
+    /**
+     * The SOAP service representing the client.
+     */
+    private final SoapService soapService ;
+    
+    /**
+     * Construct the completion initiator client.
+     */
+    private CompletionInitiatorClient()
+    {
+        final HandlerRegistry handlerRegistry = new HandlerRegistry() ;
+        
+        // Add WS-Addressing
+        AddressingPolicy.register(handlerRegistry) ;
+        // Add client policies
+        ClientPolicy.register(handlerRegistry) ;
+        
+        soapService = new SoapService(handlerRegistry) ;
+    }
+    
+    /**
+     * Send a committed request.
+     * @param addressingContext addressing context initialised with to and message ID.
+     * @throws SoapFault For any errors.
+     * @throws IOException for any transport errors.
+     */
+    public void sendCommitted(final AddressingContext addressingContext)
+        throws SoapFault, IOException
+    {
+        final NamedElement contents = new NamedElement(AtomicTransactionConstants.WSAT_ELEMENT_COMMITTED_QNAME, new NotificationType()) ;
+        final SoapBody soapBody = new SoapBody(contents, committedAction) ;
+        addressingContext.setAction(new AttributedURIType(committedAction)) ;
+        
+        addressingContext.setReplyTo(noneReplyTo) ;
+        
+        WSAddr2005Client.sendOneWay(soapBody, addressingContext, null, soapService) ;
+    }
+    
+    /**
+     * Send an aborted request.
+     * @param addressingContext addressing context initialised with to and message ID.
+     * @throws SoapFault For any errors.
+     * @throws IOException for any transport errors.
+     */
+    public void sendAborted(final AddressingContext addressingContext)
+        throws SoapFault, IOException
+    {
+        final NamedElement contents = new NamedElement(AtomicTransactionConstants.WSAT_ELEMENT_ABORTED_QNAME, new NotificationType()) ;
+        final SoapBody soapBody = new SoapBody(contents, abortedAction) ;
+        addressingContext.setAction(new AttributedURIType(abortedAction)) ;
+        
+        addressingContext.setReplyTo(noneReplyTo) ;
+        
+        WSAddr2005Client.sendOneWay(soapBody, addressingContext, null, soapService) ;
+    }
+
+    /**
+     * Send a fault.
+     * @param addressingContext The addressing context.
+     * @param soapFault The SOAP fault.
+     * @throws SoapFault For any errors.
+     * @throws IOException for any transport errors.
+     */
+    public void sendSoapFault(final AddressingContext addressingContext, final SoapFault soapFault)
+        throws SoapFault, IOException
+    {
+        soapFault.setAction(faultAction) ;
+        addressingContext.setAction(new AttributedURIType(faultAction)) ;
+        
+        WSAddr2005Client.sendSoapFault(soapFault, addressingContext, null, soapService) ;
+    }
+    
+    /**
+     * Get the Completion Coordinator client singleton.
+     * @return The Completion Coordinator client singleton.
+     */
+    public static CompletionInitiatorClient getClient()
+    {
+        return CLIENT ;
+    }
+}


Property changes on: labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsat11/client/CompletionInitiatorClient.java
___________________________________________________________________
Name: svn:keywords
   + Rev Date
Name: svn:eol-style
   + native

Added: labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsat11/client/CoordinatorClient.java
===================================================================
--- labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsat11/client/CoordinatorClient.java	                        (rev 0)
+++ labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsat11/client/CoordinatorClient.java	2007-08-14 12:43:41 UTC (rev 14200)
@@ -0,0 +1,218 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag.  All rights reserved. 
+ * See the copyright.txt in the distribution for a full listing 
+ * of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU General Public License, v. 2.0.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A 
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+ * PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+ * You should have received a copy of the GNU General Public License,
+ * v. 2.0 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+ * MA  02110-1301, USA.
+ * 
+ * (C) 2005-2006,
+ * @author JBoss Inc.
+ */
+package com.arjuna.webservices.wsat11.client;
+
+import java.io.IOException;
+
+import com.arjuna.webservices.HandlerRegistry;
+import com.arjuna.webservices.SoapBody;
+import com.arjuna.webservices.SoapFault;
+import com.arjuna.webservices.SoapRegistry;
+import com.arjuna.webservices.SoapService;
+import com.arjuna.webservices.base.policy.ClientPolicy;
+import com.arjuna.webservices.stax.NamedElement;
+import com.arjuna.webservices.wsaddr2005.AddressingConstants;
+import com.arjuna.webservices.wsaddr2005.AddressingContext;
+import com.arjuna.webservices.wsaddr2005.AttributedURIType;
+import com.arjuna.webservices.wsaddr2005.EndpointReferenceType;
+import com.arjuna.webservices.wsaddr2005.client.WSAddr2005Client;
+import com.arjuna.webservices.wsaddr2005.policy.AddressingPolicy;
+import com.arjuna.webservices.wsjboss.InstanceIdentifier;
+import com.arjuna.webservices.wsat11.AtomicTransactionConstants;
+import com.arjuna.webservices.wsat11.NotificationType;
+
+/**
+ * The Client side of the Coordinator.
+ * @author kevin
+ */
+public class CoordinatorClient
+{
+    /**
+     * The client singleton.
+     */
+    private static final CoordinatorClient CLIENT = new CoordinatorClient() ;
+    
+    /**
+     * The prepared action.
+     */
+    private final String preparedAction = AtomicTransactionConstants.WSAT_ACTION_PREPARED ;
+    /**
+     * The aborted action.
+     */
+    private final String abortedAction = AtomicTransactionConstants.WSAT_ACTION_ABORTED ;
+    /**
+     * The read only action.
+     */
+    private final String readOnlyAction = AtomicTransactionConstants.WSAT_ACTION_READ_ONLY ;
+    /**
+     * The committed action.
+     */
+    private final String committedAction = AtomicTransactionConstants.WSAT_ACTION_COMMITTED ;
+    /**
+     * The fault action.
+     */
+    private final String faultAction = AtomicTransactionConstants.WSAT_ACTION_FAULT ;
+    
+    /**
+     * The none ReplyTo endpoint reference.
+     */
+    private final EndpointReferenceType noneReplyTo = new EndpointReferenceType(new AttributedURIType(AddressingConstants.WSA_ADDRESS_NONE)) ;
+    
+    /**
+     * The SOAP service representing the client.
+     */
+    private final SoapService soapService ;
+    /**
+     * The participant URI for replies.
+     */
+    private final AttributedURIType participant ;
+    
+    /**
+     * Construct the coordinator client.
+     */
+    private CoordinatorClient()
+    {
+        final HandlerRegistry handlerRegistry = new HandlerRegistry() ;
+        
+        // Add WS-Addressing
+        AddressingPolicy.register(handlerRegistry) ;
+        // Add client policies
+        ClientPolicy.register(handlerRegistry) ;
+        
+        soapService = new SoapService(handlerRegistry) ;
+        final String participantURI =
+            SoapRegistry.getRegistry().getServiceURI(AtomicTransactionConstants.SERVICE_PARTICIPANT) ;
+        participant = new AttributedURIType(participantURI) ;
+    }
+    
+    /**
+     * Send a prepared request.
+     * @param addressingContext addressing context initialised with to and message ID.
+     * @param identifier The identifier of the initiator.
+     * @throws SoapFault For any SOAP errors.
+     * @throws IOException for any transport errors.
+     */
+    public void sendPrepared(final AddressingContext addressingContext, final InstanceIdentifier identifier)
+        throws SoapFault, IOException
+    {
+        final EndpointReferenceType endpointReference = getEndpointReference(identifier) ;
+        
+        final NamedElement contents = new NamedElement(AtomicTransactionConstants.WSAT_ELEMENT_PREPARED_QNAME, new NotificationType()) ;
+        final SoapBody soapBody = new SoapBody(contents, preparedAction) ;
+        addressingContext.setAction(new AttributedURIType(preparedAction)) ;
+        
+        addressingContext.setFrom(endpointReference) ;
+        addressingContext.setReplyTo(noneReplyTo) ;
+        
+        WSAddr2005Client.sendOneWay(soapBody, addressingContext, null, soapService) ;
+    }
+    
+    /**
+     * Send an aborted request.
+     * @param addressingContext addressing context initialised with to and message ID.
+     * @throws SoapFault For any SOAP errors.
+     * @throws IOException for any transport errors.
+     */
+    public void sendAborted(final AddressingContext addressingContext)
+        throws SoapFault, IOException
+    {
+        final NamedElement contents = new NamedElement(AtomicTransactionConstants.WSAT_ELEMENT_ABORTED_QNAME, new NotificationType()) ;
+        final SoapBody soapBody = new SoapBody(contents, abortedAction) ;
+        addressingContext.setAction(new AttributedURIType(abortedAction)) ;
+        
+        addressingContext.setReplyTo(noneReplyTo) ;
+        
+        WSAddr2005Client.sendOneWay(soapBody, addressingContext, null, soapService) ;
+    }
+    
+    /**
+     * Send a read only request.
+     * @param addressingContext addressing context initialised with to and message ID.
+     * @throws SoapFault For any SOAP errors.
+     * @throws IOException for any transport errors.
+     */
+    public void sendReadOnly(final AddressingContext addressingContext)
+        throws SoapFault, IOException
+    {
+        final NamedElement contents = new NamedElement(AtomicTransactionConstants.WSAT_ELEMENT_READ_ONLY_QNAME, new NotificationType()) ;
+        final SoapBody soapBody = new SoapBody(contents, readOnlyAction) ;
+        addressingContext.setAction(new AttributedURIType(readOnlyAction)) ;
+        
+        addressingContext.setReplyTo(noneReplyTo) ;
+        
+        WSAddr2005Client.sendOneWay(soapBody, addressingContext, null, soapService) ;
+    }
+    
+    /**
+     * Send a committed request.
+     * @param addressingContext addressing context initialised with to and message ID.
+     * @throws SoapFault For any SOAP errors.
+     * @throws IOException for any transport errors.
+     */
+    public void sendCommitted(final AddressingContext addressingContext)
+        throws SoapFault, IOException
+    {
+        final NamedElement contents = new NamedElement(AtomicTransactionConstants.WSAT_ELEMENT_COMMITTED_QNAME, new NotificationType()) ;
+        final SoapBody soapBody = new SoapBody(contents, committedAction) ;
+        addressingContext.setAction(new AttributedURIType(committedAction)) ;
+        
+        addressingContext.setReplyTo(noneReplyTo) ;
+        
+        WSAddr2005Client.sendOneWay(soapBody, addressingContext, null, soapService) ;
+    }
+
+    /**
+     * Send a fault.
+     * @param addressingContext The addressing context.
+     * @param soapFault The SOAP fault.
+     * @throws SoapFault For any SOAP errors.
+     * @throws IOException for any transport errors.
+     */
+    public void sendSoapFault(final AddressingContext addressingContext, final SoapFault soapFault)
+        throws SoapFault, IOException
+    {
+        soapFault.setAction(faultAction) ;
+        addressingContext.setAction(new AttributedURIType(faultAction)) ;
+        
+        WSAddr2005Client.sendSoapFault(soapFault, addressingContext, null, soapService) ;
+    }
+    
+    /**
+     * Get the endpoint reference for the specified identifier.
+     * @param identifier The endpoint reference identifier.
+     * @return The endpoint reference.
+     */
+    private EndpointReferenceType getEndpointReference(final InstanceIdentifier identifier)
+    {
+        final EndpointReferenceType participantEndpoint = new EndpointReferenceType(participant) ;
+        InstanceIdentifier.setEndpointInstanceIdentifier(participantEndpoint, identifier) ;
+        return participantEndpoint ;
+    }
+    
+    /**
+     * Get the Completion Coordinator client singleton.
+     * @return The Completion Coordinator client singleton.
+     */
+    public static CoordinatorClient getClient()
+    {
+        return CLIENT ;
+    }
+}


Property changes on: labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsat11/client/CoordinatorClient.java
___________________________________________________________________
Name: svn:keywords
   + Rev Date
Name: svn:eol-style
   + native

Added: labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsat11/client/ParticipantClient.java
===================================================================
--- labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsat11/client/ParticipantClient.java	                        (rev 0)
+++ labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsat11/client/ParticipantClient.java	2007-08-14 12:43:41 UTC (rev 14200)
@@ -0,0 +1,204 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag.  All rights reserved. 
+ * See the copyright.txt in the distribution for a full listing 
+ * of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU General Public License, v. 2.0.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A 
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+ * PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+ * You should have received a copy of the GNU General Public License,
+ * v. 2.0 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+ * MA  02110-1301, USA.
+ * 
+ * (C) 2005-2006,
+ * @author JBoss Inc.
+ */
+package com.arjuna.webservices.wsat11.client;
+
+import java.io.IOException;
+
+import com.arjuna.webservices.HandlerRegistry;
+import com.arjuna.webservices.SoapBody;
+import com.arjuna.webservices.SoapFault;
+import com.arjuna.webservices.SoapRegistry;
+import com.arjuna.webservices.SoapService;
+import com.arjuna.webservices.base.policy.ClientPolicy;
+import com.arjuna.webservices.stax.NamedElement;
+import com.arjuna.webservices.wsaddr2005.AddressingConstants;
+import com.arjuna.webservices.wsaddr2005.AddressingContext;
+import com.arjuna.webservices.wsaddr2005.AttributedURIType;
+import com.arjuna.webservices.wsaddr2005.EndpointReferenceType;
+import com.arjuna.webservices.wsaddr2005.client.WSAddr2005Client;
+import com.arjuna.webservices.wsaddr2005.policy.AddressingPolicy;
+import com.arjuna.webservices.wsjboss.InstanceIdentifier;
+import com.arjuna.webservices.wsat11.AtomicTransactionConstants;
+import com.arjuna.webservices.wsat11.NotificationType;
+
+/**
+ * The Client side of the Participant.
+ * @author kevin
+ */
+public class ParticipantClient
+{
+    /**
+     * The client singleton.
+     */
+    private static final ParticipantClient CLIENT = new ParticipantClient() ;
+    
+    /**
+     * The prepare action.
+     */
+    private final String prepareAction = AtomicTransactionConstants.WSAT_ACTION_PREPARE ;
+    /**
+     * The commit action.
+     */
+    private final String commitAction = AtomicTransactionConstants.WSAT_ACTION_COMMIT ;
+    /**
+     * The rollback action.
+     */
+    private final String rollbackAction = AtomicTransactionConstants.WSAT_ACTION_ROLLBACK ;
+    /**
+     * The fault action.
+     */
+    private final String faultAction = AtomicTransactionConstants.WSAT_ACTION_FAULT ;
+    
+    /**
+     * The none ReplyTo endpoint reference.
+     */
+    private final EndpointReferenceType noneReplyTo = new EndpointReferenceType(new AttributedURIType(AddressingConstants.WSA_ADDRESS_NONE)) ;
+    
+    /**
+     * The SOAP service representing the client.
+     */
+    private final SoapService soapService ;
+    /**
+     * The coordinator URI for replies.
+     */
+    private final AttributedURIType coordinator ;
+    
+    /**
+     * Construct the completion initiator client.
+     */
+    private ParticipantClient()
+    {
+        final HandlerRegistry handlerRegistry = new HandlerRegistry() ;
+        
+        // Add WS-Addressing
+        AddressingPolicy.register(handlerRegistry) ;
+        // Add client policies
+        ClientPolicy.register(handlerRegistry) ;
+        
+        soapService = new SoapService(handlerRegistry) ;
+        final String coordinatorURI =
+            SoapRegistry.getRegistry().getServiceURI(AtomicTransactionConstants.SERVICE_COORDINATOR) ;
+        coordinator = new AttributedURIType(coordinatorURI) ;
+    }
+    
+    /**
+     * Send a prepare request.
+     * @param addressingContext addressing context initialised with to and message ID.
+     * @param identifier The identifier of the initiator.
+     * @throws SoapFault For any errors.
+     * @throws IOException for any transport errors.
+     */
+    public void sendPrepare(final AddressingContext addressingContext, final InstanceIdentifier identifier)
+        throws SoapFault, IOException
+    {
+        final EndpointReferenceType endpointReference = getEndpointReference(identifier) ;
+        
+        final NamedElement contents = new NamedElement(AtomicTransactionConstants.WSAT_ELEMENT_PREPARE_QNAME, new NotificationType()) ;
+        final SoapBody soapBody = new SoapBody(contents, prepareAction) ;
+        addressingContext.setAction(new AttributedURIType(prepareAction)) ;
+        
+        addressingContext.setFrom(endpointReference) ;
+        addressingContext.setReplyTo(noneReplyTo) ;
+        
+        WSAddr2005Client.sendOneWay(soapBody, addressingContext, null, soapService) ;
+    }
+    
+    /**
+     * Send a commit request.
+     * @param addressingContext addressing context initialised with to and message ID.
+     * @param identifier The identifier of the initiator.
+     * @throws SoapFault For any errors.
+     * @throws IOException for any transport errors.
+     */
+    public void sendCommit(final AddressingContext addressingContext, final InstanceIdentifier identifier)
+        throws SoapFault, IOException
+    {
+        final EndpointReferenceType endpointReference = getEndpointReference(identifier) ;
+        
+        final NamedElement contents = new NamedElement(AtomicTransactionConstants.WSAT_ELEMENT_COMMIT_QNAME, new NotificationType()) ;
+        final SoapBody soapBody = new SoapBody(contents, commitAction) ;
+        addressingContext.setAction(new AttributedURIType(commitAction)) ;
+        
+        addressingContext.setFrom(endpointReference) ;
+        addressingContext.setReplyTo(noneReplyTo) ;
+        
+        WSAddr2005Client.sendOneWay(soapBody, addressingContext, null, soapService) ;
+    }
+    
+    /**
+     * Send a rollback request.
+     * @param addressingContext addressing context initialised with to and message ID.
+     * @param identifier The identifier of the initiator.
+     * @throws SoapFault For any errors.
+     * @throws IOException for any transport errors.
+     */
+    public void sendRollback(final AddressingContext addressingContext, final InstanceIdentifier identifier)
+        throws SoapFault, IOException
+    {
+        final EndpointReferenceType endpointReference = getEndpointReference(identifier) ;
+        
+        final NamedElement contents = new NamedElement(AtomicTransactionConstants.WSAT_ELEMENT_ROLLBACK_QNAME, new NotificationType()) ;
+        final SoapBody soapBody = new SoapBody(contents, rollbackAction) ;
+        addressingContext.setAction(new AttributedURIType(rollbackAction)) ;
+        
+        addressingContext.setFrom(endpointReference) ;
+        addressingContext.setReplyTo(noneReplyTo) ;
+        
+        WSAddr2005Client.sendOneWay(soapBody, addressingContext, null, soapService) ;
+    }
+
+    /**
+     * Send a fault.
+     * @param addressingContext The addressing context.
+     * @param soapFault The SOAP fault.
+     * @throws SoapFault For any errors.
+     * @throws IOException for any transport errors.
+     */
+    public void sendSoapFault(final AddressingContext addressingContext, final SoapFault soapFault)
+        throws SoapFault, IOException
+    {
+        soapFault.setAction(faultAction) ;
+        addressingContext.setAction(new AttributedURIType(faultAction)) ;
+        
+        WSAddr2005Client.sendSoapFault(soapFault, addressingContext, null, soapService) ;
+    }
+    
+    /**
+     * Get the endpoint reference for the specified identifier.
+     * @param identifier The endpoint reference identifier.
+     * @return The endpoint reference.
+     */
+    private EndpointReferenceType getEndpointReference(final InstanceIdentifier identifier)
+    {
+        final EndpointReferenceType coordinatorEndpoint = new EndpointReferenceType(coordinator) ;
+        InstanceIdentifier.setEndpointInstanceIdentifier(coordinatorEndpoint, identifier) ;
+        return coordinatorEndpoint ;
+    }
+    
+    /**
+     * Get the Completion Coordinator client singleton.
+     * @return The Completion Coordinator client singleton.
+     */
+    public static ParticipantClient getClient()
+    {
+        return CLIENT ;
+    }
+}


Property changes on: labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsat11/client/ParticipantClient.java
___________________________________________________________________
Name: svn:keywords
   + Rev Date
Name: svn:eol-style
   + native

Added: labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsat11/handlers/CompletionCoordinatorCommitHandler.java
===================================================================
--- labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsat11/handlers/CompletionCoordinatorCommitHandler.java	                        (rev 0)
+++ labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsat11/handlers/CompletionCoordinatorCommitHandler.java	2007-08-14 12:43:41 UTC (rev 14200)
@@ -0,0 +1,63 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag.  All rights reserved. 
+ * See the copyright.txt in the distribution for a full listing 
+ * of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU General Public License, v. 2.0.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A 
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+ * PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+ * You should have received a copy of the GNU General Public License,
+ * v. 2.0 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+ * MA  02110-1301, USA.
+ * 
+ * (C) 2005-2006,
+ * @author JBoss Inc.
+ */
+package com.arjuna.webservices.wsat11.handlers;
+
+import javax.xml.stream.XMLStreamException;
+import javax.xml.stream.XMLStreamReader;
+
+import com.arjuna.webservices.BodyHandler;
+import com.arjuna.webservices.MessageContext;
+import com.arjuna.webservices.SoapBody;
+import com.arjuna.webservices.SoapFault;
+import com.arjuna.webservices.soap.SoapDetails;
+import com.arjuna.webservices.wsaddr2005.AddressingContext;
+import com.arjuna.webservices.wsjboss.JBossContext;
+import com.arjuna.webservices.wsat11.NotificationType;
+import com.arjuna.webservices.wsat11.processors.CompletionCoordinatorProcessor;
+
+/**
+ * The completion coordinator commit handler.
+ * @author kevin
+ */
+public class CompletionCoordinatorCommitHandler implements BodyHandler
+{
+    /**
+     * Handle the body element.
+     * @param soapDetails The SOAP details.
+     * @param context The current message context.
+     * @param responseContext The response message context.
+     * @param action The transport action value.
+     * @param in The current stream reader.
+     * @throws XMLStreamException for parsing errors.
+     * @throws SoapFault for processing errors.
+     * @return The response elements or null if one way.
+     */
+    public SoapBody invoke(final SoapDetails soapDetails, final MessageContext context,
+        final MessageContext responseContext, final String action, final XMLStreamReader in)
+        throws XMLStreamException, SoapFault
+    {
+        final NotificationType commit = new NotificationType(in) ;
+        final AddressingContext addressingContext = AddressingContext.getContext(context) ;
+        final JBossContext jbossContext = JBossContext.getContext(context) ;
+        CompletionCoordinatorProcessor.getProcessor().commit(commit, addressingContext, jbossContext) ;
+        return null ;
+    }
+}


Property changes on: labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsat11/handlers/CompletionCoordinatorCommitHandler.java
___________________________________________________________________
Name: svn:keywords
   + Rev Date
Name: svn:eol-style
   + native

Added: labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsat11/handlers/CompletionCoordinatorRollbackHandler.java
===================================================================
--- labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsat11/handlers/CompletionCoordinatorRollbackHandler.java	                        (rev 0)
+++ labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsat11/handlers/CompletionCoordinatorRollbackHandler.java	2007-08-14 12:43:41 UTC (rev 14200)
@@ -0,0 +1,63 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag.  All rights reserved. 
+ * See the copyright.txt in the distribution for a full listing 
+ * of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU General Public License, v. 2.0.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A 
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+ * PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+ * You should have received a copy of the GNU General Public License,
+ * v. 2.0 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+ * MA  02110-1301, USA.
+ * 
+ * (C) 2005-2006,
+ * @author JBoss Inc.
+ */
+package com.arjuna.webservices.wsat11.handlers;
+
+import javax.xml.stream.XMLStreamException;
+import javax.xml.stream.XMLStreamReader;
+
+import com.arjuna.webservices.BodyHandler;
+import com.arjuna.webservices.MessageContext;
+import com.arjuna.webservices.SoapBody;
+import com.arjuna.webservices.SoapFault;
+import com.arjuna.webservices.soap.SoapDetails;
+import com.arjuna.webservices.wsaddr2005.AddressingContext;
+import com.arjuna.webservices.wsjboss.JBossContext;
+import com.arjuna.webservices.wsat11.NotificationType;
+import com.arjuna.webservices.wsat11.processors.CompletionCoordinatorProcessor;
+
+/**
+ * The completion coordinator rollback handler.
+ * @author kevin
+ */
+public class CompletionCoordinatorRollbackHandler implements BodyHandler
+{
+    /**
+     * Handle the body element.
+     * @param soapDetails The SOAP details.
+     * @param context The current message context.
+     * @param responseContext The response message context.
+     * @param action The transport action value.
+     * @param in The current stream reader.
+     * @throws XMLStreamException for parsing errors.
+     * @throws SoapFault for processing errors.
+     * @return The response elements or null if one way.
+     */
+    public SoapBody invoke(final SoapDetails soapDetails, final MessageContext context,
+        final MessageContext responseContext, final String action, final XMLStreamReader in)
+        throws XMLStreamException, SoapFault
+    {
+        final NotificationType rollback = new NotificationType(in) ;
+        final AddressingContext addressingContext = AddressingContext.getContext(context) ;
+        final JBossContext jbossContext = JBossContext.getContext(context) ;
+        CompletionCoordinatorProcessor.getProcessor().rollback(rollback, addressingContext, jbossContext) ;
+        return null ;
+    }
+}


Property changes on: labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsat11/handlers/CompletionCoordinatorRollbackHandler.java
___________________________________________________________________
Name: svn:keywords
   + Rev Date
Name: svn:eol-style
   + native

Added: labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsat11/handlers/CompletionInitiatorAbortedHandler.java
===================================================================
--- labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsat11/handlers/CompletionInitiatorAbortedHandler.java	                        (rev 0)
+++ labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsat11/handlers/CompletionInitiatorAbortedHandler.java	2007-08-14 12:43:41 UTC (rev 14200)
@@ -0,0 +1,63 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag.  All rights reserved. 
+ * See the copyright.txt in the distribution for a full listing 
+ * of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU General Public License, v. 2.0.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A 
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+ * PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+ * You should have received a copy of the GNU General Public License,
+ * v. 2.0 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+ * MA  02110-1301, USA.
+ * 
+ * (C) 2005-2006,
+ * @author JBoss Inc.
+ */
+package com.arjuna.webservices.wsat11.handlers;
+
+import javax.xml.stream.XMLStreamException;
+import javax.xml.stream.XMLStreamReader;
+
+import com.arjuna.webservices.BodyHandler;
+import com.arjuna.webservices.MessageContext;
+import com.arjuna.webservices.SoapBody;
+import com.arjuna.webservices.SoapFault;
+import com.arjuna.webservices.soap.SoapDetails;
+import com.arjuna.webservices.wsaddr2005.AddressingContext;
+import com.arjuna.webservices.wsjboss.JBossContext;
+import com.arjuna.webservices.wsat11.NotificationType;
+import com.arjuna.webservices.wsat11.processors.CompletionInitiatorProcessor;
+
+/**
+ * The completion initiator aborted handler.
+ * @author kevin
+ */
+public class CompletionInitiatorAbortedHandler implements BodyHandler
+{
+    /**
+     * Handle the body element.
+     * @param soapDetails The SOAP details.
+     * @param context The current message context.
+     * @param responseContext The response message context.
+     * @param action The transport action value.
+     * @param in The current stream reader.
+     * @throws XMLStreamException for parsing errors.
+     * @throws SoapFault for processing errors.
+     * @return The response elements or null if one way.
+     */
+    public SoapBody invoke(final SoapDetails soapDetails, final MessageContext context,
+        final MessageContext responseContext, final String action, final XMLStreamReader in)
+        throws XMLStreamException, SoapFault
+    {
+        final NotificationType aborted = new NotificationType(in) ;
+        final AddressingContext addressingContext = AddressingContext.getContext(context) ;
+        final JBossContext jbossContext = JBossContext.getContext(context) ;
+        CompletionInitiatorProcessor.getProcessor().handleAborted(aborted, addressingContext, jbossContext) ;
+        return null ;
+    }
+}


Property changes on: labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsat11/handlers/CompletionInitiatorAbortedHandler.java
___________________________________________________________________
Name: svn:keywords
   + Rev Date
Name: svn:eol-style
   + native

Added: labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsat11/handlers/CompletionInitiatorCommittedHandler.java
===================================================================
--- labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsat11/handlers/CompletionInitiatorCommittedHandler.java	                        (rev 0)
+++ labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsat11/handlers/CompletionInitiatorCommittedHandler.java	2007-08-14 12:43:41 UTC (rev 14200)
@@ -0,0 +1,63 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag.  All rights reserved. 
+ * See the copyright.txt in the distribution for a full listing 
+ * of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU General Public License, v. 2.0.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A 
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+ * PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+ * You should have received a copy of the GNU General Public License,
+ * v. 2.0 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+ * MA  02110-1301, USA.
+ * 
+ * (C) 2005-2006,
+ * @author JBoss Inc.
+ */
+package com.arjuna.webservices.wsat11.handlers;
+
+import javax.xml.stream.XMLStreamException;
+import javax.xml.stream.XMLStreamReader;
+
+import com.arjuna.webservices.BodyHandler;
+import com.arjuna.webservices.MessageContext;
+import com.arjuna.webservices.SoapBody;
+import com.arjuna.webservices.SoapFault;
+import com.arjuna.webservices.soap.SoapDetails;
+import com.arjuna.webservices.wsaddr2005.AddressingContext;
+import com.arjuna.webservices.wsjboss.JBossContext;
+import com.arjuna.webservices.wsat11.NotificationType;
+import com.arjuna.webservices.wsat11.processors.CompletionInitiatorProcessor;
+
+/**
+ * The completion initiator committed handler.
+ * @author kevin
+ */
+public class CompletionInitiatorCommittedHandler implements BodyHandler
+{
+    /**
+     * Handle the body element.
+     * @param soapDetails The SOAP details.
+     * @param context The current message context.
+     * @param responseContext The response message context.
+     * @param action The transport action value.
+     * @param in The current stream reader.
+     * @throws XMLStreamException for parsing errors.
+     * @throws SoapFault for processing errors.
+     * @return The response elements or null if one way.
+     */
+    public SoapBody invoke(final SoapDetails soapDetails, final MessageContext context,
+        final MessageContext responseContext, final String action, final XMLStreamReader in)
+        throws XMLStreamException, SoapFault
+    {
+        final NotificationType committed = new NotificationType(in) ;
+        final AddressingContext addressingContext = AddressingContext.getContext(context) ;
+        final JBossContext jbossContext = JBossContext.getContext(context) ;
+        CompletionInitiatorProcessor.getProcessor().handleCommitted(committed, addressingContext, jbossContext) ;
+        return null ;
+    }
+}


Property changes on: labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsat11/handlers/CompletionInitiatorCommittedHandler.java
___________________________________________________________________
Name: svn:keywords
   + Rev Date
Name: svn:eol-style
   + native

Added: labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsat11/handlers/CompletionInitiatorSoapFaultHandler.java
===================================================================
--- labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsat11/handlers/CompletionInitiatorSoapFaultHandler.java	                        (rev 0)
+++ labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsat11/handlers/CompletionInitiatorSoapFaultHandler.java	2007-08-14 12:43:41 UTC (rev 14200)
@@ -0,0 +1,62 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag.  All rights reserved. 
+ * See the copyright.txt in the distribution for a full listing 
+ * of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU General Public License, v. 2.0.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A 
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+ * PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+ * You should have received a copy of the GNU General Public License,
+ * v. 2.0 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+ * MA  02110-1301, USA.
+ * 
+ * (C) 2005-2006,
+ * @author JBoss Inc.
+ */
+package com.arjuna.webservices.wsat11.handlers;
+
+import javax.xml.stream.XMLStreamException;
+import javax.xml.stream.XMLStreamReader;
+
+import com.arjuna.webservices.BodyHandler;
+import com.arjuna.webservices.MessageContext;
+import com.arjuna.webservices.SoapBody;
+import com.arjuna.webservices.SoapFault;
+import com.arjuna.webservices.soap.SoapDetails;
+import com.arjuna.webservices.wsaddr2005.AddressingContext;
+import com.arjuna.webservices.wsjboss.JBossContext;
+import com.arjuna.webservices.wsat11.processors.CompletionInitiatorProcessor;
+
+/**
+ * The completion initiator fault handler.
+ * @author kevin
+ */
+public class CompletionInitiatorSoapFaultHandler implements BodyHandler
+{
+    /**
+     * Handle the body element.
+     * @param soapDetails The SOAP details.
+     * @param context The current message context.
+     * @param responseContext The response message context.
+     * @param action The transport action value.
+     * @param in The current stream reader.
+     * @throws XMLStreamException for parsing errors.
+     * @throws SoapFault for processing errors.
+     * @return The response elements or null if one way.
+     */
+    public SoapBody invoke(final SoapDetails soapDetails, final MessageContext context,
+        final MessageContext responseContext, final String action, final XMLStreamReader in)
+        throws XMLStreamException, SoapFault
+    {
+        final SoapFault soapFault = soapDetails.parseSoapFault(in) ;
+        final AddressingContext addressingContext = AddressingContext.getContext(context) ;
+        final JBossContext jbossContext = JBossContext.getContext(context) ;
+        CompletionInitiatorProcessor.getProcessor().handleSoapFault(soapFault, addressingContext, jbossContext) ;
+        return null ;
+    }
+}


Property changes on: labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsat11/handlers/CompletionInitiatorSoapFaultHandler.java
___________________________________________________________________
Name: svn:keywords
   + Rev Date
Name: svn:eol-style
   + native

Added: labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsat11/handlers/CoordinatorAbortedHandler.java
===================================================================
--- labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsat11/handlers/CoordinatorAbortedHandler.java	                        (rev 0)
+++ labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsat11/handlers/CoordinatorAbortedHandler.java	2007-08-14 12:43:41 UTC (rev 14200)
@@ -0,0 +1,63 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag.  All rights reserved. 
+ * See the copyright.txt in the distribution for a full listing 
+ * of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU General Public License, v. 2.0.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A 
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+ * PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+ * You should have received a copy of the GNU General Public License,
+ * v. 2.0 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+ * MA  02110-1301, USA.
+ * 
+ * (C) 2005-2006,
+ * @author JBoss Inc.
+ */
+package com.arjuna.webservices.wsat11.handlers;
+
+import javax.xml.stream.XMLStreamException;
+import javax.xml.stream.XMLStreamReader;
+
+import com.arjuna.webservices.BodyHandler;
+import com.arjuna.webservices.MessageContext;
+import com.arjuna.webservices.SoapBody;
+import com.arjuna.webservices.SoapFault;
+import com.arjuna.webservices.soap.SoapDetails;
+import com.arjuna.webservices.wsaddr2005.AddressingContext;
+import com.arjuna.webservices.wsjboss.JBossContext;
+import com.arjuna.webservices.wsat11.NotificationType;
+import com.arjuna.webservices.wsat11.processors.CoordinatorProcessor;
+
+/**
+ * The coordinator aborted handler.
+ * @author kevin
+ */
+public class CoordinatorAbortedHandler implements BodyHandler
+{
+    /**
+     * Handle the body element.
+     * @param soapDetails The SOAP details.
+     * @param context The current message context.
+     * @param responseContext The response message context.
+     * @param action The transport action value.
+     * @param in The current stream reader.
+     * @throws XMLStreamException for parsing errors.
+     * @throws SoapFault for processing errors.
+     * @return The response elements or null if one way.
+     */
+    public SoapBody invoke(final SoapDetails soapDetails, final MessageContext context,
+        final MessageContext responseContext, final String action, final XMLStreamReader in)
+        throws XMLStreamException, SoapFault
+    {
+        final NotificationType aborted = new NotificationType(in) ;
+        final AddressingContext addressingContext = AddressingContext.getContext(context) ;
+        final JBossContext jbossContext = JBossContext.getContext(context) ;
+        CoordinatorProcessor.getProcessor().aborted(aborted, addressingContext, jbossContext) ;
+        return null ;
+    }
+}


Property changes on: labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsat11/handlers/CoordinatorAbortedHandler.java
___________________________________________________________________
Name: svn:keywords
   + Rev Date
Name: svn:eol-style
   + native

Added: labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsat11/handlers/CoordinatorCommittedHandler.java
===================================================================
--- labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsat11/handlers/CoordinatorCommittedHandler.java	                        (rev 0)
+++ labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsat11/handlers/CoordinatorCommittedHandler.java	2007-08-14 12:43:41 UTC (rev 14200)
@@ -0,0 +1,63 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag.  All rights reserved. 
+ * See the copyright.txt in the distribution for a full listing 
+ * of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU General Public License, v. 2.0.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A 
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+ * PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+ * You should have received a copy of the GNU General Public License,
+ * v. 2.0 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+ * MA  02110-1301, USA.
+ * 
+ * (C) 2005-2006,
+ * @author JBoss Inc.
+ */
+package com.arjuna.webservices.wsat11.handlers;
+
+import javax.xml.stream.XMLStreamException;
+import javax.xml.stream.XMLStreamReader;
+
+import com.arjuna.webservices.BodyHandler;
+import com.arjuna.webservices.MessageContext;
+import com.arjuna.webservices.SoapBody;
+import com.arjuna.webservices.SoapFault;
+import com.arjuna.webservices.soap.SoapDetails;
+import com.arjuna.webservices.wsaddr2005.AddressingContext;
+import com.arjuna.webservices.wsjboss.JBossContext;
+import com.arjuna.webservices.wsat11.NotificationType;
+import com.arjuna.webservices.wsat11.processors.CoordinatorProcessor;
+
+/**
+ * The coordinator committed handler.
+ * @author kevin
+ */
+public class CoordinatorCommittedHandler implements BodyHandler
+{
+    /**
+     * Handle the body element.
+     * @param soapDetails The SOAP details.
+     * @param context The current message context.
+     * @param responseContext The response message context.
+     * @param action The transport action value.
+     * @param in The current stream reader.
+     * @throws XMLStreamException for parsing errors.
+     * @throws SoapFault for processing errors.
+     * @return The response elements or null if one way.
+     */
+    public SoapBody invoke(final SoapDetails soapDetails, final MessageContext context,
+        final MessageContext responseContext, final String action, final XMLStreamReader in)
+        throws XMLStreamException, SoapFault
+    {
+        final NotificationType committed = new NotificationType(in) ;
+        final AddressingContext addressingContext = AddressingContext.getContext(context) ;
+        final JBossContext jbossContext = JBossContext.getContext(context) ;
+        CoordinatorProcessor.getProcessor().committed(committed, addressingContext, jbossContext) ;
+        return null ;
+    }
+}


Property changes on: labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsat11/handlers/CoordinatorCommittedHandler.java
___________________________________________________________________
Name: svn:keywords
   + Rev Date
Name: svn:eol-style
   + native

Added: labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsat11/handlers/CoordinatorPreparedHandler.java
===================================================================
--- labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsat11/handlers/CoordinatorPreparedHandler.java	                        (rev 0)
+++ labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsat11/handlers/CoordinatorPreparedHandler.java	2007-08-14 12:43:41 UTC (rev 14200)
@@ -0,0 +1,63 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag.  All rights reserved. 
+ * See the copyright.txt in the distribution for a full listing 
+ * of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU General Public License, v. 2.0.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A 
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+ * PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+ * You should have received a copy of the GNU General Public License,
+ * v. 2.0 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+ * MA  02110-1301, USA.
+ * 
+ * (C) 2005-2006,
+ * @author JBoss Inc.
+ */
+package com.arjuna.webservices.wsat11.handlers;
+
+import javax.xml.stream.XMLStreamException;
+import javax.xml.stream.XMLStreamReader;
+
+import com.arjuna.webservices.BodyHandler;
+import com.arjuna.webservices.MessageContext;
+import com.arjuna.webservices.SoapBody;
+import com.arjuna.webservices.SoapFault;
+import com.arjuna.webservices.soap.SoapDetails;
+import com.arjuna.webservices.wsaddr2005.AddressingContext;
+import com.arjuna.webservices.wsjboss.JBossContext;
+import com.arjuna.webservices.wsat11.NotificationType;
+import com.arjuna.webservices.wsat11.processors.CoordinatorProcessor;
+
+/**
+ * The coordinator prepared handler.
+ * @author kevin
+ */
+public class CoordinatorPreparedHandler implements BodyHandler
+{
+    /**
+     * Handle the body element.
+     * @param soapDetails The SOAP details.
+     * @param context The current message context.
+     * @param responseContext The response message context.
+     * @param action The transport action value.
+     * @param in The current stream reader.
+     * @throws XMLStreamException for parsing errors.
+     * @throws SoapFault for processing errors.
+     * @return The response elements or null if one way.
+     */
+    public SoapBody invoke(final SoapDetails soapDetails, final MessageContext context,
+        final MessageContext responseContext, final String action, final XMLStreamReader in)
+        throws XMLStreamException, SoapFault
+    {
+        final NotificationType prepared = new NotificationType(in) ;
+        final AddressingContext addressingContext = AddressingContext.getContext(context) ;
+        final JBossContext jbossContext = JBossContext.getContext(context) ;
+        CoordinatorProcessor.getProcessor().prepared(prepared, addressingContext, jbossContext) ;
+        return null ;
+    }
+}


Property changes on: labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsat11/handlers/CoordinatorPreparedHandler.java
___________________________________________________________________
Name: svn:keywords
   + Rev Date
Name: svn:eol-style
   + native

Added: labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsat11/handlers/CoordinatorReadOnlyHandler.java
===================================================================
--- labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsat11/handlers/CoordinatorReadOnlyHandler.java	                        (rev 0)
+++ labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsat11/handlers/CoordinatorReadOnlyHandler.java	2007-08-14 12:43:41 UTC (rev 14200)
@@ -0,0 +1,63 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag.  All rights reserved. 
+ * See the copyright.txt in the distribution for a full listing 
+ * of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU General Public License, v. 2.0.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A 
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+ * PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+ * You should have received a copy of the GNU General Public License,
+ * v. 2.0 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+ * MA  02110-1301, USA.
+ * 
+ * (C) 2005-2006,
+ * @author JBoss Inc.
+ */
+package com.arjuna.webservices.wsat11.handlers;
+
+import javax.xml.stream.XMLStreamException;
+import javax.xml.stream.XMLStreamReader;
+
+import com.arjuna.webservices.BodyHandler;
+import com.arjuna.webservices.MessageContext;
+import com.arjuna.webservices.SoapBody;
+import com.arjuna.webservices.SoapFault;
+import com.arjuna.webservices.soap.SoapDetails;
+import com.arjuna.webservices.wsaddr2005.AddressingContext;
+import com.arjuna.webservices.wsjboss.JBossContext;
+import com.arjuna.webservices.wsat11.NotificationType;
+import com.arjuna.webservices.wsat11.processors.CoordinatorProcessor;
+
+/**
+ * The coordinator read only handler.
+ * @author kevin
+ */
+public class CoordinatorReadOnlyHandler implements BodyHandler
+{
+    /**
+     * Handle the body element.
+     * @param soapDetails The SOAP details.
+     * @param context The current message context.
+     * @param responseContext The response message context.
+     * @param action The transport action value.
+     * @param in The current stream reader.
+     * @throws XMLStreamException for parsing errors.
+     * @throws SoapFault for processing errors.
+     * @return The response elements or null if one way.
+     */
+    public SoapBody invoke(final SoapDetails soapDetails, final MessageContext context,
+        final MessageContext responseContext, final String action, final XMLStreamReader in)
+        throws XMLStreamException, SoapFault
+    {
+        final NotificationType readOnly = new NotificationType(in) ;
+        final AddressingContext addressingContext = AddressingContext.getContext(context) ;
+        final JBossContext jbossContext = JBossContext.getContext(context) ;
+        CoordinatorProcessor.getProcessor().readOnly(readOnly, addressingContext, jbossContext) ;
+        return null ;
+    }
+}


Property changes on: labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsat11/handlers/CoordinatorReadOnlyHandler.java
___________________________________________________________________
Name: svn:keywords
   + Rev Date
Name: svn:eol-style
   + native

Added: labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsat11/handlers/CoordinatorSoapFaultHandler.java
===================================================================
--- labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsat11/handlers/CoordinatorSoapFaultHandler.java	                        (rev 0)
+++ labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsat11/handlers/CoordinatorSoapFaultHandler.java	2007-08-14 12:43:41 UTC (rev 14200)
@@ -0,0 +1,62 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag.  All rights reserved. 
+ * See the copyright.txt in the distribution for a full listing 
+ * of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU General Public License, v. 2.0.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A 
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+ * PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+ * You should have received a copy of the GNU General Public License,
+ * v. 2.0 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+ * MA  02110-1301, USA.
+ * 
+ * (C) 2005-2006,
+ * @author JBoss Inc.
+ */
+package com.arjuna.webservices.wsat11.handlers;
+
+import javax.xml.stream.XMLStreamException;
+import javax.xml.stream.XMLStreamReader;
+
+import com.arjuna.webservices.BodyHandler;
+import com.arjuna.webservices.MessageContext;
+import com.arjuna.webservices.SoapBody;
+import com.arjuna.webservices.SoapFault;
+import com.arjuna.webservices.soap.SoapDetails;
+import com.arjuna.webservices.wsaddr2005.AddressingContext;
+import com.arjuna.webservices.wsjboss.JBossContext;
+import com.arjuna.webservices.wsat11.processors.CoordinatorProcessor;
+
+/**
+ * The coordinator fault handler.
+ * @author kevin
+ */
+public class CoordinatorSoapFaultHandler implements BodyHandler
+{
+    /**
+     * Handle the body element.
+     * @param soapDetails The SOAP details.
+     * @param context The current message context.
+     * @param responseContext The response message context.
+     * @param action The transport action value.
+     * @param in The current stream reader.
+     * @throws XMLStreamException for parsing errors.
+     * @throws SoapFault for processing errors.
+     * @return The response elements or null if one way.
+     */
+    public SoapBody invoke(final SoapDetails soapDetails, final MessageContext context,
+        final MessageContext responseContext, final String action, final XMLStreamReader in)
+        throws XMLStreamException, SoapFault
+    {
+        final SoapFault soapFault = soapDetails.parseSoapFault(in) ;
+        final AddressingContext addressingContext = AddressingContext.getContext(context) ;
+        final JBossContext jbossContext = JBossContext.getContext(context) ;
+        CoordinatorProcessor.getProcessor().soapFault(soapFault, addressingContext, jbossContext) ;
+        return null ;
+    }
+}


Property changes on: labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsat11/handlers/CoordinatorSoapFaultHandler.java
___________________________________________________________________
Name: svn:keywords
   + Rev Date
Name: svn:eol-style
   + native

Added: labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsat11/handlers/ParticipantCommitHandler.java
===================================================================
--- labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsat11/handlers/ParticipantCommitHandler.java	                        (rev 0)
+++ labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsat11/handlers/ParticipantCommitHandler.java	2007-08-14 12:43:41 UTC (rev 14200)
@@ -0,0 +1,63 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag.  All rights reserved. 
+ * See the copyright.txt in the distribution for a full listing 
+ * of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU General Public License, v. 2.0.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A 
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+ * PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+ * You should have received a copy of the GNU General Public License,
+ * v. 2.0 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+ * MA  02110-1301, USA.
+ * 
+ * (C) 2005-2006,
+ * @author JBoss Inc.
+ */
+package com.arjuna.webservices.wsat11.handlers;
+
+import javax.xml.stream.XMLStreamException;
+import javax.xml.stream.XMLStreamReader;
+
+import com.arjuna.webservices.BodyHandler;
+import com.arjuna.webservices.MessageContext;
+import com.arjuna.webservices.SoapBody;
+import com.arjuna.webservices.SoapFault;
+import com.arjuna.webservices.soap.SoapDetails;
+import com.arjuna.webservices.wsaddr2005.AddressingContext;
+import com.arjuna.webservices.wsjboss.JBossContext;
+import com.arjuna.webservices.wsat11.NotificationType;
+import com.arjuna.webservices.wsat11.processors.ParticipantProcessor;
+
+/**
+ * The participant commit handler.
+ * @author kevin
+ */
+public class ParticipantCommitHandler implements BodyHandler
+{
+    /**
+     * Handle the body element.
+     * @param soapDetails The SOAP details.
+     * @param context The current message context.
+     * @param responseContext The response message context.
+     * @param action The transport action value.
+     * @param in The current stream reader.
+     * @throws XMLStreamException for parsing errors.
+     * @throws SoapFault for processing errors.
+     * @return The response elements or null if one way.
+     */
+    public SoapBody invoke(final SoapDetails soapDetails, final MessageContext context,
+        final MessageContext responseContext, final String action, final XMLStreamReader in)
+        throws XMLStreamException, SoapFault
+    {
+        final NotificationType commit = new NotificationType(in) ;
+        final AddressingContext addressingContext = AddressingContext.getContext(context) ;
+        final JBossContext jbossContext = JBossContext.getContext(context) ;
+        ParticipantProcessor.getProcessor().commit(commit, addressingContext, jbossContext) ;
+        return null ;
+    }
+}


Property changes on: labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsat11/handlers/ParticipantCommitHandler.java
___________________________________________________________________
Name: svn:keywords
   + Rev Date
Name: svn:eol-style
   + native

Added: labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsat11/handlers/ParticipantPrepareHandler.java
===================================================================
--- labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsat11/handlers/ParticipantPrepareHandler.java	                        (rev 0)
+++ labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsat11/handlers/ParticipantPrepareHandler.java	2007-08-14 12:43:41 UTC (rev 14200)
@@ -0,0 +1,63 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag.  All rights reserved. 
+ * See the copyright.txt in the distribution for a full listing 
+ * of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU General Public License, v. 2.0.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A 
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+ * PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+ * You should have received a copy of the GNU General Public License,
+ * v. 2.0 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+ * MA  02110-1301, USA.
+ * 
+ * (C) 2005-2006,
+ * @author JBoss Inc.
+ */
+package com.arjuna.webservices.wsat11.handlers;
+
+import javax.xml.stream.XMLStreamException;
+import javax.xml.stream.XMLStreamReader;
+
+import com.arjuna.webservices.BodyHandler;
+import com.arjuna.webservices.MessageContext;
+import com.arjuna.webservices.SoapBody;
+import com.arjuna.webservices.SoapFault;
+import com.arjuna.webservices.soap.SoapDetails;
+import com.arjuna.webservices.wsaddr2005.AddressingContext;
+import com.arjuna.webservices.wsjboss.JBossContext;
+import com.arjuna.webservices.wsat11.NotificationType;
+import com.arjuna.webservices.wsat11.processors.ParticipantProcessor;
+
+/**
+ * The participant prepare handler.
+ * @author kevin
+ */
+public class ParticipantPrepareHandler implements BodyHandler
+{
+    /**
+     * Handle the body element.
+     * @param soapDetails The SOAP details.
+     * @param context The current message context.
+     * @param responseContext The response message context.
+     * @param action The transport action value.
+     * @param in The current stream reader.
+     * @throws XMLStreamException for parsing errors.
+     * @throws SoapFault for processing errors.
+     * @return The response elements or null if one way.
+     */
+    public SoapBody invoke(final SoapDetails soapDetails, final MessageContext context,
+        final MessageContext responseContext, final String action, final XMLStreamReader in)
+        throws XMLStreamException, SoapFault
+    {
+        final NotificationType prepare = new NotificationType(in) ;
+        final AddressingContext addressingContext = AddressingContext.getContext(context) ;
+        final JBossContext jbossContext = JBossContext.getContext(context) ;
+        ParticipantProcessor.getProcessor().prepare(prepare, addressingContext, jbossContext) ;
+        return null ;
+    }
+}


Property changes on: labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsat11/handlers/ParticipantPrepareHandler.java
___________________________________________________________________
Name: svn:keywords
   + Rev Date
Name: svn:eol-style
   + native

Added: labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsat11/handlers/ParticipantRollbackHandler.java
===================================================================
--- labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsat11/handlers/ParticipantRollbackHandler.java	                        (rev 0)
+++ labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsat11/handlers/ParticipantRollbackHandler.java	2007-08-14 12:43:41 UTC (rev 14200)
@@ -0,0 +1,63 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag.  All rights reserved. 
+ * See the copyright.txt in the distribution for a full listing 
+ * of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU General Public License, v. 2.0.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A 
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+ * PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+ * You should have received a copy of the GNU General Public License,
+ * v. 2.0 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+ * MA  02110-1301, USA.
+ * 
+ * (C) 2005-2006,
+ * @author JBoss Inc.
+ */
+package com.arjuna.webservices.wsat11.handlers;
+
+import javax.xml.stream.XMLStreamException;
+import javax.xml.stream.XMLStreamReader;
+
+import com.arjuna.webservices.BodyHandler;
+import com.arjuna.webservices.MessageContext;
+import com.arjuna.webservices.SoapBody;
+import com.arjuna.webservices.SoapFault;
+import com.arjuna.webservices.soap.SoapDetails;
+import com.arjuna.webservices.wsaddr2005.AddressingContext;
+import com.arjuna.webservices.wsjboss.JBossContext;
+import com.arjuna.webservices.wsat11.NotificationType;
+import com.arjuna.webservices.wsat11.processors.ParticipantProcessor;
+
+/**
+ * The participant rollback handler.
+ * @author kevin
+ */
+public class ParticipantRollbackHandler implements BodyHandler
+{
+    /**
+     * Handle the body element.
+     * @param soapDetails The SOAP details.
+     * @param context The current message context.
+     * @param responseContext The response message context.
+     * @param action The transport action value.
+     * @param in The current stream reader.
+     * @throws XMLStreamException for parsing errors.
+     * @throws SoapFault for processing errors.
+     * @return The response elements or null if one way.
+     */
+    public SoapBody invoke(final SoapDetails soapDetails, final MessageContext context,
+        final MessageContext responseContext, final String action, final XMLStreamReader in)
+        throws XMLStreamException, SoapFault
+    {
+        final NotificationType rollback = new NotificationType(in) ;
+        final AddressingContext addressingContext = AddressingContext.getContext(context) ;
+        final JBossContext jbossContext = JBossContext.getContext(context) ;
+        ParticipantProcessor.getProcessor().rollback(rollback, addressingContext, jbossContext) ;
+        return null ;
+    }
+}


Property changes on: labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsat11/handlers/ParticipantRollbackHandler.java
___________________________________________________________________
Name: svn:keywords
   + Rev Date
Name: svn:eol-style
   + native

Added: labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsat11/handlers/ParticipantSoapFaultHandler.java
===================================================================
--- labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsat11/handlers/ParticipantSoapFaultHandler.java	                        (rev 0)
+++ labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsat11/handlers/ParticipantSoapFaultHandler.java	2007-08-14 12:43:41 UTC (rev 14200)
@@ -0,0 +1,62 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag.  All rights reserved. 
+ * See the copyright.txt in the distribution for a full listing 
+ * of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU General Public License, v. 2.0.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A 
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+ * PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+ * You should have received a copy of the GNU General Public License,
+ * v. 2.0 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+ * MA  02110-1301, USA.
+ * 
+ * (C) 2005-2006,
+ * @author JBoss Inc.
+ */
+package com.arjuna.webservices.wsat11.handlers;
+
+import javax.xml.stream.XMLStreamException;
+import javax.xml.stream.XMLStreamReader;
+
+import com.arjuna.webservices.BodyHandler;
+import com.arjuna.webservices.MessageContext;
+import com.arjuna.webservices.SoapBody;
+import com.arjuna.webservices.SoapFault;
+import com.arjuna.webservices.soap.SoapDetails;
+import com.arjuna.webservices.wsaddr2005.AddressingContext;
+import com.arjuna.webservices.wsjboss.JBossContext;
+import com.arjuna.webservices.wsat11.processors.ParticipantProcessor;
+
+/**
+ * The participant SOAP fault handler.
+ * @author kevin
+ */
+public class ParticipantSoapFaultHandler implements BodyHandler
+{
+    /**
+     * Handle the body element.
+     * @param soapDetails The SOAP details.
+     * @param context The current message context.
+     * @param responseContext The response message context.
+     * @param action The transport action value.
+     * @param in The current stream reader.
+     * @throws XMLStreamException for parsing errors.
+     * @throws SoapFault for processing errors.
+     * @return The response elements or null if one way.
+     */
+    public SoapBody invoke(final SoapDetails soapDetails, final MessageContext context,
+        final MessageContext responseContext, final String action, final XMLStreamReader in)
+        throws XMLStreamException, SoapFault
+    {
+        final SoapFault soapFault = soapDetails.parseSoapFault(in) ;
+        final AddressingContext addressingContext = AddressingContext.getContext(context) ;
+        final JBossContext jbossContext = JBossContext.getContext(context) ;
+        ParticipantProcessor.getProcessor().soapFault(soapFault, addressingContext, jbossContext) ;
+        return null ;
+    }
+}


Property changes on: labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsat11/handlers/ParticipantSoapFaultHandler.java
___________________________________________________________________
Name: svn:keywords
   + Rev Date
Name: svn:eol-style
   + native

Added: labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsat11/policy/CompletionCoordinatorPolicy.java
===================================================================
--- labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsat11/policy/CompletionCoordinatorPolicy.java	                        (rev 0)
+++ labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsat11/policy/CompletionCoordinatorPolicy.java	2007-08-14 12:43:41 UTC (rev 14200)
@@ -0,0 +1,56 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag.  All rights reserved. 
+ * See the copyright.txt in the distribution for a full listing 
+ * of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU General Public License, v. 2.0.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A 
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+ * PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+ * You should have received a copy of the GNU General Public License,
+ * v. 2.0 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+ * MA  02110-1301, USA.
+ * 
+ * (C) 2005-2006,
+ * @author JBoss Inc.
+ */
+package com.arjuna.webservices.wsat11.policy;
+
+import com.arjuna.webservices.HandlerRegistry;
+import com.arjuna.webservices.base.handlers.LoggingFaultHandler;
+import com.arjuna.webservices.wsat11.AtomicTransactionConstants;
+import com.arjuna.webservices.wsat11.handlers.CompletionCoordinatorCommitHandler;
+import com.arjuna.webservices.wsat11.handlers.CompletionCoordinatorRollbackHandler;
+
+/**
+ * Policy responsible for binding in the WS-AtomicTransaction completion server handlers.
+ * @author kevin
+ */
+public class CompletionCoordinatorPolicy
+{
+    /**
+     * Add this policy to the registry.
+     * @param registry The registry containing the policy.
+     */
+    public static void register(final HandlerRegistry registry)
+    {
+        registry.registerBodyHandler(AtomicTransactionConstants.WSAT_ELEMENT_COMMIT_QNAME, new CompletionCoordinatorCommitHandler()) ;
+        registry.registerBodyHandler(AtomicTransactionConstants.WSAT_ELEMENT_ROLLBACK_QNAME, new CompletionCoordinatorRollbackHandler()) ;
+        registry.registerFaultHandler(new LoggingFaultHandler(AtomicTransactionConstants.SERVICE_COMPLETION_COORDINATOR)) ;
+    }
+
+    /**
+     * Remove this policy from the registry.
+     * @param registry The registry containing the policy.
+     */
+    public static void remove(final HandlerRegistry registry)
+    {
+        registry.registerFaultHandler(null) ;
+        registry.removeBodyHandler(AtomicTransactionConstants.WSAT_ELEMENT_ROLLBACK_QNAME) ;
+        registry.removeBodyHandler(AtomicTransactionConstants.WSAT_ELEMENT_COMMIT_QNAME) ;
+    }
+}


Property changes on: labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsat11/policy/CompletionCoordinatorPolicy.java
___________________________________________________________________
Name: svn:keywords
   + Rev Date
Name: svn:eol-style
   + native

Added: labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsat11/policy/CompletionInitiatorPolicy.java
===================================================================
--- labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsat11/policy/CompletionInitiatorPolicy.java	                        (rev 0)
+++ labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsat11/policy/CompletionInitiatorPolicy.java	2007-08-14 12:43:41 UTC (rev 14200)
@@ -0,0 +1,56 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag.  All rights reserved. 
+ * See the copyright.txt in the distribution for a full listing 
+ * of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU General Public License, v. 2.0.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A 
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+ * PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+ * You should have received a copy of the GNU General Public License,
+ * v. 2.0 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+ * MA  02110-1301, USA.
+ * 
+ * (C) 2005-2006,
+ * @author JBoss Inc.
+ */
+package com.arjuna.webservices.wsat11.policy;
+
+import com.arjuna.webservices.HandlerRegistry;
+import com.arjuna.webservices.wsat11.AtomicTransactionConstants;
+import com.arjuna.webservices.wsat11.handlers.CompletionInitiatorAbortedHandler;
+import com.arjuna.webservices.wsat11.handlers.CompletionInitiatorCommittedHandler;
+import com.arjuna.webservices.wsat11.handlers.CompletionInitiatorSoapFaultHandler;
+
+/**
+ * Policy responsible for binding in the WS-AtomicTransaction completion client handlers.
+ * @author kevin
+ */
+public class CompletionInitiatorPolicy
+{
+    /**
+     * Add this policy to the registry.
+     * @param registry The registry containing the policy.
+     */
+    public static void register(final HandlerRegistry registry)
+    {
+        registry.registerBodyHandler(AtomicTransactionConstants.WSAT_ELEMENT_COMMITTED_QNAME, new CompletionInitiatorCommittedHandler()) ;
+        registry.registerBodyHandler(AtomicTransactionConstants.WSAT_ELEMENT_ABORTED_QNAME, new CompletionInitiatorAbortedHandler()) ;
+        registry.registerFaultHandler(new CompletionInitiatorSoapFaultHandler()) ;
+    }
+
+    /**
+     * Remove this policy from the registry.
+     * @param registry The registry containing the policy.
+     */
+    public static void remove(final HandlerRegistry registry)
+    {
+        registry.registerFaultHandler(null) ;
+        registry.removeBodyHandler(AtomicTransactionConstants.WSAT_ELEMENT_ABORTED_QNAME) ;
+        registry.removeBodyHandler(AtomicTransactionConstants.WSAT_ELEMENT_COMMITTED_QNAME) ;
+    }
+}


Property changes on: labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsat11/policy/CompletionInitiatorPolicy.java
___________________________________________________________________
Name: svn:keywords
   + Rev Date
Name: svn:eol-style
   + native

Added: labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsat11/policy/CoordinatorPolicy.java
===================================================================
--- labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsat11/policy/CoordinatorPolicy.java	                        (rev 0)
+++ labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsat11/policy/CoordinatorPolicy.java	2007-08-14 12:43:41 UTC (rev 14200)
@@ -0,0 +1,62 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag.  All rights reserved. 
+ * See the copyright.txt in the distribution for a full listing 
+ * of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU General Public License, v. 2.0.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A 
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+ * PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+ * You should have received a copy of the GNU General Public License,
+ * v. 2.0 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+ * MA  02110-1301, USA.
+ * 
+ * (C) 2005-2006,
+ * @author JBoss Inc.
+ */
+package com.arjuna.webservices.wsat11.policy;
+
+import com.arjuna.webservices.HandlerRegistry;
+import com.arjuna.webservices.wsat11.AtomicTransactionConstants;
+import com.arjuna.webservices.wsat11.handlers.CoordinatorAbortedHandler;
+import com.arjuna.webservices.wsat11.handlers.CoordinatorCommittedHandler;
+import com.arjuna.webservices.wsat11.handlers.CoordinatorSoapFaultHandler;
+import com.arjuna.webservices.wsat11.handlers.CoordinatorPreparedHandler;
+import com.arjuna.webservices.wsat11.handlers.CoordinatorReadOnlyHandler;
+
+/**
+ * Policy responsible for binding in the WS-AtomicTransaction coordinator handlers.
+ * @author kevin
+ */
+public class CoordinatorPolicy
+{
+    /**
+     * Add this policy to the registry.
+     * @param registry The registry containing the policy.
+     */
+    public static void register(final HandlerRegistry registry)
+    {
+        registry.registerBodyHandler(AtomicTransactionConstants.WSAT_ELEMENT_PREPARED_QNAME, new CoordinatorPreparedHandler()) ;
+        registry.registerBodyHandler(AtomicTransactionConstants.WSAT_ELEMENT_ABORTED_QNAME, new CoordinatorAbortedHandler()) ;
+        registry.registerBodyHandler(AtomicTransactionConstants.WSAT_ELEMENT_READ_ONLY_QNAME, new CoordinatorReadOnlyHandler()) ;
+        registry.registerBodyHandler(AtomicTransactionConstants.WSAT_ELEMENT_COMMITTED_QNAME, new CoordinatorCommittedHandler()) ;
+        registry.registerFaultHandler(new CoordinatorSoapFaultHandler()) ;
+    }
+
+    /**
+     * Remove this policy from the registry.
+     * @param registry The registry containing the policy.
+     */
+    public static void remove(final HandlerRegistry registry)
+    {
+        registry.registerFaultHandler(null) ;
+        registry.removeBodyHandler(AtomicTransactionConstants.WSAT_ELEMENT_COMMITTED_QNAME) ;
+        registry.removeBodyHandler(AtomicTransactionConstants.WSAT_ELEMENT_READ_ONLY_QNAME) ;
+        registry.removeBodyHandler(AtomicTransactionConstants.WSAT_ELEMENT_ABORTED_QNAME) ;
+        registry.removeBodyHandler(AtomicTransactionConstants.WSAT_ELEMENT_PREPARED_QNAME) ;
+    }
+}


Property changes on: labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsat11/policy/CoordinatorPolicy.java
___________________________________________________________________
Name: svn:keywords
   + Rev Date
Name: svn:eol-style
   + native

Added: labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsat11/policy/ParticipantPolicy.java
===================================================================
--- labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsat11/policy/ParticipantPolicy.java	                        (rev 0)
+++ labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsat11/policy/ParticipantPolicy.java	2007-08-14 12:43:41 UTC (rev 14200)
@@ -0,0 +1,59 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag.  All rights reserved. 
+ * See the copyright.txt in the distribution for a full listing 
+ * of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU General Public License, v. 2.0.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A 
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+ * PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+ * You should have received a copy of the GNU General Public License,
+ * v. 2.0 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+ * MA  02110-1301, USA.
+ * 
+ * (C) 2005-2006,
+ * @author JBoss Inc.
+ */
+package com.arjuna.webservices.wsat11.policy;
+
+import com.arjuna.webservices.HandlerRegistry;
+import com.arjuna.webservices.wsat11.AtomicTransactionConstants;
+import com.arjuna.webservices.wsat11.handlers.ParticipantCommitHandler;
+import com.arjuna.webservices.wsat11.handlers.ParticipantPrepareHandler;
+import com.arjuna.webservices.wsat11.handlers.ParticipantRollbackHandler;
+import com.arjuna.webservices.wsat11.handlers.ParticipantSoapFaultHandler;
+
+/**
+ * Policy responsible for binding in the WS-AtomicTransaction participant handlers.
+ * @author kevin
+ */
+public class ParticipantPolicy
+{
+    /**
+     * Add this policy to the registry.
+     * @param registry The registry containing the policy.
+     */
+    public static void register(final HandlerRegistry registry)
+    {
+        registry.registerBodyHandler(AtomicTransactionConstants.WSAT_ELEMENT_PREPARE_QNAME, new ParticipantPrepareHandler()) ;
+        registry.registerBodyHandler(AtomicTransactionConstants.WSAT_ELEMENT_COMMIT_QNAME, new ParticipantCommitHandler()) ;
+        registry.registerBodyHandler(AtomicTransactionConstants.WSAT_ELEMENT_ROLLBACK_QNAME, new ParticipantRollbackHandler()) ;
+        registry.registerFaultHandler(new ParticipantSoapFaultHandler()) ;
+    }
+
+    /**
+     * Remove this policy from the registry.
+     * @param registry The registry containing the policy.
+     */
+    public static void remove(final HandlerRegistry registry)
+    {
+        registry.registerFaultHandler(null) ;
+        registry.removeBodyHandler(AtomicTransactionConstants.WSAT_ELEMENT_ROLLBACK_QNAME) ;
+        registry.removeBodyHandler(AtomicTransactionConstants.WSAT_ELEMENT_COMMIT_QNAME) ;
+        registry.removeBodyHandler(AtomicTransactionConstants.WSAT_ELEMENT_PREPARE_QNAME) ;
+    }
+}


Property changes on: labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsat11/policy/ParticipantPolicy.java
___________________________________________________________________
Name: svn:keywords
   + Rev Date
Name: svn:eol-style
   + native

Added: labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsat11/processors/CompletionCoordinatorProcessor.java
===================================================================
--- labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsat11/processors/CompletionCoordinatorProcessor.java	                        (rev 0)
+++ labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsat11/processors/CompletionCoordinatorProcessor.java	2007-08-14 12:43:41 UTC (rev 14200)
@@ -0,0 +1,90 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag.  All rights reserved. 
+ * See the copyright.txt in the distribution for a full listing 
+ * of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU General Public License, v. 2.0.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A 
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+ * PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+ * You should have received a copy of the GNU General Public License,
+ * v. 2.0 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+ * MA  02110-1301, USA.
+ * 
+ * (C) 2005-2006,
+ * @author JBoss Inc.
+ */
+package com.arjuna.webservices.wsat11.processors;
+
+import com.arjuna.webservices.wsaddr2005.AddressingContext;
+import com.arjuna.webservices.wsjboss.JBossContext;
+import com.arjuna.webservices.wsat11.NotificationType;
+import com.arjuna.wst.CompletionCoordinatorParticipant;
+
+/**
+ * The Completion Coordinator processor.
+ * @author kevin
+ */
+public abstract class CompletionCoordinatorProcessor
+{
+    /**
+     * The coordinator processor.
+     */
+    private static CompletionCoordinatorProcessor PROCESSOR ;
+    
+    /**
+     * Get the processor.
+     * @return The processor.
+     */
+    public static synchronized CompletionCoordinatorProcessor getProcessor()
+    {
+        return PROCESSOR ;
+    }
+
+    /**
+     * Set the processor.
+     * @param processor The processor.
+     * @return The previous processor.
+     */
+    public static synchronized CompletionCoordinatorProcessor setProcessor(final CompletionCoordinatorProcessor processor)
+    {
+        final CompletionCoordinatorProcessor origProcessor = PROCESSOR ;
+        PROCESSOR = processor ;
+        return origProcessor ;
+    }
+
+    /**
+     * Activate the participant.
+     * @param participant The participant.
+     * @param identifier The identifier.
+     */
+    public abstract void activateParticipant(final CompletionCoordinatorParticipant participant, final String identifier) ;
+
+    /**
+     * Deactivate the participant.
+     * @param participant The participant.
+     */
+    public abstract void deactivateParticipant(final CompletionCoordinatorParticipant participant) ;
+
+    /**
+     * Commit.
+     * @param commit The commit notification.
+     * @param addressingContext The addressing context.
+     * @param jbossContext The jboss context.
+     */
+    public abstract void commit(final NotificationType commit, final AddressingContext addressingContext,
+        final JBossContext jbossContext) ;
+    
+    /**
+     * Rollback.
+     * @param rollback The rollback notification.
+     * @param addressingContext The addressing context.
+     * @param jbossContext The jboss context.
+     */
+    public abstract void rollback(final NotificationType rollback, final AddressingContext addressingContext,
+        final JBossContext jbossContext) ;
+}


Property changes on: labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsat11/processors/CompletionCoordinatorProcessor.java
___________________________________________________________________
Name: svn:keywords
   + Rev Date
Name: svn:eol-style
   + native

Added: labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsat11/processors/CompletionInitiatorCallback.java
===================================================================
--- labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsat11/processors/CompletionInitiatorCallback.java	                        (rev 0)
+++ labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsat11/processors/CompletionInitiatorCallback.java	2007-08-14 12:43:41 UTC (rev 14200)
@@ -0,0 +1,61 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag.  All rights reserved. 
+ * See the copyright.txt in the distribution for a full listing 
+ * of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU General Public License, v. 2.0.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A 
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+ * PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+ * You should have received a copy of the GNU General Public License,
+ * v. 2.0 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+ * MA  02110-1301, USA.
+ * 
+ * (C) 2005-2006,
+ * @author JBoss Inc.
+ */
+package com.arjuna.webservices.wsat11.processors;
+
+import com.arjuna.webservices.SoapFault;
+import com.arjuna.webservices.base.processors.Callback;
+import com.arjuna.webservices.wsaddr2005.AddressingContext;
+import com.arjuna.webservices.wsjboss.JBossContext;
+import com.arjuna.webservices.wsat11.NotificationType;
+
+/**
+ * The Completion Initiator callback.
+ * @author kevin
+ */
+public abstract class CompletionInitiatorCallback extends Callback
+{
+    /**
+     * An aborted response.
+     * @param aborted The aborted notification.
+     * @param addressingContext The addressing context.
+     * @param jbossContext The jboss context.
+     */
+    public abstract void aborted(final NotificationType aborted, final AddressingContext addressingContext,
+        final JBossContext jbossContext) ;
+    
+    /**
+     * A committed response.
+     * @param committed The committed notification.
+     * @param addressingContext The addressing context.
+     * @param jbossContext The jboss context.
+     */
+    public abstract void committed(final NotificationType committed, final AddressingContext addressingContext, 
+        final JBossContext jbossContext) ;
+    
+    /**
+     * A SOAP fault response.
+     * @param soapFault The SOAP fault.
+     * @param addressingContext The addressing context.
+     * @param jbossContext The jboss context.
+     */
+    public abstract void soapFault(final SoapFault soapFault, final AddressingContext addressingContext,
+        final JBossContext jbossContext) ;
+}


Property changes on: labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsat11/processors/CompletionInitiatorCallback.java
___________________________________________________________________
Name: svn:keywords
   + Rev Date
Name: svn:eol-style
   + native

Added: labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsat11/processors/CompletionInitiatorProcessor.java
===================================================================
--- labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsat11/processors/CompletionInitiatorProcessor.java	                        (rev 0)
+++ labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsat11/processors/CompletionInitiatorProcessor.java	2007-08-14 12:43:41 UTC (rev 14200)
@@ -0,0 +1,107 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag.  All rights reserved. 
+ * See the copyright.txt in the distribution for a full listing 
+ * of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU General Public License, v. 2.0.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A 
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+ * PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+ * You should have received a copy of the GNU General Public License,
+ * v. 2.0 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+ * MA  02110-1301, USA.
+ * 
+ * (C) 2005-2006,
+ * @author JBoss Inc.
+ */
+package com.arjuna.webservices.wsat11.processors;
+
+import com.arjuna.webservices.SoapFault;
+import com.arjuna.webservices.base.processors.Callback;
+import com.arjuna.webservices.wsaddr2005.AddressingContext;
+import com.arjuna.webservices.wsjboss.JBossContext;
+import com.arjuna.webservices.wsjboss.processor.BaseNotificationProcessor;
+import com.arjuna.webservices.wsat11.NotificationType;
+
+/**
+ * The Completion Initiator processor.
+ * @author kevin
+ */
+public class CompletionInitiatorProcessor extends BaseNotificationProcessor
+{
+    /**
+     * The initiator singleton.
+     */
+    private static final CompletionInitiatorProcessor PROCESSOR = new CompletionInitiatorProcessor() ;
+    
+    /**
+     * Get the processor singleton.
+     * @return The singleton.
+     */
+    public static CompletionInitiatorProcessor getProcessor()
+    {
+        return PROCESSOR ;
+    }
+
+    /**
+     * Handle an aborted response.
+     * @param aborted The aborted notification.
+     * @param addressingContext The addressing context.
+     * @param arjunaContext The arjuna context.
+     */
+    public void handleAborted(final NotificationType aborted, final AddressingContext addressingContext,
+        final JBossContext arjunaContext)
+    {
+        handleCallbacks(new CallbackExecutorAdapter() {
+            public void execute(final Callback callback) {
+                ((CompletionInitiatorCallback)callback).aborted(aborted, addressingContext, arjunaContext) ;
+            }
+        }, getIDs(addressingContext, arjunaContext)) ;
+    }
+    
+    /**
+     * Handle a committed response.
+     * @param committed The committed notification.
+     * @param addressingContext The addressing context.
+     * @param arjunaContext The arjuna context.
+     */
+    public void handleCommitted(final NotificationType committed, final AddressingContext addressingContext, 
+        final JBossContext arjunaContext)
+    {
+        handleCallbacks(new CallbackExecutorAdapter() {
+            public void execute(final Callback callback) {
+                ((CompletionInitiatorCallback)callback).committed(committed, addressingContext, arjunaContext) ;
+            }
+        }, getIDs(addressingContext, arjunaContext)) ;
+    }
+    
+    /**
+     * Handle a SOAP fault response.
+     * @param soapFault The SOAP fault.
+     * @param addressingContext The addressing context.
+     * @param arjunaContext The arjuna context.
+     */
+    public void handleSoapFault(final SoapFault soapFault, final AddressingContext addressingContext,
+        final JBossContext arjunaContext)
+    {
+        handleCallbacks(new CallbackExecutorAdapter() {
+            public void execute(final Callback callback) {
+                ((CompletionInitiatorCallback)callback).soapFault(soapFault, addressingContext, arjunaContext) ;
+            }
+        }, getIDs(addressingContext, arjunaContext)) ;
+    }
+
+    /**
+     * Register a callback for the specific instance identifier.
+     * @param instanceIdentifier The instance identifier.
+     * @param callback The callback for the response.
+     */
+    public void registerCallback(final String instanceIdentifier, final CompletionInitiatorCallback callback)
+    {
+        register(instanceIdentifier, callback) ;
+    }
+}


Property changes on: labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsat11/processors/CompletionInitiatorProcessor.java
___________________________________________________________________
Name: svn:keywords
   + Rev Date
Name: svn:eol-style
   + native

Added: labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsat11/processors/CoordinatorProcessor.java
===================================================================
--- labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsat11/processors/CoordinatorProcessor.java	                        (rev 0)
+++ labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsat11/processors/CoordinatorProcessor.java	2007-08-14 12:43:41 UTC (rev 14200)
@@ -0,0 +1,118 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag.  All rights reserved. 
+ * See the copyright.txt in the distribution for a full listing 
+ * of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU General Public License, v. 2.0.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A 
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+ * PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+ * You should have received a copy of the GNU General Public License,
+ * v. 2.0 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+ * MA  02110-1301, USA.
+ * 
+ * (C) 2005-2006,
+ * @author JBoss Inc.
+ */
+package com.arjuna.webservices.wsat11.processors;
+
+import com.arjuna.webservices.SoapFault;
+import com.arjuna.webservices.wsaddr2005.AddressingContext;
+import com.arjuna.webservices.wsjboss.JBossContext;
+import com.arjuna.webservices.wsat11.CoordinatorInboundEvents;
+import com.arjuna.webservices.wsat11.NotificationType;
+
+/**
+ * The Coordinator processor.
+ * @author kevin
+ */
+public abstract class CoordinatorProcessor
+{
+    /**
+     * The coordinator processor.
+     */
+    private static CoordinatorProcessor PROCESSOR ;
+    
+    /**
+     * Get the processor singleton.
+     * @return The singleton.
+     */
+    public static synchronized CoordinatorProcessor getProcessor()
+    {
+        return PROCESSOR ;
+    }
+    
+    /**
+     * Set the processor singleton.
+     * @param processor The processor.
+     * @return The previous singleton.
+     */
+    public static synchronized CoordinatorProcessor setProcessor(final CoordinatorProcessor processor)
+    {
+        final CoordinatorProcessor origProcessor = PROCESSOR ;
+        PROCESSOR = processor ;
+        return origProcessor ;
+    }
+    
+    /**
+     * Activate the coordinator.
+     * @param coordinator The coordinator.
+     * @param identifier The identifier.
+     */
+    public abstract void activateCoordinator(final CoordinatorInboundEvents coordinator, final String identifier) ;
+
+    /**
+     * Deactivate the coordinator.
+     * @param coordinator The coordinator.
+     */
+    public abstract void deactivateCoordinator(final CoordinatorInboundEvents coordinator) ;
+    
+    /**
+     * Aborted.
+     * @param aborted The aborted notification.
+     * @param addressingContext The addressing context.
+     * @param arjunaContext The arjuna context.
+     */
+    public abstract void aborted(final NotificationType aborted, final AddressingContext addressingContext,
+        final JBossContext arjunaContext) ;
+    
+    /**
+     * Committed.
+     * @param committed The committed notification.
+     * @param addressingContext The addressing context.
+     * @param arjunaContext The arjuna context.
+     */
+    public abstract void committed(final NotificationType committed, final AddressingContext addressingContext,
+        final JBossContext arjunaContext) ;
+    
+    /**
+     * Prepared.
+     * @param prepared The prepared notification.
+     * @param addressingContext The addressing context.
+     * @param arjunaContext The arjuna context.
+     */
+    public abstract void prepared(final NotificationType prepared, final AddressingContext addressingContext,
+        final JBossContext arjunaContext) ;
+    
+    /**
+     * Read only.
+     * @param readOnly The read only notification.
+     * @param addressingContext The addressing context.
+     * @param arjunaContext The arjuna context.
+     */
+    public abstract void readOnly(final NotificationType readOnly, final AddressingContext addressingContext,
+        final JBossContext arjunaContext) ;
+    
+    /**
+     * SOAP fault.
+     * @param soapFault The SOAP fault.
+     * @param addressingContext The addressing context.
+     * @param arjunaContext The arjuna context.
+     */
+    public abstract void soapFault(final SoapFault soapFault, final AddressingContext addressingContext,
+        final JBossContext arjunaContext) ;
+}


Property changes on: labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsat11/processors/CoordinatorProcessor.java
___________________________________________________________________
Name: svn:keywords
   + Rev Date
Name: svn:eol-style
   + native

Added: labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsat11/processors/ParticipantProcessor.java
===================================================================
--- labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsat11/processors/ParticipantProcessor.java	                        (rev 0)
+++ labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsat11/processors/ParticipantProcessor.java	2007-08-14 12:43:41 UTC (rev 14200)
@@ -0,0 +1,109 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag.  All rights reserved. 
+ * See the copyright.txt in the distribution for a full listing 
+ * of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU General Public License, v. 2.0.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A 
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+ * PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+ * You should have received a copy of the GNU General Public License,
+ * v. 2.0 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+ * MA  02110-1301, USA.
+ * 
+ * (C) 2005-2006,
+ * @author JBoss Inc.
+ */
+package com.arjuna.webservices.wsat11.processors;
+
+import com.arjuna.webservices.SoapFault;
+import com.arjuna.webservices.wsaddr2005.AddressingContext;
+import com.arjuna.webservices.wsjboss.JBossContext;
+import com.arjuna.webservices.wsat11.NotificationType;
+import com.arjuna.webservices.wsat11.ParticipantInboundEvents;
+
+/**
+ * The Participant processor.
+ * @author kevin
+ */
+public abstract class ParticipantProcessor
+{
+    /**
+     * The participant processor.
+     */
+    private static ParticipantProcessor PROCESSOR ;
+    
+    /**
+     * Get the processor.
+     * @return The processor.
+     */
+    public static synchronized ParticipantProcessor getProcessor()
+    {
+        return PROCESSOR ;
+    }
+
+    /**
+     * Set the processor.
+     * @param processor The processor.
+     * @return The previous processor.
+     */
+    public static synchronized ParticipantProcessor setProcessor(final ParticipantProcessor processor)
+    {
+        final ParticipantProcessor origProcessor = PROCESSOR ;
+        PROCESSOR = processor ;
+        return origProcessor ;
+    }
+    
+    /**
+     * Activate the participant.
+     * @param participant The participant.
+     * @param identifier The identifier.
+     */
+    public abstract void activateParticipant(final ParticipantInboundEvents participant, final String identifier) ;
+
+    /**
+     * Deactivate the participant.
+     * @param participant The participant.
+     */
+    public abstract void deactivateParticipant(final ParticipantInboundEvents participant) ;
+
+    /**
+     * Commit.
+     * @param commit The commit notification.
+     * @param addressingContext The addressing context.
+     * @param arjunaContext The arjuna context.
+     */
+    public abstract void commit(final NotificationType commit, final AddressingContext addressingContext,
+        final JBossContext arjunaContext) ;
+    
+    /**
+     * Prepare.
+     * @param prepare The prepare notification.
+     * @param addressingContext The addressing context.
+     * @param arjunaContext The arjuna context.
+     */
+    public abstract void prepare(final NotificationType prepare, final AddressingContext addressingContext,
+        final JBossContext arjunaContext) ;
+    
+    /**
+     * Rollback.
+     * @param rollback The rollback notification.
+     * @param addressingContext The addressing context.
+     * @param arjunaContext The arjuna context.
+     */
+    public abstract void rollback(final NotificationType rollback, final AddressingContext addressingContext,
+        final JBossContext arjunaContext) ;
+
+    /**
+     * SOAP Fault.
+     * @param soapFault The SOAP fault notification.
+     * @param addressingContext The addressing context.
+     * @param arjunaContext The arjuna context.
+     */
+    public abstract void soapFault(final SoapFault soapFault, final AddressingContext addressingContext,
+        final JBossContext arjunaContext) ;
+}


Property changes on: labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsat11/processors/ParticipantProcessor.java
___________________________________________________________________
Name: svn:keywords
   + Rev Date
Name: svn:eol-style
   + native

Added: labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsat11/server/CompletionCoordinatorInitialisation.java
===================================================================
--- labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsat11/server/CompletionCoordinatorInitialisation.java	                        (rev 0)
+++ labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsat11/server/CompletionCoordinatorInitialisation.java	2007-08-14 12:43:41 UTC (rev 14200)
@@ -0,0 +1,67 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag.  All rights reserved. 
+ * See the copyright.txt in the distribution for a full listing 
+ * of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU General Public License, v. 2.0.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A 
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+ * PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+ * You should have received a copy of the GNU General Public License,
+ * v. 2.0 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+ * MA  02110-1301, USA.
+ * 
+ * (C) 2005-2006,
+ * @author JBoss Inc.
+ */
+package com.arjuna.webservices.wsat11.server;
+
+import javax.servlet.ServletContextEvent;
+import javax.servlet.ServletContextListener;
+
+import com.arjuna.webservices.HandlerRegistry;
+import com.arjuna.webservices.SoapRegistry;
+import com.arjuna.webservices.SoapService;
+import com.arjuna.webservices.wsaddr2005.policy.AddressingPolicy;
+import com.arjuna.webservices.wsjboss.policy.JBossPolicy;
+import com.arjuna.webservices.wsat11.AtomicTransactionConstants;
+import com.arjuna.webservices.wsat11.policy.CompletionCoordinatorPolicy;
+
+/**
+ * Activate the Completion Coordinator service
+ * @author kevin
+ */
+public class CompletionCoordinatorInitialisation implements ServletContextListener
+{
+    /**
+     * The context has been initialized.
+     * @param servletContextEvent The servlet context event.
+     */
+    public void contextInitialized(final ServletContextEvent servletContextEvent)
+    {
+        final HandlerRegistry handlerRegistry = new HandlerRegistry() ;
+        
+        // Add WS-Addressing
+        AddressingPolicy.register(handlerRegistry) ;
+        // Add JBoss handlers
+        JBossPolicy.register(handlerRegistry) ;
+        // Add Completion coordinator.
+        CompletionCoordinatorPolicy.register(handlerRegistry) ;
+        
+        final SoapRegistry soapRegistry = SoapRegistry.getRegistry() ;
+        soapRegistry.registerSoapService(AtomicTransactionConstants.SERVICE_COMPLETION_COORDINATOR,
+            new SoapService(handlerRegistry)) ;
+    }
+
+    /**
+     * The context is about to be destroyed.
+     * @param servletContextEvent The servlet context event.
+     */
+    public void contextDestroyed(final ServletContextEvent servletContextEvent)
+    {
+    }
+}


Property changes on: labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsat11/server/CompletionCoordinatorInitialisation.java
___________________________________________________________________
Name: svn:keywords
   + Rev Date
Name: svn:eol-style
   + native

Added: labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsat11/server/CompletionInitiatorInitialisation.java
===================================================================
--- labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsat11/server/CompletionInitiatorInitialisation.java	                        (rev 0)
+++ labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsat11/server/CompletionInitiatorInitialisation.java	2007-08-14 12:43:41 UTC (rev 14200)
@@ -0,0 +1,67 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag.  All rights reserved. 
+ * See the copyright.txt in the distribution for a full listing 
+ * of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU General Public License, v. 2.0.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A 
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+ * PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+ * You should have received a copy of the GNU General Public License,
+ * v. 2.0 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+ * MA  02110-1301, USA.
+ * 
+ * (C) 2005-2006,
+ * @author JBoss Inc.
+ */
+package com.arjuna.webservices.wsat11.server;
+
+import javax.servlet.ServletContextEvent;
+import javax.servlet.ServletContextListener;
+
+import com.arjuna.webservices.HandlerRegistry;
+import com.arjuna.webservices.SoapRegistry;
+import com.arjuna.webservices.SoapService;
+import com.arjuna.webservices.wsaddr2005.policy.AddressingPolicy;
+import com.arjuna.webservices.wsjboss.policy.JBossPolicy;
+import com.arjuna.webservices.wsat11.AtomicTransactionConstants;
+import com.arjuna.webservices.wsat11.policy.CompletionInitiatorPolicy;
+
+/**
+ * Activate the Completion Initiator service
+ * @author kevin
+ */
+public class CompletionInitiatorInitialisation implements ServletContextListener
+{
+    /**
+     * The context has been initialized.
+     * @param servletContextEvent The servlet context event.
+     */
+    public void contextInitialized(final ServletContextEvent servletContextEvent)
+    {
+        final HandlerRegistry handlerRegistry = new HandlerRegistry() ;
+        
+        // Add WS-Addressing
+        AddressingPolicy.register(handlerRegistry) ;
+        // Add JBoss handlers
+        JBossPolicy.register(handlerRegistry) ;
+        // Add Completion initiator.
+        CompletionInitiatorPolicy.register(handlerRegistry) ;
+        
+        final SoapRegistry soapRegistry = SoapRegistry.getRegistry() ;
+        soapRegistry.registerSoapService(AtomicTransactionConstants.SERVICE_COMPLETION_INITIATOR,
+            new SoapService(handlerRegistry)) ;
+    }
+
+    /**
+     * The context is about to be destroyed.
+     * @param servletContextEvent The servlet context event.
+     */
+    public void contextDestroyed(final ServletContextEvent servletContextEvent)
+    {
+    }
+}


Property changes on: labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsat11/server/CompletionInitiatorInitialisation.java
___________________________________________________________________
Name: svn:keywords
   + Rev Date
Name: svn:eol-style
   + native

Added: labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsat11/server/CoordinatorInitialisation.java
===================================================================
--- labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsat11/server/CoordinatorInitialisation.java	                        (rev 0)
+++ labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsat11/server/CoordinatorInitialisation.java	2007-08-14 12:43:41 UTC (rev 14200)
@@ -0,0 +1,67 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag.  All rights reserved. 
+ * See the copyright.txt in the distribution for a full listing 
+ * of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU General Public License, v. 2.0.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A 
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+ * PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+ * You should have received a copy of the GNU General Public License,
+ * v. 2.0 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+ * MA  02110-1301, USA.
+ * 
+ * (C) 2005-2006,
+ * @author JBoss Inc.
+ */
+package com.arjuna.webservices.wsat11.server;
+
+import javax.servlet.ServletContextEvent;
+import javax.servlet.ServletContextListener;
+
+import com.arjuna.webservices.HandlerRegistry;
+import com.arjuna.webservices.SoapRegistry;
+import com.arjuna.webservices.SoapService;
+import com.arjuna.webservices.wsaddr2005.policy.AddressingPolicy;
+import com.arjuna.webservices.wsjboss.policy.JBossPolicy;
+import com.arjuna.webservices.wsat11.AtomicTransactionConstants;
+import com.arjuna.webservices.wsat11.policy.CoordinatorPolicy;
+
+/**
+ * Activate the Coordinator service
+ * @author kevin
+ */
+public class CoordinatorInitialisation implements ServletContextListener
+{
+    /**
+     * The context has been initialized.
+     * @param servletContextEvent The servlet context event.
+     */
+    public void contextInitialized(final ServletContextEvent servletContextEvent)
+    {
+        final HandlerRegistry handlerRegistry = new HandlerRegistry() ;
+        
+        // Add WS-Addressing
+        AddressingPolicy.register(handlerRegistry) ;
+        // Add JBoss handlers
+        JBossPolicy.register(handlerRegistry) ;
+        // Add coordinator.
+        CoordinatorPolicy.register(handlerRegistry) ;
+        
+        final SoapRegistry soapRegistry = SoapRegistry.getRegistry() ;
+        soapRegistry.registerSoapService(AtomicTransactionConstants.SERVICE_COORDINATOR,
+            new SoapService(handlerRegistry)) ;
+    }
+
+    /**
+     * The context is about to be destroyed.
+     * @param servletContextEvent The servlet context event.
+     */
+    public void contextDestroyed(final ServletContextEvent servletContextEvent)
+    {
+    }
+}


Property changes on: labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsat11/server/CoordinatorInitialisation.java
___________________________________________________________________
Name: svn:keywords
   + Rev Date
Name: svn:eol-style
   + native

Added: labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsat11/server/ParticipantInitialisation.java
===================================================================
--- labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsat11/server/ParticipantInitialisation.java	                        (rev 0)
+++ labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsat11/server/ParticipantInitialisation.java	2007-08-14 12:43:41 UTC (rev 14200)
@@ -0,0 +1,67 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag.  All rights reserved. 
+ * See the copyright.txt in the distribution for a full listing 
+ * of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU General Public License, v. 2.0.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A 
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+ * PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+ * You should have received a copy of the GNU General Public License,
+ * v. 2.0 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+ * MA  02110-1301, USA.
+ * 
+ * (C) 2005-2006,
+ * @author JBoss Inc.
+ */
+package com.arjuna.webservices.wsat11.server;
+
+import javax.servlet.ServletContextEvent;
+import javax.servlet.ServletContextListener;
+
+import com.arjuna.webservices.HandlerRegistry;
+import com.arjuna.webservices.SoapRegistry;
+import com.arjuna.webservices.SoapService;
+import com.arjuna.webservices.wsaddr2005.policy.AddressingPolicy;
+import com.arjuna.webservices.wsjboss.policy.JBossPolicy;
+import com.arjuna.webservices.wsat11.AtomicTransactionConstants;
+import com.arjuna.webservices.wsat11.policy.ParticipantPolicy;
+
+/**
+ * Activate the Participant service
+ * @author kevin
+ */
+public class ParticipantInitialisation implements ServletContextListener
+{
+    /**
+     * The context has been initialized.
+     * @param servletContextEvent The servlet context event.
+     */
+    public void contextInitialized(final ServletContextEvent servletContextEvent)
+    {
+        final HandlerRegistry handlerRegistry = new HandlerRegistry() ;
+        
+        // Add WS-Addressing
+        AddressingPolicy.register(handlerRegistry) ;
+        // Add JBoss handlers
+        JBossPolicy.register(handlerRegistry) ;
+        // Add Participant.
+        ParticipantPolicy.register(handlerRegistry) ;
+        
+        final SoapRegistry soapRegistry = SoapRegistry.getRegistry() ;
+        soapRegistry.registerSoapService(AtomicTransactionConstants.SERVICE_PARTICIPANT,
+            new SoapService(handlerRegistry)) ;
+    }
+
+    /**
+     * The context is about to be destroyed.
+     * @param servletContextEvent The servlet context event.
+     */
+    public void contextDestroyed(final ServletContextEvent servletContextEvent)
+    {
+    }
+}


Property changes on: labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsat11/server/ParticipantInitialisation.java
___________________________________________________________________
Name: svn:keywords
   + Rev Date
Name: svn:eol-style
   + native

Added: labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsat11/wsat.xsd
===================================================================
--- labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsat11/wsat.xsd	                        (rev 0)
+++ labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsat11/wsat.xsd	2007-08-14 12:43:41 UTC (rev 14200)
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- 
+OASIS takes no position regarding the validity or scope of any intellectual property or other rights that might be claimed to pertain to the implementation or use of the technology described in this document or the extent to which any license under such rights might or might not be available; neither does it represent that it has made any effort to identify any such rights. Information on OASIS's procedures with respect to rights in OASIS specifications can be found at the OASIS website. Copies of claims of rights made available for publication and any assurances of licenses to be made available, or the result of an attempt made to obtain a general license or permission for the use of such proprietary rights by implementors or users of this specification, can be obtained from the OASIS President.
+OASIS invites any interested party to bring to its attention any copyrights, patents or patent applications, or other proprietary rights which may cover technology that may be required to implement this specification. Please address the information to the OASIS President.
+Copyright OASIS Open 2006. All Rights Reserved.
+This document and translations of it may be copied and furnished to others, and derivative works that comment on or otherwise explain it or assist in its implementation may be prepared, copied, published and distributed, in whole or in part, without restriction of any kind, provided that the above copyright notice and this paragraph are included on all such copies and derivative works. However, this document itself does not be modified in any way, such as by removing the copyright notice or references to OASIS, except as needed for the purpose of developing OASIS specifications, in which case the procedures for copyrights defined in the OASIS Intellectual Property Rights document must be followed, or as required to translate it into languages other than English.
+The limited permissions granted above are perpetual and will not be revoked by OASIS or its successors or assigns.
+This document and the information contained herein is provided on an "AS IS" basis and OASIS DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
+-->
+<xsd:schema targetNamespace="http://docs.oasis-open.org/ws-tx/wsat/2006/06" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:wsat="http://docs.oasis-open.org/ws-tx/wsat/2006/06" elementFormDefault="qualified" attributeFormDefault="unqualified" version="1.0">
+    <xsd:complexType name="Notification">
+        <xsd:sequence>
+            <xsd:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
+        </xsd:sequence>
+        <xsd:anyAttribute namespace="##other" processContents="lax"/>
+    </xsd:complexType>
+    <xsd:element name="Prepare" type="wsat:Notification"/>
+    <xsd:element name="Prepared" type="wsat:Notification"/>
+    <xsd:element name="Aborted" type="wsat:Notification"/>
+    <xsd:element name="ReadOnly" type="wsat:Notification"/>
+    <xsd:element name="Commit" type="wsat:Notification"/>
+    <xsd:element name="Rollback" type="wsat:Notification"/>
+    <xsd:element name="Committed" type="wsat:Notification"/>
+    <xsd:simpleType name="ErrorCodes">
+        <xsd:restriction base="xsd:QName">
+            <xsd:enumeration value="wsat:InconsistentInternalState"/>
+            <xsd:enumeration value="wsat:UnknownTransaction"/>
+        </xsd:restriction>
+    </xsd:simpleType>
+    
+    <!-- Policy assertions -->
+    <xsd:element name="ATAssertion">
+        <xsd:complexType>
+            <xsd:sequence>
+                <xsd:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded" />
+            </xsd:sequence>
+            <xsd:anyAttribute namespace="##other" processContents="lax" />
+        </xsd:complexType>
+    </xsd:element>
+    <xsd:element name="ATAlwaysCapability">
+        <xsd:complexType>
+            <xsd:anyAttribute namespace="##other" processContents="lax" />
+        </xsd:complexType>
+    </xsd:element>
+</xsd:schema>


Property changes on: labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsat11/wsat.xsd
___________________________________________________________________
Name: svn:mime-type
   + text/xml
Name: svn:keywords
   + Rev Date
Name: svn:eol-style
   + native

Added: labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/BusinessActivityConstants.java
===================================================================
--- labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/BusinessActivityConstants.java	                        (rev 0)
+++ labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/BusinessActivityConstants.java	2007-08-14 12:43:41 UTC (rev 14200)
@@ -0,0 +1,289 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag.  All rights reserved. 
+ * See the copyright.txt in the distribution for a full listing 
+ * of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU General Public License, v. 2.0.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A 
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+ * PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+ * You should have received a copy of the GNU General Public License,
+ * v. 2.0 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+ * MA  02110-1301, USA.
+ * 
+ * (C) 2005-2006,
+ * @author JBoss Inc.
+ */
+package com.arjuna.webservices.wsba11;
+
+import javax.xml.namespace.QName;
+
+/**
+ * Interface containing WS-BusinessActivity constants.
+ */
+public interface BusinessActivityConstants
+{
+    /**
+     * The coordinator completion coordinator service name.
+     */
+    public String SERVICE_COORDINATOR_COMPLETION_COORDINATOR = "BA11CoordinatorCompletionCoordinator" ;
+    /**
+     * The coordinator completion participant service name.
+     */
+    public String SERVICE_COORDINATOR_COMPLETION_PARTICIPANT = "BA11CoordinatorCompletionParticipant" ;
+    /**
+     * The participant completion coordinator service name.
+     */
+    public String SERVICE_PARTICIPANT_COMPLETION_COORDINATOR = "BA11ParticipantCompletionCoordinator" ;
+    /**
+     * The participant completion participant service name.
+     */
+    public String SERVICE_PARTICIPANT_COMPLETION_PARTICIPANT = "BA11ParticipantCompletionParticipant" ;
+    /**
+     * The Namespace.
+     */
+    public String WSBA_NAMESPACE = "http://docs.oasis-open.org/ws-tx/wsba/2006/06" ;
+    /**
+     * The namespace prefix.
+     */
+    public String WSBA_PREFIX = "wsba" ;
+    
+    /**
+     * The ExceptionIdentifier element.
+     */
+    public String WSBA_ELEMENT_EXCEPTION_IDENTIFIER = "ExceptionIdentifier" ;
+    /**
+     * The ExceptionIdentifier QName.
+     */
+    public QName WSBA_ELEMENT_EXCEPTION_IDENTIFIER_QNAME = new QName(WSBA_NAMESPACE, WSBA_ELEMENT_EXCEPTION_IDENTIFIER, WSBA_PREFIX) ;
+    
+    // Coordinator elements
+    
+    /**
+     * The Canceled element.
+     */
+    public String WSBA_ELEMENT_CANCELLED = "Canceled" ;
+    /**
+     * The Canceled QName.
+     */
+    public QName WSBA_ELEMENT_CANCELLED_QNAME = new QName(WSBA_NAMESPACE, WSBA_ELEMENT_CANCELLED, WSBA_PREFIX) ;
+    /**
+     * The Canceled Action.
+     */
+    public String WSBA_ACTION_CANCELLED = WSBA_NAMESPACE + "/" + WSBA_ELEMENT_CANCELLED ;
+    /**
+     * The Closed element.
+     */
+    public String WSBA_ELEMENT_CLOSED = "Closed" ;
+    /**
+     * The Closed QName.
+     */
+    public QName WSBA_ELEMENT_CLOSED_QNAME = new QName(WSBA_NAMESPACE, WSBA_ELEMENT_CLOSED, WSBA_PREFIX) ;
+    /**
+     * The Closed Action.
+     */
+    public String WSBA_ACTION_CLOSED = WSBA_NAMESPACE + "/" + WSBA_ELEMENT_CLOSED ;
+    /**
+     * The Compensated element.
+     */
+    public String WSBA_ELEMENT_COMPENSATED = "Compensated" ;
+    /**
+     * The Compensated QName.
+     */
+    public QName WSBA_ELEMENT_COMPENSATED_QNAME = new QName(WSBA_NAMESPACE, WSBA_ELEMENT_COMPENSATED, WSBA_PREFIX) ;
+    /**
+     * The Compensated Action.
+     */
+    public String WSBA_ACTION_COMPENSATED = WSBA_NAMESPACE + "/" + WSBA_ELEMENT_COMPENSATED ;
+    /**
+     * The Completed element.
+     */
+    public String WSBA_ELEMENT_COMPLETED = "Completed" ;
+    /**
+     * The Completed QName.
+     */
+    public QName WSBA_ELEMENT_COMPLETED_QNAME = new QName(WSBA_NAMESPACE, WSBA_ELEMENT_COMPLETED, WSBA_PREFIX) ;
+    /**
+     * The Completed Action.
+     */
+    public String WSBA_ACTION_COMPLETED = WSBA_NAMESPACE + "/" + WSBA_ELEMENT_COMPLETED ;
+    /**
+     * The Exit element.
+     */
+    public String WSBA_ELEMENT_EXIT = "Exit" ;
+    /**
+     * The Exit QName.
+     */
+    public QName WSBA_ELEMENT_EXIT_QNAME = new QName(WSBA_NAMESPACE, WSBA_ELEMENT_EXIT, WSBA_PREFIX) ;
+    /**
+     * The Exit Action.
+     */
+    public String WSBA_ACTION_EXIT = WSBA_NAMESPACE + "/" + WSBA_ELEMENT_EXIT ;
+    /**
+     * The CannotComplete element.
+     */
+    public String WSBA_ELEMENT_CANNOT_COMPLETE = "CannotComplete" ;
+    /**
+     * The CannotComplete QName.
+     */
+    public QName WSBA_ELEMENT_CANNOT_COMPLETE_QNAME = new QName(WSBA_NAMESPACE, WSBA_ELEMENT_CANNOT_COMPLETE, WSBA_PREFIX) ;
+    /**
+     * The CannotComplete Action.
+     */
+    public String WSBA_ACTION_CANNOT_COMPLETE = WSBA_NAMESPACE + "/" + WSBA_ELEMENT_CANNOT_COMPLETE ;
+    /**
+     * The Fail element.
+     */
+    public String WSBA_ELEMENT_FAIL = "Fail" ;
+    /**
+     * The Fail QName.
+     */
+    public QName WSBA_ELEMENT_FAIL_QNAME = new QName(WSBA_NAMESPACE, WSBA_ELEMENT_FAIL, WSBA_PREFIX) ;
+    /**
+     * The Fail Action.
+     */
+    public String WSBA_ACTION_FAIL = WSBA_NAMESPACE + "/" + WSBA_ELEMENT_FAIL ;
+
+    // Participant elements
+    
+    /**
+     * The Cancel element.
+     */
+    public String WSBA_ELEMENT_CANCEL = "Cancel" ;
+    /**
+     * The Cancel QName.
+     */
+    public QName WSBA_ELEMENT_CANCEL_QNAME = new QName(WSBA_NAMESPACE, WSBA_ELEMENT_CANCEL, WSBA_PREFIX) ;
+    /**
+     * The Cancel Action.
+     */
+    public String WSBA_ACTION_CANCEL = WSBA_NAMESPACE + "/" + WSBA_ELEMENT_CANCEL ;
+    /**
+     * The Close element.
+     */
+    public String WSBA_ELEMENT_CLOSE = "Close" ;
+    /**
+     * The Close QName.
+     */
+    public QName WSBA_ELEMENT_CLOSE_QNAME = new QName(WSBA_NAMESPACE, WSBA_ELEMENT_CLOSE, WSBA_PREFIX) ;
+    /**
+     * The Close Action.
+     */
+    public String WSBA_ACTION_CLOSE = WSBA_NAMESPACE + "/" + WSBA_ELEMENT_CLOSE ;
+    /**
+     * The Compensate element.
+     */
+    public String WSBA_ELEMENT_COMPENSATE = "Compensate" ;
+    /**
+     * The Compensate QName.
+     */
+    public QName WSBA_ELEMENT_COMPENSATE_QNAME = new QName(WSBA_NAMESPACE, WSBA_ELEMENT_COMPENSATE, WSBA_PREFIX) ;
+    /**
+     * The Compensate Action.
+     */
+    public String WSBA_ACTION_COMPENSATE = WSBA_NAMESPACE + "/" + WSBA_ELEMENT_COMPENSATE ;
+    /**
+     * The Complete element.
+     */
+    public String WSBA_ELEMENT_COMPLETE = "Complete" ;
+    /**
+     * The Complete QName.
+     */
+    public QName WSBA_ELEMENT_COMPLETE_QNAME = new QName(WSBA_NAMESPACE, WSBA_ELEMENT_COMPLETE, WSBA_PREFIX) ;
+    /**
+     * The Complete Action.
+     */
+    public String WSBA_ACTION_COMPLETE = WSBA_NAMESPACE + "/" + WSBA_ELEMENT_COMPLETE ;
+    /**
+     * The Failed element.
+     */
+    public String WSBA_ELEMENT_FAILED = "Failed" ;
+    /**
+     * The Failed QName.
+     */
+    public QName WSBA_ELEMENT_FAILED_QNAME = new QName(WSBA_NAMESPACE, WSBA_ELEMENT_FAILED, WSBA_PREFIX) ;
+    /**
+     * The Failed Action.
+     */
+    public String WSBA_ACTION_FAILED = WSBA_NAMESPACE + "/" + WSBA_ELEMENT_FAILED ;
+    /**
+     * The NotCompleted element.
+     */
+    public String WSBA_ELEMENT_NOT_COMPLETED = "NotCompleted" ;
+    /**
+     * The NotCompleted QName.
+     */
+    public QName WSBA_ELEMENT_NOT_COMPLETED_QNAME = new QName(WSBA_NAMESPACE, WSBA_ELEMENT_NOT_COMPLETED, WSBA_PREFIX) ;
+    /**
+     * The NotCompleted Action.
+     */
+    public String WSBA_ACTION_NOT_COMPLETED = WSBA_NAMESPACE + "/" + WSBA_ELEMENT_NOT_COMPLETED ;
+    /**
+     * The Exited element.
+     */
+    public String WSBA_ELEMENT_EXITED = "Exited" ;
+    /**
+     * The Exited QName.
+     */
+    public QName WSBA_ELEMENT_EXITED_QNAME = new QName(WSBA_NAMESPACE, WSBA_ELEMENT_EXITED, WSBA_PREFIX) ;
+    /**
+     * The Exited Action.
+     */
+    public String WSBA_ACTION_EXITED = WSBA_NAMESPACE + "/" + WSBA_ELEMENT_EXITED ;
+    
+    // Elements for both
+    
+    /**
+     * The GetStatus element.
+     */
+    public String WSBA_ELEMENT_GET_STATUS = "GetStatus" ;
+    /**
+     * The GetStatus QName.
+     */
+    public QName WSBA_ELEMENT_GET_STATUS_QNAME = new QName(WSBA_NAMESPACE, WSBA_ELEMENT_GET_STATUS, WSBA_PREFIX) ;
+    /**
+     * The GetStatus Action.
+     */
+    public String WSBA_ACTION_GET_STATUS = WSBA_NAMESPACE + "/" + WSBA_ELEMENT_GET_STATUS ;
+    /**
+     * The State element.
+     */
+    public String WSBA_ELEMENT_STATE = "State" ;
+    /**
+     * The State QName.
+     */
+    public QName WSBA_ELEMENT_STATE_QNAME = new QName(WSBA_NAMESPACE, WSBA_ELEMENT_STATE, WSBA_PREFIX) ;
+    /**
+     * The Status element.
+     */
+    public String WSBA_ELEMENT_STATUS = "Status" ;
+    /**
+     * The Status QName.
+     */
+    public QName WSBA_ELEMENT_STATUS_QNAME = new QName(WSBA_NAMESPACE, WSBA_ELEMENT_STATUS, WSBA_PREFIX) ;
+    /**
+     * The Status Action.
+     */
+    public String WSBA_ACTION_STATUS = WSBA_NAMESPACE + "/" + WSBA_ELEMENT_STATUS ;
+    
+    /**
+     * The business activity atomic outcome protocol.
+     */
+    public String WSBA_PROTOCOL_ATOMIC_OUTCOME = WSBA_NAMESPACE + "/AtomicOutcome" ;
+    /**
+     * The business activity mixed outcome protocol.
+     */
+    public String WSBA_PROTOCOL_MIXED_OUTCOME = WSBA_NAMESPACE + "/MixedOutcome" ;
+    /**
+     * The participant completion protocol.
+     */
+    public String WSBA_SUB_PROTOCOL_PARTICIPANT_COMPLETION = WSBA_NAMESPACE + "/ParticipantCompletion" ;
+    /**
+     * The coordinator completion protocol.
+     */
+    public String WSBA_SUB_PROTOCOL_COORDINATOR_COMPLETION = WSBA_NAMESPACE + "/CoordinatorCompletion" ;
+}


Property changes on: labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/BusinessActivityConstants.java
___________________________________________________________________
Name: svn:keywords
   + Rev Date
Name: svn:eol-style
   + native

Added: labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/CoordinatorCompletionCoordinatorInboundEvents.java
===================================================================
--- labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/CoordinatorCompletionCoordinatorInboundEvents.java	                        (rev 0)
+++ labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/CoordinatorCompletionCoordinatorInboundEvents.java	2007-08-14 12:43:41 UTC (rev 14200)
@@ -0,0 +1,115 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag.  All rights reserved. 
+ * See the copyright.txt in the distribution for a full listing 
+ * of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU General Public License, v. 2.0.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A 
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+ * PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+ * You should have received a copy of the GNU General Public License,
+ * v. 2.0 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+ * MA  02110-1301, USA.
+ * 
+ * (C) 2005-2006,
+ * @author JBoss Inc.
+ */
+package com.arjuna.webservices.wsba11;
+
+import com.arjuna.webservices.SoapFault;
+import com.arjuna.webservices.wsaddr2005.AddressingContext;
+import com.arjuna.webservices.wsjboss.JBossContext;
+
+
+/**
+ * The Participant events.
+ */
+public interface CoordinatorCompletionCoordinatorInboundEvents
+{
+    /**
+     * Handle the cancelled event.
+     * @param cancelled The cancelled notification.
+     * @param addressingContext The addressing context.
+     * @param jbossContext The jboss context.
+     */
+    public void cancelled(final NotificationType cancelled, final AddressingContext addressingContext, final JBossContext jbossContext) ;
+    
+    /**
+     * Handle the closed event.
+     * @param closed The closed notification.
+     * @param addressingContext The addressing context.
+     * @param jbossContext The jboss context.
+     */
+    public void closed(final NotificationType closed, final AddressingContext addressingContext, final JBossContext jbossContext) ;
+    
+    /**
+     * Handle the compensated event.
+     * @param compensated The compensated notification.
+     * @param addressingContext The addressing context.
+     * @param jbossContext The jboss context.
+     */
+    public void compensated(final NotificationType compensated, final AddressingContext addressingContext, final JBossContext jbossContext) ;
+    
+    /**
+     * Handle the completed event.
+     * @param completed The completed notification.
+     * @param addressingContext The addressing context.
+     * @param jbossContext The jboss context.
+     */
+    public void completed(final NotificationType completed, final AddressingContext addressingContext,
+        final JBossContext jbossContext) ;
+    
+    /**
+     * Handle the exit event.
+     * @param exit The exit notification.
+     * @param addressingContext The addressing context.
+     * @param jbossContext The jboss context.
+     */
+    public void exit(final NotificationType exit, final AddressingContext addressingContext, final JBossContext jbossContext) ;
+    
+    /**
+     * Handle the fail event.
+     * @param fail The fail exception.
+     * @param addressingContext The addressing context.
+     * @param jbossContext The jboss context.
+     */
+    public void fail(final ExceptionType fail, final AddressingContext addressingContext,
+        final JBossContext jbossContext) ;
+    
+    /**
+     * Handle the cannot complete event.
+     * @param cannotComplete The cannotComplete exception.
+     * @param addressingContext The addressing context.
+     * @param jbossContext The jboss context.
+     */
+    public void cannotComplete(final NotificationType cannotComplete, final AddressingContext addressingContext,
+        final JBossContext jbossContext) ;
+    
+    /**
+     * Handle the getStatus event.
+     * @param getStatus The getStatus notification.
+     * @param addressingContext The addressing context.
+     * @param jbossContext The jboss context.
+     */
+    public void getStatus(final NotificationType getStatus, final AddressingContext addressingContext, final JBossContext jbossContext) ;
+    
+    /**
+     * Handle the status event.
+     * @param status The status.
+     * @param addressingContext The addressing context.
+     * @param jbossContext The jboss context.
+     */
+    public void status(final StatusType status, final AddressingContext addressingContext, final JBossContext jbossContext) ;
+    
+    /**
+     * Handle the SOAP fault event.
+     * @param soapFault The SOAP fault.
+     * @param addressingContext The addressing context.
+     * @param jbossContext The jboss context.
+     */
+    public void soapFault(final SoapFault soapFault, final AddressingContext addressingContext, final JBossContext jbossContext) ;
+}


Property changes on: labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/CoordinatorCompletionCoordinatorInboundEvents.java
___________________________________________________________________
Name: svn:keywords
   + Rev Date
Name: svn:eol-style
   + native

Added: labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/CoordinatorCompletionParticipantInboundEvents.java
===================================================================
--- labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/CoordinatorCompletionParticipantInboundEvents.java	                        (rev 0)
+++ labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/CoordinatorCompletionParticipantInboundEvents.java	2007-08-14 12:43:41 UTC (rev 14200)
@@ -0,0 +1,112 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag.  All rights reserved. 
+ * See the copyright.txt in the distribution for a full listing 
+ * of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU General Public License, v. 2.0.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A 
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+ * PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+ * You should have received a copy of the GNU General Public License,
+ * v. 2.0 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+ * MA  02110-1301, USA.
+ * 
+ * (C) 2005-2006,
+ * @author JBoss Inc.
+ */
+package com.arjuna.webservices.wsba11;
+
+import com.arjuna.webservices.SoapFault;
+import com.arjuna.webservices.wsaddr2005.AddressingContext;
+import com.arjuna.webservices.wsjboss.JBossContext;
+
+
+/**
+ * The Participant events.
+ */
+public interface CoordinatorCompletionParticipantInboundEvents
+{
+    /**
+     * Handle the cancel event.
+     * @param cancel The cancel notification.
+     * @param addressingContext The addressing context.
+     * @param jbossContext The jboss context.
+     */
+    public void cancel(final NotificationType cancel, final AddressingContext addressingContext, final JBossContext jbossContext) ;
+    
+    /**
+     * Handle the close event.
+     * @param close The close notification.
+     * @param addressingContext The addressing context.
+     * @param jbossContext The jboss context.
+     */
+    public void close(final NotificationType close, final AddressingContext addressingContext, final JBossContext jbossContext) ;
+    
+    /**
+     * Handle the compensate event.
+     * @param compensate The compensate notification.
+     * @param addressingContext The addressing context.
+     * @param jbossContext The jboss context.
+     */
+    public void compensate(final NotificationType compensate, final AddressingContext addressingContext, final JBossContext jbossContext) ;
+    
+    /**
+     * Handle the complete event.
+     * @param complete The complete notification.
+     * @param addressingContext The addressing context.
+     * @param jbossContext The jboss context.
+     */
+    public void complete(final NotificationType complete, final AddressingContext addressingContext, final JBossContext jbossContext) ;
+    
+    /**
+     * Handle the exited event.
+     * @param exited The exited notification.
+     * @param addressingContext The addressing context.
+     * @param jbossContext The jboss context.
+     */
+    public void exited(final NotificationType exited, final AddressingContext addressingContext, final JBossContext jbossContext) ;
+    
+    /**
+     * Handle the failed event.
+     * @param failed The failed notification.
+     * @param addressingContext The addressing context.
+     * @param jbossContext The jboss context.
+     */
+    public void failed(final NotificationType failed, final AddressingContext addressingContext, final JBossContext jbossContext) ;
+    
+    /**
+     * Handle the not completed event.
+     * @param notCompleted The notCompleted notification.
+     * @param addressingContext The addressing context.
+     * @param jbossContext The jboss context.
+     */
+    public void notCompleted(final NotificationType notCompleted, final AddressingContext addressingContext, final JBossContext jbossContext) ;
+    
+    /**
+     * Handle the getStatus event.
+     * @param getStatus The getStatus notification.
+     * @param addressingContext The addressing context.
+     * @param jbossContext The jboss context.
+     */
+    public void getStatus(final NotificationType getStatus, final AddressingContext addressingContext, final JBossContext jbossContext) ;
+    
+    /**
+     * Handle the status event.
+     * @param status The status type.
+     * @param addressingContext The addressing context.
+     * @param jbossContext The jboss context.
+     */
+    public void status(final StatusType status, final AddressingContext addressingContext, final JBossContext jbossContext) ;
+    
+    /**
+     * Handle the SOAP fault event.
+     * @param soapFault The SOAP fault.
+     * @param addressingContext The addressing context.
+     * @param jbossContext The jboss context.
+     */
+    public void soapFault(final SoapFault soapFault, final AddressingContext addressingContext, final JBossContext jbossContext) ;
+}


Property changes on: labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/CoordinatorCompletionParticipantInboundEvents.java
___________________________________________________________________
Name: svn:keywords
   + Rev Date
Name: svn:eol-style
   + native

Added: labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/ExceptionIdentifierType.java
===================================================================
--- labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/ExceptionIdentifierType.java	                        (rev 0)
+++ labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/ExceptionIdentifierType.java	2007-08-14 12:43:41 UTC (rev 14200)
@@ -0,0 +1,132 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag.  All rights reserved. 
+ * See the copyright.txt in the distribution for a full listing 
+ * of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU General Public License, v. 2.0.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A 
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+ * PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+ * You should have received a copy of the GNU General Public License,
+ * v. 2.0 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+ * MA  02110-1301, USA.
+ * 
+ * (C) 2005-2006,
+ * @author JBoss Inc.
+ */
+package com.arjuna.webservices.wsba11;
+
+import javax.xml.namespace.NamespaceContext;
+import javax.xml.namespace.QName;
+import javax.xml.stream.XMLStreamException;
+import javax.xml.stream.XMLStreamReader;
+import javax.xml.stream.XMLStreamWriter;
+
+import com.arjuna.webservices.logging.WSTLogger;
+import com.arjuna.webservices.stax.ElementContent;
+import com.arjuna.webservices.util.QNameHelper;
+import com.arjuna.webservices.util.StreamHelper;
+
+/**
+ * Representation of an ExceptionIdentifier element.
+ * @author kevin
+ */
+class ExceptionIdentifierType extends ElementContent
+{
+    /**
+     * The exception identifier.
+     */
+    private QName exceptionIdentifier ;
+    
+    /**
+     * Construct the exception identifier with the specified identifier.
+     * @param exceptionIdentifier The exception identifier.
+     */
+    ExceptionIdentifierType(final QName exceptionIdentifier)
+    {
+        this.exceptionIdentifier = exceptionIdentifier ;
+    }
+    
+    /**
+     * Construct the ExceptionIdentifier from the input stream.
+     * @param in The input stream.
+     * @throws XMLStreamException for parsing errors.
+     */
+    ExceptionIdentifierType(final XMLStreamReader in)
+        throws XMLStreamException
+    {
+        parse(in) ;
+    }
+    
+    /**
+     * Add the element.
+     * @param in The current input stream.
+     * @param elementName The qualified element name.
+     */
+    protected void putElement(final XMLStreamReader in,
+        final QName elementName)
+        throws XMLStreamException
+    {
+        throw new XMLStreamException("ExceptionIdentifier elements cannot have embedded elements.") ;
+    }
+    
+    /**
+     * Set the exception identifier of this element.
+     * @param exceptionIdentifier The exception identifier of the element.
+     */
+    void setExceptionIdentifier(final QName exceptionIdentifier)
+    {
+        this.exceptionIdentifier = exceptionIdentifier ;
+    }
+    
+    /**
+     * Get the exception identifier of this element.
+     * @return The exception identifier of the element or null if not set.
+     */
+    QName getExceptionIdentifier()
+    {
+        return exceptionIdentifier ;
+    }
+    
+    /**
+     * Set the text value of this element.
+     * @param in The current input stream.
+     * @param value The text value of this element.
+     */
+    protected void putValue(final XMLStreamReader in, final String value)
+        throws XMLStreamException
+    {
+        final NamespaceContext namespaceContext = in.getNamespaceContext() ;
+        setExceptionIdentifier(QNameHelper.toQName(namespaceContext, value)) ;
+    }
+    
+    /**
+     * Write the child content of the element.
+     * @param out The output stream.
+     * 
+     * @message com.arjuna.webservices.wsba11.ExceptionIdentifierType_1 [com.arjuna.webservices.wsba11.ExceptionIdentifierType_1] - Invalid QName value for ExceptionIdentifier
+     */
+    protected void writeChildContent(final XMLStreamWriter out)
+        throws XMLStreamException
+    {
+	if (exceptionIdentifier == null)
+	{
+	    throw new XMLStreamException(WSTLogger.log_mesg.getString("com.arjuna.webservices.wsba11.ExceptionIdentifierType_1")) ;
+	}
+	
+        StreamHelper.writeQualifiedName(out, exceptionIdentifier) ;
+    }
+    
+    /**
+     * Is the configuration of this element valid?
+     * @return true if valid, false otherwise.
+     */
+    public boolean isValid()
+    {
+        return (exceptionIdentifier != null) && super.isValid() ;
+    }
+}


Property changes on: labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/ExceptionIdentifierType.java
___________________________________________________________________
Name: svn:keywords
   + Rev Date
Name: svn:eol-style
   + native

Added: labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/ExceptionType.java
===================================================================
--- labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/ExceptionType.java	                        (rev 0)
+++ labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/ExceptionType.java	2007-08-14 12:43:41 UTC (rev 14200)
@@ -0,0 +1,152 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag.  All rights reserved. 
+ * See the copyright.txt in the distribution for a full listing 
+ * of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU General Public License, v. 2.0.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A 
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+ * PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+ * You should have received a copy of the GNU General Public License,
+ * v. 2.0 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+ * MA  02110-1301, USA.
+ * 
+ * (C) 2005-2006,
+ * @author JBoss Inc.
+ */
+package com.arjuna.webservices.wsba11;
+
+import javax.xml.namespace.QName;
+import javax.xml.stream.XMLStreamException;
+import javax.xml.stream.XMLStreamReader;
+import javax.xml.stream.XMLStreamWriter;
+
+import com.arjuna.webservices.stax.AnyContentAnyAttributeSupport;
+import com.arjuna.webservices.util.StreamHelper;
+
+/*
+ * <xsd:complexType name="ExceptionType">
+ *   <xsd:sequence>
+ *     <xsd:element name="ExceptionIdentifier" type="xsd:QName"/>
+ *     <xsd:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
+ *   </xsd:sequence>
+ *   <xsd:anyAttribute namespace="##other" processContents="lax"/>
+ * </xsd:complexType>
+ */
+/**
+ * Representation of an ExceptionType
+ * @author kevin
+ */
+public class ExceptionType extends AnyContentAnyAttributeSupport
+{
+    /**
+     * The exception identifier.
+     */
+    private ExceptionIdentifierType exceptionIdentifier ;
+
+    /**
+     * Default constructor.
+     */
+    public ExceptionType()
+    {
+    }
+    
+    /**
+     * Construct an exception type with the specified exception identifier.
+     * @param exceptionIdentifier The exception identifier.
+     */
+    public ExceptionType(final QName exceptionIdentifier)
+    {
+        setExceptionIdentifier(exceptionIdentifier) ;
+    }
+    
+    /**
+     * Construct the exception from the input stream.
+     * @param in The input stream.
+     * @throws XMLStreamException for parsing errors.
+     */
+    public ExceptionType(final XMLStreamReader in)
+        throws XMLStreamException
+    {
+        parse(in) ;
+    }
+
+    /**
+     * Set the exception identifier.
+     * @param exceptionIdentifier The exception identifier.
+     */
+    private void setExceptionIdentifier(final ExceptionIdentifierType exceptionIdentifier)
+    {
+        this.exceptionIdentifier = exceptionIdentifier ;
+    }
+
+    /**
+     * Set the exception identifier.
+     * @param exceptionIdentifier The exception identifier.
+     */
+    public void setExceptionIdentifier(final QName exceptionIdentifier)
+    {
+        setExceptionIdentifier(new ExceptionIdentifierType(exceptionIdentifier)) ;
+    }
+    
+    /**
+     * Get the exception identifier.
+     * @return The exception identifier.
+     */
+    public QName getExceptionIdentifier()
+    {
+        return (exceptionIdentifier == null ? null : exceptionIdentifier.getExceptionIdentifier()) ;
+    }
+    
+    /**
+     * Add the element.
+     * @param in The current input stream.
+     * @param elementName The qualified element name.
+     */
+    protected void putElement(final XMLStreamReader in,
+        final QName elementName)
+        throws XMLStreamException
+    {
+        if (BusinessActivityConstants.WSBA_NAMESPACE.equals(elementName.getNamespaceURI()))
+        {
+            final String localPart = elementName.getLocalPart() ;
+            if (BusinessActivityConstants.WSBA_ELEMENT_EXCEPTION_IDENTIFIER.equals(localPart))
+            {
+                setExceptionIdentifier(new ExceptionIdentifierType(in)) ;
+            }
+            else
+            {
+                throw new XMLStreamException("Unexpected element name: " + elementName) ;
+            }
+        }
+        else
+        {
+            super.putElement(in, elementName) ;
+        }
+    }
+    
+    /**
+     * Write the child content of the element.
+     * @param out The output stream.
+     */
+    protected void writeChildContent(final XMLStreamWriter out)
+        throws XMLStreamException
+    {
+        StreamHelper.writeElement(out, BusinessActivityConstants.WSBA_ELEMENT_EXCEPTION_IDENTIFIER_QNAME, exceptionIdentifier) ;
+        super.writeChildContent(out) ;
+    }
+    
+    /**
+     * Is the configuration of this element valid?
+     * @return true if valid, false otherwise.
+     */
+    public boolean isValid()
+    {
+        return ((exceptionIdentifier != null) && exceptionIdentifier.isValid()) &&
+            super.isValid() ;
+    }
+}


Property changes on: labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/ExceptionType.java
___________________________________________________________________
Name: svn:keywords
   + Rev Date
Name: svn:eol-style
   + native

Added: labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/NotificationType.java
===================================================================
--- labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/NotificationType.java	                        (rev 0)
+++ labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/NotificationType.java	2007-08-14 12:43:41 UTC (rev 14200)
@@ -0,0 +1,60 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag.  All rights reserved. 
+ * See the copyright.txt in the distribution for a full listing 
+ * of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU General Public License, v. 2.0.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A 
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+ * PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+ * You should have received a copy of the GNU General Public License,
+ * v. 2.0 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+ * MA  02110-1301, USA.
+ * 
+ * (C) 2005-2006,
+ * @author JBoss Inc.
+ */
+package com.arjuna.webservices.wsba11;
+
+import javax.xml.stream.XMLStreamException;
+import javax.xml.stream.XMLStreamReader;
+
+import com.arjuna.webservices.stax.AnyContentAnyAttributeSupport;
+
+/*
+ * <xsd:complexType name="Notification">
+ *   <xsd:sequence>
+ *     <xsd:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
+ *   </xsd:sequence>
+ *   <xsd:anyAttribute namespace="##other" processContents="lax"/>
+ * </xsd:complexType>
+ */
+/**
+ * Representation of the Notification type.
+ * @author kevin
+ */
+public class NotificationType extends AnyContentAnyAttributeSupport
+{
+    /**
+     * Default constructor.
+     */
+    public NotificationType()
+    {
+    }
+    
+    /**
+     * Construct a notification from the input stream.
+     * 
+     * @param in The input stream.
+     * @throws XMLStreamException For errors during parsing.
+     */
+    public NotificationType(final XMLStreamReader in)
+        throws XMLStreamException
+    {
+        parse(in) ;
+    }
+}


Property changes on: labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/NotificationType.java
___________________________________________________________________
Name: svn:keywords
   + Rev Date
Name: svn:eol-style
   + native

Added: labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/ParticipantCompletionCoordinatorInboundEvents.java
===================================================================
--- labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/ParticipantCompletionCoordinatorInboundEvents.java	                        (rev 0)
+++ labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/ParticipantCompletionCoordinatorInboundEvents.java	2007-08-14 12:43:41 UTC (rev 14200)
@@ -0,0 +1,115 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag.  All rights reserved. 
+ * See the copyright.txt in the distribution for a full listing 
+ * of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU General Public License, v. 2.0.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A 
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+ * PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+ * You should have received a copy of the GNU General Public License,
+ * v. 2.0 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+ * MA  02110-1301, USA.
+ * 
+ * (C) 2005-2006,
+ * @author JBoss Inc.
+ */
+package com.arjuna.webservices.wsba11;
+
+import com.arjuna.webservices.SoapFault;
+import com.arjuna.webservices.wsaddr2005.AddressingContext;
+import com.arjuna.webservices.wsjboss.JBossContext;
+
+
+/**
+ * The Participant events.
+ */
+public interface ParticipantCompletionCoordinatorInboundEvents
+{
+    /**
+     * Handle the cancelled event.
+     * @param cancelled The cancelled notification.
+     * @param addressingContext The addressing context.
+     * @param jbossContext The jboss context.
+     */
+    public void cancelled(final NotificationType cancelled, final AddressingContext addressingContext, final JBossContext jbossContext) ;
+    
+    /**
+     * Handle the closed event.
+     * @param closed The closed notification.
+     * @param addressingContext The addressing context.
+     * @param jbossContext The jboss context.
+     */
+    public void closed(final NotificationType closed, final AddressingContext addressingContext, final JBossContext jbossContext) ;
+    
+    /**
+     * Handle the compensated event.
+     * @param compensated The compensated notification.
+     * @param addressingContext The addressing context.
+     * @param jbossContext The jboss context.
+     */
+    public void compensated(final NotificationType compensated, final AddressingContext addressingContext, final JBossContext jbossContext) ;
+    
+    /**
+     * Handle the completed event.
+     * @param completed The completed notification.
+     * @param addressingContext The addressing context.
+     * @param jbossContext The jboss context.
+     */
+    public void completed(final NotificationType completed, final AddressingContext addressingContext,
+        final JBossContext jbossContext) ;
+    
+    /**
+     * Handle the exit event.
+     * @param exit The exit notification.
+     * @param addressingContext The addressing context.
+     * @param jbossContext The jboss context.
+     */
+    public void exit(final NotificationType exit, final AddressingContext addressingContext, final JBossContext jbossContext) ;
+    
+    /**
+     * Handle the fail event.
+     * @param fail The fail exception.
+     * @param addressingContext The addressing context.
+     * @param jbossContext The jboss context.
+     */
+    public void fail(final ExceptionType fail, final AddressingContext addressingContext,
+        final JBossContext jbossContext) ;
+    
+    /**
+     * Handle the cannot complete event.
+     * @param cannotComplete The cannotComplete exception.
+     * @param addressingContext The addressing context.
+     * @param jbossContext The jboss context.
+     */
+    public void cannotComplete(final NotificationType cannotComplete, final AddressingContext addressingContext,
+        final JBossContext jbossContext) ;
+    
+    /**
+     * Handle the getStatus event.
+     * @param getStatus The getStatus notification.
+     * @param addressingContext The addressing context.
+     * @param jbossContext The jboss context.
+     */
+    public void getStatus(final NotificationType getStatus, final AddressingContext addressingContext, final JBossContext jbossContext) ;
+    
+    /**
+     * Handle the status event.
+     * @param status The status.
+     * @param addressingContext The addressing context.
+     * @param jbossContext The jboss context.
+     */
+    public void status(final StatusType status, final AddressingContext addressingContext, final JBossContext jbossContext) ;
+    
+    /**
+     * Handle the SOAP fault event.
+     * @param soapFault The SOAP fault.
+     * @param addressingContext The addressing context.
+     * @param jbossContext The jboss context.
+     */
+    public void soapFault(final SoapFault soapFault, final AddressingContext addressingContext, final JBossContext jbossContext) ;
+}


Property changes on: labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/ParticipantCompletionCoordinatorInboundEvents.java
___________________________________________________________________
Name: svn:keywords
   + Rev Date
Name: svn:eol-style
   + native

Added: labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/ParticipantCompletionParticipantInboundEvents.java
===================================================================
--- labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/ParticipantCompletionParticipantInboundEvents.java	                        (rev 0)
+++ labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/ParticipantCompletionParticipantInboundEvents.java	2007-08-14 12:43:41 UTC (rev 14200)
@@ -0,0 +1,104 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag.  All rights reserved. 
+ * See the copyright.txt in the distribution for a full listing 
+ * of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU General Public License, v. 2.0.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A 
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+ * PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+ * You should have received a copy of the GNU General Public License,
+ * v. 2.0 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+ * MA  02110-1301, USA.
+ * 
+ * (C) 2005-2006,
+ * @author JBoss Inc.
+ */
+package com.arjuna.webservices.wsba11;
+
+import com.arjuna.webservices.SoapFault;
+import com.arjuna.webservices.wsaddr2005.AddressingContext;
+import com.arjuna.webservices.wsjboss.JBossContext;
+
+
+/**
+ * The Participant events.
+ */
+public interface ParticipantCompletionParticipantInboundEvents
+{
+    /**
+     * Handle the cancel event.
+     * @param cancel The cancel notification.
+     * @param addressingContext The addressing context.
+     * @param jbossContext The jboss context.
+     */
+    public void cancel(final NotificationType cancel, final AddressingContext addressingContext, final JBossContext jbossContext) ;
+    
+    /**
+     * Handle the close event.
+     * @param close The close notification.
+     * @param addressingContext The addressing context.
+     * @param jbossContext The jboss context.
+     */
+    public void close(final NotificationType close, final AddressingContext addressingContext, final JBossContext jbossContext) ;
+    
+    /**
+     * Handle the compensate event.
+     * @param compensate The compensate notification.
+     * @param addressingContext The addressing context.
+     * @param jbossContext The jboss context.
+     */
+    public void compensate(final NotificationType compensate, final AddressingContext addressingContext, final JBossContext jbossContext) ;
+    
+    /**
+     * Handle the exited event.
+     * @param exited The exited notification.
+     * @param addressingContext The addressing context.
+     * @param jbossContext The jboss context.
+     */
+    public void exited(final NotificationType exited, final AddressingContext addressingContext, final JBossContext jbossContext) ;
+    
+    /**
+     * Handle the failed event.
+     * @param failed The failed notification.
+     * @param addressingContext The addressing context.
+     * @param jbossContext The jboss context.
+     */
+    public void failed(final NotificationType failed, final AddressingContext addressingContext, final JBossContext jbossContext) ;
+    
+    /**
+     * Handle the not completed event.
+     * @param notCompleted The notCompleted notification.
+     * @param addressingContext The addressing context.
+     * @param jbossContext The jboss context.
+     */
+    public void notCompleted(final NotificationType notCompleted, final AddressingContext addressingContext, final JBossContext jbossContext) ;
+    
+    /**
+     * Handle the getStatus event.
+     * @param getStatus The getStatus notification.
+     * @param addressingContext The addressing context.
+     * @param jbossContext The jboss context.
+     */
+    public void getStatus(final NotificationType getStatus, final AddressingContext addressingContext, final JBossContext jbossContext) ;
+    
+    /**
+     * Handle the status event.
+     * @param status The status type.
+     * @param addressingContext The addressing context.
+     * @param jbossContext The jboss context.
+     */
+    public void status(final StatusType status, final AddressingContext addressingContext, final JBossContext jbossContext) ;
+    
+    /**
+     * Handle the SOAP fault event.
+     * @param soapFault The SOAP fault.
+     * @param addressingContext The addressing context.
+     * @param jbossContext The jboss context.
+     */
+    public void soapFault(final SoapFault soapFault, final AddressingContext addressingContext, final JBossContext jbossContext) ;
+}


Property changes on: labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/ParticipantCompletionParticipantInboundEvents.java
___________________________________________________________________
Name: svn:keywords
   + Rev Date
Name: svn:eol-style
   + native

Added: labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/State.java
===================================================================
--- labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/State.java	                        (rev 0)
+++ labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/State.java	2007-08-14 12:43:41 UTC (rev 14200)
@@ -0,0 +1,208 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag.  All rights reserved. 
+ * See the copyright.txt in the distribution for a full listing 
+ * of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU General Public License, v. 2.0.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A 
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+ * PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+ * You should have received a copy of the GNU General Public License,
+ * v. 2.0 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+ * MA  02110-1301, USA.
+ * 
+ * (C) 2005-2006,
+ * @author JBoss Inc.
+ */
+package com.arjuna.webservices.wsba11;
+
+import java.text.MessageFormat;
+import java.util.Map;
+
+import javax.xml.namespace.QName;
+
+import com.arjuna.webservices.logging.WSTLogger;
+import com.arjuna.webservices.util.Enumerated;
+import com.arjuna.webservices.util.InvalidEnumerationException;
+
+/*
+ * <xsd:simpleType name="StateType">
+ *   <xsd:restriction base="xsd:QName">
+ *     <xsd:enumeration value="wsba:Active"/>
+ *     <xsd:enumeration value="wsba:Canceling"/>
+ *     <xsd:enumeration value="wsba:Canceling-Active"/>
+ *     <xsd:enumeration value="wsba:Canceling-Completing"/>
+ *     <xsd:enumeration value="wsba:Completing"/>
+ *     <xsd:enumeration value="wsba:Completed"/>
+ *     <xsd:enumeration value="wsba:Closing"/>
+ *     <xsd:enumeration value="wsba:Compensating"/>
+ *     <xsd:enumeration value="wsba:Failing-Active"/>
+ *     <xsd:enumeration value="wsba:Failing-Canceling"/>
+ *     <xsd:enumeration value="wsba:Failing-Completing"/>
+ *     <xsd:enumeration value="wsba:Failing-Compensating"/>
+ *     <xsd:enumeration value="wsba:NotCompleting"/>
+ *     <xsd:enumeration value="wsba:Exiting"/>
+ *     <xsd:enumeration value="wsba:Ended"/>
+ *   </xsd:restriction>
+ * </xsd:simpleType>
+ */
+/**
+ * Class representing state enumerations.
+ * @author kevin
+ */
+public class State extends Enumerated
+{
+    /**
+     * Serial version UID for serialisation.
+     */
+    
+    /**
+     * The Active state.
+     */
+    public static final State STATE_ACTIVE = new State("Active") ;
+    /**
+     * The Canceling state.
+     */
+    public static final State STATE_CANCELING = new State("Canceling") ;
+    /**
+     * The Canceling-Active state.
+     */
+    public static final State STATE_CANCELING_ACTIVE = new State("Canceling-Active") ;
+    /**
+     * The Canceling-Completing state.
+     */
+    public static final State STATE_CANCELING_COMPLETING = new State("Canceling-Completing") ;
+    /**
+     * The Completing state.
+     */
+    public static final State STATE_COMPLETING = new State("Completing") ;
+    /**
+     * The Completed state.
+     */
+    public static final State STATE_COMPLETED = new State("Completed") ;
+    /**
+     * The Closing state.
+     */
+    public static final State STATE_CLOSING = new State("Closing") ;
+    /**
+     * The Compensating state.
+     */
+    public static final State STATE_COMPENSATING = new State("Compensating") ;
+    /**
+     * The Failing-Active state.
+     */
+    public static final State STATE_FAILING_ACTIVE = new State("Failing-Active") ;
+    /**
+     * The Failing-Canceling state.
+     */
+    public static final State STATE_FAILING_CANCELING = new State("Failing-Canceling") ;
+    /**
+     * The Failing-Completing state.
+     */
+    public static final State STATE_FAILING_COMPLETING = new State("Failing-Completing") ;
+    /**
+     * The Failing-Compensating state.
+     */
+    public static final State STATE_FAILING_COMPENSATING = new State("Failing-Compensating") ;
+    /**
+     * The Exiting state.
+     */
+    public static final State STATE_EXITING = new State("Exiting") ;
+    /**
+     * The NotCompleting state.
+     */
+    public static final State STATE_NOT_COMPLETING = new State("NotCompleting") ;
+    /**
+     * The Ended state.
+     */
+    public static final State STATE_ENDED = new State("Ended") ;
+    
+    /**
+     * The map of enumerations.
+     */
+    private static final Map ENUM_MAP = generateMap(new Enumerated[] {
+        STATE_ACTIVE, STATE_CANCELING, STATE_CANCELING_ACTIVE,
+        STATE_CANCELING_COMPLETING, STATE_COMPLETING, STATE_COMPLETED,
+        STATE_CLOSING, STATE_COMPENSATING, STATE_FAILING_ACTIVE,
+        STATE_FAILING_CANCELING, STATE_FAILING_COMPLETING,
+        STATE_FAILING_COMPENSATING, STATE_EXITING,
+        STATE_NOT_COMPLETING, STATE_ENDED
+    }) ;
+    
+    /**
+     * Construct the state enumeration with the specified value.
+     * @param localName The localName of the state enumeration.
+     */
+    private State(final String value)
+    {
+        super(getQualifiedName(value)) ;
+    }
+    
+    /**
+     * Get the value of this enumeration.
+     * @return the value.
+     */
+    public QName getValue()
+    {
+        return (QName)getKey() ;
+    }
+    
+    /**
+     * Resolve the enumeration for the specified value.
+     * @param value The value.
+     * @return The enumeration.
+     * @throws InvalidEnumerationException if the value is not valid.
+     */
+    protected Enumerated resolveEnum(final Object value)
+        throws InvalidEnumerationException
+    {
+        return toState((QName)value) ;
+    }
+    
+    /**
+     * Return the enumeration for the specified value.
+     * @param name The name.
+     * @return The enumeration.
+     * @throws InvalidEnumerationException if the name is not valid.
+     */
+    public static State toState(final String name)
+        throws InvalidEnumerationException
+    {
+        return toState(getQualifiedName(name)) ;
+    }
+    
+    /**
+     * Return the enumeration for the specified value.
+     * @param qName The qName value.
+     * @return The enumeration.
+     * @throws InvalidEnumerationException if the value is not valid.
+     * @message com.arjuna.webservices.wsba11.State_1 [com.arjuna.webservices.wsba11.State_1] - Invalid state enumeration: {0}
+     */
+    public static State toState(final QName qName)
+        throws InvalidEnumerationException
+    {
+        final Object state = ENUM_MAP.get(qName) ;
+        if (state == null)
+        {
+            final String pattern = WSTLogger.log_mesg.getString("com.arjuna.webservices.wsba11.State_1") ;
+            final String message = MessageFormat.format(pattern, new Object[] {qName}) ;
+            throw new InvalidEnumerationException(message) ;
+        }
+        return (State)state ;
+    }
+    
+    /**
+     * Get the qualified name.
+     * @param value The name to qualify.
+     * @return The qualified name.
+     */
+    private static QName getQualifiedName(final String name)
+    {
+        return new QName(BusinessActivityConstants.WSBA_NAMESPACE,
+                name, BusinessActivityConstants.WSBA_PREFIX) ;
+    }
+}


Property changes on: labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/State.java
___________________________________________________________________
Name: svn:keywords
   + Rev Date
Name: svn:eol-style
   + native

Added: labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/StateType.java
===================================================================
--- labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/StateType.java	                        (rev 0)
+++ labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/StateType.java	2007-08-14 12:43:41 UTC (rev 14200)
@@ -0,0 +1,133 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag.  All rights reserved. 
+ * See the copyright.txt in the distribution for a full listing 
+ * of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU General Public License, v. 2.0.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A 
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+ * PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+ * You should have received a copy of the GNU General Public License,
+ * v. 2.0 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+ * MA  02110-1301, USA.
+ * 
+ * (C) 2005-2006,
+ * @author JBoss Inc.
+ */
+package com.arjuna.webservices.wsba11;
+
+import javax.xml.namespace.QName;
+import javax.xml.stream.XMLStreamException;
+import javax.xml.stream.XMLStreamReader;
+import javax.xml.stream.XMLStreamWriter;
+
+import com.arjuna.webservices.logging.WSTLogger;
+import com.arjuna.webservices.stax.ElementContent;
+import com.arjuna.webservices.util.InvalidEnumerationException;
+import com.arjuna.webservices.util.QNameHelper;
+import com.arjuna.webservices.util.StreamHelper;
+
+/**
+ * Representation of a State element.
+ * @author kevin
+ */
+class StateType extends ElementContent
+{
+    /**
+     * The state.
+     */
+    private State state ;
+    
+    /**
+     * Construct the state with the specified state.
+     * @param state The state.
+     */
+    StateType(final State state)
+    {
+        this.state = state ;
+    }
+    
+    /**
+     * Construct the State from the input stream.
+     * @param in The input stream.
+     * @throws XMLStreamException for parsing errors.
+     */
+    StateType(final XMLStreamReader in)
+        throws XMLStreamException
+    {
+        parse(in) ;
+    }
+    
+    /**
+     * Add the element.
+     * @param in The current input stream.
+     * @param elementName The qualified element name.
+     * @message com.arjuna.webservices.wsba11.StateType_1 [com.arjuna.webservices.wsba11.StateType_1] - State elements cannot have embedded elements.
+     */
+    protected void putElement(final XMLStreamReader in,
+        final QName elementName)
+        throws XMLStreamException
+    {
+        throw new XMLStreamException(WSTLogger.log_mesg.getString("com.arjuna.webservices.wsba11.StateType_1")) ;
+    }
+    
+    /**
+     * Set the state of this element.
+     * @param state The state of the element.
+     */
+    void setState(final State state)
+    {
+        this.state = state ;
+    }
+    
+    /**
+     * Get the state of this element.
+     * @return The state of the element or null if not set.
+     */
+    State getState()
+    {
+        return state ;
+    }
+    
+    /**
+     * Set the text value of this element.
+     * @param in The current input stream.
+     * @param value The text value of this element.
+     */
+    protected void putValue(final XMLStreamReader in, final String value)
+        throws XMLStreamException
+    {
+        final QName qName = QNameHelper.toQName(in.getNamespaceContext(), value) ;
+        try
+        {
+            state = State.toState(qName) ;
+        }
+        catch (final InvalidEnumerationException iee)
+        {
+            throw new XMLStreamException(iee) ;
+        }
+    }
+    
+    /**
+     * Write the child content of the element.
+     * @param out The output stream.
+     */
+    protected void writeChildContent(final XMLStreamWriter out)
+        throws XMLStreamException
+    {
+        StreamHelper.writeQualifiedName(out, state.getValue()) ;
+    }
+    
+    /**
+     * Is the configuration of this element valid?
+     * @return true if valid, false otherwise.
+     */
+    public boolean isValid()
+    {
+        return (state != null) && super.isValid() ;
+    }
+}


Property changes on: labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/StateType.java
___________________________________________________________________
Name: svn:keywords
   + Rev Date
Name: svn:eol-style
   + native

Added: labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/StatusType.java
===================================================================
--- labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/StatusType.java	                        (rev 0)
+++ labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/StatusType.java	2007-08-14 12:43:41 UTC (rev 14200)
@@ -0,0 +1,142 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag.  All rights reserved. 
+ * See the copyright.txt in the distribution for a full listing 
+ * of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU General Public License, v. 2.0.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A 
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+ * PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+ * You should have received a copy of the GNU General Public License,
+ * v. 2.0 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+ * MA  02110-1301, USA.
+ * 
+ * (C) 2005-2006,
+ * @author JBoss Inc.
+ */
+package com.arjuna.webservices.wsba11;
+
+import javax.xml.namespace.QName;
+import javax.xml.stream.XMLStreamException;
+import javax.xml.stream.XMLStreamReader;
+import javax.xml.stream.XMLStreamWriter;
+
+import com.arjuna.webservices.stax.AnyContentAnyAttributeSupport;
+import com.arjuna.webservices.util.StreamHelper;
+/*
+ * <xsd:complexType name="StatusType">
+ *   <xsd:sequence>
+ *     <xsd:element name="State" type="wsba:StateType"/>
+ *     <xsd:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
+ *   </xsd:sequence>
+ *   <xsd:anyAttribute namespace="##other" processContents="lax"/>
+ * </xsd:complexType>
+ */
+/**
+ * Representation of a StatusType
+ * @author kevin
+ */
+public class StatusType extends AnyContentAnyAttributeSupport
+{
+    /**
+     * The state.
+     */
+    private StateType state ;
+
+    /**
+     * Default constructor.
+     */
+    public StatusType()
+    {
+    }
+
+    /**
+     * Construct the status type with the specified state.
+     * @param state the state.
+     */
+    public StatusType(final State state)
+    {
+        this.state = new StateType(state) ;
+    }
+    
+    /**
+     * Construct the state from the input stream.
+     * @param in The input stream.
+     * @throws XMLStreamException for parsing errors.
+     */
+    public StatusType(final XMLStreamReader in)
+        throws XMLStreamException
+    {
+        parse(in) ;
+    }
+
+    /**
+     * Set the state.
+     * @param state The state.
+     */
+    private void setState(final StateType state)
+    {
+        this.state = state ;
+    }
+    
+    /**
+     * Get the state.
+     * @return The state.
+     */
+    public State getState()
+    {
+        return (state == null ? null : state.getState()) ;
+    }
+    
+    /**
+     * Add the element.
+     * @param in The current input stream.
+     * @param elementName The qualified element name.
+     */
+    protected void putElement(final XMLStreamReader in,
+        final QName elementName)
+        throws XMLStreamException
+    {
+        if (BusinessActivityConstants.WSBA_NAMESPACE.equals(elementName.getNamespaceURI()))
+        {
+            final String localPart = elementName.getLocalPart() ;
+            if (BusinessActivityConstants.WSBA_ELEMENT_STATE.equals(localPart))
+            {
+                setState(new StateType(in)) ;
+            }
+            else
+            {
+                throw new XMLStreamException("Unexpected element name: " + elementName) ;
+            }
+        }
+        else
+        {
+            super.putElement(in, elementName) ;
+        }
+    }
+    
+    /**
+     * Write the child content of the element.
+     * @param out The output stream.
+     */
+    protected void writeChildContent(final XMLStreamWriter out)
+        throws XMLStreamException
+    {
+        StreamHelper.writeElement(out, BusinessActivityConstants.WSBA_ELEMENT_STATE_QNAME, state) ;
+        super.writeChildContent(out) ;
+    }
+    
+    /**
+     * Is the configuration of this element valid?
+     * @return true if valid, false otherwise.
+     */
+    public boolean isValid()
+    {
+        return ((state != null) && state.isValid()) &&
+            super.isValid() ;
+    }
+}


Property changes on: labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/StatusType.java
___________________________________________________________________
Name: svn:keywords
   + Rev Date
Name: svn:eol-style
   + native

Added: labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/client/CoordinatorCompletionCoordinatorClient.java
===================================================================
--- labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/client/CoordinatorCompletionCoordinatorClient.java	                        (rev 0)
+++ labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/client/CoordinatorCompletionCoordinatorClient.java	2007-08-14 12:43:41 UTC (rev 14200)
@@ -0,0 +1,363 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag.  All rights reserved. 
+ * See the copyright.txt in the distribution for a full listing 
+ * of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU General Public License, v. 2.0.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A 
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+ * PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+ * You should have received a copy of the GNU General Public License,
+ * v. 2.0 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+ * MA  02110-1301, USA.
+ * 
+ * (C) 2005-2006,
+ * @author JBoss Inc.
+ */
+package com.arjuna.webservices.wsba11.client;
+
+import java.io.IOException;
+
+import javax.xml.namespace.QName;
+
+import com.arjuna.webservices.HandlerRegistry;
+import com.arjuna.webservices.SoapBody;
+import com.arjuna.webservices.SoapFault;
+import com.arjuna.webservices.SoapRegistry;
+import com.arjuna.webservices.SoapService;
+import com.arjuna.webservices.base.policy.ClientPolicy;
+import com.arjuna.webservices.stax.NamedElement;
+import com.arjuna.webservices.wsaddr2005.AddressingConstants;
+import com.arjuna.webservices.wsaddr2005.AddressingContext;
+import com.arjuna.webservices.wsaddr2005.AttributedURIType;
+import com.arjuna.webservices.wsaddr2005.EndpointReferenceType;
+import com.arjuna.webservices.wsaddr2005.client.WSAddr2005Client;
+import com.arjuna.webservices.wsaddr2005.policy.AddressingPolicy;
+import com.arjuna.webservices.wsjboss.InstanceIdentifier;
+import com.arjuna.webservices.wsba11.BusinessActivityConstants;
+import com.arjuna.webservices.wsba11.ExceptionType;
+import com.arjuna.webservices.wsba11.NotificationType;
+import com.arjuna.webservices.wsba11.State;
+import com.arjuna.webservices.wsba11.StatusType;
+
+/**
+ * The Client side of the Coordinator Completion Coordinator.
+ * @author kevin
+ */
+public class CoordinatorCompletionCoordinatorClient
+{
+    /**
+     * The client singleton.
+     */
+    private static final CoordinatorCompletionCoordinatorClient CLIENT = new CoordinatorCompletionCoordinatorClient() ;
+    
+    /**
+     * The completed action.
+     */
+    private final String completedAction = BusinessActivityConstants.WSBA_ACTION_COMPLETED ;
+    /**
+     * The fail action.
+     */
+    private final String failAction = BusinessActivityConstants.WSBA_ACTION_FAIL ;
+    /**
+     * The compensated action.
+     */
+    private final String compensatedAction = BusinessActivityConstants.WSBA_ACTION_COMPENSATED ;
+    /**
+     * The closed action.
+     */
+    private final String closedAction = BusinessActivityConstants.WSBA_ACTION_CLOSED ;
+    /**
+     * The cancelled action.
+     */
+    private final String cancelledAction = BusinessActivityConstants.WSBA_ACTION_CANCELLED ;
+    /**
+     * The exit action.
+     */
+    private final String exitAction = BusinessActivityConstants.WSBA_ACTION_EXIT ;
+    /**
+     * The cannot complete action.
+     */
+    private final String cannotCompleteAction = BusinessActivityConstants.WSBA_ACTION_CANNOT_COMPLETE ;
+    /**
+     * The get status action.
+     */
+    private final String getStatusAction = BusinessActivityConstants.WSBA_ACTION_GET_STATUS ;
+    /**
+     * The status action.
+     */
+    private final String statusAction = BusinessActivityConstants.WSBA_ACTION_STATUS ;
+    
+    /**
+     * The none ReplyTo endpoint reference.
+     */
+    private final EndpointReferenceType noneReplyTo = new EndpointReferenceType(new AttributedURIType(AddressingConstants.WSA_ADDRESS_NONE)) ;
+    
+    /**
+     * The SOAP service representing the client.
+     */
+    private final SoapService soapService ;
+    /**
+     * The coordinator completion participant URI for replies.
+     */
+    private final AttributedURIType coordinatorCompletionParticipant ;
+    
+    /**
+     * Construct the participant completion coordinator client.
+     */
+    private CoordinatorCompletionCoordinatorClient()
+    {
+        final HandlerRegistry handlerRegistry = new HandlerRegistry() ;
+        
+        // Add WS-Addressing
+        AddressingPolicy.register(handlerRegistry) ;
+        // Add client policies
+        ClientPolicy.register(handlerRegistry) ;
+        
+        soapService = new SoapService(handlerRegistry) ;
+        final String coordinatorCompletionParticipantURI =
+            SoapRegistry.getRegistry().getServiceURI(BusinessActivityConstants.SERVICE_COORDINATOR_COMPLETION_PARTICIPANT) ;
+        coordinatorCompletionParticipant = new AttributedURIType(coordinatorCompletionParticipantURI) ;
+    }
+    
+    /**
+     * Send a completed request.
+     * @param addressingContext addressing context initialised with to and message ID.
+     * @param identifier The identifier of the initiator.
+     * @throws SoapFault For any errors.
+     * @throws IOException for any transport errors.
+     */
+    public void sendCompleted(final AddressingContext addressingContext, final InstanceIdentifier identifier)
+        throws SoapFault, IOException
+    {
+        final EndpointReferenceType endpointReference = getEndpointReference(identifier) ;
+        
+        final NamedElement contents = new NamedElement(BusinessActivityConstants.WSBA_ELEMENT_COMPLETED_QNAME, new NotificationType()) ;
+        final SoapBody soapBody = new SoapBody(contents, completedAction) ;
+        addressingContext.setAction(new AttributedURIType(completedAction)) ;
+        
+        addressingContext.setFrom(endpointReference) ;
+        addressingContext.setReplyTo(noneReplyTo) ;
+        
+        WSAddr2005Client.sendOneWay(soapBody, addressingContext, null, soapService) ;
+    }
+    
+    /**
+     * Send a fail request.
+     * @param addressingContext addressing context initialised with to and message ID.
+     * @param identifier The identifier of the initiator.
+     * @param exceptionIdentifier The exception identifier.
+     * @throws SoapFault For any errors.
+     * @throws IOException for any transport errors.
+     */
+    public void sendFail(final AddressingContext addressingContext, final InstanceIdentifier identifier,
+        final QName exceptionIdentifier)
+        throws SoapFault, IOException
+    {
+        final EndpointReferenceType endpointReference = getEndpointReference(identifier) ;
+        
+        final NamedElement contents = new NamedElement(BusinessActivityConstants.WSBA_ELEMENT_FAIL_QNAME, new ExceptionType(exceptionIdentifier)) ;
+        final SoapBody soapBody = new SoapBody(contents, failAction) ;
+        addressingContext.setAction(new AttributedURIType(failAction)) ;
+        
+        addressingContext.setFrom(endpointReference) ;
+        addressingContext.setReplyTo(noneReplyTo) ;
+        
+        WSAddr2005Client.sendOneWay(soapBody, addressingContext, null, soapService) ;
+    }
+    
+    /**
+     * Send a compensated request.
+     * @param addressingContext addressing context initialised with to and message ID.
+     * @param identifier The identifier of the initiator.
+     * @throws SoapFault For any errors.
+     * @throws IOException for any transport errors.
+     */
+    public void sendCompensated(final AddressingContext addressingContext, final InstanceIdentifier identifier)
+        throws SoapFault, IOException
+    {
+        final NamedElement contents = new NamedElement(BusinessActivityConstants.WSBA_ELEMENT_COMPENSATED_QNAME, new NotificationType()) ;
+        final SoapBody soapBody = new SoapBody(contents, compensatedAction) ;
+        addressingContext.setAction(new AttributedURIType(compensatedAction)) ;
+        
+        addressingContext.setReplyTo(noneReplyTo) ;
+        
+        WSAddr2005Client.sendOneWay(soapBody, addressingContext, null, soapService) ;
+    }
+    
+    /**
+     * Send a closed request.
+     * @param addressingContext addressing context initialised with to and message ID.
+     * @param identifier The identifier of the initiator.
+     * @throws SoapFault For any errors.
+     * @throws IOException for any transport errors.
+     */
+    public void sendClosed(final AddressingContext addressingContext, final InstanceIdentifier identifier)
+        throws SoapFault, IOException
+    {
+        final NamedElement contents = new NamedElement(BusinessActivityConstants.WSBA_ELEMENT_CLOSED_QNAME, new NotificationType()) ;
+        final SoapBody soapBody = new SoapBody(contents, closedAction) ;
+        addressingContext.setAction(new AttributedURIType(closedAction)) ;
+        
+        addressingContext.setReplyTo(noneReplyTo) ;
+        
+        WSAddr2005Client.sendOneWay(soapBody, addressingContext, null, soapService) ;
+    }
+    
+    /**
+     * Send a cancelled request.
+     * @param addressingContext addressing context initialised with to and message ID.
+     * @param identifier The identifier of the initiator.
+     * @throws SoapFault For any errors.
+     * @throws IOException for any transport errors.
+     */
+    public void sendCancelled(final AddressingContext addressingContext, final InstanceIdentifier identifier)
+        throws SoapFault, IOException
+    {
+        final NamedElement contents = new NamedElement(BusinessActivityConstants.WSBA_ELEMENT_CANCELLED_QNAME, new NotificationType()) ;
+        final SoapBody soapBody = new SoapBody(contents, cancelledAction) ;
+        addressingContext.setAction(new AttributedURIType(cancelledAction)) ;
+        
+        addressingContext.setReplyTo(noneReplyTo) ;
+        
+        WSAddr2005Client.sendOneWay(soapBody, addressingContext, null, soapService) ;
+    }
+    
+    /**
+     * Send an exit request.
+     * @param addressingContext addressing context initialised with to and message ID.
+     * @param identifier The identifier of the initiator.
+     * @throws SoapFault For any errors.
+     * @throws IOException for any transport errors.
+     */
+    public void sendExit(final AddressingContext addressingContext, final InstanceIdentifier identifier)
+        throws SoapFault, IOException
+    {
+        final EndpointReferenceType endpointReference = getEndpointReference(identifier) ;
+        
+        final NamedElement contents = new NamedElement(BusinessActivityConstants.WSBA_ELEMENT_EXIT_QNAME, new NotificationType()) ;
+        final SoapBody soapBody = new SoapBody(contents, exitAction) ;
+        addressingContext.setAction(new AttributedURIType(exitAction)) ;
+        
+        addressingContext.setFrom(endpointReference) ;
+        addressingContext.setReplyTo(noneReplyTo) ;
+        
+        WSAddr2005Client.sendOneWay(soapBody, addressingContext, null, soapService) ;
+    }
+    
+    /**
+     * Send a cannot complete request.
+     * @param addressingContext addressing context initialised with to and message ID.
+     * @param identifier The identifier of the initiator.
+     * @throws SoapFault For any errors.
+     * @throws IOException for any transport errors.
+     */
+    public void sendCannotComplete(final AddressingContext addressingContext, final InstanceIdentifier identifier)
+        throws SoapFault, IOException
+    {
+        final EndpointReferenceType endpointReference = getEndpointReference(identifier) ;
+        
+        final NamedElement contents = new NamedElement(BusinessActivityConstants.WSBA_ELEMENT_CANNOT_COMPLETE_QNAME, new NotificationType()) ;
+        final SoapBody soapBody = new SoapBody(contents, cannotCompleteAction) ;
+        addressingContext.setAction(new AttributedURIType(cannotCompleteAction)) ;
+        
+        addressingContext.setFrom(endpointReference) ;
+        addressingContext.setReplyTo(noneReplyTo) ;
+        
+        WSAddr2005Client.sendOneWay(soapBody, addressingContext, null, soapService) ;
+    }
+    
+    /**
+     * Send a get status request.
+     * @param addressingContext addressing context initialised with to and message ID.
+     * @param identifier The identifier of the initiator.
+     * @throws SoapFault For any errors.
+     * @throws IOException for any transport errors.
+     */
+    public void sendGetStatus(final AddressingContext addressingContext, final InstanceIdentifier identifier)
+        throws SoapFault, IOException
+    {
+        final EndpointReferenceType endpointReference = getEndpointReference(identifier) ;
+        
+        final NamedElement contents = new NamedElement(BusinessActivityConstants.WSBA_ELEMENT_GET_STATUS_QNAME, new NotificationType()) ;
+        final SoapBody soapBody = new SoapBody(contents, getStatusAction) ;
+        addressingContext.setAction(new AttributedURIType(getStatusAction)) ;
+        
+        addressingContext.setFrom(endpointReference) ;
+        addressingContext.setReplyTo(noneReplyTo) ;
+        
+        WSAddr2005Client.sendOneWay(soapBody, addressingContext, null, soapService) ;
+    }
+    
+    /**
+     * Send a status request.
+     * @param addressingContext addressing context initialised with to and message ID.
+     * @param identifier The identifier of the initiator.
+     * @param state The state.
+     * @throws SoapFault For any errors.
+     * @throws IOException for any transport errors.
+     */
+    public void sendStatus(final AddressingContext addressingContext, final InstanceIdentifier identifier,
+        final State state)
+        throws SoapFault, IOException
+    {
+        final EndpointReferenceType endpointReference = getEndpointReference(identifier) ;
+        
+        final NamedElement contents = new NamedElement(BusinessActivityConstants.WSBA_ELEMENT_STATUS_QNAME, new StatusType(state)) ;
+        final SoapBody soapBody = new SoapBody(contents, statusAction) ;
+        addressingContext.setAction(new AttributedURIType(statusAction)) ;
+        
+        addressingContext.setFrom(endpointReference) ;
+        addressingContext.setReplyTo(noneReplyTo) ;
+        
+        WSAddr2005Client.sendOneWay(soapBody, addressingContext, null, soapService) ;
+    }
+
+    /**
+     * Send a fault.
+     * @param addressingContext The addressing context.
+     * @param identifier The current identifier.
+     * @param soapFault The SOAP fault. The soap fault.
+     * @param faultAction The fault action.
+     * @throws SoapFault For any errors.
+     * @throws IOException for any transport errors.
+     */
+    public void sendSoapFault(final AddressingContext addressingContext, final InstanceIdentifier identifier, final SoapFault soapFault, final String faultAction)
+        throws SoapFault, IOException
+    {
+        final EndpointReferenceType endpointReference = getEndpointReference(identifier) ;
+        
+        soapFault.setAction(faultAction) ;
+        addressingContext.setAction(new AttributedURIType(faultAction)) ;
+        
+        addressingContext.setFrom(endpointReference) ;
+        addressingContext.setReplyTo(noneReplyTo) ;
+        
+        WSAddr2005Client.sendSoapFault(soapFault, addressingContext, null, soapService) ;
+    }
+    
+    /**
+     * Get the endpoint reference for the specified identifier.
+     * @param identifier The endpoint reference identifier.
+     * @return The endpoint reference.
+     */
+    private EndpointReferenceType getEndpointReference(final InstanceIdentifier identifier)
+    {
+        final EndpointReferenceType completionCoordinatorEndpoint = new EndpointReferenceType(coordinatorCompletionParticipant) ;
+        InstanceIdentifier.setEndpointInstanceIdentifier(completionCoordinatorEndpoint, identifier) ;
+        return completionCoordinatorEndpoint ;
+    }
+    
+    /**
+     * Get the Completion Coordinator client singleton.
+     * @return The Completion Coordinator client singleton.
+     */
+    public static CoordinatorCompletionCoordinatorClient getClient()
+    {
+        return CLIENT ;
+    }
+}


Property changes on: labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/client/CoordinatorCompletionCoordinatorClient.java
___________________________________________________________________
Name: svn:keywords
   + Rev Date
Name: svn:eol-style
   + native

Added: labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/client/CoordinatorCompletionParticipantClient.java
===================================================================
--- labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/client/CoordinatorCompletionParticipantClient.java	                        (rev 0)
+++ labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/client/CoordinatorCompletionParticipantClient.java	2007-08-14 12:43:41 UTC (rev 14200)
@@ -0,0 +1,358 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag.  All rights reserved. 
+ * See the copyright.txt in the distribution for a full listing 
+ * of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU General Public License, v. 2.0.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A 
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+ * PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+ * You should have received a copy of the GNU General Public License,
+ * v. 2.0 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+ * MA  02110-1301, USA.
+ * 
+ * (C) 2005-2006,
+ * @author JBoss Inc.
+ */
+package com.arjuna.webservices.wsba11.client;
+
+import java.io.IOException;
+
+import com.arjuna.webservices.HandlerRegistry;
+import com.arjuna.webservices.SoapBody;
+import com.arjuna.webservices.SoapFault;
+import com.arjuna.webservices.SoapRegistry;
+import com.arjuna.webservices.SoapService;
+import com.arjuna.webservices.base.policy.ClientPolicy;
+import com.arjuna.webservices.stax.NamedElement;
+import com.arjuna.webservices.wsaddr2005.AddressingConstants;
+import com.arjuna.webservices.wsaddr2005.AddressingContext;
+import com.arjuna.webservices.wsaddr2005.AttributedURIType;
+import com.arjuna.webservices.wsaddr2005.EndpointReferenceType;
+import com.arjuna.webservices.wsaddr2005.client.WSAddr2005Client;
+import com.arjuna.webservices.wsaddr2005.policy.AddressingPolicy;
+import com.arjuna.webservices.wsjboss.InstanceIdentifier;
+import com.arjuna.webservices.wsba11.BusinessActivityConstants;
+import com.arjuna.webservices.wsba11.NotificationType;
+import com.arjuna.webservices.wsba11.State;
+import com.arjuna.webservices.wsba11.StatusType;
+
+/**
+ * The Client side of the Coordinator Participant Coordinator.
+ * @author kevin
+ */
+public class CoordinatorCompletionParticipantClient
+{
+    /**
+     * The client singleton.
+     */
+    private static final CoordinatorCompletionParticipantClient CLIENT = new CoordinatorCompletionParticipantClient() ;
+    
+    /**
+     * The complete action.
+     */
+    private final String completeAction = BusinessActivityConstants.WSBA_ACTION_COMPLETE ;
+    /**
+     * The close action.
+     */
+    private final String closeAction = BusinessActivityConstants.WSBA_ACTION_CLOSE ;
+    /**
+     * The cancel action.
+     */
+    private final String cancelAction = BusinessActivityConstants.WSBA_ACTION_CANCEL ;
+    /**
+     * The compensat action.
+     */
+    private final String compensateAction = BusinessActivityConstants.WSBA_ACTION_COMPENSATE ;
+    /**
+     * The failed action.
+     */
+    private final String failedAction = BusinessActivityConstants.WSBA_ACTION_FAILED ;
+    /**
+     * The exited action.
+     */
+    private final String exitedAction = BusinessActivityConstants.WSBA_ACTION_EXITED ;
+    /**
+     * The not completed action.
+     */
+    private final String notCompletedAction = BusinessActivityConstants.WSBA_ACTION_NOT_COMPLETED ;
+    /**
+     * The get status action.
+     */
+    private final String getStatusAction = BusinessActivityConstants.WSBA_ACTION_GET_STATUS ;
+    /**
+     * The status action.
+     */
+    private final String statusAction = BusinessActivityConstants.WSBA_ACTION_STATUS ;
+    
+    /**
+     * The none ReplyTo endpoint reference.
+     */
+    private final EndpointReferenceType noneReplyTo = new EndpointReferenceType(new AttributedURIType(AddressingConstants.WSA_ADDRESS_NONE)) ;
+    
+    /**
+     * The SOAP service representing the client.
+     */
+    private final SoapService soapService ;
+    /**
+     * The coordinator completion coordinator URI for replies.
+     */
+    private final AttributedURIType coordinatorCompletionCoordinator ;
+    
+    /**
+     * Construct the participant completion coordinator client.
+     */
+    private CoordinatorCompletionParticipantClient()
+    {
+        final HandlerRegistry handlerRegistry = new HandlerRegistry() ;
+        
+        // Add WS-Addressing
+        AddressingPolicy.register(handlerRegistry) ;
+        // Add client policies
+        ClientPolicy.register(handlerRegistry) ;
+        
+        soapService = new SoapService(handlerRegistry) ;
+        final String coordinatorCompletionCoordinatorURI =
+            SoapRegistry.getRegistry().getServiceURI(BusinessActivityConstants.SERVICE_COORDINATOR_COMPLETION_COORDINATOR) ;
+        coordinatorCompletionCoordinator = new AttributedURIType(coordinatorCompletionCoordinatorURI) ;
+    }
+    
+    /**
+     * Send a complete request.
+     * @param addressingContext addressing context initialised with to and message ID.
+     * @param identifier The identifier of the initiator.
+     * @throws SoapFault For any errors.
+     * @throws IOException for any transport errors.
+     */
+    public void sendComplete(final AddressingContext addressingContext, final InstanceIdentifier identifier)
+        throws SoapFault, IOException
+    {
+        final EndpointReferenceType endpointReference = getEndpointReference(identifier) ;
+        
+        final NamedElement contents = new NamedElement(BusinessActivityConstants.WSBA_ELEMENT_COMPLETE_QNAME, new NotificationType()) ;
+        final SoapBody soapBody = new SoapBody(contents, completeAction) ;
+        addressingContext.setAction(new AttributedURIType(completeAction)) ;
+        
+        addressingContext.setFrom(endpointReference) ;
+        addressingContext.setReplyTo(noneReplyTo) ;
+        
+        WSAddr2005Client.sendOneWay(soapBody, addressingContext, null, soapService) ;
+    }
+    
+    /**
+     * Send a close request.
+     * @param addressingContext addressing context initialised with to and message ID.
+     * @param identifier The identifier of the initiator.
+     * @throws SoapFault For any errors.
+     * @throws IOException for any transport errors.
+     */
+    public void sendClose(final AddressingContext addressingContext, final InstanceIdentifier identifier)
+        throws SoapFault, IOException
+    {
+        final EndpointReferenceType endpointReference = getEndpointReference(identifier) ;
+        
+        final NamedElement contents = new NamedElement(BusinessActivityConstants.WSBA_ELEMENT_CLOSE_QNAME, new NotificationType()) ;
+        final SoapBody soapBody = new SoapBody(contents, closeAction) ;
+        addressingContext.setAction(new AttributedURIType(closeAction)) ;
+        
+        addressingContext.setFrom(endpointReference) ;
+        addressingContext.setReplyTo(noneReplyTo) ;
+        
+        WSAddr2005Client.sendOneWay(soapBody, addressingContext, null, soapService) ;
+    }
+    
+    /**
+     * Send a cancel request.
+     * @param addressingContext addressing context initialised with to and message ID.
+     * @param identifier The identifier of the initiator.
+     * @throws SoapFault For any errors.
+     * @throws IOException for any transport errors.
+     */
+    public void sendCancel(final AddressingContext addressingContext, final InstanceIdentifier identifier)
+        throws SoapFault, IOException
+    {
+        final EndpointReferenceType endpointReference = getEndpointReference(identifier) ;
+        
+        final NamedElement contents = new NamedElement(BusinessActivityConstants.WSBA_ELEMENT_CANCEL_QNAME, new NotificationType()) ;
+        final SoapBody soapBody = new SoapBody(contents, cancelAction) ;
+        addressingContext.setAction(new AttributedURIType(cancelAction)) ;
+        
+        addressingContext.setFrom(endpointReference) ;
+        addressingContext.setReplyTo(noneReplyTo) ;
+        
+        WSAddr2005Client.sendOneWay(soapBody, addressingContext, null, soapService) ;
+    }
+    
+    /**
+     * Send a compensate request.
+     * @param addressingContext addressing context initialised with to and message ID.
+     * @param identifier The identifier of the initiator.
+     * @throws SoapFault For any errors.
+     * @throws IOException for any transport errors.
+     */
+    public void sendCompensate(final AddressingContext addressingContext, final InstanceIdentifier identifier)
+        throws SoapFault, IOException
+    {
+        final EndpointReferenceType endpointReference = getEndpointReference(identifier) ;
+        
+        final NamedElement contents = new NamedElement(BusinessActivityConstants.WSBA_ELEMENT_COMPENSATE_QNAME, new NotificationType()) ;
+        final SoapBody soapBody = new SoapBody(contents, compensateAction) ;
+        addressingContext.setAction(new AttributedURIType(compensateAction)) ;
+        
+        addressingContext.setFrom(endpointReference) ;
+        addressingContext.setReplyTo(noneReplyTo) ;
+        
+        WSAddr2005Client.sendOneWay(soapBody, addressingContext, null, soapService) ;
+    }
+    
+    /**
+     * Send a failed request.
+     * @param addressingContext addressing context initialised with to and message ID.
+     * @param identifier The identifier of the initiator.
+     * @throws SoapFault For any errors.
+     * @throws IOException for any transport errors.
+     */
+    public void sendFailed(final AddressingContext addressingContext, final InstanceIdentifier identifier)
+        throws SoapFault, IOException
+    {
+        final NamedElement contents = new NamedElement(BusinessActivityConstants.WSBA_ELEMENT_FAILED_QNAME, new NotificationType()) ;
+        final SoapBody soapBody = new SoapBody(contents, failedAction) ;
+        addressingContext.setAction(new AttributedURIType(failedAction)) ;
+        
+        addressingContext.setReplyTo(noneReplyTo) ;
+        
+        WSAddr2005Client.sendOneWay(soapBody, addressingContext, null, soapService) ;
+    }
+    
+    /**
+     * Send an exited request.
+     * @param addressingContext addressing context initialised with to and message ID.
+     * @param identifier The identifier of the initiator.
+     * @throws SoapFault For any errors.
+     * @throws IOException for any transport errors.
+     */
+    public void sendExited(final AddressingContext addressingContext, final InstanceIdentifier identifier)
+        throws SoapFault, IOException
+    {
+        final NamedElement contents = new NamedElement(BusinessActivityConstants.WSBA_ELEMENT_EXITED_QNAME, new NotificationType()) ;
+        final SoapBody soapBody = new SoapBody(contents, exitedAction) ;
+        addressingContext.setAction(new AttributedURIType(exitedAction)) ;
+        
+        addressingContext.setReplyTo(noneReplyTo) ;
+        
+        WSAddr2005Client.sendOneWay(soapBody, addressingContext, null, soapService) ;
+    }
+    
+    /**
+     * Send a not completed request.
+     * @param addressingContext addressing context initialised with to and message ID.
+     * @param identifier The identifier of the initiator.
+     * @throws SoapFault For any errors.
+     * @throws IOException for any transport errors.
+     */
+    public void sendNotCompleted(final AddressingContext addressingContext, final InstanceIdentifier identifier)
+        throws SoapFault, IOException
+    {
+        final NamedElement contents = new NamedElement(BusinessActivityConstants.WSBA_ELEMENT_NOT_COMPLETED_QNAME, new NotificationType()) ;
+        final SoapBody soapBody = new SoapBody(contents, notCompletedAction) ;
+        addressingContext.setAction(new AttributedURIType(notCompletedAction)) ;
+        
+        addressingContext.setReplyTo(noneReplyTo) ;
+        
+        WSAddr2005Client.sendOneWay(soapBody, addressingContext, null, soapService) ;
+    }
+    
+    /**
+     * Send a get status request.
+     * @param addressingContext addressing context initialised with to and message ID.
+     * @param identifier The identifier of the initiator.
+     * @throws SoapFault For any errors.
+     * @throws IOException for any transport errors.
+     */
+    public void sendGetStatus(final AddressingContext addressingContext, final InstanceIdentifier identifier)
+        throws SoapFault, IOException
+    {
+        final EndpointReferenceType endpointReference = getEndpointReference(identifier) ;
+        
+        final NamedElement contents = new NamedElement(BusinessActivityConstants.WSBA_ELEMENT_GET_STATUS_QNAME, new NotificationType()) ;
+        final SoapBody soapBody = new SoapBody(contents, getStatusAction) ;
+        addressingContext.setAction(new AttributedURIType(getStatusAction)) ;
+        
+        addressingContext.setFrom(endpointReference) ;
+        addressingContext.setReplyTo(noneReplyTo) ;
+        
+        WSAddr2005Client.sendOneWay(soapBody, addressingContext, null, soapService) ;
+    }
+    
+    /**
+     * Send a status request.
+     * @param addressingContext addressing context initialised with to and message ID.
+     * @param identifier The identifier of the initiator.
+     * @param state The state.
+     * @throws SoapFault For any errors.
+     * @throws IOException for any transport errors.
+     */
+    public void sendStatus(final AddressingContext addressingContext, final InstanceIdentifier identifier,
+        final State state)
+        throws SoapFault, IOException
+    {
+        final EndpointReferenceType endpointReference = getEndpointReference(identifier) ;
+        
+        final NamedElement contents = new NamedElement(BusinessActivityConstants.WSBA_ELEMENT_STATUS_QNAME, new StatusType(state)) ;
+        final SoapBody soapBody = new SoapBody(contents, statusAction) ;
+        addressingContext.setAction(new AttributedURIType(statusAction)) ;
+        
+        addressingContext.setFrom(endpointReference) ;
+        addressingContext.setReplyTo(noneReplyTo) ;
+        
+        WSAddr2005Client.sendOneWay(soapBody, addressingContext, null, soapService) ;
+    }
+
+    /**
+     * Send a fault.
+     * @param addressingContext The addressing context.
+     * @param identifier The current identifier.
+     * @param soapFault The SOAP fault. The soap fault.
+     * @param faultAction The fault action.
+     * @throws SoapFault For any errors.
+     * @throws IOException for any transport errors.
+     */
+    public void sendSoapFault(final AddressingContext addressingContext, final InstanceIdentifier identifier, final SoapFault soapFault, final String faultAction)
+        throws SoapFault, IOException
+    {
+        final EndpointReferenceType endpointReference = getEndpointReference(identifier) ;
+        
+        soapFault.setAction(faultAction) ;
+        addressingContext.setAction(new AttributedURIType(faultAction)) ;
+        
+        addressingContext.setFrom(endpointReference) ;
+        addressingContext.setReplyTo(noneReplyTo) ;
+        
+        WSAddr2005Client.sendSoapFault(soapFault, addressingContext, null, soapService) ;
+    }
+    
+    /**
+     * Get the endpoint reference for the specified identifier.
+     * @param identifier The endpoint reference identifier.
+     * @return The endpoint reference.
+     */
+    private EndpointReferenceType getEndpointReference(final InstanceIdentifier identifier)
+    {
+        final EndpointReferenceType coordinatorCompletionCoordinatorEndpoint = new EndpointReferenceType(coordinatorCompletionCoordinator) ;
+        InstanceIdentifier.setEndpointInstanceIdentifier(coordinatorCompletionCoordinatorEndpoint, identifier) ;
+        return coordinatorCompletionCoordinatorEndpoint ;
+    }
+    
+    /**
+     * Get the Completion Coordinator client singleton.
+     * @return The Completion Coordinator client singleton.
+     */
+    public static CoordinatorCompletionParticipantClient getClient()
+    {
+        return CLIENT ;
+    }
+}


Property changes on: labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/client/CoordinatorCompletionParticipantClient.java
___________________________________________________________________
Name: svn:keywords
   + Rev Date
Name: svn:eol-style
   + native

Added: labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/client/ParticipantCompletionCoordinatorClient.java
===================================================================
--- labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/client/ParticipantCompletionCoordinatorClient.java	                        (rev 0)
+++ labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/client/ParticipantCompletionCoordinatorClient.java	2007-08-14 12:43:41 UTC (rev 14200)
@@ -0,0 +1,363 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag.  All rights reserved. 
+ * See the copyright.txt in the distribution for a full listing 
+ * of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU General Public License, v. 2.0.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A 
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+ * PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+ * You should have received a copy of the GNU General Public License,
+ * v. 2.0 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+ * MA  02110-1301, USA.
+ * 
+ * (C) 2005-2006,
+ * @author JBoss Inc.
+ */
+package com.arjuna.webservices.wsba11.client;
+
+import java.io.IOException;
+
+import javax.xml.namespace.QName;
+
+import com.arjuna.webservices.HandlerRegistry;
+import com.arjuna.webservices.SoapBody;
+import com.arjuna.webservices.SoapFault;
+import com.arjuna.webservices.SoapRegistry;
+import com.arjuna.webservices.SoapService;
+import com.arjuna.webservices.base.policy.ClientPolicy;
+import com.arjuna.webservices.stax.NamedElement;
+import com.arjuna.webservices.wsaddr2005.AddressingConstants;
+import com.arjuna.webservices.wsaddr2005.AddressingContext;
+import com.arjuna.webservices.wsaddr2005.AttributedURIType;
+import com.arjuna.webservices.wsaddr2005.EndpointReferenceType;
+import com.arjuna.webservices.wsaddr2005.client.WSAddr2005Client;
+import com.arjuna.webservices.wsaddr2005.policy.AddressingPolicy;
+import com.arjuna.webservices.wsjboss.InstanceIdentifier;
+import com.arjuna.webservices.wsba11.BusinessActivityConstants;
+import com.arjuna.webservices.wsba11.ExceptionType;
+import com.arjuna.webservices.wsba11.NotificationType;
+import com.arjuna.webservices.wsba11.State;
+import com.arjuna.webservices.wsba11.StatusType;
+
+/**
+ * The Client side of the Participant Completion Coordinator.
+ * @author kevin
+ */
+public class ParticipantCompletionCoordinatorClient
+{
+    /**
+     * The client singleton.
+     */
+    private static final ParticipantCompletionCoordinatorClient CLIENT = new ParticipantCompletionCoordinatorClient() ;
+    
+    /**
+     * The completed action.
+     */
+    private final String completedAction = BusinessActivityConstants.WSBA_ACTION_COMPLETED ;
+    /**
+     * The fail action.
+     */
+    private final String failAction = BusinessActivityConstants.WSBA_ACTION_FAIL ;
+    /**
+     * The compensated action.
+     */
+    private final String compensatedAction = BusinessActivityConstants.WSBA_ACTION_COMPENSATED ;
+    /**
+     * The closed action.
+     */
+    private final String closedAction = BusinessActivityConstants.WSBA_ACTION_CLOSED ;
+    /**
+     * The cancelled action.
+     */
+    private final String cancelledAction = BusinessActivityConstants.WSBA_ACTION_CANCELLED ;
+    /**
+     * The exit action.
+     */
+    private final String exitAction = BusinessActivityConstants.WSBA_ACTION_EXIT ;
+    /**
+     * The cannot complete action.
+     */
+    private final String cannotCompleteAction = BusinessActivityConstants.WSBA_ACTION_CANNOT_COMPLETE ;
+    /**
+     * The get status action.
+     */
+    private final String getStatusAction = BusinessActivityConstants.WSBA_ACTION_GET_STATUS ;
+    /**
+     * The status action.
+     */
+    private final String statusAction = BusinessActivityConstants.WSBA_ACTION_STATUS ;
+    
+    /**
+     * The none ReplyTo endpoint reference.
+     */
+    private final EndpointReferenceType noneReplyTo = new EndpointReferenceType(new AttributedURIType(AddressingConstants.WSA_ADDRESS_NONE)) ;
+    
+    /**
+     * The SOAP service representing the client.
+     */
+    private final SoapService soapService ;
+    /**
+     * The participant completion participant URI for replies.
+     */
+    private final AttributedURIType participantCompletionParticipant ;
+    
+    /**
+     * Construct the participant completion coordinator client.
+     */
+    private ParticipantCompletionCoordinatorClient()
+    {
+        final HandlerRegistry handlerRegistry = new HandlerRegistry() ;
+        
+        // Add WS-Addressing
+        AddressingPolicy.register(handlerRegistry) ;
+        // Add client policies
+        ClientPolicy.register(handlerRegistry) ;
+        
+        soapService = new SoapService(handlerRegistry) ;
+        final String participantCompletionParticipantURI =
+            SoapRegistry.getRegistry().getServiceURI(BusinessActivityConstants.SERVICE_PARTICIPANT_COMPLETION_PARTICIPANT) ;
+        participantCompletionParticipant = new AttributedURIType(participantCompletionParticipantURI) ;
+    }
+    
+    /**
+     * Send a completed request.
+     * @param addressingContext addressing context initialised with to and message ID.
+     * @param identifier The identifier of the initiator.
+     * @throws SoapFault For any errors.
+     * @throws IOException for any transport errors.
+     */
+    public void sendCompleted(final AddressingContext addressingContext, final InstanceIdentifier identifier)
+        throws SoapFault, IOException
+    {
+        final EndpointReferenceType endpointReference = getEndpointReference(identifier) ;
+        
+        final NamedElement contents = new NamedElement(BusinessActivityConstants.WSBA_ELEMENT_COMPLETED_QNAME, new NotificationType()) ;
+        final SoapBody soapBody = new SoapBody(contents, completedAction) ;
+        addressingContext.setAction(new AttributedURIType(completedAction)) ;
+        
+        addressingContext.setFrom(endpointReference) ;
+        addressingContext.setReplyTo(noneReplyTo) ;
+        
+        WSAddr2005Client.sendOneWay(soapBody, addressingContext, null, soapService) ;
+    }
+    
+    /**
+     * Send a fail request.
+     * @param addressingContext addressing context initialised with to and message ID.
+     * @param identifier The identifier of the initiator.
+     * @param exceptionIdentifier The exception identifier.
+     * @throws SoapFault For any errors.
+     * @throws IOException for any transport errors.
+     */
+    public void sendFail(final AddressingContext addressingContext, final InstanceIdentifier identifier,
+        final QName exceptionIdentifier)
+        throws SoapFault, IOException
+    {
+        final EndpointReferenceType endpointReference = getEndpointReference(identifier) ;
+        
+        final NamedElement contents = new NamedElement(BusinessActivityConstants.WSBA_ELEMENT_FAIL_QNAME, new ExceptionType(exceptionIdentifier)) ;
+        final SoapBody soapBody = new SoapBody(contents, failAction) ;
+        addressingContext.setAction(new AttributedURIType(failAction)) ;
+        
+        addressingContext.setFrom(endpointReference) ;
+        addressingContext.setReplyTo(noneReplyTo) ;
+        
+        WSAddr2005Client.sendOneWay(soapBody, addressingContext, null, soapService) ;
+    }
+    
+    /**
+     * Send a compensated request.
+     * @param addressingContext addressing context initialised with to and message ID.
+     * @param identifier The identifier of the initiator.
+     * @throws SoapFault For any errors.
+     * @throws IOException for any transport errors.
+     */
+    public void sendCompensated(final AddressingContext addressingContext, final InstanceIdentifier identifier)
+        throws SoapFault, IOException
+    {
+        final NamedElement contents = new NamedElement(BusinessActivityConstants.WSBA_ELEMENT_COMPENSATED_QNAME, new NotificationType()) ;
+        final SoapBody soapBody = new SoapBody(contents, compensatedAction) ;
+        addressingContext.setAction(new AttributedURIType(compensatedAction)) ;
+        
+        addressingContext.setReplyTo(noneReplyTo) ;
+        
+        WSAddr2005Client.sendOneWay(soapBody, addressingContext, null, soapService) ;
+    }
+    
+    /**
+     * Send a closed request.
+     * @param addressingContext addressing context initialised with to and message ID.
+     * @param identifier The identifier of the initiator.
+     * @throws SoapFault For any errors.
+     * @throws IOException for any transport errors.
+     */
+    public void sendClosed(final AddressingContext addressingContext, final InstanceIdentifier identifier)
+        throws SoapFault, IOException
+    {
+        final NamedElement contents = new NamedElement(BusinessActivityConstants.WSBA_ELEMENT_CLOSED_QNAME, new NotificationType()) ;
+        final SoapBody soapBody = new SoapBody(contents, closedAction) ;
+        addressingContext.setAction(new AttributedURIType(closedAction)) ;
+        
+        addressingContext.setReplyTo(noneReplyTo) ;
+        
+        WSAddr2005Client.sendOneWay(soapBody, addressingContext, null, soapService) ;
+    }
+    
+    /**
+     * Send a cancelled request.
+     * @param addressingContext addressing context initialised with to and message ID.
+     * @param identifier The identifier of the initiator.
+     * @throws SoapFault For any errors.
+     * @throws IOException for any transport errors.
+     */
+    public void sendCancelled(final AddressingContext addressingContext, final InstanceIdentifier identifier)
+        throws SoapFault, IOException
+    {
+        final NamedElement contents = new NamedElement(BusinessActivityConstants.WSBA_ELEMENT_CANCELLED_QNAME, new NotificationType()) ;
+        final SoapBody soapBody = new SoapBody(contents, cancelledAction) ;
+        addressingContext.setAction(new AttributedURIType(cancelledAction)) ;
+        
+        addressingContext.setReplyTo(noneReplyTo) ;
+        
+        WSAddr2005Client.sendOneWay(soapBody, addressingContext, null, soapService) ;
+    }
+    
+    /**
+     * Send an exit request.
+     * @param addressingContext addressing context initialised with to and message ID.
+     * @param identifier The identifier of the initiator.
+     * @throws SoapFault For any errors.
+     * @throws IOException for any transport errors.
+     */
+    public void sendExit(final AddressingContext addressingContext, final InstanceIdentifier identifier)
+        throws SoapFault, IOException
+    {
+        final EndpointReferenceType endpointReference = getEndpointReference(identifier) ;
+        
+        final NamedElement contents = new NamedElement(BusinessActivityConstants.WSBA_ELEMENT_EXIT_QNAME, new NotificationType()) ;
+        final SoapBody soapBody = new SoapBody(contents, exitAction) ;
+        addressingContext.setAction(new AttributedURIType(exitAction)) ;
+        
+        addressingContext.setFrom(endpointReference) ;
+        addressingContext.setReplyTo(noneReplyTo) ;
+        
+        WSAddr2005Client.sendOneWay(soapBody, addressingContext, null, soapService) ;
+    }
+    
+    /**
+     * Send a cannot complete request.
+     * @param addressingContext addressing context initialised with to and message ID.
+     * @param identifier The identifier of the initiator.
+     * @throws SoapFault For any errors.
+     * @throws IOException for any transport errors.
+     */
+    public void sendCannotComplete(final AddressingContext addressingContext, final InstanceIdentifier identifier)
+        throws SoapFault, IOException
+    {
+        final EndpointReferenceType endpointReference = getEndpointReference(identifier) ;
+        
+        final NamedElement contents = new NamedElement(BusinessActivityConstants.WSBA_ELEMENT_CANNOT_COMPLETE_QNAME, new NotificationType()) ;
+        final SoapBody soapBody = new SoapBody(contents, cannotCompleteAction) ;
+        addressingContext.setAction(new AttributedURIType(cannotCompleteAction)) ;
+        
+        addressingContext.setFrom(endpointReference) ;
+        addressingContext.setReplyTo(noneReplyTo) ;
+        
+        WSAddr2005Client.sendOneWay(soapBody, addressingContext, null, soapService) ;
+    }
+    
+    /**
+     * Send a get status request.
+     * @param addressingContext addressing context initialised with to and message ID.
+     * @param identifier The identifier of the initiator.
+     * @throws SoapFault For any errors.
+     * @throws IOException for any transport errors.
+     */
+    public void sendGetStatus(final AddressingContext addressingContext, final InstanceIdentifier identifier)
+        throws SoapFault, IOException
+    {
+        final EndpointReferenceType endpointReference = getEndpointReference(identifier) ;
+        
+        final NamedElement contents = new NamedElement(BusinessActivityConstants.WSBA_ELEMENT_GET_STATUS_QNAME, new NotificationType()) ;
+        final SoapBody soapBody = new SoapBody(contents, getStatusAction) ;
+        addressingContext.setAction(new AttributedURIType(getStatusAction)) ;
+        
+        addressingContext.setFrom(endpointReference) ;
+        addressingContext.setReplyTo(noneReplyTo) ;
+        
+        WSAddr2005Client.sendOneWay(soapBody, addressingContext, null, soapService) ;
+    }
+    
+    /**
+     * Send a status request.
+     * @param addressingContext addressing context initialised with to and message ID.
+     * @param identifier The identifier of the initiator.
+     * @param state The state.
+     * @throws SoapFault For any errors.
+     * @throws IOException for any transport errors.
+     */
+    public void sendStatus(final AddressingContext addressingContext, final InstanceIdentifier identifier,
+        final State state)
+        throws SoapFault, IOException
+    {
+        final EndpointReferenceType endpointReference = getEndpointReference(identifier) ;
+        
+        final NamedElement contents = new NamedElement(BusinessActivityConstants.WSBA_ELEMENT_STATUS_QNAME, new StatusType(state)) ;
+        final SoapBody soapBody = new SoapBody(contents, statusAction) ;
+        addressingContext.setAction(new AttributedURIType(statusAction)) ;
+        
+        addressingContext.setFrom(endpointReference) ;
+        addressingContext.setReplyTo(noneReplyTo) ;
+        
+        WSAddr2005Client.sendOneWay(soapBody, addressingContext, null, soapService) ;
+    }
+
+    /**
+     * Send a fault.
+     * @param addressingContext The addressing context.
+     * @param identifier The current identifier.
+     * @param soapFault The SOAP fault. The soap fault.
+     * @param faultAction The fault action.
+     * @throws SoapFault For any errors.
+     * @throws IOException for any transport errors.
+     */
+    public void sendSoapFault(final AddressingContext addressingContext, final InstanceIdentifier identifier, final SoapFault soapFault, final String faultAction)
+        throws SoapFault, IOException
+    {
+        final EndpointReferenceType endpointReference = getEndpointReference(identifier) ;
+        
+        soapFault.setAction(faultAction) ;
+        addressingContext.setAction(new AttributedURIType(faultAction)) ;
+        
+        addressingContext.setFrom(endpointReference) ;
+        addressingContext.setReplyTo(noneReplyTo) ;
+        
+        WSAddr2005Client.sendSoapFault(soapFault, addressingContext, null, soapService) ;
+    }
+    
+    /**
+     * Get the endpoint reference for the specified identifier.
+     * @param identifier The endpoint reference identifier.
+     * @return The endpoint reference.
+     */
+    private EndpointReferenceType getEndpointReference(final InstanceIdentifier identifier)
+    {
+        final EndpointReferenceType participantCompletionParticipantEndpoint = new EndpointReferenceType(participantCompletionParticipant) ;
+        InstanceIdentifier.setEndpointInstanceIdentifier(participantCompletionParticipantEndpoint, identifier) ;
+        return participantCompletionParticipantEndpoint ;
+    }
+    
+    /**
+     * Get the Completion Coordinator client singleton.
+     * @return The Completion Coordinator client singleton.
+     */
+    public static ParticipantCompletionCoordinatorClient getClient()
+    {
+        return CLIENT ;
+    }
+}


Property changes on: labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/client/ParticipantCompletionCoordinatorClient.java
___________________________________________________________________
Name: svn:keywords
   + Rev Date
Name: svn:eol-style
   + native

Added: labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/client/ParticipantCompletionParticipantClient.java
===================================================================
--- labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/client/ParticipantCompletionParticipantClient.java	                        (rev 0)
+++ labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/client/ParticipantCompletionParticipantClient.java	2007-08-14 12:43:41 UTC (rev 14200)
@@ -0,0 +1,332 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag.  All rights reserved. 
+ * See the copyright.txt in the distribution for a full listing 
+ * of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU General Public License, v. 2.0.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A 
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+ * PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+ * You should have received a copy of the GNU General Public License,
+ * v. 2.0 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+ * MA  02110-1301, USA.
+ * 
+ * (C) 2005-2006,
+ * @author JBoss Inc.
+ */
+package com.arjuna.webservices.wsba11.client;
+
+import java.io.IOException;
+
+import com.arjuna.webservices.HandlerRegistry;
+import com.arjuna.webservices.SoapBody;
+import com.arjuna.webservices.SoapFault;
+import com.arjuna.webservices.SoapRegistry;
+import com.arjuna.webservices.SoapService;
+import com.arjuna.webservices.base.policy.ClientPolicy;
+import com.arjuna.webservices.stax.NamedElement;
+import com.arjuna.webservices.wsaddr2005.AddressingConstants;
+import com.arjuna.webservices.wsaddr2005.AddressingContext;
+import com.arjuna.webservices.wsaddr2005.AttributedURIType;
+import com.arjuna.webservices.wsaddr2005.EndpointReferenceType;
+import com.arjuna.webservices.wsaddr2005.client.WSAddr2005Client;
+import com.arjuna.webservices.wsaddr2005.policy.AddressingPolicy;
+import com.arjuna.webservices.wsjboss.InstanceIdentifier;
+import com.arjuna.webservices.wsba11.BusinessActivityConstants;
+import com.arjuna.webservices.wsba11.NotificationType;
+import com.arjuna.webservices.wsba11.State;
+import com.arjuna.webservices.wsba11.StatusType;
+
+/**
+ * The Client side of the Participant Participant Coordinator.
+ * @author kevin
+ */
+public class ParticipantCompletionParticipantClient
+{
+    /**
+     * The client singleton.
+     */
+    private static final ParticipantCompletionParticipantClient CLIENT = new ParticipantCompletionParticipantClient() ;
+    
+    /**
+     * The close action.
+     */
+    private final String closeAction = BusinessActivityConstants.WSBA_ACTION_CLOSE ;
+    /**
+     * The cancel action.
+     */
+    private final String cancelAction = BusinessActivityConstants.WSBA_ACTION_CANCEL ;
+    /**
+     * The compensat action.
+     */
+    private final String compensateAction = BusinessActivityConstants.WSBA_ACTION_COMPENSATE ;
+    /**
+     * The failed action.
+     */
+    private final String failedAction = BusinessActivityConstants.WSBA_ACTION_FAILED ;
+    /**
+     * The exited action.
+     */
+    private final String exitedAction = BusinessActivityConstants.WSBA_ACTION_EXITED ;
+    /**
+     * The not completed action.
+     */
+    private final String notCompletedAction = BusinessActivityConstants.WSBA_ACTION_NOT_COMPLETED ;
+    /**
+     * The get status action.
+     */
+    private final String getStatusAction = BusinessActivityConstants.WSBA_ACTION_GET_STATUS ;
+    /**
+     * The status action.
+     */
+    private final String statusAction = BusinessActivityConstants.WSBA_ACTION_STATUS ;
+    
+    /**
+     * The none ReplyTo endpoint reference.
+     */
+    private final EndpointReferenceType noneReplyTo = new EndpointReferenceType(new AttributedURIType(AddressingConstants.WSA_ADDRESS_NONE)) ;
+    
+    /**
+     * The SOAP service representing the client.
+     */
+    private final SoapService soapService ;
+    /**
+     * The participant completion coordinator URI for replies.
+     */
+    private final AttributedURIType participantCompletionCoordinator ;
+    
+    /**
+     * Construct the participant completion coordinator client.
+     */
+    private ParticipantCompletionParticipantClient()
+    {
+        final HandlerRegistry handlerRegistry = new HandlerRegistry() ;
+        
+        // Add WS-Addressing
+        AddressingPolicy.register(handlerRegistry) ;
+        // Add client policies
+        ClientPolicy.register(handlerRegistry) ;
+        
+        soapService = new SoapService(handlerRegistry) ;
+        final String participantCompletionCoordinatorURI =
+            SoapRegistry.getRegistry().getServiceURI(BusinessActivityConstants.SERVICE_PARTICIPANT_COMPLETION_COORDINATOR) ;
+        participantCompletionCoordinator = new AttributedURIType(participantCompletionCoordinatorURI) ;
+    }
+    
+    /**
+     * Send a close request.
+     * @param addressingContext addressing context initialised with to and message ID.
+     * @param identifier The identifier of the initiator.
+     * @throws SoapFault For any errors.
+     * @throws IOException for any transport errors.
+     */
+    public void sendClose(final AddressingContext addressingContext, final InstanceIdentifier identifier)
+        throws SoapFault, IOException
+    {
+        final EndpointReferenceType endpointReference = getEndpointReference(identifier) ;
+        
+        final NamedElement contents = new NamedElement(BusinessActivityConstants.WSBA_ELEMENT_CLOSE_QNAME, new NotificationType()) ;
+        final SoapBody soapBody = new SoapBody(contents, closeAction) ;
+        addressingContext.setAction(new AttributedURIType(closeAction)) ;
+        
+        addressingContext.setFrom(endpointReference) ;
+        addressingContext.setReplyTo(noneReplyTo) ;
+        
+        WSAddr2005Client.sendOneWay(soapBody, addressingContext, null, soapService) ;
+    }
+    
+    /**
+     * Send a cancel request.
+     * @param addressingContext addressing context initialised with to and message ID.
+     * @param identifier The identifier of the initiator.
+     * @throws SoapFault For any errors.
+     * @throws IOException for any transport errors.
+     */
+    public void sendCancel(final AddressingContext addressingContext, final InstanceIdentifier identifier)
+        throws SoapFault, IOException
+    {
+        final EndpointReferenceType endpointReference = getEndpointReference(identifier) ;
+        
+        final NamedElement contents = new NamedElement(BusinessActivityConstants.WSBA_ELEMENT_CANCEL_QNAME, new NotificationType()) ;
+        final SoapBody soapBody = new SoapBody(contents, cancelAction) ;
+        addressingContext.setAction(new AttributedURIType(cancelAction)) ;
+        
+        addressingContext.setFrom(endpointReference) ;
+        addressingContext.setReplyTo(noneReplyTo) ;
+        
+        WSAddr2005Client.sendOneWay(soapBody, addressingContext, null, soapService) ;
+    }
+    
+    /**
+     * Send a compensate request.
+     * @param addressingContext addressing context initialised with to and message ID.
+     * @param identifier The identifier of the initiator.
+     * @throws SoapFault For any errors.
+     * @throws IOException for any transport errors.
+     */
+    public void sendCompensate(final AddressingContext addressingContext, final InstanceIdentifier identifier)
+        throws SoapFault, IOException
+    {
+	final EndpointReferenceType endpointReference = getEndpointReference(identifier) ;
+        
+        final NamedElement contents = new NamedElement(BusinessActivityConstants.WSBA_ELEMENT_COMPENSATE_QNAME, new NotificationType()) ;
+        final SoapBody soapBody = new SoapBody(contents, compensateAction) ;
+        addressingContext.setAction(new AttributedURIType(compensateAction)) ;
+        
+        addressingContext.setFrom(endpointReference) ;
+        addressingContext.setReplyTo(noneReplyTo) ;
+        
+        WSAddr2005Client.sendOneWay(soapBody, addressingContext, null, soapService) ;
+    }
+    
+    /**
+     * Send a failed request.
+     * @param addressingContext addressing context initialised with to and message ID.
+     * @param identifier The identifier of the initiator.
+     * @throws SoapFault For any errors.
+     * @throws IOException for any transport errors.
+     */
+    public void sendFailed(final AddressingContext addressingContext, final InstanceIdentifier identifier)
+        throws SoapFault, IOException
+    {
+        final NamedElement contents = new NamedElement(BusinessActivityConstants.WSBA_ELEMENT_FAILED_QNAME, new NotificationType()) ;
+        final SoapBody soapBody = new SoapBody(contents, failedAction) ;
+        addressingContext.setAction(new AttributedURIType(failedAction)) ;
+        
+        addressingContext.setReplyTo(noneReplyTo) ;
+        
+        WSAddr2005Client.sendOneWay(soapBody, addressingContext, null, soapService) ;
+    }
+    
+    /**
+     * Send an exited request.
+     * @param addressingContext addressing context initialised with to and message ID.
+     * @param identifier The identifier of the initiator.
+     * @throws SoapFault For any errors.
+     * @throws IOException for any transport errors.
+     */
+    public void sendExited(final AddressingContext addressingContext, final InstanceIdentifier identifier)
+        throws SoapFault, IOException
+    {
+        final NamedElement contents = new NamedElement(BusinessActivityConstants.WSBA_ELEMENT_EXITED_QNAME, new NotificationType()) ;
+        final SoapBody soapBody = new SoapBody(contents, exitedAction) ;
+        addressingContext.setAction(new AttributedURIType(exitedAction)) ;
+        
+        addressingContext.setReplyTo(noneReplyTo) ;
+        
+        WSAddr2005Client.sendOneWay(soapBody, addressingContext, null, soapService) ;
+    }
+    
+    /**
+     * Send a not completed request.
+     * @param addressingContext addressing context initialised with to and message ID.
+     * @param identifier The identifier of the initiator.
+     * @throws SoapFault For any errors.
+     * @throws IOException for any transport errors.
+     */
+    public void sendNotCompleted(final AddressingContext addressingContext, final InstanceIdentifier identifier)
+        throws SoapFault, IOException
+    {
+        final NamedElement contents = new NamedElement(BusinessActivityConstants.WSBA_ELEMENT_NOT_COMPLETED_QNAME, new NotificationType()) ;
+        final SoapBody soapBody = new SoapBody(contents, notCompletedAction) ;
+        addressingContext.setAction(new AttributedURIType(notCompletedAction)) ;
+        
+        addressingContext.setReplyTo(noneReplyTo) ;
+        
+        WSAddr2005Client.sendOneWay(soapBody, addressingContext, null, soapService) ;
+    }
+    
+    /**
+     * Send a get status request.
+     * @param addressingContext addressing context initialised with to and message ID.
+     * @param identifier The identifier of the initiator.
+     * @throws SoapFault For any errors.
+     * @throws IOException for any transport errors.
+     */
+    public void sendGetStatus(final AddressingContext addressingContext, final InstanceIdentifier identifier)
+        throws SoapFault, IOException
+    {
+	final EndpointReferenceType endpointReference = getEndpointReference(identifier) ;
+        
+        final NamedElement contents = new NamedElement(BusinessActivityConstants.WSBA_ELEMENT_GET_STATUS_QNAME, new NotificationType()) ;
+        final SoapBody soapBody = new SoapBody(contents, getStatusAction) ;
+        addressingContext.setAction(new AttributedURIType(getStatusAction)) ;
+        
+        addressingContext.setFrom(endpointReference) ;
+        addressingContext.setReplyTo(noneReplyTo) ;
+        
+        WSAddr2005Client.sendOneWay(soapBody, addressingContext, null, soapService) ;
+    }
+    
+    /**
+     * Send a status request.
+     * @param addressingContext addressing context initialised with to and message ID.
+     * @param identifier The identifier of the initiator.
+     * @param state The state.
+     * @throws SoapFault For any errors.
+     * @throws IOException for any transport errors.
+     */
+    public void sendStatus(final AddressingContext addressingContext, final InstanceIdentifier identifier,
+        final State state)
+        throws SoapFault, IOException
+    {
+	final EndpointReferenceType endpointReference = getEndpointReference(identifier) ;
+        
+        final NamedElement contents = new NamedElement(BusinessActivityConstants.WSBA_ELEMENT_STATUS_QNAME, new StatusType(state)) ;
+        final SoapBody soapBody = new SoapBody(contents, statusAction) ;
+        addressingContext.setAction(new AttributedURIType(statusAction)) ;
+        
+        addressingContext.setFrom(endpointReference) ;
+        addressingContext.setReplyTo(noneReplyTo) ;
+        
+        WSAddr2005Client.sendOneWay(soapBody, addressingContext, null, soapService) ;
+    }
+
+    /**
+     * Send a fault.
+     * @param addressingContext The addressing context.
+     * @param identifier The current identifier.
+     * @param soapFault The SOAP fault. The soap fault.
+     * @param faultAction The fault action.
+     * @throws SoapFault For any errors.
+     * @throws IOException for any transport errors.
+     */
+    public void sendSoapFault(final AddressingContext addressingContext, final InstanceIdentifier identifier, final SoapFault soapFault, final String faultAction)
+        throws SoapFault, IOException
+    {
+        final EndpointReferenceType endpointReference = getEndpointReference(identifier) ;
+        
+        soapFault.setAction(faultAction) ;
+        addressingContext.setAction(new AttributedURIType(faultAction)) ;
+        
+        addressingContext.setFrom(endpointReference) ;
+        addressingContext.setReplyTo(noneReplyTo) ;
+        
+        WSAddr2005Client.sendSoapFault(soapFault, addressingContext, null, soapService) ;
+    }
+    
+    /**
+     * Get the endpoint reference for the specified identifier.
+     * @param identifier The endpoint reference identifier.
+     * @return The endpoint reference.
+     */
+    private EndpointReferenceType getEndpointReference(final InstanceIdentifier identifier)
+    {
+        final EndpointReferenceType participantCompletionCoordinatorEndpoint = new EndpointReferenceType(participantCompletionCoordinator) ;
+        InstanceIdentifier.setEndpointInstanceIdentifier(participantCompletionCoordinatorEndpoint, identifier) ;
+        return participantCompletionCoordinatorEndpoint ;
+    }
+    
+    /**
+     * Get the Completion Coordinator client singleton.
+     * @return The Completion Coordinator client singleton.
+     */
+    public static ParticipantCompletionParticipantClient getClient()
+    {
+        return CLIENT ;
+    }
+}


Property changes on: labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/client/ParticipantCompletionParticipantClient.java
___________________________________________________________________
Name: svn:keywords
   + Rev Date
Name: svn:eol-style
   + native

Added: labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/handlers/CoordinatorCompletionCoordinatorCancelledHandler.java
===================================================================
--- labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/handlers/CoordinatorCompletionCoordinatorCancelledHandler.java	                        (rev 0)
+++ labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/handlers/CoordinatorCompletionCoordinatorCancelledHandler.java	2007-08-14 12:43:41 UTC (rev 14200)
@@ -0,0 +1,63 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag.  All rights reserved. 
+ * See the copyright.txt in the distribution for a full listing 
+ * of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU General Public License, v. 2.0.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A 
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+ * PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+ * You should have received a copy of the GNU General Public License,
+ * v. 2.0 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+ * MA  02110-1301, USA.
+ * 
+ * (C) 2005-2006,
+ * @author JBoss Inc.
+ */
+package com.arjuna.webservices.wsba11.handlers;
+
+import javax.xml.stream.XMLStreamException;
+import javax.xml.stream.XMLStreamReader;
+
+import com.arjuna.webservices.BodyHandler;
+import com.arjuna.webservices.MessageContext;
+import com.arjuna.webservices.SoapBody;
+import com.arjuna.webservices.SoapFault;
+import com.arjuna.webservices.soap.SoapDetails;
+import com.arjuna.webservices.wsaddr2005.AddressingContext;
+import com.arjuna.webservices.wsjboss.JBossContext;
+import com.arjuna.webservices.wsba11.NotificationType;
+import com.arjuna.webservices.wsba11.processors.CoordinatorCompletionCoordinatorProcessor;
+
+/**
+ * The coordinator completion coordinator cancelled handler.
+ * @author kevin
+ */
+public class CoordinatorCompletionCoordinatorCancelledHandler implements BodyHandler
+{
+    /**
+     * Handle the body element.
+     * @param soapDetails The SOAP details.
+     * @param context The current message context.
+     * @param responseContext The response message context.
+     * @param action The transport SOAP action. 
+     * @param in The current stream reader.
+     * @throws XMLStreamException for parsing errors.
+     * @throws SoapFault for processing errors.
+     * @return The response elements or null if one way.
+     */
+    public SoapBody invoke(final SoapDetails soapDetails, final MessageContext context,
+        final MessageContext responseContext, final String action, final XMLStreamReader in)
+        throws XMLStreamException, SoapFault
+    {
+        final NotificationType cancelled = new NotificationType(in) ;
+        final AddressingContext addressingContext = AddressingContext.getContext(context) ;
+        final JBossContext jbossContext = JBossContext.getContext(context) ;
+        CoordinatorCompletionCoordinatorProcessor.getProcessor().cancelled(cancelled, addressingContext, jbossContext) ;
+        return null ;
+    }
+}


Property changes on: labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/handlers/CoordinatorCompletionCoordinatorCancelledHandler.java
___________________________________________________________________
Name: svn:keywords
   + Rev Date
Name: svn:eol-style
   + native

Added: labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/handlers/CoordinatorCompletionCoordinatorCannotCompleteHandler.java
===================================================================
--- labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/handlers/CoordinatorCompletionCoordinatorCannotCompleteHandler.java	                        (rev 0)
+++ labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/handlers/CoordinatorCompletionCoordinatorCannotCompleteHandler.java	2007-08-14 12:43:41 UTC (rev 14200)
@@ -0,0 +1,63 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag.  All rights reserved. 
+ * See the copyright.txt in the distribution for a full listing 
+ * of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU General Public License, v. 2.0.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A 
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+ * PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+ * You should have received a copy of the GNU General Public License,
+ * v. 2.0 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+ * MA  02110-1301, USA.
+ * 
+ * (C) 2005-2006,
+ * @author JBoss Inc.
+ */
+package com.arjuna.webservices.wsba11.handlers;
+
+import javax.xml.stream.XMLStreamException;
+import javax.xml.stream.XMLStreamReader;
+
+import com.arjuna.webservices.BodyHandler;
+import com.arjuna.webservices.MessageContext;
+import com.arjuna.webservices.SoapBody;
+import com.arjuna.webservices.SoapFault;
+import com.arjuna.webservices.soap.SoapDetails;
+import com.arjuna.webservices.wsaddr2005.AddressingContext;
+import com.arjuna.webservices.wsjboss.JBossContext;
+import com.arjuna.webservices.wsba11.NotificationType;
+import com.arjuna.webservices.wsba11.processors.CoordinatorCompletionCoordinatorProcessor;
+
+/**
+ * The coordinator completion coordinator cannot complete handler.
+ * @author kevin
+ */
+public class CoordinatorCompletionCoordinatorCannotCompleteHandler implements BodyHandler
+{
+    /**
+     * Handle the body element.
+     * @param soapDetails The SOAP details.
+     * @param context The current message context.
+     * @param responseContext The response message context.
+     * @param action The transport SOAP action. 
+     * @param in The current stream reader.
+     * @throws XMLStreamException for parsing errors.
+     * @throws SoapFault for processing errors.
+     * @return The response elements or null if one way.
+     */
+    public SoapBody invoke(final SoapDetails soapDetails, final MessageContext context,
+        final MessageContext responseContext, final String action, final XMLStreamReader in)
+        throws XMLStreamException, SoapFault
+    {
+        final NotificationType cannotComplete = new NotificationType(in) ;
+        final AddressingContext addressingContext = AddressingContext.getContext(context) ;
+        final JBossContext jbossContext = JBossContext.getContext(context) ;
+        CoordinatorCompletionCoordinatorProcessor.getProcessor().cannotComplete(cannotComplete, addressingContext, jbossContext) ;
+        return null ;
+    }
+}


Property changes on: labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/handlers/CoordinatorCompletionCoordinatorCannotCompleteHandler.java
___________________________________________________________________
Name: svn:keywords
   + Rev Date
Name: svn:eol-style
   + native

Added: labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/handlers/CoordinatorCompletionCoordinatorClosedHandler.java
===================================================================
--- labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/handlers/CoordinatorCompletionCoordinatorClosedHandler.java	                        (rev 0)
+++ labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/handlers/CoordinatorCompletionCoordinatorClosedHandler.java	2007-08-14 12:43:41 UTC (rev 14200)
@@ -0,0 +1,63 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag.  All rights reserved. 
+ * See the copyright.txt in the distribution for a full listing 
+ * of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU General Public License, v. 2.0.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A 
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+ * PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+ * You should have received a copy of the GNU General Public License,
+ * v. 2.0 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+ * MA  02110-1301, USA.
+ * 
+ * (C) 2005-2006,
+ * @author JBoss Inc.
+ */
+package com.arjuna.webservices.wsba11.handlers;
+
+import javax.xml.stream.XMLStreamException;
+import javax.xml.stream.XMLStreamReader;
+
+import com.arjuna.webservices.BodyHandler;
+import com.arjuna.webservices.MessageContext;
+import com.arjuna.webservices.SoapBody;
+import com.arjuna.webservices.SoapFault;
+import com.arjuna.webservices.soap.SoapDetails;
+import com.arjuna.webservices.wsaddr2005.AddressingContext;
+import com.arjuna.webservices.wsjboss.JBossContext;
+import com.arjuna.webservices.wsba11.NotificationType;
+import com.arjuna.webservices.wsba11.processors.CoordinatorCompletionCoordinatorProcessor;
+
+/**
+ * The coordinator completion coordinator closed handler.
+ * @author kevin
+ */
+public class CoordinatorCompletionCoordinatorClosedHandler implements BodyHandler
+{
+    /**
+     * Handle the body element.
+     * @param soapDetails The SOAP details.
+     * @param context The current message context.
+     * @param responseContext The response message context.
+     * @param action The transport SOAP action. 
+     * @param in The current stream reader.
+     * @throws XMLStreamException for parsing errors.
+     * @throws SoapFault for processing errors.
+     * @return The response elements or null if one way.
+     */
+    public SoapBody invoke(final SoapDetails soapDetails, final MessageContext context,
+        final MessageContext responseContext, final String action, final XMLStreamReader in)
+        throws XMLStreamException, SoapFault
+    {
+        final NotificationType closed = new NotificationType(in) ;
+        final AddressingContext addressingContext = AddressingContext.getContext(context) ;
+        final JBossContext jbossContext = JBossContext.getContext(context) ;
+        CoordinatorCompletionCoordinatorProcessor.getProcessor().closed(closed, addressingContext, jbossContext) ;
+        return null ;
+    }
+}


Property changes on: labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/handlers/CoordinatorCompletionCoordinatorClosedHandler.java
___________________________________________________________________
Name: svn:keywords
   + Rev Date
Name: svn:eol-style
   + native

Added: labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/handlers/CoordinatorCompletionCoordinatorCompensatedHandler.java
===================================================================
--- labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/handlers/CoordinatorCompletionCoordinatorCompensatedHandler.java	                        (rev 0)
+++ labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/handlers/CoordinatorCompletionCoordinatorCompensatedHandler.java	2007-08-14 12:43:41 UTC (rev 14200)
@@ -0,0 +1,63 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag.  All rights reserved. 
+ * See the copyright.txt in the distribution for a full listing 
+ * of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU General Public License, v. 2.0.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A 
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+ * PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+ * You should have received a copy of the GNU General Public License,
+ * v. 2.0 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+ * MA  02110-1301, USA.
+ * 
+ * (C) 2005-2006,
+ * @author JBoss Inc.
+ */
+package com.arjuna.webservices.wsba11.handlers;
+
+import javax.xml.stream.XMLStreamException;
+import javax.xml.stream.XMLStreamReader;
+
+import com.arjuna.webservices.BodyHandler;
+import com.arjuna.webservices.MessageContext;
+import com.arjuna.webservices.SoapBody;
+import com.arjuna.webservices.SoapFault;
+import com.arjuna.webservices.soap.SoapDetails;
+import com.arjuna.webservices.wsaddr2005.AddressingContext;
+import com.arjuna.webservices.wsjboss.JBossContext;
+import com.arjuna.webservices.wsba11.NotificationType;
+import com.arjuna.webservices.wsba11.processors.CoordinatorCompletionCoordinatorProcessor;
+
+/**
+ * The coordinator completion coordinator compensated handler.
+ * @author kevin
+ */
+public class CoordinatorCompletionCoordinatorCompensatedHandler implements BodyHandler
+{
+    /**
+     * Handle the body element.
+     * @param soapDetails The SOAP details.
+     * @param context The current message context.
+     * @param responseContext The response message context.
+     * @param action The transport SOAP action. 
+     * @param in The current stream reader.
+     * @throws XMLStreamException for parsing errors.
+     * @throws SoapFault for processing errors.
+     * @return The response elements or null if one way.
+     */
+    public SoapBody invoke(final SoapDetails soapDetails, final MessageContext context,
+        final MessageContext responseContext, final String action, final XMLStreamReader in)
+        throws XMLStreamException, SoapFault
+    {
+        final NotificationType compensated = new NotificationType(in) ;
+        final AddressingContext addressingContext = AddressingContext.getContext(context) ;
+        final JBossContext jbossContext = JBossContext.getContext(context) ;
+        CoordinatorCompletionCoordinatorProcessor.getProcessor().compensated(compensated, addressingContext, jbossContext) ;
+        return null ;
+    }
+}


Property changes on: labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/handlers/CoordinatorCompletionCoordinatorCompensatedHandler.java
___________________________________________________________________
Name: svn:keywords
   + Rev Date
Name: svn:eol-style
   + native

Added: labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/handlers/CoordinatorCompletionCoordinatorCompletedHandler.java
===================================================================
--- labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/handlers/CoordinatorCompletionCoordinatorCompletedHandler.java	                        (rev 0)
+++ labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/handlers/CoordinatorCompletionCoordinatorCompletedHandler.java	2007-08-14 12:43:41 UTC (rev 14200)
@@ -0,0 +1,63 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag.  All rights reserved. 
+ * See the copyright.txt in the distribution for a full listing 
+ * of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU General Public License, v. 2.0.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A 
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+ * PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+ * You should have received a copy of the GNU General Public License,
+ * v. 2.0 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+ * MA  02110-1301, USA.
+ * 
+ * (C) 2005-2006,
+ * @author JBoss Inc.
+ */
+package com.arjuna.webservices.wsba11.handlers;
+
+import javax.xml.stream.XMLStreamException;
+import javax.xml.stream.XMLStreamReader;
+
+import com.arjuna.webservices.BodyHandler;
+import com.arjuna.webservices.MessageContext;
+import com.arjuna.webservices.SoapBody;
+import com.arjuna.webservices.SoapFault;
+import com.arjuna.webservices.soap.SoapDetails;
+import com.arjuna.webservices.wsaddr2005.AddressingContext;
+import com.arjuna.webservices.wsjboss.JBossContext;
+import com.arjuna.webservices.wsba11.NotificationType;
+import com.arjuna.webservices.wsba11.processors.CoordinatorCompletionCoordinatorProcessor;
+
+/**
+ * The coordinator completion coordinator completed handler.
+ * @author kevin
+ */
+public class CoordinatorCompletionCoordinatorCompletedHandler implements BodyHandler
+{
+    /**
+     * Handle the body element.
+     * @param soapDetails The SOAP details.
+     * @param context The current message context.
+     * @param responseContext The response message context.
+     * @param action The transport SOAP action. 
+     * @param in The current stream reader.
+     * @throws XMLStreamException for parsing errors.
+     * @throws SoapFault for processing errors.
+     * @return The response elements or null if one way.
+     */
+    public SoapBody invoke(final SoapDetails soapDetails, final MessageContext context,
+        final MessageContext responseContext, final String action, final XMLStreamReader in)
+        throws XMLStreamException, SoapFault
+    {
+        final NotificationType completed = new NotificationType(in) ;
+        final AddressingContext addressingContext = AddressingContext.getContext(context) ;
+        final JBossContext jbossContext = JBossContext.getContext(context) ;
+        CoordinatorCompletionCoordinatorProcessor.getProcessor().completed(completed, addressingContext, jbossContext) ;
+        return null ;
+    }
+}


Property changes on: labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/handlers/CoordinatorCompletionCoordinatorCompletedHandler.java
___________________________________________________________________
Name: svn:keywords
   + Rev Date
Name: svn:eol-style
   + native

Added: labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/handlers/CoordinatorCompletionCoordinatorExitHandler.java
===================================================================
--- labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/handlers/CoordinatorCompletionCoordinatorExitHandler.java	                        (rev 0)
+++ labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/handlers/CoordinatorCompletionCoordinatorExitHandler.java	2007-08-14 12:43:41 UTC (rev 14200)
@@ -0,0 +1,63 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag.  All rights reserved. 
+ * See the copyright.txt in the distribution for a full listing 
+ * of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU General Public License, v. 2.0.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A 
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+ * PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+ * You should have received a copy of the GNU General Public License,
+ * v. 2.0 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+ * MA  02110-1301, USA.
+ * 
+ * (C) 2005-2006,
+ * @author JBoss Inc.
+ */
+package com.arjuna.webservices.wsba11.handlers;
+
+import javax.xml.stream.XMLStreamException;
+import javax.xml.stream.XMLStreamReader;
+
+import com.arjuna.webservices.BodyHandler;
+import com.arjuna.webservices.MessageContext;
+import com.arjuna.webservices.SoapBody;
+import com.arjuna.webservices.SoapFault;
+import com.arjuna.webservices.soap.SoapDetails;
+import com.arjuna.webservices.wsaddr2005.AddressingContext;
+import com.arjuna.webservices.wsjboss.JBossContext;
+import com.arjuna.webservices.wsba11.NotificationType;
+import com.arjuna.webservices.wsba11.processors.CoordinatorCompletionCoordinatorProcessor;
+
+/**
+ * The coordinator completion coordinator exit handler.
+ * @author kevin
+ */
+public class CoordinatorCompletionCoordinatorExitHandler implements BodyHandler
+{
+    /**
+     * Handle the body element.
+     * @param soapDetails The SOAP details.
+     * @param context The current message context.
+     * @param responseContext The response message context.
+     * @param action The transport SOAP action. 
+     * @param in The current stream reader.
+     * @throws XMLStreamException for parsing errors.
+     * @throws SoapFault for processing errors.
+     * @return The response elements or null if one way.
+     */
+    public SoapBody invoke(final SoapDetails soapDetails, final MessageContext context,
+        final MessageContext responseContext, final String action, final XMLStreamReader in)
+        throws XMLStreamException, SoapFault
+    {
+        final NotificationType exit = new NotificationType(in) ;
+        final AddressingContext addressingContext = AddressingContext.getContext(context) ;
+        final JBossContext jbossContext = JBossContext.getContext(context) ;
+        CoordinatorCompletionCoordinatorProcessor.getProcessor().exit(exit, addressingContext, jbossContext) ;
+        return null ;
+    }
+}


Property changes on: labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/handlers/CoordinatorCompletionCoordinatorExitHandler.java
___________________________________________________________________
Name: svn:keywords
   + Rev Date
Name: svn:eol-style
   + native

Added: labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/handlers/CoordinatorCompletionCoordinatorFailHandler.java
===================================================================
--- labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/handlers/CoordinatorCompletionCoordinatorFailHandler.java	                        (rev 0)
+++ labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/handlers/CoordinatorCompletionCoordinatorFailHandler.java	2007-08-14 12:43:41 UTC (rev 14200)
@@ -0,0 +1,63 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag.  All rights reserved. 
+ * See the copyright.txt in the distribution for a full listing 
+ * of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU General Public License, v. 2.0.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A 
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+ * PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+ * You should have received a copy of the GNU General Public License,
+ * v. 2.0 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+ * MA  02110-1301, USA.
+ * 
+ * (C) 2005-2006,
+ * @author JBoss Inc.
+ */
+package com.arjuna.webservices.wsba11.handlers;
+
+import javax.xml.stream.XMLStreamException;
+import javax.xml.stream.XMLStreamReader;
+
+import com.arjuna.webservices.BodyHandler;
+import com.arjuna.webservices.MessageContext;
+import com.arjuna.webservices.SoapBody;
+import com.arjuna.webservices.SoapFault;
+import com.arjuna.webservices.soap.SoapDetails;
+import com.arjuna.webservices.wsaddr2005.AddressingContext;
+import com.arjuna.webservices.wsjboss.JBossContext;
+import com.arjuna.webservices.wsba11.ExceptionType;
+import com.arjuna.webservices.wsba11.processors.CoordinatorCompletionCoordinatorProcessor;
+
+/**
+ * The coordinator completion coordinator fail handler.
+ * @author kevin
+ */
+public class CoordinatorCompletionCoordinatorFailHandler implements BodyHandler
+{
+    /**
+     * Handle the body element.
+     * @param soapDetails The SOAP details.
+     * @param context The current message context.
+     * @param responseContext The response message context.
+     * @param action The transport SOAP action. 
+     * @param in The current stream reader.
+     * @throws XMLStreamException for parsing errors.
+     * @throws SoapFault for processing errors.
+     * @return The response elements or null if one way.
+     */
+    public SoapBody invoke(final SoapDetails soapDetails, final MessageContext context,
+        final MessageContext responseContext, final String action, final XMLStreamReader in)
+        throws XMLStreamException, SoapFault
+    {
+        final ExceptionType fail = new ExceptionType(in) ;
+        final AddressingContext addressingContext = AddressingContext.getContext(context) ;
+        final JBossContext jbossContext = JBossContext.getContext(context) ;
+        CoordinatorCompletionCoordinatorProcessor.getProcessor().fail(fail, addressingContext, jbossContext) ;
+        return null ;
+    }
+}


Property changes on: labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/handlers/CoordinatorCompletionCoordinatorFailHandler.java
___________________________________________________________________
Name: svn:keywords
   + Rev Date
Name: svn:eol-style
   + native

Added: labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/handlers/CoordinatorCompletionCoordinatorFaultHandler.java
===================================================================
--- labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/handlers/CoordinatorCompletionCoordinatorFaultHandler.java	                        (rev 0)
+++ labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/handlers/CoordinatorCompletionCoordinatorFaultHandler.java	2007-08-14 12:43:41 UTC (rev 14200)
@@ -0,0 +1,42 @@
+package com.arjuna.webservices.wsba11.handlers;
+
+import javax.xml.stream.XMLStreamException;
+import javax.xml.stream.XMLStreamReader;
+
+import com.arjuna.webservices.BodyHandler;
+import com.arjuna.webservices.MessageContext;
+import com.arjuna.webservices.SoapBody;
+import com.arjuna.webservices.SoapFault;
+import com.arjuna.webservices.soap.SoapDetails;
+import com.arjuna.webservices.wsaddr2005.AddressingContext;
+import com.arjuna.webservices.wsba11.processors.CoordinatorCompletionCoordinatorProcessor;
+import com.arjuna.webservices.wsjboss.JBossContext;
+
+/**
+ * The coordinator completion coordinator fault handler.
+ * @author kevin
+ */
+public class CoordinatorCompletionCoordinatorFaultHandler implements BodyHandler
+{
+    /**
+     * Handle the body element.
+     * @param soapDetails The SOAP details.
+     * @param context The current message context.
+     * @param responseContext The r message context.
+     * @param action The transport SOAP action.
+     * @param in The current stream reader.
+     * @throws XMLStreamException for parsing errors.
+     * @throws SoapFault for processing errors.
+     * @return The response elements or null if one way.
+     */
+    public SoapBody invoke(final SoapDetails soapDetails, final MessageContext context,
+        final MessageContext responseContext, final String action, final XMLStreamReader in)
+        throws XMLStreamException, SoapFault
+    {
+        final SoapFault soapFault = soapDetails.parseSoapFault(in) ;
+        final AddressingContext addressingContext = AddressingContext.getContext(context) ;
+        final JBossContext jbossContext = JBossContext.getContext(context) ;
+        CoordinatorCompletionCoordinatorProcessor.getProcessor().soapFault(soapFault, addressingContext, jbossContext) ;
+        return null ;
+    }
+}


Property changes on: labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/handlers/CoordinatorCompletionCoordinatorFaultHandler.java
___________________________________________________________________
Name: svn:keywords
   + Rev Date
Name: svn:eol-style
   + native

Added: labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/handlers/CoordinatorCompletionCoordinatorGetStatusHandler.java
===================================================================
--- labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/handlers/CoordinatorCompletionCoordinatorGetStatusHandler.java	                        (rev 0)
+++ labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/handlers/CoordinatorCompletionCoordinatorGetStatusHandler.java	2007-08-14 12:43:41 UTC (rev 14200)
@@ -0,0 +1,63 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag.  All rights reserved. 
+ * See the copyright.txt in the distribution for a full listing 
+ * of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU General Public License, v. 2.0.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A 
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+ * PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+ * You should have received a copy of the GNU General Public License,
+ * v. 2.0 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+ * MA  02110-1301, USA.
+ * 
+ * (C) 2005-2006,
+ * @author JBoss Inc.
+ */
+package com.arjuna.webservices.wsba11.handlers;
+
+import javax.xml.stream.XMLStreamException;
+import javax.xml.stream.XMLStreamReader;
+
+import com.arjuna.webservices.BodyHandler;
+import com.arjuna.webservices.MessageContext;
+import com.arjuna.webservices.SoapBody;
+import com.arjuna.webservices.SoapFault;
+import com.arjuna.webservices.soap.SoapDetails;
+import com.arjuna.webservices.wsaddr2005.AddressingContext;
+import com.arjuna.webservices.wsjboss.JBossContext;
+import com.arjuna.webservices.wsba11.NotificationType;
+import com.arjuna.webservices.wsba11.processors.CoordinatorCompletionCoordinatorProcessor;
+
+/**
+ * The coordinator completion coordinator get status handler.
+ * @author kevin
+ */
+public class CoordinatorCompletionCoordinatorGetStatusHandler implements BodyHandler
+{
+    /**
+     * Handle the body element.
+     * @param soapDetails The SOAP details.
+     * @param context The current message context.
+     * @param responseContext The response message context.
+     * @param action The transport SOAP action. 
+     * @param in The current stream reader.
+     * @throws XMLStreamException for parsing errors.
+     * @throws SoapFault for processing errors.
+     * @return The response elements or null if one way.
+     */
+    public SoapBody invoke(final SoapDetails soapDetails, final MessageContext context,
+        final MessageContext responseContext, final String action, final XMLStreamReader in)
+        throws XMLStreamException, SoapFault
+    {
+        final NotificationType getStatus = new NotificationType(in) ;
+        final AddressingContext addressingContext = AddressingContext.getContext(context) ;
+        final JBossContext jbossContext = JBossContext.getContext(context) ;
+        CoordinatorCompletionCoordinatorProcessor.getProcessor().getStatus(getStatus, addressingContext, jbossContext) ;
+        return null ;
+    }
+}


Property changes on: labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/handlers/CoordinatorCompletionCoordinatorGetStatusHandler.java
___________________________________________________________________
Name: svn:keywords
   + Rev Date
Name: svn:eol-style
   + native

Added: labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/handlers/CoordinatorCompletionCoordinatorStatusHandler.java
===================================================================
--- labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/handlers/CoordinatorCompletionCoordinatorStatusHandler.java	                        (rev 0)
+++ labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/handlers/CoordinatorCompletionCoordinatorStatusHandler.java	2007-08-14 12:43:41 UTC (rev 14200)
@@ -0,0 +1,63 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag.  All rights reserved. 
+ * See the copyright.txt in the distribution for a full listing 
+ * of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU General Public License, v. 2.0.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A 
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+ * PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+ * You should have received a copy of the GNU General Public License,
+ * v. 2.0 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+ * MA  02110-1301, USA.
+ * 
+ * (C) 2005-2006,
+ * @author JBoss Inc.
+ */
+package com.arjuna.webservices.wsba11.handlers;
+
+import javax.xml.stream.XMLStreamException;
+import javax.xml.stream.XMLStreamReader;
+
+import com.arjuna.webservices.BodyHandler;
+import com.arjuna.webservices.MessageContext;
+import com.arjuna.webservices.SoapBody;
+import com.arjuna.webservices.SoapFault;
+import com.arjuna.webservices.soap.SoapDetails;
+import com.arjuna.webservices.wsaddr2005.AddressingContext;
+import com.arjuna.webservices.wsjboss.JBossContext;
+import com.arjuna.webservices.wsba11.StatusType;
+import com.arjuna.webservices.wsba11.processors.CoordinatorCompletionCoordinatorProcessor;
+
+/**
+ * The coordinator completion coordinator status handler.
+ * @author kevin
+ */
+public class CoordinatorCompletionCoordinatorStatusHandler implements BodyHandler
+{
+    /**
+     * Handle the body element.
+     * @param soapDetails The SOAP details.
+     * @param context The current message context.
+     * @param responseContext The response message context.
+     * @param action The transport SOAP action. 
+     * @param in The current stream reader.
+     * @throws XMLStreamException for parsing errors.
+     * @throws SoapFault for processing errors.
+     * @return The response elements or null if one way.
+     */
+    public SoapBody invoke(final SoapDetails soapDetails, final MessageContext context,
+        final MessageContext responseContext, final String action, final XMLStreamReader in)
+        throws XMLStreamException, SoapFault
+    {
+        final StatusType status = new StatusType(in) ;
+        final AddressingContext addressingContext = AddressingContext.getContext(context) ;
+        final JBossContext jbossContext = JBossContext.getContext(context) ;
+        CoordinatorCompletionCoordinatorProcessor.getProcessor().status(status, addressingContext, jbossContext) ;
+        return null ;
+    }
+}


Property changes on: labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/handlers/CoordinatorCompletionCoordinatorStatusHandler.java
___________________________________________________________________
Name: svn:keywords
   + Rev Date
Name: svn:eol-style
   + native

Added: labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/handlers/CoordinatorCompletionParticipantCancelHandler.java
===================================================================
--- labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/handlers/CoordinatorCompletionParticipantCancelHandler.java	                        (rev 0)
+++ labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/handlers/CoordinatorCompletionParticipantCancelHandler.java	2007-08-14 12:43:41 UTC (rev 14200)
@@ -0,0 +1,63 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag.  All rights reserved. 
+ * See the copyright.txt in the distribution for a full listing 
+ * of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU General Public License, v. 2.0.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A 
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+ * PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+ * You should have received a copy of the GNU General Public License,
+ * v. 2.0 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+ * MA  02110-1301, USA.
+ * 
+ * (C) 2005-2006,
+ * @author JBoss Inc.
+ */
+package com.arjuna.webservices.wsba11.handlers;
+
+import javax.xml.stream.XMLStreamException;
+import javax.xml.stream.XMLStreamReader;
+
+import com.arjuna.webservices.BodyHandler;
+import com.arjuna.webservices.MessageContext;
+import com.arjuna.webservices.SoapBody;
+import com.arjuna.webservices.SoapFault;
+import com.arjuna.webservices.soap.SoapDetails;
+import com.arjuna.webservices.wsaddr2005.AddressingContext;
+import com.arjuna.webservices.wsjboss.JBossContext;
+import com.arjuna.webservices.wsba11.NotificationType;
+import com.arjuna.webservices.wsba11.processors.CoordinatorCompletionParticipantProcessor;
+
+/**
+ * The coordinator completion participant cancel handler.
+ * @author kevin
+ */
+public class CoordinatorCompletionParticipantCancelHandler implements BodyHandler
+{
+    /**
+     * Handle the body element.
+     * @param soapDetails The SOAP details.
+     * @param context The current message context.
+     * @param responseContext The response message context.
+     * @param action The transport SOAP action. 
+     * @param in The current stream reader.
+     * @throws XMLStreamException for parsing errors.
+     * @throws SoapFault for processing errors.
+     * @return The response elements or null if one way.
+     */
+    public SoapBody invoke(final SoapDetails soapDetails, final MessageContext context,
+        final MessageContext responseContext, final String action, final XMLStreamReader in)
+        throws XMLStreamException, SoapFault
+    {
+        final NotificationType cancel = new NotificationType(in) ;
+        final AddressingContext addressingContext = AddressingContext.getContext(context) ;
+        final JBossContext jbossContext = JBossContext.getContext(context) ;
+        CoordinatorCompletionParticipantProcessor.getProcessor().cancel(cancel, addressingContext, jbossContext) ;
+        return null ;
+    }
+}


Property changes on: labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/handlers/CoordinatorCompletionParticipantCancelHandler.java
___________________________________________________________________
Name: svn:keywords
   + Rev Date
Name: svn:eol-style
   + native

Added: labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/handlers/CoordinatorCompletionParticipantCloseHandler.java
===================================================================
--- labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/handlers/CoordinatorCompletionParticipantCloseHandler.java	                        (rev 0)
+++ labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/handlers/CoordinatorCompletionParticipantCloseHandler.java	2007-08-14 12:43:41 UTC (rev 14200)
@@ -0,0 +1,63 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag.  All rights reserved. 
+ * See the copyright.txt in the distribution for a full listing 
+ * of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU General Public License, v. 2.0.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A 
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+ * PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+ * You should have received a copy of the GNU General Public License,
+ * v. 2.0 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+ * MA  02110-1301, USA.
+ * 
+ * (C) 2005-2006,
+ * @author JBoss Inc.
+ */
+package com.arjuna.webservices.wsba11.handlers;
+
+import javax.xml.stream.XMLStreamException;
+import javax.xml.stream.XMLStreamReader;
+
+import com.arjuna.webservices.BodyHandler;
+import com.arjuna.webservices.MessageContext;
+import com.arjuna.webservices.SoapBody;
+import com.arjuna.webservices.SoapFault;
+import com.arjuna.webservices.soap.SoapDetails;
+import com.arjuna.webservices.wsaddr2005.AddressingContext;
+import com.arjuna.webservices.wsjboss.JBossContext;
+import com.arjuna.webservices.wsba11.NotificationType;
+import com.arjuna.webservices.wsba11.processors.CoordinatorCompletionParticipantProcessor;
+
+/**
+ * The coordinator completion participant close handler.
+ * @author kevin
+ */
+public class CoordinatorCompletionParticipantCloseHandler implements BodyHandler
+{
+    /**
+     * Handle the body element.
+     * @param soapDetails The SOAP details.
+     * @param context The current message context.
+     * @param responseContext The response message context.
+     * @param action The transport SOAP action. 
+     * @param in The current stream reader.
+     * @throws XMLStreamException for parsing errors.
+     * @throws SoapFault for processing errors.
+     * @return The response elements or null if one way.
+     */
+    public SoapBody invoke(final SoapDetails soapDetails, final MessageContext context,
+        final MessageContext responseContext, final String action, final XMLStreamReader in)
+        throws XMLStreamException, SoapFault
+    {
+        final NotificationType close = new NotificationType(in) ;
+        final AddressingContext addressingContext = AddressingContext.getContext(context) ;
+        final JBossContext jbossContext = JBossContext.getContext(context) ;
+        CoordinatorCompletionParticipantProcessor.getProcessor().close(close, addressingContext, jbossContext) ;
+        return null ;
+    }
+}


Property changes on: labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/handlers/CoordinatorCompletionParticipantCloseHandler.java
___________________________________________________________________
Name: svn:keywords
   + Rev Date
Name: svn:eol-style
   + native

Added: labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/handlers/CoordinatorCompletionParticipantCompensateHandler.java
===================================================================
--- labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/handlers/CoordinatorCompletionParticipantCompensateHandler.java	                        (rev 0)
+++ labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/handlers/CoordinatorCompletionParticipantCompensateHandler.java	2007-08-14 12:43:41 UTC (rev 14200)
@@ -0,0 +1,63 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag.  All rights reserved. 
+ * See the copyright.txt in the distribution for a full listing 
+ * of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU General Public License, v. 2.0.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A 
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+ * PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+ * You should have received a copy of the GNU General Public License,
+ * v. 2.0 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+ * MA  02110-1301, USA.
+ * 
+ * (C) 2005-2006,
+ * @author JBoss Inc.
+ */
+package com.arjuna.webservices.wsba11.handlers;
+
+import javax.xml.stream.XMLStreamException;
+import javax.xml.stream.XMLStreamReader;
+
+import com.arjuna.webservices.BodyHandler;
+import com.arjuna.webservices.MessageContext;
+import com.arjuna.webservices.SoapBody;
+import com.arjuna.webservices.SoapFault;
+import com.arjuna.webservices.soap.SoapDetails;
+import com.arjuna.webservices.wsaddr2005.AddressingContext;
+import com.arjuna.webservices.wsjboss.JBossContext;
+import com.arjuna.webservices.wsba11.NotificationType;
+import com.arjuna.webservices.wsba11.processors.CoordinatorCompletionParticipantProcessor;
+
+/**
+ * The coordinator completion participant compensate handler.
+ * @author kevin
+ */
+public class CoordinatorCompletionParticipantCompensateHandler implements BodyHandler
+{
+    /**
+     * Handle the body element.
+     * @param soapDetails The SOAP details.
+     * @param context The current message context.
+     * @param responseContext The response message context.
+     * @param action The transport SOAP action. 
+     * @param in The current stream reader.
+     * @throws XMLStreamException for parsing errors.
+     * @throws SoapFault for processing errors.
+     * @return The response elements or null if one way.
+     */
+    public SoapBody invoke(final SoapDetails soapDetails, final MessageContext context,
+        final MessageContext responseContext, final String action, final XMLStreamReader in)
+        throws XMLStreamException, SoapFault
+    {
+        final NotificationType compensate = new NotificationType(in) ;
+        final AddressingContext addressingContext = AddressingContext.getContext(context) ;
+        final JBossContext jbossContext = JBossContext.getContext(context) ;
+        CoordinatorCompletionParticipantProcessor.getProcessor().compensate(compensate, addressingContext, jbossContext) ;
+        return null ;
+    }
+}


Property changes on: labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/handlers/CoordinatorCompletionParticipantCompensateHandler.java
___________________________________________________________________
Name: svn:keywords
   + Rev Date
Name: svn:eol-style
   + native

Added: labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/handlers/CoordinatorCompletionParticipantCompleteHandler.java
===================================================================
--- labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/handlers/CoordinatorCompletionParticipantCompleteHandler.java	                        (rev 0)
+++ labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/handlers/CoordinatorCompletionParticipantCompleteHandler.java	2007-08-14 12:43:41 UTC (rev 14200)
@@ -0,0 +1,63 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag.  All rights reserved. 
+ * See the copyright.txt in the distribution for a full listing 
+ * of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU General Public License, v. 2.0.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A 
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+ * PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+ * You should have received a copy of the GNU General Public License,
+ * v. 2.0 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+ * MA  02110-1301, USA.
+ * 
+ * (C) 2005-2006,
+ * @author JBoss Inc.
+ */
+package com.arjuna.webservices.wsba11.handlers;
+
+import javax.xml.stream.XMLStreamException;
+import javax.xml.stream.XMLStreamReader;
+
+import com.arjuna.webservices.BodyHandler;
+import com.arjuna.webservices.MessageContext;
+import com.arjuna.webservices.SoapBody;
+import com.arjuna.webservices.SoapFault;
+import com.arjuna.webservices.soap.SoapDetails;
+import com.arjuna.webservices.wsaddr2005.AddressingContext;
+import com.arjuna.webservices.wsjboss.JBossContext;
+import com.arjuna.webservices.wsba11.NotificationType;
+import com.arjuna.webservices.wsba11.processors.CoordinatorCompletionParticipantProcessor;
+
+/**
+ * The coordinator completion participant complete handler.
+ * @author kevin
+ */
+public class CoordinatorCompletionParticipantCompleteHandler implements BodyHandler
+{
+    /**
+     * Handle the body element.
+     * @param soapDetails The SOAP details.
+     * @param context The current message context.
+     * @param responseContext The response message context.
+     * @param action The transport SOAP action. 
+     * @param in The current stream reader.
+     * @throws XMLStreamException for parsing errors.
+     * @throws SoapFault for processing errors.
+     * @return The response elements or null if one way.
+     */
+    public SoapBody invoke(final SoapDetails soapDetails, final MessageContext context,
+        final MessageContext responseContext, final String action, final XMLStreamReader in)
+        throws XMLStreamException, SoapFault
+    {
+        final NotificationType complete = new NotificationType(in) ;
+        final AddressingContext addressingContext = AddressingContext.getContext(context) ;
+        final JBossContext jbossContext = JBossContext.getContext(context) ;
+        CoordinatorCompletionParticipantProcessor.getProcessor().complete(complete, addressingContext, jbossContext) ;
+        return null ;
+    }
+}


Property changes on: labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/handlers/CoordinatorCompletionParticipantCompleteHandler.java
___________________________________________________________________
Name: svn:keywords
   + Rev Date
Name: svn:eol-style
   + native

Added: labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/handlers/CoordinatorCompletionParticipantExitedHandler.java
===================================================================
--- labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/handlers/CoordinatorCompletionParticipantExitedHandler.java	                        (rev 0)
+++ labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/handlers/CoordinatorCompletionParticipantExitedHandler.java	2007-08-14 12:43:41 UTC (rev 14200)
@@ -0,0 +1,63 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag.  All rights reserved. 
+ * See the copyright.txt in the distribution for a full listing 
+ * of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU General Public License, v. 2.0.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A 
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+ * PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+ * You should have received a copy of the GNU General Public License,
+ * v. 2.0 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+ * MA  02110-1301, USA.
+ * 
+ * (C) 2005-2006,
+ * @author JBoss Inc.
+ */
+package com.arjuna.webservices.wsba11.handlers;
+
+import javax.xml.stream.XMLStreamException;
+import javax.xml.stream.XMLStreamReader;
+
+import com.arjuna.webservices.BodyHandler;
+import com.arjuna.webservices.MessageContext;
+import com.arjuna.webservices.SoapBody;
+import com.arjuna.webservices.SoapFault;
+import com.arjuna.webservices.soap.SoapDetails;
+import com.arjuna.webservices.wsaddr2005.AddressingContext;
+import com.arjuna.webservices.wsjboss.JBossContext;
+import com.arjuna.webservices.wsba11.NotificationType;
+import com.arjuna.webservices.wsba11.processors.CoordinatorCompletionParticipantProcessor;
+
+/**
+ * The coordinator completion participant exited handler.
+ * @author kevin
+ */
+public class CoordinatorCompletionParticipantExitedHandler implements BodyHandler
+{
+    /**
+     * Handle the body element.
+     * @param soapDetails The SOAP details.
+     * @param context The current message context.
+     * @param responseContext The response message context.
+     * @param action The transport SOAP action. 
+     * @param in The current stream reader.
+     * @throws XMLStreamException for parsing errors.
+     * @throws SoapFault for processing errors.
+     * @return The response elements or null if one way.
+     */
+    public SoapBody invoke(final SoapDetails soapDetails, final MessageContext context,
+        final MessageContext responseContext, final String action, final XMLStreamReader in)
+        throws XMLStreamException, SoapFault
+    {
+        final NotificationType exited = new NotificationType(in) ;
+        final AddressingContext addressingContext = AddressingContext.getContext(context) ;
+        final JBossContext jbossContext = JBossContext.getContext(context) ;
+        CoordinatorCompletionParticipantProcessor.getProcessor().exited(exited, addressingContext, jbossContext) ;
+        return null ;
+    }
+}


Property changes on: labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/handlers/CoordinatorCompletionParticipantExitedHandler.java
___________________________________________________________________
Name: svn:keywords
   + Rev Date
Name: svn:eol-style
   + native

Added: labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/handlers/CoordinatorCompletionParticipantFailedHandler.java
===================================================================
--- labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/handlers/CoordinatorCompletionParticipantFailedHandler.java	                        (rev 0)
+++ labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/handlers/CoordinatorCompletionParticipantFailedHandler.java	2007-08-14 12:43:41 UTC (rev 14200)
@@ -0,0 +1,63 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag.  All rights reserved. 
+ * See the copyright.txt in the distribution for a full listing 
+ * of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU General Public License, v. 2.0.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A 
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+ * PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+ * You should have received a copy of the GNU General Public License,
+ * v. 2.0 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+ * MA  02110-1301, USA.
+ * 
+ * (C) 2005-2006,
+ * @author JBoss Inc.
+ */
+package com.arjuna.webservices.wsba11.handlers;
+
+import javax.xml.stream.XMLStreamException;
+import javax.xml.stream.XMLStreamReader;
+
+import com.arjuna.webservices.BodyHandler;
+import com.arjuna.webservices.MessageContext;
+import com.arjuna.webservices.SoapBody;
+import com.arjuna.webservices.SoapFault;
+import com.arjuna.webservices.soap.SoapDetails;
+import com.arjuna.webservices.wsaddr2005.AddressingContext;
+import com.arjuna.webservices.wsjboss.JBossContext;
+import com.arjuna.webservices.wsba11.NotificationType;
+import com.arjuna.webservices.wsba11.processors.CoordinatorCompletionParticipantProcessor;
+
+/**
+ * The coordinator completion participant failed handler.
+ * @author kevin
+ */
+public class CoordinatorCompletionParticipantFailedHandler implements BodyHandler
+{
+    /**
+     * Handle the body element.
+     * @param soapDetails The SOAP details.
+     * @param context The current message context.
+     * @param responseContext The response message context.
+     * @param action The transport SOAP action. 
+     * @param in The current stream reader.
+     * @throws XMLStreamException for parsing errors.
+     * @throws SoapFault for processing errors.
+     * @return The response elements or null if one way.
+     */
+    public SoapBody invoke(final SoapDetails soapDetails, final MessageContext context,
+        final MessageContext responseContext, final String action, final XMLStreamReader in)
+        throws XMLStreamException, SoapFault
+    {
+        final NotificationType failed = new NotificationType(in) ;
+        final AddressingContext addressingContext = AddressingContext.getContext(context) ;
+        final JBossContext jbossContext = JBossContext.getContext(context) ;
+        CoordinatorCompletionParticipantProcessor.getProcessor().failed(failed, addressingContext, jbossContext) ;
+        return null ;
+    }
+}


Property changes on: labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/handlers/CoordinatorCompletionParticipantFailedHandler.java
___________________________________________________________________
Name: svn:keywords
   + Rev Date
Name: svn:eol-style
   + native

Added: labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/handlers/CoordinatorCompletionParticipantFaultHandler.java
===================================================================
--- labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/handlers/CoordinatorCompletionParticipantFaultHandler.java	                        (rev 0)
+++ labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/handlers/CoordinatorCompletionParticipantFaultHandler.java	2007-08-14 12:43:41 UTC (rev 14200)
@@ -0,0 +1,42 @@
+package com.arjuna.webservices.wsba11.handlers;
+
+import javax.xml.stream.XMLStreamException;
+import javax.xml.stream.XMLStreamReader;
+
+import com.arjuna.webservices.BodyHandler;
+import com.arjuna.webservices.MessageContext;
+import com.arjuna.webservices.SoapBody;
+import com.arjuna.webservices.SoapFault;
+import com.arjuna.webservices.soap.SoapDetails;
+import com.arjuna.webservices.wsaddr2005.AddressingContext;
+import com.arjuna.webservices.wsba11.processors.CoordinatorCompletionParticipantProcessor;
+import com.arjuna.webservices.wsjboss.JBossContext;
+
+/**
+ * The coordinator completion participant fault handler.
+ * @author kevin
+ */
+public class CoordinatorCompletionParticipantFaultHandler implements BodyHandler
+{
+    /**
+     * Handle the body element.
+     * @param soapDetails The SOAP details.
+     * @param context The current message context.
+     * @param responseContext The r message context.
+     * @param action The transport SOAP action.
+     * @param in The current stream reader.
+     * @throws XMLStreamException for parsing errors.
+     * @throws SoapFault for processing errors.
+     * @return The response elements or null if one way.
+     */
+    public SoapBody invoke(final SoapDetails soapDetails, final MessageContext context,
+        final MessageContext responseContext, final String action, final XMLStreamReader in)
+        throws XMLStreamException, SoapFault
+    {
+        final SoapFault soapFault = soapDetails.parseSoapFault(in) ;
+        final AddressingContext addressingContext = AddressingContext.getContext(context) ;
+        final JBossContext jbossContext = JBossContext.getContext(context) ;
+        CoordinatorCompletionParticipantProcessor.getProcessor().soapFault(soapFault, addressingContext, jbossContext) ;
+        return null ;
+    }
+}


Property changes on: labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/handlers/CoordinatorCompletionParticipantFaultHandler.java
___________________________________________________________________
Name: svn:keywords
   + Rev Date
Name: svn:eol-style
   + native

Added: labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/handlers/CoordinatorCompletionParticipantGetStatusHandler.java
===================================================================
--- labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/handlers/CoordinatorCompletionParticipantGetStatusHandler.java	                        (rev 0)
+++ labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/handlers/CoordinatorCompletionParticipantGetStatusHandler.java	2007-08-14 12:43:41 UTC (rev 14200)
@@ -0,0 +1,63 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag.  All rights reserved. 
+ * See the copyright.txt in the distribution for a full listing 
+ * of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU General Public License, v. 2.0.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A 
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+ * PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+ * You should have received a copy of the GNU General Public License,
+ * v. 2.0 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+ * MA  02110-1301, USA.
+ * 
+ * (C) 2005-2006,
+ * @author JBoss Inc.
+ */
+package com.arjuna.webservices.wsba11.handlers;
+
+import javax.xml.stream.XMLStreamException;
+import javax.xml.stream.XMLStreamReader;
+
+import com.arjuna.webservices.BodyHandler;
+import com.arjuna.webservices.MessageContext;
+import com.arjuna.webservices.SoapBody;
+import com.arjuna.webservices.SoapFault;
+import com.arjuna.webservices.soap.SoapDetails;
+import com.arjuna.webservices.wsaddr2005.AddressingContext;
+import com.arjuna.webservices.wsjboss.JBossContext;
+import com.arjuna.webservices.wsba11.NotificationType;
+import com.arjuna.webservices.wsba11.processors.CoordinatorCompletionParticipantProcessor;
+
+/**
+ * The coordinator completion participant get status handler.
+ * @author kevin
+ */
+public class CoordinatorCompletionParticipantGetStatusHandler implements BodyHandler
+{
+    /**
+     * Handle the body element.
+     * @param soapDetails The SOAP details.
+     * @param context The current message context.
+     * @param responseContext The response message context.
+     * @param action The transport SOAP action. 
+     * @param in The current stream reader.
+     * @throws XMLStreamException for parsing errors.
+     * @throws SoapFault for processing errors.
+     * @return The response elements or null if one way.
+     */
+    public SoapBody invoke(final SoapDetails soapDetails, final MessageContext context,
+        final MessageContext responseContext, final String action, final XMLStreamReader in)
+        throws XMLStreamException, SoapFault
+    {
+        final NotificationType getStatus = new NotificationType(in) ;
+        final AddressingContext addressingContext = AddressingContext.getContext(context) ;
+        final JBossContext jbossContext = JBossContext.getContext(context) ;
+        CoordinatorCompletionParticipantProcessor.getProcessor().getStatus(getStatus, addressingContext, jbossContext) ;
+        return null ;
+    }
+}


Property changes on: labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/handlers/CoordinatorCompletionParticipantGetStatusHandler.java
___________________________________________________________________
Name: svn:keywords
   + Rev Date
Name: svn:eol-style
   + native

Added: labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/handlers/CoordinatorCompletionParticipantNotCompletedHandler.java
===================================================================
--- labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/handlers/CoordinatorCompletionParticipantNotCompletedHandler.java	                        (rev 0)
+++ labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/handlers/CoordinatorCompletionParticipantNotCompletedHandler.java	2007-08-14 12:43:41 UTC (rev 14200)
@@ -0,0 +1,63 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag.  All rights reserved. 
+ * See the copyright.txt in the distribution for a full listing 
+ * of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU General Public License, v. 2.0.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A 
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+ * PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+ * You should have received a copy of the GNU General Public License,
+ * v. 2.0 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+ * MA  02110-1301, USA.
+ * 
+ * (C) 2005-2006,
+ * @author JBoss Inc.
+ */
+package com.arjuna.webservices.wsba11.handlers;
+
+import javax.xml.stream.XMLStreamException;
+import javax.xml.stream.XMLStreamReader;
+
+import com.arjuna.webservices.BodyHandler;
+import com.arjuna.webservices.MessageContext;
+import com.arjuna.webservices.SoapBody;
+import com.arjuna.webservices.SoapFault;
+import com.arjuna.webservices.soap.SoapDetails;
+import com.arjuna.webservices.wsaddr2005.AddressingContext;
+import com.arjuna.webservices.wsjboss.JBossContext;
+import com.arjuna.webservices.wsba11.NotificationType;
+import com.arjuna.webservices.wsba11.processors.CoordinatorCompletionParticipantProcessor;
+
+/**
+ * The coordinator completion participant not completed handler.
+ * @author kevin
+ */
+public class CoordinatorCompletionParticipantNotCompletedHandler implements BodyHandler
+{
+    /**
+     * Handle the body element.
+     * @param soapDetails The SOAP details.
+     * @param context The current message context.
+     * @param responseContext The response message context.
+     * @param action The transport SOAP action. 
+     * @param in The current stream reader.
+     * @throws XMLStreamException for parsing errors.
+     * @throws SoapFault for processing errors.
+     * @return The response elements or null if one way.
+     */
+    public SoapBody invoke(final SoapDetails soapDetails, final MessageContext context,
+        final MessageContext responseContext, final String action, final XMLStreamReader in)
+        throws XMLStreamException, SoapFault
+    {
+        final NotificationType notCompleted = new NotificationType(in) ;
+        final AddressingContext addressingContext = AddressingContext.getContext(context) ;
+        final JBossContext jbossContext = JBossContext.getContext(context) ;
+        CoordinatorCompletionParticipantProcessor.getProcessor().notCompleted(notCompleted, addressingContext, jbossContext) ;
+        return null ;
+    }
+}


Property changes on: labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/handlers/CoordinatorCompletionParticipantNotCompletedHandler.java
___________________________________________________________________
Name: svn:keywords
   + Rev Date
Name: svn:eol-style
   + native

Added: labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/handlers/CoordinatorCompletionParticipantStatusHandler.java
===================================================================
--- labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/handlers/CoordinatorCompletionParticipantStatusHandler.java	                        (rev 0)
+++ labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/handlers/CoordinatorCompletionParticipantStatusHandler.java	2007-08-14 12:43:41 UTC (rev 14200)
@@ -0,0 +1,63 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag.  All rights reserved. 
+ * See the copyright.txt in the distribution for a full listing 
+ * of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU General Public License, v. 2.0.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A 
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+ * PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+ * You should have received a copy of the GNU General Public License,
+ * v. 2.0 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+ * MA  02110-1301, USA.
+ * 
+ * (C) 2005-2006,
+ * @author JBoss Inc.
+ */
+package com.arjuna.webservices.wsba11.handlers;
+
+import javax.xml.stream.XMLStreamException;
+import javax.xml.stream.XMLStreamReader;
+
+import com.arjuna.webservices.BodyHandler;
+import com.arjuna.webservices.MessageContext;
+import com.arjuna.webservices.SoapBody;
+import com.arjuna.webservices.SoapFault;
+import com.arjuna.webservices.soap.SoapDetails;
+import com.arjuna.webservices.wsaddr2005.AddressingContext;
+import com.arjuna.webservices.wsjboss.JBossContext;
+import com.arjuna.webservices.wsba11.StatusType;
+import com.arjuna.webservices.wsba11.processors.CoordinatorCompletionParticipantProcessor;
+
+/**
+ * The coordinator completion participant status handler.
+ * @author kevin
+ */
+public class CoordinatorCompletionParticipantStatusHandler implements BodyHandler
+{
+    /**
+     * Handle the body element.
+     * @param soapDetails The SOAP details.
+     * @param context The current message context.
+     * @param responseContext The response message context.
+     * @param action The transport SOAP action. 
+     * @param in The current stream reader.
+     * @throws XMLStreamException for parsing errors.
+     * @throws SoapFault for processing errors.
+     * @return The response elements or null if one way.
+     */
+    public SoapBody invoke(final SoapDetails soapDetails, final MessageContext context,
+        final MessageContext responseContext, final String action, final XMLStreamReader in)
+        throws XMLStreamException, SoapFault
+    {
+        final StatusType status = new StatusType(in) ;
+        final AddressingContext addressingContext = AddressingContext.getContext(context) ;
+        final JBossContext jbossContext = JBossContext.getContext(context) ;
+        CoordinatorCompletionParticipantProcessor.getProcessor().status(status, addressingContext, jbossContext) ;
+        return null ;
+    }
+}


Property changes on: labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/handlers/CoordinatorCompletionParticipantStatusHandler.java
___________________________________________________________________
Name: svn:keywords
   + Rev Date
Name: svn:eol-style
   + native

Added: labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/handlers/ParticipantCompletionCoordinatorCancelledHandler.java
===================================================================
--- labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/handlers/ParticipantCompletionCoordinatorCancelledHandler.java	                        (rev 0)
+++ labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/handlers/ParticipantCompletionCoordinatorCancelledHandler.java	2007-08-14 12:43:41 UTC (rev 14200)
@@ -0,0 +1,63 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag.  All rights reserved. 
+ * See the copyright.txt in the distribution for a full listing 
+ * of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU General Public License, v. 2.0.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A 
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+ * PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+ * You should have received a copy of the GNU General Public License,
+ * v. 2.0 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+ * MA  02110-1301, USA.
+ * 
+ * (C) 2005-2006,
+ * @author JBoss Inc.
+ */
+package com.arjuna.webservices.wsba11.handlers;
+
+import javax.xml.stream.XMLStreamException;
+import javax.xml.stream.XMLStreamReader;
+
+import com.arjuna.webservices.BodyHandler;
+import com.arjuna.webservices.MessageContext;
+import com.arjuna.webservices.SoapBody;
+import com.arjuna.webservices.SoapFault;
+import com.arjuna.webservices.soap.SoapDetails;
+import com.arjuna.webservices.wsaddr2005.AddressingContext;
+import com.arjuna.webservices.wsjboss.JBossContext;
+import com.arjuna.webservices.wsba11.NotificationType;
+import com.arjuna.webservices.wsba11.processors.ParticipantCompletionCoordinatorProcessor;
+
+/**
+ * The participant completion coordinator cancelled handler.
+ * @author kevin
+ */
+public class ParticipantCompletionCoordinatorCancelledHandler implements BodyHandler
+{
+    /**
+     * Handle the body element.
+     * @param soapDetails The SOAP details.
+     * @param context The current message context.
+     * @param responseContext The response message context.
+     * @param action The transport SOAP action. 
+     * @param in The current stream reader.
+     * @throws XMLStreamException for parsing errors.
+     * @throws SoapFault for processing errors.
+     * @return The response elements or null if one way.
+     */
+    public SoapBody invoke(final SoapDetails soapDetails, final MessageContext context,
+        final MessageContext responseContext, final String action, final XMLStreamReader in)
+        throws XMLStreamException, SoapFault
+    {
+        final NotificationType cancelled = new NotificationType(in) ;
+        final AddressingContext addressingContext = AddressingContext.getContext(context) ;
+        final JBossContext jbossContext = JBossContext.getContext(context) ;
+        ParticipantCompletionCoordinatorProcessor.getProcessor().cancelled(cancelled, addressingContext, jbossContext) ;
+        return null ;
+    }
+}


Property changes on: labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/handlers/ParticipantCompletionCoordinatorCancelledHandler.java
___________________________________________________________________
Name: svn:keywords
   + Rev Date
Name: svn:eol-style
   + native

Added: labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/handlers/ParticipantCompletionCoordinatorCannotCompleteHandler.java
===================================================================
--- labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/handlers/ParticipantCompletionCoordinatorCannotCompleteHandler.java	                        (rev 0)
+++ labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/handlers/ParticipantCompletionCoordinatorCannotCompleteHandler.java	2007-08-14 12:43:41 UTC (rev 14200)
@@ -0,0 +1,63 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag.  All rights reserved. 
+ * See the copyright.txt in the distribution for a full listing 
+ * of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU General Public License, v. 2.0.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A 
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+ * PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+ * You should have received a copy of the GNU General Public License,
+ * v. 2.0 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+ * MA  02110-1301, USA.
+ * 
+ * (C) 2005-2006,
+ * @author JBoss Inc.
+ */
+package com.arjuna.webservices.wsba11.handlers;
+
+import javax.xml.stream.XMLStreamException;
+import javax.xml.stream.XMLStreamReader;
+
+import com.arjuna.webservices.BodyHandler;
+import com.arjuna.webservices.MessageContext;
+import com.arjuna.webservices.SoapBody;
+import com.arjuna.webservices.SoapFault;
+import com.arjuna.webservices.soap.SoapDetails;
+import com.arjuna.webservices.wsaddr2005.AddressingContext;
+import com.arjuna.webservices.wsjboss.JBossContext;
+import com.arjuna.webservices.wsba11.NotificationType;
+import com.arjuna.webservices.wsba11.processors.ParticipantCompletionCoordinatorProcessor;
+
+/**
+ * The participant completion coordinator cannot complete handler.
+ * @author kevin
+ */
+public class ParticipantCompletionCoordinatorCannotCompleteHandler implements BodyHandler
+{
+    /**
+     * Handle the body element.
+     * @param soapDetails The SOAP details.
+     * @param context The current message context.
+     * @param responseContext The response message context.
+     * @param action The transport SOAP action. 
+     * @param in The current stream reader.
+     * @throws XMLStreamException for parsing errors.
+     * @throws SoapFault for processing errors.
+     * @return The response elements or null if one way.
+     */
+    public SoapBody invoke(final SoapDetails soapDetails, final MessageContext context,
+        final MessageContext responseContext, final String action, final XMLStreamReader in)
+        throws XMLStreamException, SoapFault
+    {
+        final NotificationType cannotComplete = new NotificationType(in) ;
+        final AddressingContext addressingContext = AddressingContext.getContext(context) ;
+        final JBossContext jbossContext = JBossContext.getContext(context) ;
+        ParticipantCompletionCoordinatorProcessor.getProcessor().cannotComplete(cannotComplete, addressingContext, jbossContext) ;
+        return null ;
+    }
+}


Property changes on: labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/handlers/ParticipantCompletionCoordinatorCannotCompleteHandler.java
___________________________________________________________________
Name: svn:keywords
   + Rev Date
Name: svn:eol-style
   + native

Added: labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/handlers/ParticipantCompletionCoordinatorClosedHandler.java
===================================================================
--- labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/handlers/ParticipantCompletionCoordinatorClosedHandler.java	                        (rev 0)
+++ labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/handlers/ParticipantCompletionCoordinatorClosedHandler.java	2007-08-14 12:43:41 UTC (rev 14200)
@@ -0,0 +1,63 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag.  All rights reserved. 
+ * See the copyright.txt in the distribution for a full listing 
+ * of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU General Public License, v. 2.0.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A 
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+ * PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+ * You should have received a copy of the GNU General Public License,
+ * v. 2.0 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+ * MA  02110-1301, USA.
+ * 
+ * (C) 2005-2006,
+ * @author JBoss Inc.
+ */
+package com.arjuna.webservices.wsba11.handlers;
+
+import javax.xml.stream.XMLStreamException;
+import javax.xml.stream.XMLStreamReader;
+
+import com.arjuna.webservices.BodyHandler;
+import com.arjuna.webservices.MessageContext;
+import com.arjuna.webservices.SoapBody;
+import com.arjuna.webservices.SoapFault;
+import com.arjuna.webservices.soap.SoapDetails;
+import com.arjuna.webservices.wsaddr2005.AddressingContext;
+import com.arjuna.webservices.wsjboss.JBossContext;
+import com.arjuna.webservices.wsba11.NotificationType;
+import com.arjuna.webservices.wsba11.processors.ParticipantCompletionCoordinatorProcessor;
+
+/**
+ * The participant completion coordinator closed handler.
+ * @author kevin
+ */
+public class ParticipantCompletionCoordinatorClosedHandler implements BodyHandler
+{
+    /**
+     * Handle the body element.
+     * @param soapDetails The SOAP details.
+     * @param context The current message context.
+     * @param responseContext The response message context.
+     * @param action The transport SOAP action. 
+     * @param in The current stream reader.
+     * @throws XMLStreamException for parsing errors.
+     * @throws SoapFault for processing errors.
+     * @return The response elements or null if one way.
+     */
+    public SoapBody invoke(final SoapDetails soapDetails, final MessageContext context,
+        final MessageContext responseContext, final String action, final XMLStreamReader in)
+        throws XMLStreamException, SoapFault
+    {
+        final NotificationType closed = new NotificationType(in) ;
+        final AddressingContext addressingContext = AddressingContext.getContext(context) ;
+        final JBossContext jbossContext = JBossContext.getContext(context) ;
+        ParticipantCompletionCoordinatorProcessor.getProcessor().closed(closed, addressingContext, jbossContext) ;
+        return null ;
+    }
+}


Property changes on: labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/handlers/ParticipantCompletionCoordinatorClosedHandler.java
___________________________________________________________________
Name: svn:keywords
   + Rev Date
Name: svn:eol-style
   + native

Added: labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/handlers/ParticipantCompletionCoordinatorCompensatedHandler.java
===================================================================
--- labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/handlers/ParticipantCompletionCoordinatorCompensatedHandler.java	                        (rev 0)
+++ labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/handlers/ParticipantCompletionCoordinatorCompensatedHandler.java	2007-08-14 12:43:41 UTC (rev 14200)
@@ -0,0 +1,63 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag.  All rights reserved. 
+ * See the copyright.txt in the distribution for a full listing 
+ * of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU General Public License, v. 2.0.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A 
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+ * PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+ * You should have received a copy of the GNU General Public License,
+ * v. 2.0 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+ * MA  02110-1301, USA.
+ * 
+ * (C) 2005-2006,
+ * @author JBoss Inc.
+ */
+package com.arjuna.webservices.wsba11.handlers;
+
+import javax.xml.stream.XMLStreamException;
+import javax.xml.stream.XMLStreamReader;
+
+import com.arjuna.webservices.BodyHandler;
+import com.arjuna.webservices.MessageContext;
+import com.arjuna.webservices.SoapBody;
+import com.arjuna.webservices.SoapFault;
+import com.arjuna.webservices.soap.SoapDetails;
+import com.arjuna.webservices.wsaddr2005.AddressingContext;
+import com.arjuna.webservices.wsjboss.JBossContext;
+import com.arjuna.webservices.wsba11.NotificationType;
+import com.arjuna.webservices.wsba11.processors.ParticipantCompletionCoordinatorProcessor;
+
+/**
+ * The participant completion coordinator compensated handler.
+ * @author kevin
+ */
+public class ParticipantCompletionCoordinatorCompensatedHandler implements BodyHandler
+{
+    /**
+     * Handle the body element.
+     * @param soapDetails The SOAP details.
+     * @param context The current message context.
+     * @param responseContext The response message context.
+     * @param action The transport SOAP action. 
+     * @param in The current stream reader.
+     * @throws XMLStreamException for parsing errors.
+     * @throws SoapFault for processing errors.
+     * @return The response elements or null if one way.
+     */
+    public SoapBody invoke(final SoapDetails soapDetails, final MessageContext context,
+        final MessageContext responseContext, final String action, final XMLStreamReader in)
+        throws XMLStreamException, SoapFault
+    {
+        final NotificationType compensated = new NotificationType(in) ;
+        final AddressingContext addressingContext = AddressingContext.getContext(context) ;
+        final JBossContext jbossContext = JBossContext.getContext(context) ;
+        ParticipantCompletionCoordinatorProcessor.getProcessor().compensated(compensated, addressingContext, jbossContext) ;
+        return null ;
+    }
+}


Property changes on: labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/handlers/ParticipantCompletionCoordinatorCompensatedHandler.java
___________________________________________________________________
Name: svn:keywords
   + Rev Date
Name: svn:eol-style
   + native

Added: labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/handlers/ParticipantCompletionCoordinatorCompletedHandler.java
===================================================================
--- labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/handlers/ParticipantCompletionCoordinatorCompletedHandler.java	                        (rev 0)
+++ labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/handlers/ParticipantCompletionCoordinatorCompletedHandler.java	2007-08-14 12:43:41 UTC (rev 14200)
@@ -0,0 +1,63 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag.  All rights reserved. 
+ * See the copyright.txt in the distribution for a full listing 
+ * of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU General Public License, v. 2.0.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A 
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+ * PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+ * You should have received a copy of the GNU General Public License,
+ * v. 2.0 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+ * MA  02110-1301, USA.
+ * 
+ * (C) 2005-2006,
+ * @author JBoss Inc.
+ */
+package com.arjuna.webservices.wsba11.handlers;
+
+import javax.xml.stream.XMLStreamException;
+import javax.xml.stream.XMLStreamReader;
+
+import com.arjuna.webservices.BodyHandler;
+import com.arjuna.webservices.MessageContext;
+import com.arjuna.webservices.SoapBody;
+import com.arjuna.webservices.SoapFault;
+import com.arjuna.webservices.soap.SoapDetails;
+import com.arjuna.webservices.wsaddr2005.AddressingContext;
+import com.arjuna.webservices.wsjboss.JBossContext;
+import com.arjuna.webservices.wsba11.NotificationType;
+import com.arjuna.webservices.wsba11.processors.ParticipantCompletionCoordinatorProcessor;
+
+/**
+ * The participant completion coordinator completed handler.
+ * @author kevin
+ */
+public class ParticipantCompletionCoordinatorCompletedHandler implements BodyHandler
+{
+    /**
+     * Handle the body element.
+     * @param soapDetails The SOAP details.
+     * @param context The current message context.
+     * @param responseContext The response message context.
+     * @param action The transport SOAP action. 
+     * @param in The current stream reader.
+     * @throws XMLStreamException for parsing errors.
+     * @throws SoapFault for processing errors.
+     * @return The response elements or null if one way.
+     */
+    public SoapBody invoke(final SoapDetails soapDetails, final MessageContext context,
+        final MessageContext responseContext, final String action, final XMLStreamReader in)
+        throws XMLStreamException, SoapFault
+    {
+        final NotificationType completed = new NotificationType(in) ;
+        final AddressingContext addressingContext = AddressingContext.getContext(context) ;
+        final JBossContext jbossContext = JBossContext.getContext(context) ;
+        ParticipantCompletionCoordinatorProcessor.getProcessor().completed(completed, addressingContext, jbossContext) ;
+        return null ;
+    }
+}


Property changes on: labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/handlers/ParticipantCompletionCoordinatorCompletedHandler.java
___________________________________________________________________
Name: svn:keywords
   + Rev Date
Name: svn:eol-style
   + native

Added: labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/handlers/ParticipantCompletionCoordinatorExitHandler.java
===================================================================
--- labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/handlers/ParticipantCompletionCoordinatorExitHandler.java	                        (rev 0)
+++ labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/handlers/ParticipantCompletionCoordinatorExitHandler.java	2007-08-14 12:43:41 UTC (rev 14200)
@@ -0,0 +1,63 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag.  All rights reserved. 
+ * See the copyright.txt in the distribution for a full listing 
+ * of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU General Public License, v. 2.0.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A 
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+ * PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+ * You should have received a copy of the GNU General Public License,
+ * v. 2.0 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+ * MA  02110-1301, USA.
+ * 
+ * (C) 2005-2006,
+ * @author JBoss Inc.
+ */
+package com.arjuna.webservices.wsba11.handlers;
+
+import javax.xml.stream.XMLStreamException;
+import javax.xml.stream.XMLStreamReader;
+
+import com.arjuna.webservices.BodyHandler;
+import com.arjuna.webservices.MessageContext;
+import com.arjuna.webservices.SoapBody;
+import com.arjuna.webservices.SoapFault;
+import com.arjuna.webservices.soap.SoapDetails;
+import com.arjuna.webservices.wsaddr2005.AddressingContext;
+import com.arjuna.webservices.wsjboss.JBossContext;
+import com.arjuna.webservices.wsba11.NotificationType;
+import com.arjuna.webservices.wsba11.processors.ParticipantCompletionCoordinatorProcessor;
+
+/**
+ * The participant completion coordinator exit handler.
+ * @author kevin
+ */
+public class ParticipantCompletionCoordinatorExitHandler implements BodyHandler
+{
+    /**
+     * Handle the body element.
+     * @param soapDetails The SOAP details.
+     * @param context The current message context.
+     * @param responseContext The response message context.
+     * @param action The transport SOAP action. 
+     * @param in The current stream reader.
+     * @throws XMLStreamException for parsing errors.
+     * @throws SoapFault for processing errors.
+     * @return The response elements or null if one way.
+     */
+    public SoapBody invoke(final SoapDetails soapDetails, final MessageContext context,
+        final MessageContext responseContext, final String action, final XMLStreamReader in)
+        throws XMLStreamException, SoapFault
+    {
+        final NotificationType exit = new NotificationType(in) ;
+        final AddressingContext addressingContext = AddressingContext.getContext(context) ;
+        final JBossContext jbossContext = JBossContext.getContext(context) ;
+        ParticipantCompletionCoordinatorProcessor.getProcessor().exit(exit, addressingContext, jbossContext) ;
+        return null ;
+    }
+}


Property changes on: labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/handlers/ParticipantCompletionCoordinatorExitHandler.java
___________________________________________________________________
Name: svn:keywords
   + Rev Date
Name: svn:eol-style
   + native

Added: labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/handlers/ParticipantCompletionCoordinatorFailHandler.java
===================================================================
--- labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/handlers/ParticipantCompletionCoordinatorFailHandler.java	                        (rev 0)
+++ labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/handlers/ParticipantCompletionCoordinatorFailHandler.java	2007-08-14 12:43:41 UTC (rev 14200)
@@ -0,0 +1,63 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag.  All rights reserved. 
+ * See the copyright.txt in the distribution for a full listing 
+ * of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU General Public License, v. 2.0.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A 
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+ * PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+ * You should have received a copy of the GNU General Public License,
+ * v. 2.0 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+ * MA  02110-1301, USA.
+ * 
+ * (C) 2005-2006,
+ * @author JBoss Inc.
+ */
+package com.arjuna.webservices.wsba11.handlers;
+
+import javax.xml.stream.XMLStreamException;
+import javax.xml.stream.XMLStreamReader;
+
+import com.arjuna.webservices.BodyHandler;
+import com.arjuna.webservices.MessageContext;
+import com.arjuna.webservices.SoapBody;
+import com.arjuna.webservices.SoapFault;
+import com.arjuna.webservices.soap.SoapDetails;
+import com.arjuna.webservices.wsaddr2005.AddressingContext;
+import com.arjuna.webservices.wsjboss.JBossContext;
+import com.arjuna.webservices.wsba11.ExceptionType;
+import com.arjuna.webservices.wsba11.processors.ParticipantCompletionCoordinatorProcessor;
+
+/**
+ * The participant completion coordinator fail handler.
+ * @author kevin
+ */
+public class ParticipantCompletionCoordinatorFailHandler implements BodyHandler
+{
+    /**
+     * Handle the body element.
+     * @param soapDetails The SOAP details.
+     * @param context The current message context.
+     * @param responseContext The response message context.
+     * @param action The transport SOAP action. 
+     * @param in The current stream reader.
+     * @throws XMLStreamException for parsing errors.
+     * @throws SoapFault for processing errors.
+     * @return The response elements or null if one way.
+     */
+    public SoapBody invoke(final SoapDetails soapDetails, final MessageContext context,
+        final MessageContext responseContext, final String action, final XMLStreamReader in)
+        throws XMLStreamException, SoapFault
+    {
+        final ExceptionType fail = new ExceptionType(in) ;
+        final AddressingContext addressingContext = AddressingContext.getContext(context) ;
+        final JBossContext jbossContext = JBossContext.getContext(context) ;
+        ParticipantCompletionCoordinatorProcessor.getProcessor().fail(fail, addressingContext, jbossContext) ;
+        return null ;
+    }
+}


Property changes on: labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/handlers/ParticipantCompletionCoordinatorFailHandler.java
___________________________________________________________________
Name: svn:keywords
   + Rev Date
Name: svn:eol-style
   + native

Added: labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/handlers/ParticipantCompletionCoordinatorFaultHandler.java
===================================================================
--- labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/handlers/ParticipantCompletionCoordinatorFaultHandler.java	                        (rev 0)
+++ labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/handlers/ParticipantCompletionCoordinatorFaultHandler.java	2007-08-14 12:43:41 UTC (rev 14200)
@@ -0,0 +1,42 @@
+package com.arjuna.webservices.wsba11.handlers;
+
+import javax.xml.stream.XMLStreamException;
+import javax.xml.stream.XMLStreamReader;
+
+import com.arjuna.webservices.BodyHandler;
+import com.arjuna.webservices.MessageContext;
+import com.arjuna.webservices.SoapBody;
+import com.arjuna.webservices.SoapFault;
+import com.arjuna.webservices.soap.SoapDetails;
+import com.arjuna.webservices.wsaddr2005.AddressingContext;
+import com.arjuna.webservices.wsba11.processors.ParticipantCompletionCoordinatorProcessor;
+import com.arjuna.webservices.wsjboss.JBossContext;
+
+/**
+ * The participant completion coordinator fault handler.
+ * @author kevin
+ */
+public class ParticipantCompletionCoordinatorFaultHandler implements BodyHandler
+{
+    /**
+     * Handle the body element.
+     * @param soapDetails The SOAP details.
+     * @param context The current message context.
+     * @param responseContext The r message context.
+     * @param action The transport SOAP action.
+     * @param in The current stream reader.
+     * @throws XMLStreamException for parsing errors.
+     * @throws SoapFault for processing errors.
+     * @return The response elements or null if one way.
+     */
+    public SoapBody invoke(final SoapDetails soapDetails, final MessageContext context,
+        final MessageContext responseContext, final String action, final XMLStreamReader in)
+        throws XMLStreamException, SoapFault
+    {
+        final SoapFault soapFault = soapDetails.parseSoapFault(in) ;
+        final AddressingContext addressingContext = AddressingContext.getContext(context) ;
+        final JBossContext jbossContext = JBossContext.getContext(context) ;
+        ParticipantCompletionCoordinatorProcessor.getProcessor().soapFault(soapFault, addressingContext, jbossContext) ;
+        return null ;
+    }
+}


Property changes on: labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/handlers/ParticipantCompletionCoordinatorFaultHandler.java
___________________________________________________________________
Name: svn:keywords
   + Rev Date
Name: svn:eol-style
   + native

Added: labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/handlers/ParticipantCompletionCoordinatorGetStatusHandler.java
===================================================================
--- labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/handlers/ParticipantCompletionCoordinatorGetStatusHandler.java	                        (rev 0)
+++ labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/handlers/ParticipantCompletionCoordinatorGetStatusHandler.java	2007-08-14 12:43:41 UTC (rev 14200)
@@ -0,0 +1,63 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag.  All rights reserved. 
+ * See the copyright.txt in the distribution for a full listing 
+ * of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU General Public License, v. 2.0.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A 
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+ * PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+ * You should have received a copy of the GNU General Public License,
+ * v. 2.0 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+ * MA  02110-1301, USA.
+ * 
+ * (C) 2005-2006,
+ * @author JBoss Inc.
+ */
+package com.arjuna.webservices.wsba11.handlers;
+
+import javax.xml.stream.XMLStreamException;
+import javax.xml.stream.XMLStreamReader;
+
+import com.arjuna.webservices.BodyHandler;
+import com.arjuna.webservices.MessageContext;
+import com.arjuna.webservices.SoapBody;
+import com.arjuna.webservices.SoapFault;
+import com.arjuna.webservices.soap.SoapDetails;
+import com.arjuna.webservices.wsaddr2005.AddressingContext;
+import com.arjuna.webservices.wsjboss.JBossContext;
+import com.arjuna.webservices.wsba11.NotificationType;
+import com.arjuna.webservices.wsba11.processors.ParticipantCompletionCoordinatorProcessor;
+
+/**
+ * The participant completion coordinator get status handler.
+ * @author kevin
+ */
+public class ParticipantCompletionCoordinatorGetStatusHandler implements BodyHandler
+{
+    /**
+     * Handle the body element.
+     * @param soapDetails The SOAP details.
+     * @param context The current message context.
+     * @param responseContext The response message context.
+     * @param action The transport SOAP action. 
+     * @param in The current stream reader.
+     * @throws XMLStreamException for parsing errors.
+     * @throws SoapFault for processing errors.
+     * @return The response elements or null if one way.
+     */
+    public SoapBody invoke(final SoapDetails soapDetails, final MessageContext context,
+        final MessageContext responseContext, final String action, final XMLStreamReader in)
+        throws XMLStreamException, SoapFault
+    {
+        final NotificationType getStatus = new NotificationType(in) ;
+        final AddressingContext addressingContext = AddressingContext.getContext(context) ;
+        final JBossContext jbossContext = JBossContext.getContext(context) ;
+        ParticipantCompletionCoordinatorProcessor.getProcessor().getStatus(getStatus, addressingContext, jbossContext) ;
+        return null ;
+    }
+}


Property changes on: labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/handlers/ParticipantCompletionCoordinatorGetStatusHandler.java
___________________________________________________________________
Name: svn:keywords
   + Rev Date
Name: svn:eol-style
   + native

Added: labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/handlers/ParticipantCompletionCoordinatorStatusHandler.java
===================================================================
--- labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/handlers/ParticipantCompletionCoordinatorStatusHandler.java	                        (rev 0)
+++ labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/handlers/ParticipantCompletionCoordinatorStatusHandler.java	2007-08-14 12:43:41 UTC (rev 14200)
@@ -0,0 +1,63 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag.  All rights reserved. 
+ * See the copyright.txt in the distribution for a full listing 
+ * of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU General Public License, v. 2.0.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A 
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+ * PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+ * You should have received a copy of the GNU General Public License,
+ * v. 2.0 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+ * MA  02110-1301, USA.
+ * 
+ * (C) 2005-2006,
+ * @author JBoss Inc.
+ */
+package com.arjuna.webservices.wsba11.handlers;
+
+import javax.xml.stream.XMLStreamException;
+import javax.xml.stream.XMLStreamReader;
+
+import com.arjuna.webservices.BodyHandler;
+import com.arjuna.webservices.MessageContext;
+import com.arjuna.webservices.SoapBody;
+import com.arjuna.webservices.SoapFault;
+import com.arjuna.webservices.soap.SoapDetails;
+import com.arjuna.webservices.wsaddr2005.AddressingContext;
+import com.arjuna.webservices.wsjboss.JBossContext;
+import com.arjuna.webservices.wsba11.StatusType;
+import com.arjuna.webservices.wsba11.processors.ParticipantCompletionCoordinatorProcessor;
+
+/**
+ * The participant completion coordinator status handler.
+ * @author kevin
+ */
+public class ParticipantCompletionCoordinatorStatusHandler implements BodyHandler
+{
+    /**
+     * Handle the body element.
+     * @param soapDetails The SOAP details.
+     * @param context The current message context.
+     * @param responseContext The response message context.
+     * @param action The transport SOAP action. 
+     * @param in The current stream reader.
+     * @throws XMLStreamException for parsing errors.
+     * @throws SoapFault for processing errors.
+     * @return The response elements or null if one way.
+     */
+    public SoapBody invoke(final SoapDetails soapDetails, final MessageContext context,
+        final MessageContext responseContext, final String action, final XMLStreamReader in)
+        throws XMLStreamException, SoapFault
+    {
+        final StatusType status = new StatusType(in) ;
+        final AddressingContext addressingContext = AddressingContext.getContext(context) ;
+        final JBossContext jbossContext = JBossContext.getContext(context) ;
+        ParticipantCompletionCoordinatorProcessor.getProcessor().status(status, addressingContext, jbossContext) ;
+        return null ;
+    }
+}


Property changes on: labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/handlers/ParticipantCompletionCoordinatorStatusHandler.java
___________________________________________________________________
Name: svn:keywords
   + Rev Date
Name: svn:eol-style
   + native

Added: labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/handlers/ParticipantCompletionParticipantCancelHandler.java
===================================================================
--- labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/handlers/ParticipantCompletionParticipantCancelHandler.java	                        (rev 0)
+++ labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/handlers/ParticipantCompletionParticipantCancelHandler.java	2007-08-14 12:43:41 UTC (rev 14200)
@@ -0,0 +1,63 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag.  All rights reserved. 
+ * See the copyright.txt in the distribution for a full listing 
+ * of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU General Public License, v. 2.0.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A 
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+ * PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+ * You should have received a copy of the GNU General Public License,
+ * v. 2.0 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+ * MA  02110-1301, USA.
+ * 
+ * (C) 2005-2006,
+ * @author JBoss Inc.
+ */
+package com.arjuna.webservices.wsba11.handlers;
+
+import javax.xml.stream.XMLStreamException;
+import javax.xml.stream.XMLStreamReader;
+
+import com.arjuna.webservices.BodyHandler;
+import com.arjuna.webservices.MessageContext;
+import com.arjuna.webservices.SoapBody;
+import com.arjuna.webservices.SoapFault;
+import com.arjuna.webservices.soap.SoapDetails;
+import com.arjuna.webservices.wsaddr2005.AddressingContext;
+import com.arjuna.webservices.wsjboss.JBossContext;
+import com.arjuna.webservices.wsba11.NotificationType;
+import com.arjuna.webservices.wsba11.processors.ParticipantCompletionParticipantProcessor;
+
+/**
+ * The participant completion participant cancel handler.
+ * @author kevin
+ */
+public class ParticipantCompletionParticipantCancelHandler implements BodyHandler
+{
+    /**
+     * Handle the body element.
+     * @param soapDetails The SOAP details.
+     * @param context The current message context.
+     * @param responseContext The response message context.
+     * @param action The transport SOAP action. 
+     * @param in The current stream reader.
+     * @throws XMLStreamException for parsing errors.
+     * @throws SoapFault for processing errors.
+     * @return The response elements or null if one way.
+     */
+    public SoapBody invoke(final SoapDetails soapDetails, final MessageContext context,
+        final MessageContext responseContext, final String action, final XMLStreamReader in)
+        throws XMLStreamException, SoapFault
+    {
+        final NotificationType cancel = new NotificationType(in) ;
+        final AddressingContext addressingContext = AddressingContext.getContext(context) ;
+        final JBossContext jbossContext = JBossContext.getContext(context) ;
+        ParticipantCompletionParticipantProcessor.getProcessor().cancel(cancel, addressingContext, jbossContext) ;
+        return null ;
+    }
+}


Property changes on: labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/handlers/ParticipantCompletionParticipantCancelHandler.java
___________________________________________________________________
Name: svn:keywords
   + Rev Date
Name: svn:eol-style
   + native

Added: labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/handlers/ParticipantCompletionParticipantCloseHandler.java
===================================================================
--- labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/handlers/ParticipantCompletionParticipantCloseHandler.java	                        (rev 0)
+++ labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/handlers/ParticipantCompletionParticipantCloseHandler.java	2007-08-14 12:43:41 UTC (rev 14200)
@@ -0,0 +1,63 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag.  All rights reserved. 
+ * See the copyright.txt in the distribution for a full listing 
+ * of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU General Public License, v. 2.0.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A 
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+ * PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+ * You should have received a copy of the GNU General Public License,
+ * v. 2.0 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+ * MA  02110-1301, USA.
+ * 
+ * (C) 2005-2006,
+ * @author JBoss Inc.
+ */
+package com.arjuna.webservices.wsba11.handlers;
+
+import javax.xml.stream.XMLStreamException;
+import javax.xml.stream.XMLStreamReader;
+
+import com.arjuna.webservices.BodyHandler;
+import com.arjuna.webservices.MessageContext;
+import com.arjuna.webservices.SoapBody;
+import com.arjuna.webservices.SoapFault;
+import com.arjuna.webservices.soap.SoapDetails;
+import com.arjuna.webservices.wsaddr2005.AddressingContext;
+import com.arjuna.webservices.wsjboss.JBossContext;
+import com.arjuna.webservices.wsba11.NotificationType;
+import com.arjuna.webservices.wsba11.processors.ParticipantCompletionParticipantProcessor;
+
+/**
+ * The participant completion participant close handler.
+ * @author kevin
+ */
+public class ParticipantCompletionParticipantCloseHandler implements BodyHandler
+{
+    /**
+     * Handle the body element.
+     * @param soapDetails The SOAP details.
+     * @param context The current message context.
+     * @param responseContext The response message context.
+     * @param action The transport SOAP action. 
+     * @param in The current stream reader.
+     * @throws XMLStreamException for parsing errors.
+     * @throws SoapFault for processing errors.
+     * @return The response elements or null if one way.
+     */
+    public SoapBody invoke(final SoapDetails soapDetails, final MessageContext context,
+        final MessageContext responseContext, final String action, final XMLStreamReader in)
+        throws XMLStreamException, SoapFault
+    {
+        final NotificationType close = new NotificationType(in) ;
+        final AddressingContext addressingContext = AddressingContext.getContext(context) ;
+        final JBossContext jbossContext = JBossContext.getContext(context) ;
+        ParticipantCompletionParticipantProcessor.getProcessor().close(close, addressingContext, jbossContext) ;
+        return null ;
+    }
+}


Property changes on: labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/handlers/ParticipantCompletionParticipantCloseHandler.java
___________________________________________________________________
Name: svn:keywords
   + Rev Date
Name: svn:eol-style
   + native

Added: labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/handlers/ParticipantCompletionParticipantCompensateHandler.java
===================================================================
--- labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/handlers/ParticipantCompletionParticipantCompensateHandler.java	                        (rev 0)
+++ labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/handlers/ParticipantCompletionParticipantCompensateHandler.java	2007-08-14 12:43:41 UTC (rev 14200)
@@ -0,0 +1,63 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag.  All rights reserved. 
+ * See the copyright.txt in the distribution for a full listing 
+ * of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU General Public License, v. 2.0.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A 
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+ * PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+ * You should have received a copy of the GNU General Public License,
+ * v. 2.0 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+ * MA  02110-1301, USA.
+ * 
+ * (C) 2005-2006,
+ * @author JBoss Inc.
+ */
+package com.arjuna.webservices.wsba11.handlers;
+
+import javax.xml.stream.XMLStreamException;
+import javax.xml.stream.XMLStreamReader;
+
+import com.arjuna.webservices.BodyHandler;
+import com.arjuna.webservices.MessageContext;
+import com.arjuna.webservices.SoapBody;
+import com.arjuna.webservices.SoapFault;
+import com.arjuna.webservices.soap.SoapDetails;
+import com.arjuna.webservices.wsaddr2005.AddressingContext;
+import com.arjuna.webservices.wsjboss.JBossContext;
+import com.arjuna.webservices.wsba11.NotificationType;
+import com.arjuna.webservices.wsba11.processors.ParticipantCompletionParticipantProcessor;
+
+/**
+ * The participant completion participant compensate handler.
+ * @author kevin
+ */
+public class ParticipantCompletionParticipantCompensateHandler implements BodyHandler
+{
+    /**
+     * Handle the body element.
+     * @param soapDetails The SOAP details.
+     * @param context The current message context.
+     * @param responseContext The response message context.
+     * @param action The transport SOAP action. 
+     * @param in The current stream reader.
+     * @throws XMLStreamException for parsing errors.
+     * @throws SoapFault for processing errors.
+     * @return The response elements or null if one way.
+     */
+    public SoapBody invoke(final SoapDetails soapDetails, final MessageContext context,
+        final MessageContext responseContext, final String action, final XMLStreamReader in)
+        throws XMLStreamException, SoapFault
+    {
+        final NotificationType compensate = new NotificationType(in) ;
+        final AddressingContext addressingContext = AddressingContext.getContext(context) ;
+        final JBossContext jbossContext = JBossContext.getContext(context) ;
+        ParticipantCompletionParticipantProcessor.getProcessor().compensate(compensate, addressingContext, jbossContext) ;
+        return null ;
+    }
+}


Property changes on: labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/handlers/ParticipantCompletionParticipantCompensateHandler.java
___________________________________________________________________
Name: svn:keywords
   + Rev Date
Name: svn:eol-style
   + native

Added: labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/handlers/ParticipantCompletionParticipantExitedHandler.java
===================================================================
--- labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/handlers/ParticipantCompletionParticipantExitedHandler.java	                        (rev 0)
+++ labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/handlers/ParticipantCompletionParticipantExitedHandler.java	2007-08-14 12:43:41 UTC (rev 14200)
@@ -0,0 +1,63 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag.  All rights reserved. 
+ * See the copyright.txt in the distribution for a full listing 
+ * of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU General Public License, v. 2.0.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A 
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+ * PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+ * You should have received a copy of the GNU General Public License,
+ * v. 2.0 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+ * MA  02110-1301, USA.
+ * 
+ * (C) 2005-2006,
+ * @author JBoss Inc.
+ */
+package com.arjuna.webservices.wsba11.handlers;
+
+import javax.xml.stream.XMLStreamException;
+import javax.xml.stream.XMLStreamReader;
+
+import com.arjuna.webservices.BodyHandler;
+import com.arjuna.webservices.MessageContext;
+import com.arjuna.webservices.SoapBody;
+import com.arjuna.webservices.SoapFault;
+import com.arjuna.webservices.soap.SoapDetails;
+import com.arjuna.webservices.wsaddr2005.AddressingContext;
+import com.arjuna.webservices.wsjboss.JBossContext;
+import com.arjuna.webservices.wsba11.NotificationType;
+import com.arjuna.webservices.wsba11.processors.ParticipantCompletionParticipantProcessor;
+
+/**
+ * The participant completion participant exited handler.
+ * @author kevin
+ */
+public class ParticipantCompletionParticipantExitedHandler implements BodyHandler
+{
+    /**
+     * Handle the body element.
+     * @param soapDetails The SOAP details.
+     * @param context The current message context.
+     * @param responseContext The response message context.
+     * @param action The transport SOAP action. 
+     * @param in The current stream reader.
+     * @throws XMLStreamException for parsing errors.
+     * @throws SoapFault for processing errors.
+     * @return The response elements or null if one way.
+     */
+    public SoapBody invoke(final SoapDetails soapDetails, final MessageContext context,
+        final MessageContext responseContext, final String action, final XMLStreamReader in)
+        throws XMLStreamException, SoapFault
+    {
+        final NotificationType exited = new NotificationType(in) ;
+        final AddressingContext addressingContext = AddressingContext.getContext(context) ;
+        final JBossContext jbossContext = JBossContext.getContext(context) ;
+        ParticipantCompletionParticipantProcessor.getProcessor().exited(exited, addressingContext, jbossContext) ;
+        return null ;
+    }
+}


Property changes on: labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/handlers/ParticipantCompletionParticipantExitedHandler.java
___________________________________________________________________
Name: svn:keywords
   + Rev Date
Name: svn:eol-style
   + native

Added: labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/handlers/ParticipantCompletionParticipantFailedHandler.java
===================================================================
--- labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/handlers/ParticipantCompletionParticipantFailedHandler.java	                        (rev 0)
+++ labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/handlers/ParticipantCompletionParticipantFailedHandler.java	2007-08-14 12:43:41 UTC (rev 14200)
@@ -0,0 +1,63 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag.  All rights reserved. 
+ * See the copyright.txt in the distribution for a full listing 
+ * of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU General Public License, v. 2.0.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A 
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+ * PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+ * You should have received a copy of the GNU General Public License,
+ * v. 2.0 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+ * MA  02110-1301, USA.
+ * 
+ * (C) 2005-2006,
+ * @author JBoss Inc.
+ */
+package com.arjuna.webservices.wsba11.handlers;
+
+import javax.xml.stream.XMLStreamException;
+import javax.xml.stream.XMLStreamReader;
+
+import com.arjuna.webservices.BodyHandler;
+import com.arjuna.webservices.MessageContext;
+import com.arjuna.webservices.SoapBody;
+import com.arjuna.webservices.SoapFault;
+import com.arjuna.webservices.soap.SoapDetails;
+import com.arjuna.webservices.wsaddr2005.AddressingContext;
+import com.arjuna.webservices.wsjboss.JBossContext;
+import com.arjuna.webservices.wsba11.NotificationType;
+import com.arjuna.webservices.wsba11.processors.ParticipantCompletionParticipantProcessor;
+
+/**
+ * The participant completion participant failed handler.
+ * @author kevin
+ */
+public class ParticipantCompletionParticipantFailedHandler implements BodyHandler
+{
+    /**
+     * Handle the body element.
+     * @param soapDetails The SOAP details.
+     * @param context The current message context.
+     * @param responseContext The response message context.
+     * @param action The transport SOAP action. 
+     * @param in The current stream reader.
+     * @throws XMLStreamException for parsing errors.
+     * @throws SoapFault for processing errors.
+     * @return The response elements or null if one way.
+     */
+    public SoapBody invoke(final SoapDetails soapDetails, final MessageContext context,
+        final MessageContext responseContext, final String action, final XMLStreamReader in)
+        throws XMLStreamException, SoapFault
+    {
+        final NotificationType failed = new NotificationType(in) ;
+        final AddressingContext addressingContext = AddressingContext.getContext(context) ;
+        final JBossContext jbossContext = JBossContext.getContext(context) ;
+        ParticipantCompletionParticipantProcessor.getProcessor().failed(failed, addressingContext, jbossContext) ;
+        return null ;
+    }
+}


Property changes on: labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/handlers/ParticipantCompletionParticipantFailedHandler.java
___________________________________________________________________
Name: svn:keywords
   + Rev Date
Name: svn:eol-style
   + native

Added: labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/handlers/ParticipantCompletionParticipantFaultHandler.java
===================================================================
--- labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/handlers/ParticipantCompletionParticipantFaultHandler.java	                        (rev 0)
+++ labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/handlers/ParticipantCompletionParticipantFaultHandler.java	2007-08-14 12:43:41 UTC (rev 14200)
@@ -0,0 +1,42 @@
+package com.arjuna.webservices.wsba11.handlers;
+
+import javax.xml.stream.XMLStreamException;
+import javax.xml.stream.XMLStreamReader;
+
+import com.arjuna.webservices.BodyHandler;
+import com.arjuna.webservices.MessageContext;
+import com.arjuna.webservices.SoapBody;
+import com.arjuna.webservices.SoapFault;
+import com.arjuna.webservices.soap.SoapDetails;
+import com.arjuna.webservices.wsaddr2005.AddressingContext;
+import com.arjuna.webservices.wsba11.processors.ParticipantCompletionParticipantProcessor;
+import com.arjuna.webservices.wsjboss.JBossContext;
+
+/**
+ * The participant completion participant fault handler.
+ * @author kevin
+ */
+public class ParticipantCompletionParticipantFaultHandler implements BodyHandler
+{
+    /**
+     * Handle the body element.
+     * @param soapDetails The SOAP details.
+     * @param context The current message context.
+     * @param responseContext The r message context.
+     * @param action The transport SOAP action.
+     * @param in The current stream reader.
+     * @throws XMLStreamException for parsing errors.
+     * @throws SoapFault for processing errors.
+     * @return The response elements or null if one way.
+     */
+    public SoapBody invoke(final SoapDetails soapDetails, final MessageContext context,
+        final MessageContext responseContext, final String action, final XMLStreamReader in)
+        throws XMLStreamException, SoapFault
+    {
+        final SoapFault soapFault = soapDetails.parseSoapFault(in) ;
+        final AddressingContext addressingContext = AddressingContext.getContext(context) ;
+        final JBossContext jbossContext = JBossContext.getContext(context) ;
+        ParticipantCompletionParticipantProcessor.getProcessor().soapFault(soapFault, addressingContext, jbossContext) ;
+        return null ;
+    }
+}


Property changes on: labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/handlers/ParticipantCompletionParticipantFaultHandler.java
___________________________________________________________________
Name: svn:keywords
   + Rev Date
Name: svn:eol-style
   + native

Added: labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/handlers/ParticipantCompletionParticipantGetStatusHandler.java
===================================================================
--- labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/handlers/ParticipantCompletionParticipantGetStatusHandler.java	                        (rev 0)
+++ labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/handlers/ParticipantCompletionParticipantGetStatusHandler.java	2007-08-14 12:43:41 UTC (rev 14200)
@@ -0,0 +1,63 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag.  All rights reserved. 
+ * See the copyright.txt in the distribution for a full listing 
+ * of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU General Public License, v. 2.0.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A 
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+ * PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+ * You should have received a copy of the GNU General Public License,
+ * v. 2.0 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+ * MA  02110-1301, USA.
+ * 
+ * (C) 2005-2006,
+ * @author JBoss Inc.
+ */
+package com.arjuna.webservices.wsba11.handlers;
+
+import javax.xml.stream.XMLStreamException;
+import javax.xml.stream.XMLStreamReader;
+
+import com.arjuna.webservices.BodyHandler;
+import com.arjuna.webservices.MessageContext;
+import com.arjuna.webservices.SoapBody;
+import com.arjuna.webservices.SoapFault;
+import com.arjuna.webservices.soap.SoapDetails;
+import com.arjuna.webservices.wsaddr2005.AddressingContext;
+import com.arjuna.webservices.wsjboss.JBossContext;
+import com.arjuna.webservices.wsba11.NotificationType;
+import com.arjuna.webservices.wsba11.processors.ParticipantCompletionParticipantProcessor;
+
+/**
+ * The participant completion participant get status handler.
+ * @author kevin
+ */
+public class ParticipantCompletionParticipantGetStatusHandler implements BodyHandler
+{
+    /**
+     * Handle the body element.
+     * @param soapDetails The SOAP details.
+     * @param context The current message context.
+     * @param responseContext The response message context.
+     * @param action The transport SOAP action. 
+     * @param in The current stream reader.
+     * @throws XMLStreamException for parsing errors.
+     * @throws SoapFault for processing errors.
+     * @return The response elements or null if one way.
+     */
+    public SoapBody invoke(final SoapDetails soapDetails, final MessageContext context,
+        final MessageContext responseContext, final String action, final XMLStreamReader in)
+        throws XMLStreamException, SoapFault
+    {
+        final NotificationType getStatus = new NotificationType(in) ;
+        final AddressingContext addressingContext = AddressingContext.getContext(context) ;
+        final JBossContext jbossContext = JBossContext.getContext(context) ;
+        ParticipantCompletionParticipantProcessor.getProcessor().getStatus(getStatus, addressingContext, jbossContext) ;
+        return null ;
+    }
+}


Property changes on: labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/handlers/ParticipantCompletionParticipantGetStatusHandler.java
___________________________________________________________________
Name: svn:keywords
   + Rev Date
Name: svn:eol-style
   + native

Added: labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/handlers/ParticipantCompletionParticipantNotCompletedHandler.java
===================================================================
--- labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/handlers/ParticipantCompletionParticipantNotCompletedHandler.java	                        (rev 0)
+++ labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/handlers/ParticipantCompletionParticipantNotCompletedHandler.java	2007-08-14 12:43:41 UTC (rev 14200)
@@ -0,0 +1,63 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag.  All rights reserved. 
+ * See the copyright.txt in the distribution for a full listing 
+ * of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU General Public License, v. 2.0.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A 
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+ * PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+ * You should have received a copy of the GNU General Public License,
+ * v. 2.0 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+ * MA  02110-1301, USA.
+ * 
+ * (C) 2005-2006,
+ * @author JBoss Inc.
+ */
+package com.arjuna.webservices.wsba11.handlers;
+
+import javax.xml.stream.XMLStreamException;
+import javax.xml.stream.XMLStreamReader;
+
+import com.arjuna.webservices.BodyHandler;
+import com.arjuna.webservices.MessageContext;
+import com.arjuna.webservices.SoapBody;
+import com.arjuna.webservices.SoapFault;
+import com.arjuna.webservices.soap.SoapDetails;
+import com.arjuna.webservices.wsaddr2005.AddressingContext;
+import com.arjuna.webservices.wsjboss.JBossContext;
+import com.arjuna.webservices.wsba11.NotificationType;
+import com.arjuna.webservices.wsba11.processors.ParticipantCompletionParticipantProcessor;
+
+/**
+ * The participant completion participant not completed handler.
+ * @author kevin
+ */
+public class ParticipantCompletionParticipantNotCompletedHandler implements BodyHandler
+{
+    /**
+     * Handle the body element.
+     * @param soapDetails The SOAP details.
+     * @param context The current message context.
+     * @param responseContext The response message context.
+     * @param action The transport SOAP action. 
+     * @param in The current stream reader.
+     * @throws XMLStreamException for parsing errors.
+     * @throws SoapFault for processing errors.
+     * @return The response elements or null if one way.
+     */
+    public SoapBody invoke(final SoapDetails soapDetails, final MessageContext context,
+        final MessageContext responseContext, final String action, final XMLStreamReader in)
+        throws XMLStreamException, SoapFault
+    {
+        final NotificationType notCompleted = new NotificationType(in) ;
+        final AddressingContext addressingContext = AddressingContext.getContext(context) ;
+        final JBossContext jbossContext = JBossContext.getContext(context) ;
+        ParticipantCompletionParticipantProcessor.getProcessor().notCompleted(notCompleted, addressingContext, jbossContext) ;
+        return null ;
+    }
+}


Property changes on: labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/handlers/ParticipantCompletionParticipantNotCompletedHandler.java
___________________________________________________________________
Name: svn:keywords
   + Rev Date
Name: svn:eol-style
   + native

Added: labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/handlers/ParticipantCompletionParticipantStatusHandler.java
===================================================================
--- labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/handlers/ParticipantCompletionParticipantStatusHandler.java	                        (rev 0)
+++ labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/handlers/ParticipantCompletionParticipantStatusHandler.java	2007-08-14 12:43:41 UTC (rev 14200)
@@ -0,0 +1,63 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag.  All rights reserved. 
+ * See the copyright.txt in the distribution for a full listing 
+ * of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU General Public License, v. 2.0.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A 
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+ * PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+ * You should have received a copy of the GNU General Public License,
+ * v. 2.0 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+ * MA  02110-1301, USA.
+ * 
+ * (C) 2005-2006,
+ * @author JBoss Inc.
+ */
+package com.arjuna.webservices.wsba11.handlers;
+
+import javax.xml.stream.XMLStreamException;
+import javax.xml.stream.XMLStreamReader;
+
+import com.arjuna.webservices.BodyHandler;
+import com.arjuna.webservices.MessageContext;
+import com.arjuna.webservices.SoapBody;
+import com.arjuna.webservices.SoapFault;
+import com.arjuna.webservices.soap.SoapDetails;
+import com.arjuna.webservices.wsaddr2005.AddressingContext;
+import com.arjuna.webservices.wsjboss.JBossContext;
+import com.arjuna.webservices.wsba11.StatusType;
+import com.arjuna.webservices.wsba11.processors.ParticipantCompletionParticipantProcessor;
+
+/**
+ * The participant completion participant status handler.
+ * @author kevin
+ */
+public class ParticipantCompletionParticipantStatusHandler implements BodyHandler
+{
+    /**
+     * Handle the body element.
+     * @param soapDetails The SOAP details.
+     * @param context The current message context.
+     * @param responseContext The response message context.
+     * @param action The transport SOAP action. 
+     * @param in The current stream reader.
+     * @throws XMLStreamException for parsing errors.
+     * @throws SoapFault for processing errors.
+     * @return The response elements or null if one way.
+     */
+    public SoapBody invoke(final SoapDetails soapDetails, final MessageContext context,
+        final MessageContext responseContext, final String action, final XMLStreamReader in)
+        throws XMLStreamException, SoapFault
+    {
+        final StatusType status = new StatusType(in) ;
+        final AddressingContext addressingContext = AddressingContext.getContext(context) ;
+        final JBossContext jbossContext = JBossContext.getContext(context) ;
+        ParticipantCompletionParticipantProcessor.getProcessor().status(status, addressingContext, jbossContext) ;
+        return null ;
+    }
+}


Property changes on: labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/handlers/ParticipantCompletionParticipantStatusHandler.java
___________________________________________________________________
Name: svn:keywords
   + Rev Date
Name: svn:eol-style
   + native

Added: labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/policy/CoordinatorCompletionCoordinatorPolicy.java
===================================================================
--- labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/policy/CoordinatorCompletionCoordinatorPolicy.java	                        (rev 0)
+++ labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/policy/CoordinatorCompletionCoordinatorPolicy.java	2007-08-14 12:43:41 UTC (rev 14200)
@@ -0,0 +1,77 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag.  All rights reserved. 
+ * See the copyright.txt in the distribution for a full listing 
+ * of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU General Public License, v. 2.0.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A 
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+ * PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+ * You should have received a copy of the GNU General Public License,
+ * v. 2.0 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+ * MA  02110-1301, USA.
+ * 
+ * (C) 2005-2006,
+ * @author JBoss Inc.
+ */
+package com.arjuna.webservices.wsba11.policy;
+
+import com.arjuna.webservices.HandlerRegistry;
+import com.arjuna.webservices.wsba11.BusinessActivityConstants;
+import com.arjuna.webservices.wsba11.handlers.CoordinatorCompletionCoordinatorCancelledHandler;
+import com.arjuna.webservices.wsba11.handlers.CoordinatorCompletionCoordinatorCannotCompleteHandler;
+import com.arjuna.webservices.wsba11.handlers.CoordinatorCompletionCoordinatorClosedHandler;
+import com.arjuna.webservices.wsba11.handlers.CoordinatorCompletionCoordinatorCompensatedHandler;
+import com.arjuna.webservices.wsba11.handlers.CoordinatorCompletionCoordinatorCompletedHandler;
+import com.arjuna.webservices.wsba11.handlers.CoordinatorCompletionCoordinatorExitHandler;
+import com.arjuna.webservices.wsba11.handlers.CoordinatorCompletionCoordinatorFailHandler;
+import com.arjuna.webservices.wsba11.handlers.CoordinatorCompletionCoordinatorFaultHandler;
+import com.arjuna.webservices.wsba11.handlers.CoordinatorCompletionCoordinatorGetStatusHandler;
+import com.arjuna.webservices.wsba11.handlers.CoordinatorCompletionCoordinatorStatusHandler;
+
+/**
+ * Policy responsible for binding in the WS-BusinessActivity header handlers.
+ * @author kevin
+ */
+public class CoordinatorCompletionCoordinatorPolicy
+{
+    /**
+     * Add this policy to the registry.
+     * @param registry The registry containing the policy.
+     */
+    public static void register(final HandlerRegistry registry)
+    {
+        registry.registerBodyHandler(BusinessActivityConstants.WSBA_ELEMENT_COMPLETED_QNAME, new CoordinatorCompletionCoordinatorCompletedHandler()) ;
+        registry.registerBodyHandler(BusinessActivityConstants.WSBA_ELEMENT_FAIL_QNAME, new CoordinatorCompletionCoordinatorFailHandler()) ;
+        registry.registerBodyHandler(BusinessActivityConstants.WSBA_ELEMENT_COMPENSATED_QNAME, new CoordinatorCompletionCoordinatorCompensatedHandler()) ;
+        registry.registerBodyHandler(BusinessActivityConstants.WSBA_ELEMENT_CLOSED_QNAME, new CoordinatorCompletionCoordinatorClosedHandler()) ;
+        registry.registerBodyHandler(BusinessActivityConstants.WSBA_ELEMENT_CANCELLED_QNAME, new CoordinatorCompletionCoordinatorCancelledHandler()) ;
+        registry.registerBodyHandler(BusinessActivityConstants.WSBA_ELEMENT_EXIT_QNAME, new CoordinatorCompletionCoordinatorExitHandler()) ;
+        registry.registerBodyHandler(BusinessActivityConstants.WSBA_ELEMENT_CANNOT_COMPLETE_QNAME, new CoordinatorCompletionCoordinatorCannotCompleteHandler()) ;
+        registry.registerBodyHandler(BusinessActivityConstants.WSBA_ELEMENT_GET_STATUS_QNAME, new CoordinatorCompletionCoordinatorGetStatusHandler()) ;
+        registry.registerBodyHandler(BusinessActivityConstants.WSBA_ELEMENT_STATUS_QNAME, new CoordinatorCompletionCoordinatorStatusHandler()) ;
+        registry.registerFaultHandler(new CoordinatorCompletionCoordinatorFaultHandler()) ;
+    }
+
+    /**
+     * Remove this policy from the registry.
+     * @param registry The registry containing the policy.
+     */
+    public static void remove(final HandlerRegistry registry)
+    {
+        registry.registerFaultHandler(null) ;
+        registry.removeBodyHandler(BusinessActivityConstants.WSBA_ELEMENT_STATUS_QNAME) ;
+        registry.removeBodyHandler(BusinessActivityConstants.WSBA_ELEMENT_GET_STATUS_QNAME) ;
+        registry.removeBodyHandler(BusinessActivityConstants.WSBA_ELEMENT_CANNOT_COMPLETE_QNAME) ;
+        registry.removeBodyHandler(BusinessActivityConstants.WSBA_ELEMENT_EXIT_QNAME) ;
+        registry.removeBodyHandler(BusinessActivityConstants.WSBA_ELEMENT_CANCELLED_QNAME) ;
+        registry.removeBodyHandler(BusinessActivityConstants.WSBA_ELEMENT_CLOSED_QNAME) ;
+        registry.removeBodyHandler(BusinessActivityConstants.WSBA_ELEMENT_COMPENSATED_QNAME) ;
+        registry.removeBodyHandler(BusinessActivityConstants.WSBA_ELEMENT_FAIL_QNAME) ;
+        registry.removeBodyHandler(BusinessActivityConstants.WSBA_ELEMENT_COMPLETED_QNAME) ;
+    }
+}


Property changes on: labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/policy/CoordinatorCompletionCoordinatorPolicy.java
___________________________________________________________________
Name: svn:keywords
   + Rev Date
Name: svn:eol-style
   + native

Added: labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/policy/CoordinatorCompletionParticipantPolicy.java
===================================================================
--- labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/policy/CoordinatorCompletionParticipantPolicy.java	                        (rev 0)
+++ labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/policy/CoordinatorCompletionParticipantPolicy.java	2007-08-14 12:43:41 UTC (rev 14200)
@@ -0,0 +1,77 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag.  All rights reserved. 
+ * See the copyright.txt in the distribution for a full listing 
+ * of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU General Public License, v. 2.0.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A 
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+ * PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+ * You should have received a copy of the GNU General Public License,
+ * v. 2.0 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+ * MA  02110-1301, USA.
+ * 
+ * (C) 2005-2006,
+ * @author JBoss Inc.
+ */
+package com.arjuna.webservices.wsba11.policy;
+
+import com.arjuna.webservices.HandlerRegistry;
+import com.arjuna.webservices.wsba11.BusinessActivityConstants;
+import com.arjuna.webservices.wsba11.handlers.CoordinatorCompletionParticipantCancelHandler;
+import com.arjuna.webservices.wsba11.handlers.CoordinatorCompletionParticipantCloseHandler;
+import com.arjuna.webservices.wsba11.handlers.CoordinatorCompletionParticipantCompensateHandler;
+import com.arjuna.webservices.wsba11.handlers.CoordinatorCompletionParticipantCompleteHandler;
+import com.arjuna.webservices.wsba11.handlers.CoordinatorCompletionParticipantExitedHandler;
+import com.arjuna.webservices.wsba11.handlers.CoordinatorCompletionParticipantFailedHandler;
+import com.arjuna.webservices.wsba11.handlers.CoordinatorCompletionParticipantFaultHandler;
+import com.arjuna.webservices.wsba11.handlers.CoordinatorCompletionParticipantGetStatusHandler;
+import com.arjuna.webservices.wsba11.handlers.CoordinatorCompletionParticipantNotCompletedHandler;
+import com.arjuna.webservices.wsba11.handlers.CoordinatorCompletionParticipantStatusHandler;
+
+/**
+ * Policy responsible for binding in the WS-BusinessActivity header handlers.
+ * @author kevin
+ */
+public class CoordinatorCompletionParticipantPolicy
+{
+    /**
+     * Add this policy to the registry.
+     * @param registry The registry containing the policy.
+     */
+    public static void register(final HandlerRegistry registry)
+    {
+        registry.registerBodyHandler(BusinessActivityConstants.WSBA_ELEMENT_COMPLETE_QNAME, new CoordinatorCompletionParticipantCompleteHandler()) ;
+        registry.registerBodyHandler(BusinessActivityConstants.WSBA_ELEMENT_CLOSE_QNAME, new CoordinatorCompletionParticipantCloseHandler()) ;
+        registry.registerBodyHandler(BusinessActivityConstants.WSBA_ELEMENT_CANCEL_QNAME, new CoordinatorCompletionParticipantCancelHandler()) ;
+        registry.registerBodyHandler(BusinessActivityConstants.WSBA_ELEMENT_COMPENSATE_QNAME, new CoordinatorCompletionParticipantCompensateHandler()) ;
+        registry.registerBodyHandler(BusinessActivityConstants.WSBA_ELEMENT_FAILED_QNAME, new CoordinatorCompletionParticipantFailedHandler()) ;
+        registry.registerBodyHandler(BusinessActivityConstants.WSBA_ELEMENT_EXITED_QNAME, new CoordinatorCompletionParticipantExitedHandler()) ;
+        registry.registerBodyHandler(BusinessActivityConstants.WSBA_ELEMENT_NOT_COMPLETED_QNAME, new CoordinatorCompletionParticipantNotCompletedHandler()) ;
+        registry.registerBodyHandler(BusinessActivityConstants.WSBA_ELEMENT_GET_STATUS_QNAME, new CoordinatorCompletionParticipantGetStatusHandler()) ;
+        registry.registerBodyHandler(BusinessActivityConstants.WSBA_ELEMENT_STATUS_QNAME, new CoordinatorCompletionParticipantStatusHandler()) ;
+        registry.registerFaultHandler(new CoordinatorCompletionParticipantFaultHandler()) ;
+    }
+
+    /**
+     * Remove this policy from the registry.
+     * @param registry The registry containing the policy.
+     */
+    public static void remove(final HandlerRegistry registry)
+    {
+        registry.registerFaultHandler(null) ;
+        registry.removeBodyHandler(BusinessActivityConstants.WSBA_ELEMENT_STATUS_QNAME) ;
+        registry.removeBodyHandler(BusinessActivityConstants.WSBA_ELEMENT_GET_STATUS_QNAME) ;
+        registry.removeBodyHandler(BusinessActivityConstants.WSBA_ELEMENT_NOT_COMPLETED_QNAME) ;
+        registry.removeBodyHandler(BusinessActivityConstants.WSBA_ELEMENT_EXITED_QNAME) ;
+        registry.removeBodyHandler(BusinessActivityConstants.WSBA_ELEMENT_FAILED_QNAME) ;
+        registry.removeBodyHandler(BusinessActivityConstants.WSBA_ELEMENT_COMPENSATE_QNAME) ;
+        registry.removeBodyHandler(BusinessActivityConstants.WSBA_ELEMENT_CANCEL_QNAME) ;
+        registry.removeBodyHandler(BusinessActivityConstants.WSBA_ELEMENT_CLOSE_QNAME) ;
+        registry.removeBodyHandler(BusinessActivityConstants.WSBA_ELEMENT_COMPLETE_QNAME) ;
+    }
+}


Property changes on: labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/policy/CoordinatorCompletionParticipantPolicy.java
___________________________________________________________________
Name: svn:keywords
   + Rev Date
Name: svn:eol-style
   + native

Added: labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/policy/ParticipantCompletionCoordinatorPolicy.java
===================================================================
--- labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/policy/ParticipantCompletionCoordinatorPolicy.java	                        (rev 0)
+++ labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/policy/ParticipantCompletionCoordinatorPolicy.java	2007-08-14 12:43:41 UTC (rev 14200)
@@ -0,0 +1,77 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag.  All rights reserved. 
+ * See the copyright.txt in the distribution for a full listing 
+ * of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU General Public License, v. 2.0.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A 
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+ * PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+ * You should have received a copy of the GNU General Public License,
+ * v. 2.0 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+ * MA  02110-1301, USA.
+ * 
+ * (C) 2005-2006,
+ * @author JBoss Inc.
+ */
+package com.arjuna.webservices.wsba11.policy;
+
+import com.arjuna.webservices.HandlerRegistry;
+import com.arjuna.webservices.wsba11.BusinessActivityConstants;
+import com.arjuna.webservices.wsba11.handlers.ParticipantCompletionCoordinatorCancelledHandler;
+import com.arjuna.webservices.wsba11.handlers.ParticipantCompletionCoordinatorCannotCompleteHandler;
+import com.arjuna.webservices.wsba11.handlers.ParticipantCompletionCoordinatorClosedHandler;
+import com.arjuna.webservices.wsba11.handlers.ParticipantCompletionCoordinatorCompensatedHandler;
+import com.arjuna.webservices.wsba11.handlers.ParticipantCompletionCoordinatorCompletedHandler;
+import com.arjuna.webservices.wsba11.handlers.ParticipantCompletionCoordinatorExitHandler;
+import com.arjuna.webservices.wsba11.handlers.ParticipantCompletionCoordinatorFailHandler;
+import com.arjuna.webservices.wsba11.handlers.ParticipantCompletionCoordinatorFaultHandler;
+import com.arjuna.webservices.wsba11.handlers.ParticipantCompletionCoordinatorGetStatusHandler;
+import com.arjuna.webservices.wsba11.handlers.ParticipantCompletionCoordinatorStatusHandler;
+
+/**
+ * Policy responsible for binding in the WS-BusinessActivity header handlers.
+ * @author kevin
+ */
+public class ParticipantCompletionCoordinatorPolicy
+{
+    /**
+     * Add this policy to the registry.
+     * @param registry The registry containing the policy.
+     */
+    public static void register(final HandlerRegistry registry)
+    {
+        registry.registerBodyHandler(BusinessActivityConstants.WSBA_ELEMENT_COMPLETED_QNAME, new ParticipantCompletionCoordinatorCompletedHandler()) ;
+        registry.registerBodyHandler(BusinessActivityConstants.WSBA_ELEMENT_FAIL_QNAME, new ParticipantCompletionCoordinatorFailHandler()) ;
+        registry.registerBodyHandler(BusinessActivityConstants.WSBA_ELEMENT_COMPENSATED_QNAME, new ParticipantCompletionCoordinatorCompensatedHandler()) ;
+        registry.registerBodyHandler(BusinessActivityConstants.WSBA_ELEMENT_CLOSED_QNAME, new ParticipantCompletionCoordinatorClosedHandler()) ;
+        registry.registerBodyHandler(BusinessActivityConstants.WSBA_ELEMENT_CANCELLED_QNAME, new ParticipantCompletionCoordinatorCancelledHandler()) ;
+        registry.registerBodyHandler(BusinessActivityConstants.WSBA_ELEMENT_EXIT_QNAME, new ParticipantCompletionCoordinatorExitHandler()) ;
+        registry.registerBodyHandler(BusinessActivityConstants.WSBA_ELEMENT_CANNOT_COMPLETE_QNAME, new ParticipantCompletionCoordinatorCannotCompleteHandler()) ;
+        registry.registerBodyHandler(BusinessActivityConstants.WSBA_ELEMENT_GET_STATUS_QNAME, new ParticipantCompletionCoordinatorGetStatusHandler()) ;
+        registry.registerBodyHandler(BusinessActivityConstants.WSBA_ELEMENT_STATUS_QNAME, new ParticipantCompletionCoordinatorStatusHandler()) ;
+        registry.registerFaultHandler(new ParticipantCompletionCoordinatorFaultHandler()) ;
+    }
+
+    /**
+     * Remove this policy from the registry.
+     * @param registry The registry containing the policy.
+     */
+    public static void remove(final HandlerRegistry registry)
+    {
+        registry.registerFaultHandler(null) ;
+        registry.removeBodyHandler(BusinessActivityConstants.WSBA_ELEMENT_STATUS_QNAME) ;
+        registry.removeBodyHandler(BusinessActivityConstants.WSBA_ELEMENT_GET_STATUS_QNAME) ;
+        registry.removeBodyHandler(BusinessActivityConstants.WSBA_ELEMENT_CANNOT_COMPLETE_QNAME) ;
+        registry.removeBodyHandler(BusinessActivityConstants.WSBA_ELEMENT_EXIT_QNAME) ;
+        registry.removeBodyHandler(BusinessActivityConstants.WSBA_ELEMENT_CANCELLED_QNAME) ;
+        registry.removeBodyHandler(BusinessActivityConstants.WSBA_ELEMENT_CLOSED_QNAME) ;
+        registry.removeBodyHandler(BusinessActivityConstants.WSBA_ELEMENT_COMPENSATED_QNAME) ;
+        registry.removeBodyHandler(BusinessActivityConstants.WSBA_ELEMENT_FAIL_QNAME) ;
+        registry.removeBodyHandler(BusinessActivityConstants.WSBA_ELEMENT_COMPLETED_QNAME) ;
+    }
+}


Property changes on: labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/policy/ParticipantCompletionCoordinatorPolicy.java
___________________________________________________________________
Name: svn:keywords
   + Rev Date
Name: svn:eol-style
   + native

Added: labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/policy/ParticipantCompletionParticipantPolicy.java
===================================================================
--- labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/policy/ParticipantCompletionParticipantPolicy.java	                        (rev 0)
+++ labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/policy/ParticipantCompletionParticipantPolicy.java	2007-08-14 12:43:41 UTC (rev 14200)
@@ -0,0 +1,74 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag.  All rights reserved. 
+ * See the copyright.txt in the distribution for a full listing 
+ * of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU General Public License, v. 2.0.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A 
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+ * PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+ * You should have received a copy of the GNU General Public License,
+ * v. 2.0 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+ * MA  02110-1301, USA.
+ * 
+ * (C) 2005-2006,
+ * @author JBoss Inc.
+ */
+package com.arjuna.webservices.wsba11.policy;
+
+import com.arjuna.webservices.HandlerRegistry;
+import com.arjuna.webservices.wsba11.BusinessActivityConstants;
+import com.arjuna.webservices.wsba11.handlers.ParticipantCompletionParticipantCancelHandler;
+import com.arjuna.webservices.wsba11.handlers.ParticipantCompletionParticipantCloseHandler;
+import com.arjuna.webservices.wsba11.handlers.ParticipantCompletionParticipantCompensateHandler;
+import com.arjuna.webservices.wsba11.handlers.ParticipantCompletionParticipantExitedHandler;
+import com.arjuna.webservices.wsba11.handlers.ParticipantCompletionParticipantFailedHandler;
+import com.arjuna.webservices.wsba11.handlers.ParticipantCompletionParticipantFaultHandler;
+import com.arjuna.webservices.wsba11.handlers.ParticipantCompletionParticipantGetStatusHandler;
+import com.arjuna.webservices.wsba11.handlers.ParticipantCompletionParticipantNotCompletedHandler;
+import com.arjuna.webservices.wsba11.handlers.ParticipantCompletionParticipantStatusHandler;
+
+/**
+ * Policy responsible for binding in the WS-BusinessActivity header handlers.
+ * @author kevin
+ */
+public class ParticipantCompletionParticipantPolicy
+{
+    /**
+     * Add this policy to the registry.
+     * @param registry The registry containing the policy.
+     */
+    public static void register(final HandlerRegistry registry)
+    {
+        registry.registerBodyHandler(BusinessActivityConstants.WSBA_ELEMENT_CLOSE_QNAME, new ParticipantCompletionParticipantCloseHandler()) ;
+        registry.registerBodyHandler(BusinessActivityConstants.WSBA_ELEMENT_CANCEL_QNAME, new ParticipantCompletionParticipantCancelHandler()) ;
+        registry.registerBodyHandler(BusinessActivityConstants.WSBA_ELEMENT_COMPENSATE_QNAME, new ParticipantCompletionParticipantCompensateHandler()) ;
+        registry.registerBodyHandler(BusinessActivityConstants.WSBA_ELEMENT_FAILED_QNAME, new ParticipantCompletionParticipantFailedHandler()) ;
+        registry.registerBodyHandler(BusinessActivityConstants.WSBA_ELEMENT_EXITED_QNAME, new ParticipantCompletionParticipantExitedHandler()) ;
+        registry.registerBodyHandler(BusinessActivityConstants.WSBA_ELEMENT_NOT_COMPLETED_QNAME, new ParticipantCompletionParticipantNotCompletedHandler()) ;
+        registry.registerBodyHandler(BusinessActivityConstants.WSBA_ELEMENT_GET_STATUS_QNAME, new ParticipantCompletionParticipantGetStatusHandler()) ;
+        registry.registerBodyHandler(BusinessActivityConstants.WSBA_ELEMENT_STATUS_QNAME, new ParticipantCompletionParticipantStatusHandler()) ;
+        registry.registerFaultHandler(new ParticipantCompletionParticipantFaultHandler()) ;
+    }
+
+    /**
+     * Remove this policy from the registry.
+     * @param registry The registry containing the policy.
+     */
+    public static void remove(final HandlerRegistry registry)
+    {
+        registry.registerFaultHandler(null) ;
+        registry.removeBodyHandler(BusinessActivityConstants.WSBA_ELEMENT_STATUS_QNAME) ;
+        registry.removeBodyHandler(BusinessActivityConstants.WSBA_ELEMENT_GET_STATUS_QNAME) ;
+        registry.removeBodyHandler(BusinessActivityConstants.WSBA_ELEMENT_NOT_COMPLETED_QNAME) ;
+        registry.removeBodyHandler(BusinessActivityConstants.WSBA_ELEMENT_EXITED_QNAME) ;
+        registry.removeBodyHandler(BusinessActivityConstants.WSBA_ELEMENT_FAILED_QNAME) ;
+        registry.removeBodyHandler(BusinessActivityConstants.WSBA_ELEMENT_COMPENSATE_QNAME) ;
+        registry.removeBodyHandler(BusinessActivityConstants.WSBA_ELEMENT_CANCEL_QNAME) ;
+        registry.removeBodyHandler(BusinessActivityConstants.WSBA_ELEMENT_CLOSE_QNAME) ;
+    }
+}


Property changes on: labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/policy/ParticipantCompletionParticipantPolicy.java
___________________________________________________________________
Name: svn:keywords
   + Rev Date
Name: svn:eol-style
   + native

Added: labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/processors/CoordinatorCompletionCoordinatorProcessor.java
===================================================================
--- labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/processors/CoordinatorCompletionCoordinatorProcessor.java	                        (rev 0)
+++ labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/processors/CoordinatorCompletionCoordinatorProcessor.java	2007-08-14 12:43:41 UTC (rev 14200)
@@ -0,0 +1,160 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag.  All rights reserved. 
+ * See the copyright.txt in the distribution for a full listing 
+ * of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU General Public License, v. 2.0.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A 
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+ * PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+ * You should have received a copy of the GNU General Public License,
+ * v. 2.0 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+ * MA  02110-1301, USA.
+ * 
+ * (C) 2005-2006,
+ * @author JBoss Inc.
+ */
+package com.arjuna.webservices.wsba11.processors;
+
+import com.arjuna.webservices.SoapFault;
+import com.arjuna.webservices.wsaddr2005.AddressingContext;
+import com.arjuna.webservices.wsjboss.JBossContext;
+import com.arjuna.webservices.wsba11.CoordinatorCompletionCoordinatorInboundEvents;
+import com.arjuna.webservices.wsba11.ExceptionType;
+import com.arjuna.webservices.wsba11.NotificationType;
+import com.arjuna.webservices.wsba11.StatusType;
+
+
+
+/**
+ * The Coordinator Completion Coordinator processor.
+ * @author kevin
+ */
+public abstract class CoordinatorCompletionCoordinatorProcessor
+{
+    /**
+     * The coordinator processor.
+     */
+    private static CoordinatorCompletionCoordinatorProcessor PROCESSOR ;
+    
+    /**
+     * Get the processor.
+     * @return The singleton.
+     */
+    public static synchronized CoordinatorCompletionCoordinatorProcessor getProcessor()
+    {
+        return PROCESSOR ;
+    }
+    
+    /**
+     * Set the processor.
+     * @param processor The processor.
+     * @return The previous processor.
+     */
+    public static synchronized CoordinatorCompletionCoordinatorProcessor setProcessor(final CoordinatorCompletionCoordinatorProcessor processor)
+    {
+        final CoordinatorCompletionCoordinatorProcessor origProcessor = PROCESSOR ;
+        PROCESSOR = processor ;
+        return origProcessor ;
+    }
+    
+    /**
+     * Activate the coordinator.
+     * @param coordinatorState The coordinator.
+     * @param identifier The identifier.
+     */
+    public abstract void activateCoordinator(final CoordinatorCompletionCoordinatorInboundEvents coordinator, final String identifier) ;
+
+    /**
+     * Deactivate the coordinator.
+     * @param coordinator The coordinator.
+     */
+    public abstract void deactivateCoordinator(final CoordinatorCompletionCoordinatorInboundEvents coordinator) ;
+    
+    /**
+     * Cancelled.
+     * @param cancelled The cancelled notification.
+     * @param addressingContext The addressing context.
+     * @param jbossContext The jboss context.
+     */
+    public abstract void cancelled(final NotificationType cancelled, final AddressingContext addressingContext, final JBossContext jbossContext) ;
+    
+    /**
+     * Closed.
+     * @param closed The closed notification.
+     * @param addressingContext The addressing context.
+     * @param jbossContext The jboss context.
+     */
+    public abstract void closed(final NotificationType closed, final AddressingContext addressingContext, final JBossContext jbossContext) ;
+    
+    /**
+     * Compensated.
+     * @param compensated The compensated notification.
+     * @param addressingContext The addressing context.
+     * @param jbossContext The jboss context.
+     */
+    public abstract void compensated(final NotificationType compensated, final AddressingContext addressingContext, final JBossContext jbossContext) ;
+
+    /**
+     * Completed.
+     * @param completed The completed notification.
+     * @param addressingContext The addressing context.
+     * @param jbossContext The jboss context.
+     */
+    public abstract void completed(final NotificationType completed, final AddressingContext addressingContext,
+        final JBossContext jbossContext) ;
+    
+    /**
+     * Exit.
+     * @param exit The exit notification.
+     * @param addressingContext The addressing context.
+     * @param jbossContext The jboss context.
+     */
+    public abstract void exit(final NotificationType exit, final AddressingContext addressingContext, final JBossContext jbossContext) ;
+    
+    /**
+     * Fail.
+     * @param fail The fail exception.
+     * @param addressingContext The addressing context.
+     * @param jbossContext The jboss context.
+     */
+    public abstract void fail(final ExceptionType fail, final AddressingContext addressingContext,
+        final JBossContext jbossContext) ;
+    
+    /**
+     * CannotComplete.
+     * @param cannotComplete The cannotComplete exception.
+     * @param addressingContext The addressing context.
+     * @param jbossContext The jboss context.
+     */
+    public abstract void cannotComplete(final NotificationType cannotComplete, final AddressingContext addressingContext,
+        final JBossContext jbossContext) ;
+    
+    /**
+     * Get Status.
+     * @param getStatus The get status notification.
+     * @param addressingContext The addressing context.
+     * @param jbossContext The jboss context.
+     */
+    public abstract void getStatus(final NotificationType getStatus, final AddressingContext addressingContext, final JBossContext jbossContext) ;
+    
+    /**
+     * Status.
+     * @param status The status.
+     * @param addressingContext The addressing context.
+     * @param jbossContext The jboss context.
+     */
+    public abstract void status(final StatusType status, final AddressingContext addressingContext, final JBossContext jbossContext) ;
+    
+    /**
+     * SOAP fault.
+     * @param soapFault The SOAP fault.
+     * @param addressingContext The addressing context.
+     * @param jbossContext The jboss context.
+     */
+    public abstract void soapFault(final SoapFault soapFault, final AddressingContext addressingContext, final JBossContext jbossContext) ;
+}


Property changes on: labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/processors/CoordinatorCompletionCoordinatorProcessor.java
___________________________________________________________________
Name: svn:keywords
   + Rev Date
Name: svn:eol-style
   + native

Added: labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/processors/CoordinatorCompletionParticipantProcessor.java
===================================================================
--- labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/processors/CoordinatorCompletionParticipantProcessor.java	                        (rev 0)
+++ labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/processors/CoordinatorCompletionParticipantProcessor.java	2007-08-14 12:43:41 UTC (rev 14200)
@@ -0,0 +1,155 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag.  All rights reserved. 
+ * See the copyright.txt in the distribution for a full listing 
+ * of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU General Public License, v. 2.0.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A 
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+ * PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+ * You should have received a copy of the GNU General Public License,
+ * v. 2.0 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+ * MA  02110-1301, USA.
+ * 
+ * (C) 2005-2006,
+ * @author JBoss Inc.
+ */
+package com.arjuna.webservices.wsba11.processors;
+
+import com.arjuna.webservices.SoapFault;
+import com.arjuna.webservices.wsaddr2005.AddressingContext;
+import com.arjuna.webservices.wsjboss.JBossContext;
+import com.arjuna.webservices.wsba11.CoordinatorCompletionParticipantInboundEvents;
+import com.arjuna.webservices.wsba11.NotificationType;
+import com.arjuna.webservices.wsba11.StatusType;
+
+
+/**
+ * The Coordinator Completion Participant processor.
+ * @author kevin
+ */
+public abstract class CoordinatorCompletionParticipantProcessor
+{
+    /**
+     * The participant processor.
+     */
+    private static CoordinatorCompletionParticipantProcessor PROCESSOR ;
+    
+    /**
+     * Get the processor.
+     * @return The processor.
+     */
+    public static synchronized CoordinatorCompletionParticipantProcessor getProcessor()
+    {
+        return PROCESSOR ;
+    }
+    
+    /**
+     * Set the processor.
+     * @param processor The processor.
+     * @return The previous processor.
+     */
+    public static synchronized CoordinatorCompletionParticipantProcessor setProcessor(final CoordinatorCompletionParticipantProcessor processor)
+    {
+        final CoordinatorCompletionParticipantProcessor origProcessor = PROCESSOR ;
+        PROCESSOR = processor ;
+        return origProcessor ;
+    }
+    
+    /**
+     * Activate the participant.
+     * @param participant The participant.
+     * @param identifier The identifier.
+     */
+    public abstract void activateParticipant(final CoordinatorCompletionParticipantInboundEvents participant, final String identifier) ;
+
+    /**
+     * Deactivate the participant.
+     * @param participant The participant.
+     */
+    public abstract void deactivateParticipant(final CoordinatorCompletionParticipantInboundEvents participant) ;
+    
+    /**
+     * Cancel.
+     * @param cancel The cancel notification.
+     * @param addressingContext The addressing context.
+     * @param jbossContext The jboss context.
+     */
+    public abstract void cancel(final NotificationType cancel, final AddressingContext addressingContext, final JBossContext jbossContext) ;
+    
+    /**
+     * Close.
+     * @param close The close notification.
+     * @param addressingContext The addressing context.
+     * @param jbossContext The jboss context.
+     */
+    public abstract void close(final NotificationType close, final AddressingContext addressingContext, final JBossContext jbossContext) ;
+    
+    /**
+     * Compensate.
+     * @param compensate The compensate notification.
+     * @param addressingContext The addressing context.
+     * @param jbossContext The jboss context.
+     */
+    public abstract void compensate(final NotificationType compensate, final AddressingContext addressingContext, final JBossContext jbossContext) ;
+    
+    /**
+     * Complete.
+     * @param complete The complete notification.
+     * @param addressingContext The addressing context.
+     * @param jbossContext The jboss context.
+     */
+    public abstract void complete(final NotificationType complete, final AddressingContext addressingContext, final JBossContext jbossContext) ;
+    
+    /**
+     * Exited.
+     * @param exited The exited notification.
+     * @param addressingContext The addressing context.
+     * @param jbossContext The jboss context.
+     */
+    public abstract void exited(final NotificationType exited, final AddressingContext addressingContext, final JBossContext jbossContext) ;
+    
+    /**
+     * Failed.
+     * @param failed The failed notification.
+     * @param addressingContext The addressing context.
+     * @param jbossContext The jboss context.
+     */
+    public abstract void failed(final NotificationType failed, final AddressingContext addressingContext, final JBossContext jbossContext) ;
+    
+    /**
+     * NotCompleted.
+     * @param notCompleted The notCompleted notification.
+     * @param addressingContext The addressing context.
+     * @param jbossContext The jboss context.
+     */
+    public abstract void notCompleted(final NotificationType notCompleted, final AddressingContext addressingContext, final JBossContext jbossContext) ;
+    
+    /**
+     * Get Status.
+     * @param getStatus The get status notification.
+     * @param addressingContext The addressing context.
+     * @param jbossContext The jboss context.
+     */
+    public abstract void getStatus(final NotificationType getStatus, final AddressingContext addressingContext, final JBossContext jbossContext) ;
+    
+    /**
+     * Status.
+     * @param status The status.
+     * @param addressingContext The addressing context.
+     * @param jbossContext The jboss context.
+     */
+    public abstract void status(final StatusType status, final AddressingContext addressingContext, final JBossContext jbossContext) ;
+    
+    /**
+     * SOAP fault.
+     * @param soapFault The SOAP fault.
+     * @param addressingContext The addressing context.
+     * @param jbossContext The jboss context.
+     */
+    public abstract void soapFault(final SoapFault soapFault, final AddressingContext addressingContext, final JBossContext jbossContext) ;
+}


Property changes on: labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/processors/CoordinatorCompletionParticipantProcessor.java
___________________________________________________________________
Name: svn:keywords
   + Rev Date
Name: svn:eol-style
   + native

Added: labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/processors/ParticipantCompletionCoordinatorProcessor.java
===================================================================
--- labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/processors/ParticipantCompletionCoordinatorProcessor.java	                        (rev 0)
+++ labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/processors/ParticipantCompletionCoordinatorProcessor.java	2007-08-14 12:43:41 UTC (rev 14200)
@@ -0,0 +1,158 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag.  All rights reserved. 
+ * See the copyright.txt in the distribution for a full listing 
+ * of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU General Public License, v. 2.0.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A 
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+ * PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+ * You should have received a copy of the GNU General Public License,
+ * v. 2.0 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+ * MA  02110-1301, USA.
+ * 
+ * (C) 2005-2006,
+ * @author JBoss Inc.
+ */
+package com.arjuna.webservices.wsba11.processors;
+
+import com.arjuna.webservices.SoapFault;
+import com.arjuna.webservices.wsaddr2005.AddressingContext;
+import com.arjuna.webservices.wsjboss.JBossContext;
+import com.arjuna.webservices.wsba11.ExceptionType;
+import com.arjuna.webservices.wsba11.NotificationType;
+import com.arjuna.webservices.wsba11.ParticipantCompletionCoordinatorInboundEvents;
+import com.arjuna.webservices.wsba11.StatusType;
+
+/**
+ * The Participant Completion Coordinator processor.
+ * @author kevin
+ */
+public abstract class ParticipantCompletionCoordinatorProcessor
+{
+    /**
+     * The coordinator processor.
+     */
+    private static ParticipantCompletionCoordinatorProcessor PROCESSOR ;
+    
+    /**
+     * Get the processor.
+     * @return The processor.
+     */
+    public static synchronized ParticipantCompletionCoordinatorProcessor getProcessor()
+    {
+        return PROCESSOR ;
+    }
+    
+    /**
+     * Set the processor.
+     * @param processor The processor.
+     * @return The previous processor.
+     */
+    public static synchronized ParticipantCompletionCoordinatorProcessor setProcessor(final ParticipantCompletionCoordinatorProcessor processor)
+    {
+        final ParticipantCompletionCoordinatorProcessor origProcessor = PROCESSOR ;
+        PROCESSOR = processor ;
+        return origProcessor ;
+    }
+    
+    /**
+     * Activate the coordinator.
+     * @param coordinatorState The coordinator.
+     * @param identifier The identifier.
+     */
+    public abstract void activateCoordinator(final ParticipantCompletionCoordinatorInboundEvents coordinator, final String identifier) ;
+
+    /**
+     * Deactivate the coordinator.
+     * @param coordinator The coordinator.
+     */
+    public abstract void deactivateCoordinator(final ParticipantCompletionCoordinatorInboundEvents coordinator) ;
+    
+    /**
+     * Cancelled.
+     * @param cancelled The cancelled notification.
+     * @param addressingContext The addressing context.
+     * @param jbossContext The jboss context.
+     */
+    public abstract void cancelled(final NotificationType cancelled, final AddressingContext addressingContext, final JBossContext jbossContext) ;
+    
+    /**
+     * Closed.
+     * @param closed The closed notification.
+     * @param addressingContext The addressing context.
+     * @param jbossContext The jboss context.
+     */
+    public abstract void closed(final NotificationType closed, final AddressingContext addressingContext, final JBossContext jbossContext) ;
+    
+    /**
+     * Compensated.
+     * @param compensated The compensated notification.
+     * @param addressingContext The addressing context.
+     * @param jbossContext The jboss context.
+     */
+    public abstract void compensated(final NotificationType compensated, final AddressingContext addressingContext, final JBossContext jbossContext) ;
+
+    /**
+     * Completed.
+     * @param completed The completed notification.
+     * @param addressingContext The addressing context.
+     * @param jbossContext The jboss context.
+     */
+    public abstract void completed(final NotificationType completed, final AddressingContext addressingContext,
+        final JBossContext jbossContext) ;
+    
+    /**
+     * Exit.
+     * @param exit The exit notification.
+     * @param addressingContext The addressing context.
+     * @param jbossContext The jboss context.
+     */
+    public abstract void exit(final NotificationType exit, final AddressingContext addressingContext, final JBossContext jbossContext) ;
+    
+    /**
+     * Fail.
+     * @param fail The fail exception.
+     * @param addressingContext The addressing context.
+     * @param jbossContext The jboss context.
+     */
+    public abstract void fail(final ExceptionType fail, final AddressingContext addressingContext,
+        final JBossContext jbossContext) ;
+    
+    /**
+     * CannotComplete.
+     * @param cannotComplete The cannotComplete exception.
+     * @param addressingContext The addressing context.
+     * @param jbossContext The jboss context.
+     */
+    public abstract void cannotComplete(final NotificationType cannotComplete, final AddressingContext addressingContext,
+        final JBossContext jbossContext) ;
+    
+    /**
+     * Get Status.
+     * @param getStatus The get status notification.
+     * @param addressingContext The addressing context.
+     * @param jbossContext The jboss context.
+     */
+    public abstract void getStatus(final NotificationType getStatus, final AddressingContext addressingContext, final JBossContext jbossContext) ;
+    
+    /**
+     * Status.
+     * @param status The status.
+     * @param addressingContext The addressing context.
+     * @param jbossContext The jboss context.
+     */
+    public abstract void status(final StatusType status, final AddressingContext addressingContext, final JBossContext jbossContext) ;
+    
+    /**
+     * SOAP fault.
+     * @param soapFault The SOAP fault.
+     * @param addressingContext The addressing context.
+     * @param jbossContext The jboss context.
+     */
+    public abstract void soapFault(final SoapFault soapFault, final AddressingContext addressingContext, final JBossContext jbossContext) ;
+}


Property changes on: labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/processors/ParticipantCompletionCoordinatorProcessor.java
___________________________________________________________________
Name: svn:keywords
   + Rev Date
Name: svn:eol-style
   + native

Added: labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/processors/ParticipantCompletionParticipantProcessor.java
===================================================================
--- labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/processors/ParticipantCompletionParticipantProcessor.java	                        (rev 0)
+++ labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/processors/ParticipantCompletionParticipantProcessor.java	2007-08-14 12:43:41 UTC (rev 14200)
@@ -0,0 +1,147 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag.  All rights reserved. 
+ * See the copyright.txt in the distribution for a full listing 
+ * of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU General Public License, v. 2.0.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A 
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+ * PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+ * You should have received a copy of the GNU General Public License,
+ * v. 2.0 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+ * MA  02110-1301, USA.
+ * 
+ * (C) 2005-2006,
+ * @author JBoss Inc.
+ */
+package com.arjuna.webservices.wsba11.processors;
+
+import com.arjuna.webservices.SoapFault;
+import com.arjuna.webservices.wsaddr2005.AddressingContext;
+import com.arjuna.webservices.wsjboss.JBossContext;
+import com.arjuna.webservices.wsba11.NotificationType;
+import com.arjuna.webservices.wsba11.ParticipantCompletionParticipantInboundEvents;
+import com.arjuna.webservices.wsba11.StatusType;
+
+
+/**
+ * The Participant Completion Participant processor.
+ * @author kevin
+ */
+public abstract class ParticipantCompletionParticipantProcessor
+{
+    /**
+     * The participant processor.
+     */
+    private static ParticipantCompletionParticipantProcessor PROCESSOR ;
+    
+    /**
+     * Get the processor.
+     * @return The processor.
+     */
+    public static synchronized ParticipantCompletionParticipantProcessor getProcessor()
+    {
+        return PROCESSOR ;
+    }
+    
+    /**
+     * Set the processor.
+     * @param processor The processor.
+     * @return The previous processor.
+     */
+    public static synchronized ParticipantCompletionParticipantProcessor setProcessor(final ParticipantCompletionParticipantProcessor processor)
+    {
+        final ParticipantCompletionParticipantProcessor origProcessor = PROCESSOR ;
+        PROCESSOR = processor ;
+        return origProcessor ;
+    }
+    
+    /**
+     * Activate the participant.
+     * @param participant The participant.
+     * @param identifier The identifier.
+     */
+    public abstract void activateParticipant(final ParticipantCompletionParticipantInboundEvents participant, final String identifier) ;
+
+    /**
+     * Deactivate the participant.
+     * @param participant The participant.
+     */
+    public abstract void deactivateParticipant(final ParticipantCompletionParticipantInboundEvents participant) ;
+    
+    /**
+     * Cancel.
+     * @param cancel The cancel notification.
+     * @param addressingContext The addressing context.
+     * @param jbossContext The jboss context.
+     */
+    public abstract void cancel(final NotificationType cancel, final AddressingContext addressingContext, final JBossContext jbossContext) ;
+    
+    /**
+     * Close.
+     * @param close The close notification.
+     * @param addressingContext The addressing context.
+     * @param jbossContext The jboss context.
+     */
+    public abstract void close(final NotificationType close, final AddressingContext addressingContext, final JBossContext jbossContext) ;
+    
+    /**
+     * Compensate.
+     * @param compensate The compensate notification.
+     * @param addressingContext The addressing context.
+     * @param jbossContext The jboss context.
+     */
+    public abstract void compensate(final NotificationType compensate, final AddressingContext addressingContext, final JBossContext jbossContext) ;
+    
+    /**
+     * Exited.
+     * @param exited The exited notification.
+     * @param addressingContext The addressing context.
+     * @param jbossContext The jboss context.
+     */
+    public abstract void exited(final NotificationType exited, final AddressingContext addressingContext, final JBossContext jbossContext) ;
+    
+    /**
+     * Failed.
+     * @param failed The failed notification.
+     * @param addressingContext The addressing context.
+     * @param jbossContext The jboss context.
+     */
+    public abstract void failed(final NotificationType failed, final AddressingContext addressingContext, final JBossContext jbossContext) ;
+    
+    /**
+     * NotCompleted.
+     * @param notCompleted The notCompleted notification.
+     * @param addressingContext The addressing context.
+     * @param jbossContext The jboss context.
+     */
+    public abstract void notCompleted(final NotificationType notCompleted, final AddressingContext addressingContext, final JBossContext jbossContext) ;
+    
+    /**
+     * Get Status.
+     * @param getStatus The get status notification.
+     * @param addressingContext The addressing context.
+     * @param jbossContext The jboss context.
+     */
+    public abstract void getStatus(final NotificationType getStatus, final AddressingContext addressingContext, final JBossContext jbossContext) ;
+    
+    /**
+     * Status.
+     * @param status The status.
+     * @param addressingContext The addressing context.
+     * @param jbossContext The jboss context.
+     */
+    public abstract void status(final StatusType status, final AddressingContext addressingContext, final JBossContext jbossContext) ;
+    
+    /**
+     * SOAP fault.
+     * @param soapFault The SOAP fault.
+     * @param addressingContext The addressing context.
+     * @param jbossContext The jboss context.
+     */
+    public abstract void soapFault(final SoapFault soapFault, final AddressingContext addressingContext, final JBossContext jbossContext) ;
+}


Property changes on: labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/processors/ParticipantCompletionParticipantProcessor.java
___________________________________________________________________
Name: svn:keywords
   + Rev Date
Name: svn:eol-style
   + native

Added: labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/server/CoordinatorCompletionCoordinatorInitialisation.java
===================================================================
--- labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/server/CoordinatorCompletionCoordinatorInitialisation.java	                        (rev 0)
+++ labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/server/CoordinatorCompletionCoordinatorInitialisation.java	2007-08-14 12:43:41 UTC (rev 14200)
@@ -0,0 +1,67 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag.  All rights reserved. 
+ * See the copyright.txt in the distribution for a full listing 
+ * of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU General Public License, v. 2.0.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A 
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+ * PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+ * You should have received a copy of the GNU General Public License,
+ * v. 2.0 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+ * MA  02110-1301, USA.
+ * 
+ * (C) 2005-2006,
+ * @author JBoss Inc.
+ */
+package com.arjuna.webservices.wsba11.server;
+
+import javax.servlet.ServletContextEvent;
+import javax.servlet.ServletContextListener;
+
+import com.arjuna.webservices.HandlerRegistry;
+import com.arjuna.webservices.SoapRegistry;
+import com.arjuna.webservices.SoapService;
+import com.arjuna.webservices.wsaddr2005.policy.AddressingPolicy;
+import com.arjuna.webservices.wsjboss.policy.JBossPolicy;
+import com.arjuna.webservices.wsba11.BusinessActivityConstants;
+import com.arjuna.webservices.wsba11.policy.CoordinatorCompletionCoordinatorPolicy;
+
+/**
+ * Activate the Coordinator Completion Coordinator service
+ * @author kevin
+ */
+public class CoordinatorCompletionCoordinatorInitialisation implements ServletContextListener
+{
+    /**
+     * The context has been initialized.
+     * @param servletContextEvent The servlet context event.
+     */
+    public void contextInitialized(final ServletContextEvent servletContextEvent)
+    {
+        final HandlerRegistry handlerRegistry = new HandlerRegistry() ;
+        
+        // Add WS-Addressing
+        AddressingPolicy.register(handlerRegistry) ;
+        // Add JBoss handlers
+        JBossPolicy.register(handlerRegistry) ;
+        // Add Coordinator Completion coordinator.
+        CoordinatorCompletionCoordinatorPolicy.register(handlerRegistry) ;
+        
+        final SoapRegistry soapRegistry = SoapRegistry.getRegistry() ;
+        soapRegistry.registerSoapService(BusinessActivityConstants.SERVICE_COORDINATOR_COMPLETION_COORDINATOR,
+            new SoapService(handlerRegistry)) ;
+    }
+
+    /**
+     * The context is about to be destroyed.
+     * @param servletContextEvent The servlet context event.
+     */
+    public void contextDestroyed(final ServletContextEvent servletContextEvent)
+    {
+    }
+}


Property changes on: labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/server/CoordinatorCompletionCoordinatorInitialisation.java
___________________________________________________________________
Name: svn:keywords
   + Rev Date
Name: svn:eol-style
   + native

Added: labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/server/CoordinatorCompletionParticipantInitialisation.java
===================================================================
--- labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/server/CoordinatorCompletionParticipantInitialisation.java	                        (rev 0)
+++ labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/server/CoordinatorCompletionParticipantInitialisation.java	2007-08-14 12:43:41 UTC (rev 14200)
@@ -0,0 +1,67 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag.  All rights reserved. 
+ * See the copyright.txt in the distribution for a full listing 
+ * of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU General Public License, v. 2.0.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A 
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+ * PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+ * You should have received a copy of the GNU General Public License,
+ * v. 2.0 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+ * MA  02110-1301, USA.
+ * 
+ * (C) 2005-2006,
+ * @author JBoss Inc.
+ */
+package com.arjuna.webservices.wsba11.server;
+
+import javax.servlet.ServletContextEvent;
+import javax.servlet.ServletContextListener;
+
+import com.arjuna.webservices.HandlerRegistry;
+import com.arjuna.webservices.SoapRegistry;
+import com.arjuna.webservices.SoapService;
+import com.arjuna.webservices.wsaddr2005.policy.AddressingPolicy;
+import com.arjuna.webservices.wsjboss.policy.JBossPolicy;
+import com.arjuna.webservices.wsba11.BusinessActivityConstants;
+import com.arjuna.webservices.wsba11.policy.CoordinatorCompletionParticipantPolicy;
+
+/**
+ * Activate the Coordinator Completion Participant service
+ * @author kevin
+ */
+public class CoordinatorCompletionParticipantInitialisation implements ServletContextListener
+{
+    /**
+     * The context has been initialized.
+     * @param servletContextEvent The servlet context event.
+     */
+    public void contextInitialized(final ServletContextEvent servletContextEvent)
+    {
+        final HandlerRegistry handlerRegistry = new HandlerRegistry() ;
+        
+        // Add WS-Addressing
+        AddressingPolicy.register(handlerRegistry) ;
+        // Add JBoss handlers
+        JBossPolicy.register(handlerRegistry) ;
+        // Add Coordinator Completion participant.
+        CoordinatorCompletionParticipantPolicy.register(handlerRegistry) ;
+        
+        final SoapRegistry soapRegistry = SoapRegistry.getRegistry() ;
+        soapRegistry.registerSoapService(BusinessActivityConstants.SERVICE_COORDINATOR_COMPLETION_PARTICIPANT,
+            new SoapService(handlerRegistry)) ;
+    }
+
+    /**
+     * The context is about to be destroyed.
+     * @param servletContextEvent The servlet context event.
+     */
+    public void contextDestroyed(final ServletContextEvent servletContextEvent)
+    {
+    }
+}


Property changes on: labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/server/CoordinatorCompletionParticipantInitialisation.java
___________________________________________________________________
Name: svn:keywords
   + Rev Date
Name: svn:eol-style
   + native

Added: labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/server/ParticipantCompletionCoordinatorInitialisation.java
===================================================================
--- labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/server/ParticipantCompletionCoordinatorInitialisation.java	                        (rev 0)
+++ labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/server/ParticipantCompletionCoordinatorInitialisation.java	2007-08-14 12:43:41 UTC (rev 14200)
@@ -0,0 +1,67 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag.  All rights reserved. 
+ * See the copyright.txt in the distribution for a full listing 
+ * of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU General Public License, v. 2.0.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A 
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+ * PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+ * You should have received a copy of the GNU General Public License,
+ * v. 2.0 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+ * MA  02110-1301, USA.
+ * 
+ * (C) 2005-2006,
+ * @author JBoss Inc.
+ */
+package com.arjuna.webservices.wsba11.server;
+
+import javax.servlet.ServletContextEvent;
+import javax.servlet.ServletContextListener;
+
+import com.arjuna.webservices.HandlerRegistry;
+import com.arjuna.webservices.SoapRegistry;
+import com.arjuna.webservices.SoapService;
+import com.arjuna.webservices.wsaddr2005.policy.AddressingPolicy;
+import com.arjuna.webservices.wsjboss.policy.JBossPolicy;
+import com.arjuna.webservices.wsba11.BusinessActivityConstants;
+import com.arjuna.webservices.wsba11.policy.ParticipantCompletionCoordinatorPolicy;
+
+/**
+ * Activate the Participant Completion Coordinator service
+ * @author kevin
+ */
+public class ParticipantCompletionCoordinatorInitialisation implements ServletContextListener
+{
+    /**
+     * The context has been initialized.
+     * @param servletContextEvent The servlet context event.
+     */
+    public void contextInitialized(final ServletContextEvent servletContextEvent)
+    {
+        final HandlerRegistry handlerRegistry = new HandlerRegistry() ;
+        
+        // Add WS-Addressing
+        AddressingPolicy.register(handlerRegistry) ;
+        // Add JBoss handlers
+        JBossPolicy.register(handlerRegistry) ;
+        // Add Participant Completion coordinator.
+        ParticipantCompletionCoordinatorPolicy.register(handlerRegistry) ;
+        
+        final SoapRegistry soapRegistry = SoapRegistry.getRegistry() ;
+        soapRegistry.registerSoapService(BusinessActivityConstants.SERVICE_PARTICIPANT_COMPLETION_COORDINATOR,
+            new SoapService(handlerRegistry)) ;
+    }
+
+    /**
+     * The context is about to be destroyed.
+     * @param servletContextEvent The servlet context event.
+     */
+    public void contextDestroyed(final ServletContextEvent servletContextEvent)
+    {
+    }
+}


Property changes on: labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/server/ParticipantCompletionCoordinatorInitialisation.java
___________________________________________________________________
Name: svn:keywords
   + Rev Date
Name: svn:eol-style
   + native

Added: labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/server/ParticipantCompletionParticipantInitialisation.java
===================================================================
--- labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/server/ParticipantCompletionParticipantInitialisation.java	                        (rev 0)
+++ labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/server/ParticipantCompletionParticipantInitialisation.java	2007-08-14 12:43:41 UTC (rev 14200)
@@ -0,0 +1,67 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag.  All rights reserved. 
+ * See the copyright.txt in the distribution for a full listing 
+ * of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU General Public License, v. 2.0.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A 
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+ * PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+ * You should have received a copy of the GNU General Public License,
+ * v. 2.0 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+ * MA  02110-1301, USA.
+ * 
+ * (C) 2005-2006,
+ * @author JBoss Inc.
+ */
+package com.arjuna.webservices.wsba11.server;
+
+import javax.servlet.ServletContextEvent;
+import javax.servlet.ServletContextListener;
+
+import com.arjuna.webservices.HandlerRegistry;
+import com.arjuna.webservices.SoapRegistry;
+import com.arjuna.webservices.SoapService;
+import com.arjuna.webservices.wsaddr2005.policy.AddressingPolicy;
+import com.arjuna.webservices.wsjboss.policy.JBossPolicy;
+import com.arjuna.webservices.wsba11.BusinessActivityConstants;
+import com.arjuna.webservices.wsba11.policy.ParticipantCompletionParticipantPolicy;
+
+/**
+ * Activate the Participant Completion Participant service
+ * @author kevin
+ */
+public class ParticipantCompletionParticipantInitialisation implements ServletContextListener
+{
+    /**
+     * The context has been initialized.
+     * @param servletContextEvent The servlet context event.
+     */
+    public void contextInitialized(final ServletContextEvent servletContextEvent)
+    {
+        final HandlerRegistry handlerRegistry = new HandlerRegistry() ;
+        
+        // Add WS-Addressing
+        AddressingPolicy.register(handlerRegistry) ;
+        // Add JBoss handlers
+        JBossPolicy.register(handlerRegistry) ;
+        // Add Participant Completion participant.
+        ParticipantCompletionParticipantPolicy.register(handlerRegistry) ;
+        
+        final SoapRegistry soapRegistry = SoapRegistry.getRegistry() ;
+        soapRegistry.registerSoapService(BusinessActivityConstants.SERVICE_PARTICIPANT_COMPLETION_PARTICIPANT,
+            new SoapService(handlerRegistry)) ;
+    }
+
+    /**
+     * The context is about to be destroyed.
+     * @param servletContextEvent The servlet context event.
+     */
+    public void contextDestroyed(final ServletContextEvent servletContextEvent)
+    {
+    }
+}


Property changes on: labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/server/ParticipantCompletionParticipantInitialisation.java
___________________________________________________________________
Name: svn:keywords
   + Rev Date
Name: svn:eol-style
   + native

Added: labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/wsba.xsd
===================================================================
--- labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/wsba.xsd	                        (rev 0)
+++ labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/wsba.xsd	2007-08-14 12:43:41 UTC (rev 14200)
@@ -0,0 +1,90 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- 
+OASIS takes no position regarding the validity or scope of any intellectual property or other rights that might be claimed to pertain to the implementation or use of the technology described in this document or the extent to which any license under such rights might or might not be available; neither does it represent that it has made any effort to identify any such rights. Information on OASIS's procedures with respect to rights in OASIS specifications can be found at the OASIS website. Copies of claims of rights made available for publication and any assurances of licenses to be made available, or the result of an attempt made to obtain a general license or permission for the use of such proprietary rights by implementors or users of this specification, can be obtained from the OASIS President.
+OASIS invites any interested party to bring to its attention any copyrights, patents or patent applications, or other proprietary rights which may cover technology that may be required to implement this specification. Please address the information to the OASIS President.
+Copyright OASIS Open 2006. All Rights Reserved.
+This document and translations of it may be copied and furnished to others, and derivative works that comment on or otherwise explain it or assist in its implementation may be prepared, copied, published and distributed, in whole or in part, without restriction of any kind, provided that the above copyright notice and this paragraph are included on all such copies and derivative works. However, this document itself does not be modified in any way, such as by removing the copyright notice or references to OASIS, except as needed for the purpose of developing OASIS specifications, in which case the procedures for copyrights defined in the OASIS Intellectual Property Rights document must be followed, or as required to translate it into languages other than English.
+The limited permissions granted above are perpetual and will not be revoked by OASIS or its successors or assigns.
+This document and the information contained herein is provided on an "AS IS" basis and OASIS DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
+
+
+
+-->
+<xsd:schema targetNamespace="http://docs.oasis-open.org/ws-tx/wsba/2006/06" xmlns:wsba="http://docs.oasis-open.org/ws-tx/wsba/2006/06" xmlns:xsd="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" attributeFormDefault="unqualified" version="1.0">
+	<xsd:complexType name="NotificationType">
+		<xsd:sequence>
+			<xsd:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
+		</xsd:sequence>
+		<xsd:anyAttribute namespace="##other" processContents="lax"/>
+	</xsd:complexType>
+	<xsd:complexType name="ExceptionType">
+		<xsd:sequence>
+			<xsd:element name="ExceptionIdentifier" type="xsd:QName"/>
+			<xsd:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
+		</xsd:sequence>
+		<xsd:anyAttribute namespace="##other" processContents="lax"/>
+	</xsd:complexType>
+	<!-- Coordinator accepts -->
+	<xsd:element name="Canceled" type="wsba:NotificationType"/>
+	<xsd:element name="Closed" type="wsba:NotificationType"/>
+	<xsd:element name="Compensated" type="wsba:NotificationType"/>
+	<xsd:element name="Completed" type="wsba:NotificationType"/>
+	<xsd:element name="Exit" type="wsba:NotificationType"/>
+      <xsd:element name="CannotComplete" type="wsba:NotificationType"/>
+	<xsd:element name="Fail" type="wsba:ExceptionType"/>
+	<!-- Participant accepts -->
+	<xsd:element name="Cancel" type="wsba:NotificationType"/>
+	<xsd:element name="Close" type="wsba:NotificationType"/>
+	<xsd:element name="Compensate" type="wsba:NotificationType"/>
+	<xsd:element name="Complete" type="wsba:NotificationType"/>
+	<xsd:element name="Failed" type="wsba:NotificationType"/>
+      <xsd:element name="NotCompleted" type="wsba:NotificationType"/>
+	<xsd:element name="Exited" type="wsba:NotificationType"/>
+	<!-- Both accept -->
+	<xsd:element name="GetStatus" type="wsba:NotificationType"/>
+	<xsd:complexType name="StatusType">
+		<xsd:sequence>
+			<xsd:element name="State" type="wsba:StateType"/>
+			<xsd:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
+		</xsd:sequence>
+		<xsd:anyAttribute namespace="##other" processContents="lax"/>
+	</xsd:complexType>
+	<xsd:element name="Status" type="wsba:StatusType"/>
+	<xsd:simpleType name="StateType">
+		<xsd:restriction base="xsd:QName">
+			<xsd:enumeration value="wsba:Active"/>
+			<xsd:enumeration value="wsba:Canceling"/>
+			<xsd:enumeration value="wsba:Canceling-Active"/>
+			<xsd:enumeration value="wsba:Canceling-Completing"/>
+			<xsd:enumeration value="wsba:Completing"/>
+			<xsd:enumeration value="wsba:Completed"/>
+			<xsd:enumeration value="wsba:Closing"/>
+			<xsd:enumeration value="wsba:Compensating"/>
+			<xsd:enumeration value="wsba:Failing-Active"/>
+			<xsd:enumeration value="wsba:Failing-Compensating"/>
+                  <xsd:enumeration value="wsba:Failing-Canceling"/>
+			<xsd:enumeration value="wsba:Exiting"/>
+                  <xsd:enumeration value="wsba:NotCompleting"/>
+			<xsd:enumeration value="wsba:Ended"/>
+		</xsd:restriction>
+	</xsd:simpleType>
+
+    <!-- Policy assertions -->
+    <xsd:element name="BAAtomicOutcomeAssertion">
+		<xsd:complexType>
+			<xsd:sequence>
+                   <xsd:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
+               </xsd:sequence>
+               <xsd:anyAttribute namespace="##other" processContents="lax"/>
+		</xsd:complexType>
+    </xsd:element>
+    <xsd:element name="BAMixedOutcomeAssertion">
+		<xsd:complexType>
+			<xsd:sequence>
+                   <xsd:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
+               </xsd:sequence>
+               <xsd:anyAttribute namespace="##other" processContents="lax"/>
+		</xsd:complexType>
+    </xsd:element>
+
+</xsd:schema>
\ No newline at end of file


Property changes on: labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsba11/wsba.xsd
___________________________________________________________________
Name: svn:mime-type
   + text/xml
Name: svn:keywords
   + Rev Date
Name: svn:eol-style
   + native

Added: labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsjbosstx/JBossTXConstants.java
===================================================================
--- labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsjbosstx/JBossTXConstants.java	                        (rev 0)
+++ labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsjbosstx/JBossTXConstants.java	2007-08-14 12:43:41 UTC (rev 14200)
@@ -0,0 +1,189 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag.  All rights reserved. 
+ * See the copyright.txt in the distribution for a full listing 
+ * of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU General Public License, v. 2.0.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A 
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+ * PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+ * You should have received a copy of the GNU General Public License,
+ * v. 2.0 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+ * MA  02110-1301, USA.
+ * 
+ * (C) 2005-2006,
+ * @author JBoss Inc.
+ */
+package com.arjuna.webservices.wsjbosstx;
+
+import javax.xml.namespace.QName;
+
+/**
+ * Interface containing JBoss WS constants.
+ */
+public interface JBossTXConstants
+{
+    /**
+     * The termination coordinator service name.
+     */
+    public String SERVICE_TERMINATION_COORDINATOR = "TX11TerminationCoordinator" ;
+    /**
+     * The termination participant service name.
+     */
+    public String SERVICE_TERMINATION_PARTICIPANT = "TX11TerminationParticipant" ;
+    
+    /**
+     * The Namespace.
+     */
+    public String WSJBOSSTX_NAMESPACE = "http://schemas.jboss.com/ws/2006/10/wsjbosstx" ;
+    /**
+     * The Attribute Namespace.
+     */
+    public String WSJBOSSTX_ATTRIBUTE_NAMESPACE = "" ;
+    /**
+     * The namespace prefix.
+     */
+    public String WSJBOSSTX_PREFIX = "wsjbosstx" ;
+    /**
+     * The attribute namespace prefix.
+     */
+    public String WSJBOSSTX_ATTRIBUTE_PREFIX = "" ;
+
+    /**
+     * The TerminationService element.
+     */
+    public String WSJBOSSTX_ELEMENT_TERMINATION_SERVICE = "TerminationService" ;
+    /**
+     * The TerminationService QName.
+     */
+    public QName WSJBOSSTX_ELEMENT_TERMINATION_SERVICE_QNAME = new QName(WSJBOSSTX_NAMESPACE, WSJBOSSTX_ELEMENT_TERMINATION_SERVICE, WSJBOSSTX_PREFIX) ;
+
+    /**
+     * The Complete element.
+     */
+    public String WSJBOSSTX_ELEMENT_COMPLETE = "Complete" ;
+    /**
+     * The Complete QName.
+     */
+    public QName WSJBOSSTX_ELEMENT_COMPLETE_QNAME = new QName(WSJBOSSTX_NAMESPACE, WSJBOSSTX_ELEMENT_COMPLETE, WSJBOSSTX_PREFIX) ;
+    /**
+     * The Complete Action.
+     */
+    public String WSJBOSSTX_ACTION_COMPLETE = WSJBOSSTX_NAMESPACE + "/" + WSJBOSSTX_ELEMENT_COMPLETE ;
+    /**
+     * The Completed element.
+     */
+    public String WSJBOSSTX_ELEMENT_COMPLETED = "Completed" ;
+    /**
+     * The Completed QName.
+     */
+    public QName WSJBOSSTX_ELEMENT_COMPLETED_QNAME = new QName(WSJBOSSTX_NAMESPACE, WSJBOSSTX_ELEMENT_COMPLETED, WSJBOSSTX_PREFIX) ;
+    /**
+     * The Completed Action.
+     */
+    public String WSJBOSSTX_ACTION_COMPLETED = WSJBOSSTX_NAMESPACE + "/" + WSJBOSSTX_ELEMENT_COMPLETED ;
+    /**
+     * The Close element.
+     */
+    public String WSJBOSSTX_ELEMENT_CLOSE = "Close" ;
+    /**
+     * The Close QName.
+     */
+    public QName WSJBOSSTX_ELEMENT_CLOSE_QNAME = new QName(WSJBOSSTX_NAMESPACE, WSJBOSSTX_ELEMENT_CLOSE, WSJBOSSTX_PREFIX) ;
+    /**
+     * The Close Action.
+     */
+    public String WSJBOSSTX_ACTION_CLOSE = WSJBOSSTX_NAMESPACE + "/" + WSJBOSSTX_ELEMENT_CLOSE ;
+    /**
+     * The Closed element.
+     */
+    public String WSJBOSSTX_ELEMENT_CLOSED = "Closed" ;
+    /**
+     * The Closed QName.
+     */
+    public QName WSJBOSSTX_ELEMENT_CLOSED_QNAME = new QName(WSJBOSSTX_NAMESPACE, WSJBOSSTX_ELEMENT_CLOSED, WSJBOSSTX_PREFIX) ;
+    /**
+     * The Closed Action.
+     */
+    public String WSJBOSSTX_ACTION_CLOSED = WSJBOSSTX_NAMESPACE + "/" + WSJBOSSTX_ELEMENT_CLOSED ;
+    /**
+     * The Cancel element.
+     */
+    public String WSJBOSSTX_ELEMENT_CANCEL = "Cancel" ;
+    /**
+     * The Cancel QName.
+     */
+    public QName WSJBOSSTX_ELEMENT_CANCEL_QNAME = new QName(WSJBOSSTX_NAMESPACE, WSJBOSSTX_ELEMENT_CANCEL, WSJBOSSTX_PREFIX) ;
+    /**
+     * The Cancel Action.
+     */
+    public String WSJBOSSTX_ACTION_CANCEL = WSJBOSSTX_NAMESPACE + "/" + WSJBOSSTX_ELEMENT_CANCEL ;
+    /**
+     * The Cancelled element.
+     */
+    public String WSJBOSSTX_ELEMENT_CANCELLED = "Cancelled" ;
+    /**
+     * The Cancelled QName.
+     */
+    public QName WSJBOSSTX_ELEMENT_CANCELLED_QNAME = new QName(WSJBOSSTX_NAMESPACE, WSJBOSSTX_ELEMENT_CANCELLED, WSJBOSSTX_PREFIX) ;
+    /**
+     * The Cancelled Action.
+     */
+    public String WSJBOSSTX_ACTION_CANCELLED = WSJBOSSTX_NAMESPACE + "/" + WSJBOSSTX_ELEMENT_CANCELLED ;
+    
+    /**
+     * The SOAP Fault Action.
+     */
+    public String WSJBOSSTX_ACTION_SOAP_FAULT = WSJBOSSTX_NAMESPACE + "/soapFault" ;
+
+    
+    /**
+     * The faulted error code.
+     */
+    public static final String FAULTED_ERROR_CODE = "Faulted";
+    /**
+     * The faulted error code.
+     */
+    public static final QName  FAULTED_ERROR_CODE_QNAME = new QName(WSJBOSSTX_NAMESPACE, FAULTED_ERROR_CODE, WSJBOSSTX_PREFIX);
+    /**
+     * The unknown transaction error code.
+     */
+    public static final String UNKNOWNTRANSACTION_ERROR_CODE = "UnknownTransaction";
+    /**
+     * The unknown transaction error code.
+     */
+    public static final QName  UNKNOWNTRANSACTION_ERROR_CODE_QNAME = new QName(WSJBOSSTX_NAMESPACE, UNKNOWNTRANSACTION_ERROR_CODE, WSJBOSSTX_PREFIX);
+    /**
+     * The transaction rolled back error code.
+     */
+    public static final String TRANSACTIONROLLEDBACK_ERROR_CODE = "TransactionRolledBack";
+    /**
+     * The transaction rolled back error code.
+     */
+    public static final QName  TRANSACTIONROLLEDBACK_ERROR_CODE_QNAME = new QName(WSJBOSSTX_NAMESPACE, TRANSACTIONROLLEDBACK_ERROR_CODE, WSJBOSSTX_PREFIX);
+    /**
+     * The wrong state error code.
+     */
+    public static final String WRONGSTATE_ERROR_CODE         = "WrongState";
+    /**
+     * The wrong state error code.
+     */
+    public static final QName  WRONGSTATE_ERROR_CODE_QNAME = new QName(WSJBOSSTX_NAMESPACE, WRONGSTATE_ERROR_CODE, WSJBOSSTX_PREFIX);
+    /**
+     * The unknown error error code.
+     */
+    public static final String UNKNOWNERROR_ERROR_CODE       = "UnknownError";
+    /**
+     * The unknown error error code.
+     */
+    public static final QName  UNKNOWNERROR_ERROR_CODE_QNAME = new QName(WSJBOSSTX_NAMESPACE, UNKNOWNERROR_ERROR_CODE, WSJBOSSTX_PREFIX);
+    
+    /**
+     * The termination protocol.
+     */
+    public String WSJBOSSTX_PROTOCOL_TERMINATION = WSJBOSSTX_NAMESPACE + "/BATermination";
+}


Property changes on: labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsjbosstx/JBossTXConstants.java
___________________________________________________________________
Name: svn:keywords
   + Rev Date
Name: svn:eol-style
   + native

Added: labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsjbosstx/NotificationType.java
===================================================================
--- labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsjbosstx/NotificationType.java	                        (rev 0)
+++ labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsjbosstx/NotificationType.java	2007-08-14 12:43:41 UTC (rev 14200)
@@ -0,0 +1,60 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag.  All rights reserved. 
+ * See the copyright.txt in the distribution for a full listing 
+ * of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU General Public License, v. 2.0.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A 
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+ * PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+ * You should have received a copy of the GNU General Public License,
+ * v. 2.0 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+ * MA  02110-1301, USA.
+ * 
+ * (C) 2005-2006,
+ * @author JBoss Inc.
+ */
+package com.arjuna.webservices.wsjbosstx;
+
+import javax.xml.stream.XMLStreamException;
+import javax.xml.stream.XMLStreamReader;
+
+import com.arjuna.webservices.stax.AnyContentAnyAttributeSupport;
+
+/*
+ * <xsd:complexType name="Notification">
+ *   <xsd:sequence>
+ *     <xsd:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
+ *   </xsd:sequence>
+ *   <xsd:anyAttribute namespace="##other" processContents="lax"/>
+ * </xsd:complexType>
+ */
+/**
+ * Representation of the Notification type.
+ * @author kevin
+ */
+public class NotificationType extends AnyContentAnyAttributeSupport
+{
+    /**
+     * Default constructor.
+     */
+    public NotificationType()
+    {
+    }
+    
+    /**
+     * Construct a notification from the input stream.
+     * 
+     * @param in The input stream.
+     * @throws XMLStreamException For errors during parsing.
+     */
+    public NotificationType(final XMLStreamReader in)
+        throws XMLStreamException
+    {
+        parse(in) ;
+    }
+}


Property changes on: labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsjbosstx/NotificationType.java
___________________________________________________________________
Name: svn:keywords
   + Rev Date
Name: svn:eol-style
   + native

Added: labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsjbosstx/client/TerminationCoordinatorClient.java
===================================================================
--- labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsjbosstx/client/TerminationCoordinatorClient.java	                        (rev 0)
+++ labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsjbosstx/client/TerminationCoordinatorClient.java	2007-08-14 12:43:41 UTC (rev 14200)
@@ -0,0 +1,175 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag.  All rights reserved. 
+ * See the copyright.txt in the distribution for a full listing 
+ * of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU General Public License, v. 2.0.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A 
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+ * PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+ * You should have received a copy of the GNU General Public License,
+ * v. 2.0 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+ * MA  02110-1301, USA.
+ * 
+ * (C) 2005-2006,
+ * @author JBoss Inc.
+ */
+package com.arjuna.webservices.wsjbosstx.client;
+
+import java.io.IOException;
+
+import com.arjuna.webservices.HandlerRegistry;
+import com.arjuna.webservices.SoapBody;
+import com.arjuna.webservices.SoapFault;
+import com.arjuna.webservices.SoapRegistry;
+import com.arjuna.webservices.SoapService;
+import com.arjuna.webservices.base.policy.ClientPolicy;
+import com.arjuna.webservices.stax.NamedElement;
+import com.arjuna.webservices.wsaddr2005.AddressingContext;
+import com.arjuna.webservices.wsaddr2005.AttributedURIType;
+import com.arjuna.webservices.wsaddr2005.EndpointReferenceType;
+import com.arjuna.webservices.wsaddr2005.client.WSAddr2005Client;
+import com.arjuna.webservices.wsaddr2005.policy.AddressingPolicy;
+import com.arjuna.webservices.wsjboss.InstanceIdentifier;
+import com.arjuna.webservices.wsjbosstx.JBossTXConstants;
+import com.arjuna.webservices.wsjbosstx.NotificationType;
+
+/**
+ * The Client side of the Terminator Participant.
+ * @author kevin
+ */
+public class TerminationCoordinatorClient
+{
+    /**
+     * The client singleton.
+     */
+    private static final TerminationCoordinatorClient CLIENT = new TerminationCoordinatorClient() ;
+    
+    /**
+     * The complete action.
+     */
+    private final String completeAction = JBossTXConstants.WSJBOSSTX_ACTION_COMPLETE ;
+    /**
+     * The close action.
+     */
+    private final String closeAction = JBossTXConstants.WSJBOSSTX_ACTION_CLOSE ;
+    /**
+     * The cancel action.
+     */
+    private final String cancelAction = JBossTXConstants.WSJBOSSTX_ACTION_CANCEL ;
+    
+    /**
+     * The SOAP service representing the client.
+     */
+    private final SoapService soapService ;
+    /**
+     * The termination participant URI for replies.
+     */
+    private final AttributedURIType terminationParticipant ;
+    
+    /**
+     * Construct the terminator participant client.
+     */
+    private TerminationCoordinatorClient()
+    {
+        final HandlerRegistry handlerRegistry = new HandlerRegistry() ;
+        
+        // Add WS-Addressing
+        AddressingPolicy.register(handlerRegistry) ;
+        // Add client policies
+        ClientPolicy.register(handlerRegistry) ;
+        
+        soapService = new SoapService(handlerRegistry) ;
+        final String terminationParticipantURI =
+            SoapRegistry.getRegistry().getServiceURI(JBossTXConstants.SERVICE_TERMINATION_PARTICIPANT) ;
+        terminationParticipant = new AttributedURIType(terminationParticipantURI) ;
+    }
+    
+    /**
+     * Send a complete request.
+     * @param addressingContext addressing context initialised with to and message ID.
+     * @param identifier The identifier of the initiator.
+     * @throws SoapFault For any errors.
+     * @throws IOException for any transport errors.
+     */
+    public void sendComplete(final AddressingContext addressingContext, final InstanceIdentifier identifier)
+        throws SoapFault, IOException
+    {
+        final EndpointReferenceType endpointReference = getEndpointReference(identifier) ;
+        
+        final NamedElement contents = new NamedElement(JBossTXConstants.WSJBOSSTX_ELEMENT_COMPLETE_QNAME, new NotificationType()) ;
+        final SoapBody soapBody = new SoapBody(contents, completeAction) ;
+        addressingContext.setAction(new AttributedURIType(completeAction)) ;
+        
+        addressingContext.setReplyTo(endpointReference) ;
+        
+        WSAddr2005Client.sendOneWay(soapBody, addressingContext, null, soapService) ;
+    }
+    
+    /**
+     * Send a close request.
+     * @param addressingContext addressing context initialised with to and message ID.
+     * @param identifier The identifier of the initiator.
+     * @throws SoapFault For any errors.
+     * @throws IOException for any transport errors.
+     */
+    public void sendClose(final AddressingContext addressingContext, final InstanceIdentifier identifier)
+        throws SoapFault, IOException
+    {
+        final EndpointReferenceType endpointReference = getEndpointReference(identifier) ;
+        
+        final NamedElement contents = new NamedElement(JBossTXConstants.WSJBOSSTX_ELEMENT_CLOSE_QNAME, new NotificationType()) ;
+        final SoapBody soapBody = new SoapBody(contents, closeAction) ;
+        addressingContext.setAction(new AttributedURIType(closeAction)) ;
+        
+        addressingContext.setReplyTo(endpointReference) ;
+        
+        WSAddr2005Client.sendOneWay(soapBody, addressingContext, null, soapService) ;
+    }
+    
+    /**
+     * Send a cancel request.
+     * @param addressingContext addressing context initialised with to and message ID.
+     * @param identifier The identifier of the initiator.
+     * @throws SoapFault For any errors.
+     * @throws IOException for any transport errors.
+     */
+    public void sendCancel(final AddressingContext addressingContext, final InstanceIdentifier identifier)
+        throws SoapFault, IOException
+    {
+        final EndpointReferenceType endpointReference = getEndpointReference(identifier) ;
+        
+        final NamedElement contents = new NamedElement(JBossTXConstants.WSJBOSSTX_ELEMENT_CANCEL_QNAME, new NotificationType()) ;
+        final SoapBody soapBody = new SoapBody(contents, cancelAction) ;
+        addressingContext.setAction(new AttributedURIType(cancelAction)) ;
+        
+        addressingContext.setReplyTo(endpointReference) ;
+        
+        WSAddr2005Client.sendOneWay(soapBody, addressingContext, null, soapService) ;
+    }
+    
+    /**
+     * Get the endpoint reference for the specified identifier.
+     * @param identifier The endpoint reference identifier.
+     * @return The endpoint reference.
+     */
+    private EndpointReferenceType getEndpointReference(final InstanceIdentifier identifier)
+    {
+        final EndpointReferenceType terminationParticipantEndpoint = new EndpointReferenceType(terminationParticipant) ;
+        InstanceIdentifier.setEndpointInstanceIdentifier(terminationParticipantEndpoint, identifier) ;
+        return terminationParticipantEndpoint ;
+    }
+    
+    /**
+     * Get the Terminator Participant client singleton.
+     * @return The Terminator Participant client singleton.
+     */
+    public static TerminationCoordinatorClient getClient()
+    {
+        return CLIENT ;
+    }
+}


Property changes on: labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsjbosstx/client/TerminationCoordinatorClient.java
___________________________________________________________________
Name: svn:keywords
   + Rev Date
Name: svn:eol-style
   + native

Added: labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsjbosstx/handlers/TerminationCoordinatorCancelHandler.java
===================================================================
--- labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsjbosstx/handlers/TerminationCoordinatorCancelHandler.java	                        (rev 0)
+++ labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsjbosstx/handlers/TerminationCoordinatorCancelHandler.java	2007-08-14 12:43:41 UTC (rev 14200)
@@ -0,0 +1,67 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag.  All rights reserved. 
+ * See the copyright.txt in the distribution for a full listing 
+ * of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU General Public License, v. 2.0.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A 
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+ * PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+ * You should have received a copy of the GNU General Public License,
+ * v. 2.0 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+ * MA  02110-1301, USA.
+ * 
+ * (C) 2005-2006,
+ * @author JBoss Inc.
+ */
+package com.arjuna.webservices.wsjbosstx.handlers;
+
+import javax.xml.stream.XMLStreamException;
+import javax.xml.stream.XMLStreamReader;
+
+import com.arjuna.webservices.BodyHandler;
+import com.arjuna.webservices.MessageContext;
+import com.arjuna.webservices.SoapBody;
+import com.arjuna.webservices.SoapFault;
+import com.arjuna.webservices.soap.SoapDetails;
+import com.arjuna.webservices.stax.NamedElement;
+import com.arjuna.webservices.wsaddr2005.AddressingContext;
+import com.arjuna.webservices.wsjboss.JBossContext;
+import com.arjuna.webservices.wsjbosstx.JBossTXConstants;
+import com.arjuna.webservices.wsjbosstx.NotificationType;
+import com.arjuna.webservices.wsjbosstx.processors.TerminationCoordinatorProcessor;
+
+/**
+ * The terminator participant cancel handler.
+ * @author kevin
+ */
+public class TerminationCoordinatorCancelHandler implements BodyHandler
+{
+    /**
+     * Handle the body element.
+     * @param soapDetails The SOAP details.
+     * @param context The current message context.
+     * @param responseContext The response message context. 
+     * @param action The transport SOAP action. 
+     * @param in The current stream reader.
+     * @throws XMLStreamException for parsing errors.
+     * @throws SoapFault for processing errors.
+     * @return The response elements or null if one way.
+     */
+    public SoapBody invoke(final SoapDetails soapDetails, final MessageContext context,
+        final MessageContext responseContext, final String action, final XMLStreamReader in)
+        throws XMLStreamException, SoapFault
+    {
+        final NotificationType cancel = new NotificationType(in) ;
+        final AddressingContext addressingContext = AddressingContext.getContext(context) ;
+        final JBossContext arjunaContext = JBossContext.getContext(context) ;
+        TerminationCoordinatorProcessor.getProcessor().cancel(cancel, addressingContext, arjunaContext) ;
+        
+        final NamedElement namedElement = new NamedElement(JBossTXConstants.WSJBOSSTX_ELEMENT_CANCELLED_QNAME, new NotificationType()) ;
+        return new SoapBody(namedElement, JBossTXConstants.WSJBOSSTX_ACTION_CANCELLED) ;
+    }
+}


Property changes on: labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsjbosstx/handlers/TerminationCoordinatorCancelHandler.java
___________________________________________________________________
Name: svn:keywords
   + Rev Date
Name: svn:eol-style
   + native

Added: labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsjbosstx/handlers/TerminationCoordinatorCloseHandler.java
===================================================================
--- labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsjbosstx/handlers/TerminationCoordinatorCloseHandler.java	                        (rev 0)
+++ labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsjbosstx/handlers/TerminationCoordinatorCloseHandler.java	2007-08-14 12:43:41 UTC (rev 14200)
@@ -0,0 +1,67 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag.  All rights reserved. 
+ * See the copyright.txt in the distribution for a full listing 
+ * of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU General Public License, v. 2.0.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A 
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+ * PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+ * You should have received a copy of the GNU General Public License,
+ * v. 2.0 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+ * MA  02110-1301, USA.
+ * 
+ * (C) 2005-2006,
+ * @author JBoss Inc.
+ */
+package com.arjuna.webservices.wsjbosstx.handlers;
+
+import javax.xml.stream.XMLStreamException;
+import javax.xml.stream.XMLStreamReader;
+
+import com.arjuna.webservices.BodyHandler;
+import com.arjuna.webservices.MessageContext;
+import com.arjuna.webservices.SoapBody;
+import com.arjuna.webservices.SoapFault;
+import com.arjuna.webservices.soap.SoapDetails;
+import com.arjuna.webservices.stax.NamedElement;
+import com.arjuna.webservices.wsaddr2005.AddressingContext;
+import com.arjuna.webservices.wsjboss.JBossContext;
+import com.arjuna.webservices.wsjbosstx.JBossTXConstants;
+import com.arjuna.webservices.wsjbosstx.NotificationType;
+import com.arjuna.webservices.wsjbosstx.processors.TerminationCoordinatorProcessor;
+
+/**
+ * The terminator participant close handler.
+ * @author kevin
+ */
+public class TerminationCoordinatorCloseHandler implements BodyHandler
+{
+    /**
+     * Handle the body element.
+     * @param soapDetails The SOAP details.
+     * @param context The current message context.
+     * @param responseContext The response message context. 
+     * @param action The transport SOAP action. 
+     * @param in The current stream reader.
+     * @throws XMLStreamException for parsing errors.
+     * @throws SoapFault for processing errors.
+     * @return The response elements or null if one way.
+     */
+    public SoapBody invoke(final SoapDetails soapDetails, final MessageContext context,
+        final MessageContext responseContext, final String action, final XMLStreamReader in)
+        throws XMLStreamException, SoapFault
+    {
+        final NotificationType close = new NotificationType(in) ;
+        final AddressingContext addressingContext = AddressingContext.getContext(context) ;
+        final JBossContext arjunaContext = JBossContext.getContext(context) ;
+        TerminationCoordinatorProcessor.getProcessor().close(close, addressingContext, arjunaContext) ;
+        
+        final NamedElement namedElement = new NamedElement(JBossTXConstants.WSJBOSSTX_ELEMENT_CLOSED_QNAME, new NotificationType()) ;
+        return new SoapBody(namedElement, JBossTXConstants.WSJBOSSTX_ACTION_CLOSED) ;
+    }
+}


Property changes on: labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsjbosstx/handlers/TerminationCoordinatorCloseHandler.java
___________________________________________________________________
Name: svn:keywords
   + Rev Date
Name: svn:eol-style
   + native

Added: labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsjbosstx/handlers/TerminationCoordinatorCompleteHandler.java
===================================================================
--- labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsjbosstx/handlers/TerminationCoordinatorCompleteHandler.java	                        (rev 0)
+++ labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsjbosstx/handlers/TerminationCoordinatorCompleteHandler.java	2007-08-14 12:43:41 UTC (rev 14200)
@@ -0,0 +1,67 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag.  All rights reserved. 
+ * See the copyright.txt in the distribution for a full listing 
+ * of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU General Public License, v. 2.0.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A 
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+ * PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+ * You should have received a copy of the GNU General Public License,
+ * v. 2.0 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+ * MA  02110-1301, USA.
+ * 
+ * (C) 2005-2006,
+ * @author JBoss Inc.
+ */
+package com.arjuna.webservices.wsjbosstx.handlers;
+
+import javax.xml.stream.XMLStreamException;
+import javax.xml.stream.XMLStreamReader;
+
+import com.arjuna.webservices.BodyHandler;
+import com.arjuna.webservices.MessageContext;
+import com.arjuna.webservices.SoapBody;
+import com.arjuna.webservices.SoapFault;
+import com.arjuna.webservices.soap.SoapDetails;
+import com.arjuna.webservices.stax.NamedElement;
+import com.arjuna.webservices.wsaddr2005.AddressingContext;
+import com.arjuna.webservices.wsjboss.JBossContext;
+import com.arjuna.webservices.wsjbosstx.JBossTXConstants;
+import com.arjuna.webservices.wsjbosstx.NotificationType;
+import com.arjuna.webservices.wsjbosstx.processors.TerminationCoordinatorProcessor;
+
+/**
+ * The terminator participant complete handler.
+ * @author kevin
+ */
+public class TerminationCoordinatorCompleteHandler implements BodyHandler
+{
+    /**
+     * Handle the body element.
+     * @param soapDetails The SOAP details.
+     * @param context The current message context.
+     * @param responseContext The response message context. 
+     * @param action The transport SOAP action. 
+     * @param in The current stream reader.
+     * @throws XMLStreamException for parsing errors.
+     * @throws SoapFault for processing errors.
+     * @return The response elements or null if one way.
+     */
+    public SoapBody invoke(final SoapDetails soapDetails, final MessageContext context,
+        final MessageContext responseContext, final String action, final XMLStreamReader in)
+        throws XMLStreamException, SoapFault
+    {
+        final NotificationType complete = new NotificationType(in) ;
+        final AddressingContext addressingContext = AddressingContext.getContext(context) ;
+        final JBossContext arjunaContext = JBossContext.getContext(context) ;
+	TerminationCoordinatorProcessor.getProcessor().complete(complete, addressingContext, arjunaContext) ;
+        
+        final NamedElement namedElement = new NamedElement(JBossTXConstants.WSJBOSSTX_ELEMENT_COMPLETED_QNAME, new NotificationType()) ;
+        return new SoapBody(namedElement, JBossTXConstants.WSJBOSSTX_ACTION_COMPLETED) ;
+    }
+}


Property changes on: labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsjbosstx/handlers/TerminationCoordinatorCompleteHandler.java
___________________________________________________________________
Name: svn:keywords
   + Rev Date
Name: svn:eol-style
   + native

Added: labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsjbosstx/handlers/TerminationParticipantCancelledHandler.java
===================================================================
--- labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsjbosstx/handlers/TerminationParticipantCancelledHandler.java	                        (rev 0)
+++ labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsjbosstx/handlers/TerminationParticipantCancelledHandler.java	2007-08-14 12:43:41 UTC (rev 14200)
@@ -0,0 +1,63 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag.  All rights reserved. 
+ * See the copyright.txt in the distribution for a full listing 
+ * of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU General Public License, v. 2.0.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A 
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+ * PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+ * You should have received a copy of the GNU General Public License,
+ * v. 2.0 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+ * MA  02110-1301, USA.
+ * 
+ * (C) 2005-2006,
+ * @author JBoss Inc.
+ */
+package com.arjuna.webservices.wsjbosstx.handlers;
+
+import javax.xml.stream.XMLStreamException;
+import javax.xml.stream.XMLStreamReader;
+
+import com.arjuna.webservices.BodyHandler;
+import com.arjuna.webservices.MessageContext;
+import com.arjuna.webservices.SoapBody;
+import com.arjuna.webservices.SoapFault;
+import com.arjuna.webservices.soap.SoapDetails;
+import com.arjuna.webservices.wsaddr2005.AddressingContext;
+import com.arjuna.webservices.wsjboss.JBossContext;
+import com.arjuna.webservices.wsjbosstx.NotificationType;
+import com.arjuna.webservices.wsjbosstx.processors.TerminationParticipantProcessor;
+
+/**
+ * The participant manager coordinator cancelled handler.
+ * @author kevin
+ */
+public class TerminationParticipantCancelledHandler implements BodyHandler
+{
+    /**
+     * Handle the body element.
+     * @param soapDetails The SOAP details.
+     * @param context The current message context.
+     * @param responseContext The response message context. 
+     * @param action The transport SOAP action. 
+     * @param in The current stream reader.
+     * @throws XMLStreamException for parsing errors.
+     * @throws SoapFault for processing errors.
+     * @return The response elements or null if one way.
+     */
+    public SoapBody invoke(final SoapDetails soapDetails, final MessageContext context,
+        final MessageContext responseContext, final String action, final XMLStreamReader in)
+        throws XMLStreamException, SoapFault
+    {
+        final NotificationType cancelled = new NotificationType(in) ;
+        final AddressingContext addressingContext = AddressingContext.getContext(context) ;
+        final JBossContext arjunaContext = JBossContext.getContext(context) ;
+        TerminationParticipantProcessor.getProcessor().handleCancelled(cancelled, addressingContext, arjunaContext) ;
+        return null ;
+    }
+}


Property changes on: labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsjbosstx/handlers/TerminationParticipantCancelledHandler.java
___________________________________________________________________
Name: svn:keywords
   + Rev Date
Name: svn:eol-style
   + native

Added: labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsjbosstx/handlers/TerminationParticipantClosedHandler.java
===================================================================
--- labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsjbosstx/handlers/TerminationParticipantClosedHandler.java	                        (rev 0)
+++ labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsjbosstx/handlers/TerminationParticipantClosedHandler.java	2007-08-14 12:43:41 UTC (rev 14200)
@@ -0,0 +1,63 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag.  All rights reserved. 
+ * See the copyright.txt in the distribution for a full listing 
+ * of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU General Public License, v. 2.0.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A 
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+ * PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+ * You should have received a copy of the GNU General Public License,
+ * v. 2.0 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+ * MA  02110-1301, USA.
+ * 
+ * (C) 2005-2006,
+ * @author JBoss Inc.
+ */
+package com.arjuna.webservices.wsjbosstx.handlers;
+
+import javax.xml.stream.XMLStreamException;
+import javax.xml.stream.XMLStreamReader;
+
+import com.arjuna.webservices.BodyHandler;
+import com.arjuna.webservices.MessageContext;
+import com.arjuna.webservices.SoapBody;
+import com.arjuna.webservices.SoapFault;
+import com.arjuna.webservices.soap.SoapDetails;
+import com.arjuna.webservices.wsaddr2005.AddressingContext;
+import com.arjuna.webservices.wsjboss.JBossContext;
+import com.arjuna.webservices.wsjbosstx.NotificationType;
+import com.arjuna.webservices.wsjbosstx.processors.TerminationParticipantProcessor;
+
+/**
+ * The participant manager coordinator complete handler.
+ * @author kevin
+ */
+public class TerminationParticipantClosedHandler implements BodyHandler
+{
+    /**
+     * Handle the body element.
+     * @param soapDetails The SOAP details.
+     * @param context The current message context.
+     * @param responseContext The response message context. 
+     * @param action The transport SOAP action. 
+     * @param in The current stream reader.
+     * @throws XMLStreamException for parsing errors.
+     * @throws SoapFault for processing errors.
+     * @return The response elements or null if one way.
+     */
+    public SoapBody invoke(final SoapDetails soapDetails, final MessageContext context,
+        final MessageContext responseContext, final String action, final XMLStreamReader in)
+        throws XMLStreamException, SoapFault
+    {
+        final NotificationType complete = new NotificationType(in) ;
+        final AddressingContext addressingContext = AddressingContext.getContext(context) ;
+        final JBossContext arjunaContext = JBossContext.getContext(context) ;
+        TerminationParticipantProcessor.getProcessor().handleClosed(complete, addressingContext, arjunaContext) ;
+        return null ;
+    }
+}


Property changes on: labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsjbosstx/handlers/TerminationParticipantClosedHandler.java
___________________________________________________________________
Name: svn:keywords
   + Rev Date
Name: svn:eol-style
   + native

Added: labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsjbosstx/handlers/TerminationParticipantCompletedHandler.java
===================================================================
--- labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsjbosstx/handlers/TerminationParticipantCompletedHandler.java	                        (rev 0)
+++ labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsjbosstx/handlers/TerminationParticipantCompletedHandler.java	2007-08-14 12:43:41 UTC (rev 14200)
@@ -0,0 +1,63 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag.  All rights reserved. 
+ * See the copyright.txt in the distribution for a full listing 
+ * of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU General Public License, v. 2.0.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A 
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+ * PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+ * You should have received a copy of the GNU General Public License,
+ * v. 2.0 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+ * MA  02110-1301, USA.
+ * 
+ * (C) 2005-2006,
+ * @author JBoss Inc.
+ */
+package com.arjuna.webservices.wsjbosstx.handlers;
+
+import javax.xml.stream.XMLStreamException;
+import javax.xml.stream.XMLStreamReader;
+
+import com.arjuna.webservices.BodyHandler;
+import com.arjuna.webservices.MessageContext;
+import com.arjuna.webservices.SoapBody;
+import com.arjuna.webservices.SoapFault;
+import com.arjuna.webservices.soap.SoapDetails;
+import com.arjuna.webservices.wsaddr2005.AddressingContext;
+import com.arjuna.webservices.wsjboss.JBossContext;
+import com.arjuna.webservices.wsjbosstx.NotificationType;
+import com.arjuna.webservices.wsjbosstx.processors.TerminationParticipantProcessor;
+
+/**
+ * The participant manager coordinator completed handler.
+ * @author kevin
+ */
+public class TerminationParticipantCompletedHandler implements BodyHandler
+{
+    /**
+     * Handle the body element.
+     * @param soapDetails The SOAP details.
+     * @param context The current message context.
+     * @param responseContext The response message context. 
+     * @param action The transport SOAP action. 
+     * @param in The current stream reader.
+     * @throws XMLStreamException for parsing errors.
+     * @throws SoapFault for processing errors.
+     * @return The response elements or null if one way.
+     */
+    public SoapBody invoke(final SoapDetails soapDetails, final MessageContext context,
+        final MessageContext responseContext, final String action, final XMLStreamReader in)
+        throws XMLStreamException, SoapFault
+    {
+        final NotificationType completed = new NotificationType(in) ;
+        final AddressingContext addressingContext = AddressingContext.getContext(context) ;
+        final JBossContext arjunaContext = JBossContext.getContext(context) ;
+        TerminationParticipantProcessor.getProcessor().handleCompleted(completed, addressingContext, arjunaContext) ;
+        return null ;
+    }
+}


Property changes on: labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsjbosstx/handlers/TerminationParticipantCompletedHandler.java
___________________________________________________________________
Name: svn:keywords
   + Rev Date
Name: svn:eol-style
   + native

Added: labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsjbosstx/handlers/TerminationParticipantSoapFaultHandler.java
===================================================================
--- labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsjbosstx/handlers/TerminationParticipantSoapFaultHandler.java	                        (rev 0)
+++ labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsjbosstx/handlers/TerminationParticipantSoapFaultHandler.java	2007-08-14 12:43:41 UTC (rev 14200)
@@ -0,0 +1,62 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag.  All rights reserved. 
+ * See the copyright.txt in the distribution for a full listing 
+ * of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU General Public License, v. 2.0.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A 
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+ * PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+ * You should have received a copy of the GNU General Public License,
+ * v. 2.0 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+ * MA  02110-1301, USA.
+ * 
+ * (C) 2005-2006,
+ * @author JBoss Inc.
+ */
+package com.arjuna.webservices.wsjbosstx.handlers;
+
+import javax.xml.stream.XMLStreamException;
+import javax.xml.stream.XMLStreamReader;
+
+import com.arjuna.webservices.BodyHandler;
+import com.arjuna.webservices.MessageContext;
+import com.arjuna.webservices.SoapBody;
+import com.arjuna.webservices.SoapFault;
+import com.arjuna.webservices.soap.SoapDetails;
+import com.arjuna.webservices.wsaddr2005.AddressingContext;
+import com.arjuna.webservices.wsjboss.JBossContext;
+import com.arjuna.webservices.wsjbosstx.processors.TerminationParticipantProcessor;
+
+/**
+ * The terminator SOAP fault handler.
+ * @author kevin
+ */
+public class TerminationParticipantSoapFaultHandler implements BodyHandler
+{
+    /**
+     * Handle the body element.
+     * @param soapDetails The SOAP details.
+     * @param context The current message context.
+     * @param responseContext The response message context. 
+     * @param action The transport SOAP action. 
+     * @param in The current stream reader.
+     * @throws XMLStreamException for parsing errors.
+     * @throws SoapFault for processing errors.
+     * @return The response elements or null if one way.
+     */
+    public SoapBody invoke(final SoapDetails soapDetails, final MessageContext context,
+        final MessageContext responseContext, final String action, final XMLStreamReader in)
+        throws XMLStreamException, SoapFault
+    {
+        final SoapFault soapFault = soapDetails.parseSoapFault(in) ;
+        final AddressingContext addressingContext = AddressingContext.getContext(context) ;
+        final JBossContext arjunaContext = JBossContext.getContext(context) ;
+        TerminationParticipantProcessor.getProcessor().handleSoapFault(soapFault, addressingContext, arjunaContext) ;
+        return null ;
+    }
+}


Property changes on: labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsjbosstx/handlers/TerminationParticipantSoapFaultHandler.java
___________________________________________________________________
Name: svn:keywords
   + Rev Date
Name: svn:eol-style
   + native

Added: labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsjbosstx/policy/TerminationCoordinatorPolicy.java
===================================================================
--- labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsjbosstx/policy/TerminationCoordinatorPolicy.java	                        (rev 0)
+++ labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsjbosstx/policy/TerminationCoordinatorPolicy.java	2007-08-14 12:43:41 UTC (rev 14200)
@@ -0,0 +1,59 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag.  All rights reserved. 
+ * See the copyright.txt in the distribution for a full listing 
+ * of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU General Public License, v. 2.0.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A 
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+ * PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+ * You should have received a copy of the GNU General Public License,
+ * v. 2.0 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+ * MA  02110-1301, USA.
+ * 
+ * (C) 2005-2006,
+ * @author JBoss Inc.
+ */
+package com.arjuna.webservices.wsjbosstx.policy;
+
+import com.arjuna.webservices.HandlerRegistry;
+import com.arjuna.webservices.base.handlers.LoggingFaultHandler;
+import com.arjuna.webservices.wsjbosstx.JBossTXConstants;
+import com.arjuna.webservices.wsjbosstx.handlers.TerminationCoordinatorCancelHandler;
+import com.arjuna.webservices.wsjbosstx.handlers.TerminationCoordinatorCloseHandler;
+import com.arjuna.webservices.wsjbosstx.handlers.TerminationCoordinatorCompleteHandler;
+
+/**
+ * Policy responsible for binding in the terminator participant body handlers.
+ * @author kevin
+ */
+public class TerminationCoordinatorPolicy
+{
+    /**
+     * Add this policy to the registry.
+     * @param registry The registry containing the policy.
+     */
+    public static void register(final HandlerRegistry registry)
+    {
+        registry.registerBodyHandler(JBossTXConstants.WSJBOSSTX_ELEMENT_CLOSE_QNAME, new TerminationCoordinatorCloseHandler()) ;
+        registry.registerBodyHandler(JBossTXConstants.WSJBOSSTX_ELEMENT_CANCEL_QNAME, new TerminationCoordinatorCancelHandler()) ;
+        registry.registerBodyHandler(JBossTXConstants.WSJBOSSTX_ELEMENT_COMPLETE_QNAME, new TerminationCoordinatorCompleteHandler()) ;
+        registry.registerFaultHandler(new LoggingFaultHandler(JBossTXConstants.SERVICE_TERMINATION_COORDINATOR)) ;
+    }
+
+    /**
+     * Remove this policy from the registry.
+     * @param registry The registry containing the policy.
+     */
+    public static void remove(final HandlerRegistry registry)
+    {
+        registry.registerFaultHandler(null) ;
+        registry.removeBodyHandler(JBossTXConstants.WSJBOSSTX_ELEMENT_COMPLETE_QNAME) ;
+        registry.removeBodyHandler(JBossTXConstants.WSJBOSSTX_ELEMENT_CANCEL_QNAME) ;
+        registry.removeBodyHandler(JBossTXConstants.WSJBOSSTX_ELEMENT_CLOSE_QNAME) ;
+    }
+}


Property changes on: labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsjbosstx/policy/TerminationCoordinatorPolicy.java
___________________________________________________________________
Name: svn:keywords
   + Rev Date
Name: svn:eol-style
   + native

Added: labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsjbosstx/policy/TerminationParticipantPolicy.java
===================================================================
--- labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsjbosstx/policy/TerminationParticipantPolicy.java	                        (rev 0)
+++ labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsjbosstx/policy/TerminationParticipantPolicy.java	2007-08-14 12:43:41 UTC (rev 14200)
@@ -0,0 +1,59 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag.  All rights reserved. 
+ * See the copyright.txt in the distribution for a full listing 
+ * of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU General Public License, v. 2.0.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A 
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+ * PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+ * You should have received a copy of the GNU General Public License,
+ * v. 2.0 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+ * MA  02110-1301, USA.
+ * 
+ * (C) 2005-2006,
+ * @author JBoss Inc.
+ */
+package com.arjuna.webservices.wsjbosstx.policy;
+
+import com.arjuna.webservices.HandlerRegistry;
+import com.arjuna.webservices.wsjbosstx.JBossTXConstants;
+import com.arjuna.webservices.wsjbosstx.handlers.TerminationParticipantCancelledHandler;
+import com.arjuna.webservices.wsjbosstx.handlers.TerminationParticipantClosedHandler;
+import com.arjuna.webservices.wsjbosstx.handlers.TerminationParticipantCompletedHandler;
+import com.arjuna.webservices.wsjbosstx.handlers.TerminationParticipantSoapFaultHandler;
+
+/**
+ * Policy responsible for binding in the terminator coordinator body handlers.
+ * @author kevin
+ */
+public class TerminationParticipantPolicy
+{
+    /**
+     * Add this policy to the registry.
+     * @param registry The registry containing the policy.
+     */
+    public static void register(final HandlerRegistry registry)
+    {
+        registry.registerBodyHandler(JBossTXConstants.WSJBOSSTX_ELEMENT_CLOSED_QNAME, new TerminationParticipantClosedHandler()) ;
+        registry.registerBodyHandler(JBossTXConstants.WSJBOSSTX_ELEMENT_CANCELLED_QNAME, new TerminationParticipantCancelledHandler()) ;
+        registry.registerBodyHandler(JBossTXConstants.WSJBOSSTX_ELEMENT_COMPLETED_QNAME, new TerminationParticipantCompletedHandler()) ;
+        registry.registerFaultHandler(new TerminationParticipantSoapFaultHandler()) ;
+    }
+
+    /**
+     * Remove this policy from the registry.
+     * @param registry The registry containing the policy.
+     */
+    public static void remove(final HandlerRegistry registry)
+    {
+        registry.registerFaultHandler(null) ;
+        registry.removeBodyHandler(JBossTXConstants.WSJBOSSTX_ELEMENT_COMPLETED_QNAME) ;
+        registry.removeBodyHandler(JBossTXConstants.WSJBOSSTX_ELEMENT_CANCELLED_QNAME) ;
+        registry.removeBodyHandler(JBossTXConstants.WSJBOSSTX_ELEMENT_CLOSED_QNAME) ;
+    }
+}


Property changes on: labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsjbosstx/policy/TerminationParticipantPolicy.java
___________________________________________________________________
Name: svn:keywords
   + Rev Date
Name: svn:eol-style
   + native

Added: labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsjbosstx/processors/TerminationCoordinatorProcessor.java
===================================================================
--- labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsjbosstx/processors/TerminationCoordinatorProcessor.java	                        (rev 0)
+++ labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsjbosstx/processors/TerminationCoordinatorProcessor.java	2007-08-14 12:43:41 UTC (rev 14200)
@@ -0,0 +1,103 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag.  All rights reserved. 
+ * See the copyright.txt in the distribution for a full listing 
+ * of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU General Public License, v. 2.0.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A 
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+ * PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+ * You should have received a copy of the GNU General Public License,
+ * v. 2.0 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+ * MA  02110-1301, USA.
+ * 
+ * (C) 2005-2006,
+ * @author JBoss Inc.
+ */
+package com.arjuna.webservices.wsjbosstx.processors;
+
+import com.arjuna.webservices.SoapFault;
+import com.arjuna.webservices.wsaddr2005.AddressingContext;
+import com.arjuna.webservices.wsjboss.JBossContext;
+import com.arjuna.webservices.wsjbosstx.NotificationType;
+import com.arjuna.wst.BusinessActivityTerminator;
+
+/**
+ * The Terminator Participant processor.
+ * @author kevin
+ */
+public abstract class TerminationCoordinatorProcessor
+{
+    /**
+     * The participant processor.
+     */
+    private static TerminationCoordinatorProcessor PROCESSOR ;
+    
+    /**
+     * Get the processor.
+     * @return The processor.
+     */
+    public static TerminationCoordinatorProcessor getProcessor()
+    {
+        return PROCESSOR ;
+    }
+    
+    /**
+     * Set the processor.
+     * @param processor The processor.
+     * @return The previous processor.
+     */
+    public static TerminationCoordinatorProcessor setProcessor(final TerminationCoordinatorProcessor processor)
+    {
+        final TerminationCoordinatorProcessor origProcessor = PROCESSOR ;
+        PROCESSOR = processor ;
+        return origProcessor ;
+    }
+
+    /**
+     * Activate the participant.
+     * @param participant The participant.
+     * @param identifier The identifier.
+     */
+    public abstract void activateParticipant(final BusinessActivityTerminator participant, final String identifier) ;
+
+    /**
+     * Deactivate the participant.
+     * @param participant The participant.
+     */
+    public abstract void deactivateParticipant(final BusinessActivityTerminator participant) ;
+    
+    /**
+     * Cancel.
+     * @param cancel The cancel notification.
+     * @param addressingContext The addressing context.
+     * @param jbossContext The jboss context.
+     */
+    public abstract void cancel(final NotificationType cancel, final AddressingContext addressingContext,
+        final JBossContext jbossContext)
+        throws SoapFault ;
+    
+    /**
+     * Close.
+     * @param close The close notification.
+     * @param addressingContext The addressing context.
+     * @param jbossContext The jboss context.
+     */
+    public abstract void close(final NotificationType close, final AddressingContext addressingContext,
+        final JBossContext jbossContext)
+    	throws SoapFault ;
+    
+    /**
+     * Complete.
+     * @param complete The complete notification.
+     * @param addressingContext The addressing context.
+     * @param jbossContext The jboss context.
+     */
+    public abstract void complete(final NotificationType complete, final AddressingContext addressingContext,
+        final JBossContext jbossContext)
+    	throws SoapFault ;
+}


Property changes on: labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsjbosstx/processors/TerminationCoordinatorProcessor.java
___________________________________________________________________
Name: svn:keywords
   + Rev Date
Name: svn:eol-style
   + native

Added: labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsjbosstx/processors/TerminationParticipantCallback.java
===================================================================
--- labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsjbosstx/processors/TerminationParticipantCallback.java	                        (rev 0)
+++ labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsjbosstx/processors/TerminationParticipantCallback.java	2007-08-14 12:43:41 UTC (rev 14200)
@@ -0,0 +1,70 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag.  All rights reserved. 
+ * See the copyright.txt in the distribution for a full listing 
+ * of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU General Public License, v. 2.0.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A 
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+ * PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+ * You should have received a copy of the GNU General Public License,
+ * v. 2.0 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+ * MA  02110-1301, USA.
+ * 
+ * (C) 2005-2006,
+ * @author JBoss Inc.
+ */
+package com.arjuna.webservices.wsjbosstx.processors;
+
+import com.arjuna.webservices.SoapFault;
+import com.arjuna.webservices.base.processors.Callback;
+import com.arjuna.webservices.wsaddr2005.AddressingContext;
+import com.arjuna.webservices.wsjboss.JBossContext;
+import com.arjuna.webservices.wsjbosstx.NotificationType;
+
+/**
+ * The Terminator Coordinator callback.
+ * @author kevin
+ */
+public abstract class TerminationParticipantCallback extends Callback
+{
+    /**
+     * A cancelled response.
+     * @param cancelled The cancelled notification.
+     * @param addressingContext The addressing context.
+     * @param jbossContext The jboss context.
+     */
+    public abstract void cancelled(final NotificationType cancelled, final AddressingContext addressingContext,
+        final JBossContext jbossContext) ;
+    
+    /**
+     * A closed response.
+     * @param closed The closed notification.
+     * @param addressingContext The addressing context.
+     * @param jbossContext The jboss context.
+     */
+    public abstract void closed(final NotificationType closed, final AddressingContext addressingContext,
+        final JBossContext jbossContext) ;
+    
+    /**
+     * A completed response.
+     * @param completed The completed notification.
+     * @param addressingContext The addressing context.
+     * @param jbossContext The jboss context.
+     */
+    public abstract void completed(final NotificationType completed, final AddressingContext addressingContext,
+        final JBossContext jbossContext) ;
+    
+    /**
+     * A SOAP fault response.
+     * @param soapFault The SOAP fault.
+     * @param addressingContext The addressing context.
+     * @param jbossContext The jboss context.
+     */
+    public abstract void soapFault(final SoapFault soapFault, final AddressingContext addressingContext,
+        final JBossContext jbossContext) ;
+}


Property changes on: labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsjbosstx/processors/TerminationParticipantCallback.java
___________________________________________________________________
Name: svn:keywords
   + Rev Date
Name: svn:eol-style
   + native

Added: labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsjbosstx/processors/TerminationParticipantProcessor.java
===================================================================
--- labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsjbosstx/processors/TerminationParticipantProcessor.java	                        (rev 0)
+++ labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsjbosstx/processors/TerminationParticipantProcessor.java	2007-08-14 12:43:41 UTC (rev 14200)
@@ -0,0 +1,123 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag.  All rights reserved. 
+ * See the copyright.txt in the distribution for a full listing 
+ * of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU General Public License, v. 2.0.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A 
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+ * PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+ * You should have received a copy of the GNU General Public License,
+ * v. 2.0 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+ * MA  02110-1301, USA.
+ * 
+ * (C) 2005-2006,
+ * @author JBoss Inc.
+ */
+package com.arjuna.webservices.wsjbosstx.processors;
+
+import com.arjuna.webservices.SoapFault;
+import com.arjuna.webservices.base.processors.Callback;
+import com.arjuna.webservices.wsaddr2005.AddressingContext;
+import com.arjuna.webservices.wsjboss.JBossContext;
+import com.arjuna.webservices.wsjboss.processor.BaseNotificationProcessor;
+import com.arjuna.webservices.wsjbosstx.NotificationType;
+
+/**
+ * The Terminator Coordinator processor.
+ * @author kevin
+ */
+public class TerminationParticipantProcessor extends BaseNotificationProcessor
+{
+    /**
+     * The coordinator processor.
+     */
+    private static final TerminationParticipantProcessor PROCESSOR = new TerminationParticipantProcessor() ;
+    
+    /**
+     * Get the processor singleton.
+     * @return The singleton.
+     */
+    public static TerminationParticipantProcessor getProcessor()
+    {
+        return PROCESSOR ;
+    }
+
+    /**
+     * Handle a cancelled response.
+     * @param cancelled The cancelled notification.
+     * @param addressingContext The addressing context.
+     * @param jbossContext The jboss context.
+     */
+    public void handleCancelled(final NotificationType cancelled, final AddressingContext addressingContext,
+        final JBossContext jbossContext)
+    {
+        handleCallbacks(new CallbackExecutorAdapter() {
+            public void execute(final Callback callback) {
+                ((TerminationParticipantCallback)callback).cancelled(cancelled, addressingContext, jbossContext) ;
+            }
+        }, getIDs(addressingContext, jbossContext)) ;
+    }
+    
+    /**
+     * Handle a closed response.
+     * @param closed The closed notification.
+     * @param addressingContext The addressing context.
+     * @param jbossContext The jboss context.
+     */
+    public void handleClosed(final NotificationType closed, final AddressingContext addressingContext,
+        final JBossContext jbossContext)
+    {
+        handleCallbacks(new CallbackExecutorAdapter() {
+            public void execute(final Callback callback) {
+                ((TerminationParticipantCallback)callback).closed(closed, addressingContext, jbossContext) ;
+            }
+        }, getIDs(addressingContext, jbossContext)) ;
+    }
+    
+    /**
+     * Handle a completed response.
+     * @param completed The completed notification.
+     * @param addressingContext The addressing context.
+     * @param jbossContext The jboss context.
+     */
+    public void handleCompleted(final NotificationType completed, final AddressingContext addressingContext,
+        final JBossContext jbossContext)
+    {
+        handleCallbacks(new CallbackExecutorAdapter() {
+            public void execute(final Callback callback) {
+                ((TerminationParticipantCallback)callback).completed(completed, addressingContext, jbossContext) ;
+            }
+        }, getIDs(addressingContext, jbossContext)) ;
+    }
+    
+    /**
+     * Handle a SOAP fault response.
+     * @param soapFault The SOAP fault.
+     * @param addressingContext The addressing context.
+     * @param jbossContext The jboss context.
+     */
+    public void handleSoapFault(final SoapFault soapFault, final AddressingContext addressingContext,
+        final JBossContext jbossContext)
+    {
+        handleCallbacks(new CallbackExecutorAdapter() {
+            public void execute(final Callback callback) {
+                ((TerminationParticipantCallback)callback).soapFault(soapFault, addressingContext, jbossContext) ;
+            }
+        }, getIDs(addressingContext, jbossContext)) ;
+    }
+
+    /**
+     * Register a callback for the specific instance identifier.
+     * @param instanceIdentifier The instance identifier.
+     * @param callback The callback for the response.
+     */
+    public void registerCallback(final String instanceIdentifier, final TerminationParticipantCallback callback)
+    {
+        register(instanceIdentifier, callback) ;
+    }
+}


Property changes on: labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsjbosstx/processors/TerminationParticipantProcessor.java
___________________________________________________________________
Name: svn:keywords
   + Rev Date
Name: svn:eol-style
   + native

Added: labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsjbosstx/server/TerminationCoordinatorInitialisation.java
===================================================================
--- labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsjbosstx/server/TerminationCoordinatorInitialisation.java	                        (rev 0)
+++ labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsjbosstx/server/TerminationCoordinatorInitialisation.java	2007-08-14 12:43:41 UTC (rev 14200)
@@ -0,0 +1,67 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag.  All rights reserved. 
+ * See the copyright.txt in the distribution for a full listing 
+ * of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU General Public License, v. 2.0.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A 
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+ * PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+ * You should have received a copy of the GNU General Public License,
+ * v. 2.0 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+ * MA  02110-1301, USA.
+ * 
+ * (C) 2005-2006,
+ * @author JBoss Inc.
+ */
+package com.arjuna.webservices.wsjbosstx.server;
+
+import javax.servlet.ServletContextEvent;
+import javax.servlet.ServletContextListener;
+
+import com.arjuna.webservices.HandlerRegistry;
+import com.arjuna.webservices.SoapRegistry;
+import com.arjuna.webservices.SoapService;
+import com.arjuna.webservices.wsaddr2005.policy.AddressingPolicy;
+import com.arjuna.webservices.wsjboss.policy.JBossPolicy;
+import com.arjuna.webservices.wsjbosstx.JBossTXConstants;
+import com.arjuna.webservices.wsjbosstx.policy.TerminationCoordinatorPolicy;
+
+/**
+ * Activate the Terminator Participant service
+ * @author kevin
+ */
+public class TerminationCoordinatorInitialisation implements ServletContextListener
+{
+    /**
+     * The context has been initialized.
+     * @param servletContextEvent The servlet context event.
+     */
+    public void contextInitialized(final ServletContextEvent servletContextEvent)
+    {
+        final HandlerRegistry handlerRegistry = new HandlerRegistry() ;
+        
+        // Add WS-Addressing
+        AddressingPolicy.register(handlerRegistry) ;
+        // Add JBoss handlers
+        JBossPolicy.register(handlerRegistry) ;
+        // Add Terminator participant.
+        TerminationCoordinatorPolicy.register(handlerRegistry) ;
+        
+        final SoapRegistry soapRegistry = SoapRegistry.getRegistry() ;
+        soapRegistry.registerSoapService(JBossTXConstants.SERVICE_TERMINATION_COORDINATOR,
+            new SoapService(handlerRegistry)) ;
+    }
+
+    /**
+     * The context is about to be destroyed.
+     * @param servletContextEvent The servlet context event.
+     */
+    public void contextDestroyed(final ServletContextEvent servletContextEvent)
+    {
+    }
+}


Property changes on: labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsjbosstx/server/TerminationCoordinatorInitialisation.java
___________________________________________________________________
Name: svn:keywords
   + Rev Date
Name: svn:eol-style
   + native

Added: labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsjbosstx/server/TerminationParticipantInitialisation.java
===================================================================
--- labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsjbosstx/server/TerminationParticipantInitialisation.java	                        (rev 0)
+++ labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsjbosstx/server/TerminationParticipantInitialisation.java	2007-08-14 12:43:41 UTC (rev 14200)
@@ -0,0 +1,67 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag.  All rights reserved. 
+ * See the copyright.txt in the distribution for a full listing 
+ * of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU General Public License, v. 2.0.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A 
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+ * PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+ * You should have received a copy of the GNU General Public License,
+ * v. 2.0 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+ * MA  02110-1301, USA.
+ * 
+ * (C) 2005-2006,
+ * @author JBoss Inc.
+ */
+package com.arjuna.webservices.wsjbosstx.server;
+
+import javax.servlet.ServletContextEvent;
+import javax.servlet.ServletContextListener;
+
+import com.arjuna.webservices.HandlerRegistry;
+import com.arjuna.webservices.SoapRegistry;
+import com.arjuna.webservices.SoapService;
+import com.arjuna.webservices.wsaddr.policy.AddressingPolicy;
+import com.arjuna.webservices.wsjboss.policy.JBossPolicy;
+import com.arjuna.webservices.wsjbosstx.JBossTXConstants;
+import com.arjuna.webservices.wsjbosstx.policy.TerminationParticipantPolicy;
+
+/**
+ * Activate the Terminator Coordinator service
+ * @author kevin
+ */
+public class TerminationParticipantInitialisation implements ServletContextListener
+{
+    /**
+     * The context has been initialized.
+     * @param servletContextEvent The servlet context event.
+     */
+    public void contextInitialized(final ServletContextEvent servletContextEvent)
+    {
+        final HandlerRegistry handlerRegistry = new HandlerRegistry() ;
+        
+        // Add WS-Addressing
+        AddressingPolicy.register(handlerRegistry) ;
+        // Add JBoss handlers
+        JBossPolicy.register(handlerRegistry) ;
+        // Add Terminator coordinator.
+        TerminationParticipantPolicy.register(handlerRegistry) ;
+        
+        final SoapRegistry soapRegistry = SoapRegistry.getRegistry() ;
+        soapRegistry.registerSoapService(JBossTXConstants.SERVICE_TERMINATION_PARTICIPANT,
+            new SoapService(handlerRegistry)) ;
+    }
+
+    /**
+     * The context is about to be destroyed.
+     * @param servletContextEvent The servlet context event.
+     */
+    public void contextDestroyed(final ServletContextEvent servletContextEvent)
+    {
+    }
+}


Property changes on: labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/webservices/wsjbosstx/server/TerminationParticipantInitialisation.java
___________________________________________________________________
Name: svn:keywords
   + Rev Date
Name: svn:eol-style
   + native

Added: labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/wst/BA11ParticipantManager.java
===================================================================
--- labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/wst/BA11ParticipantManager.java	                        (rev 0)
+++ labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/wst/BA11ParticipantManager.java	2007-08-14 12:43:41 UTC (rev 14200)
@@ -0,0 +1,81 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag.  All rights reserved. 
+ * See the copyright.txt in the distribution for a full listing 
+ * of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU General Public License, v. 2.0.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A 
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+ * PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+ * You should have received a copy of the GNU General Public License,
+ * v. 2.0 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+ * MA  02110-1301, USA.
+ * 
+ * (C) 2005-2006,
+ * @author JBoss Inc.
+ */
+/*
+ * Copyright (C) 2003,
+ *
+ * Arjuna Technologies Limited,
+ * Newcastle upon Tyne,
+ * Tyne and Wear,
+ * UK.
+ *
+ * $Id: BAParticipantManager.java,v 1.5 2004/09/09 08:48:33 kconner Exp $
+ */
+
+package com.arjuna.wst;
+
+import javax.xml.namespace.QName;
+
+/**
+ * When a Business Activity participant registers with a BA transaction it
+ * gets a reference to the transaction coordinator that lets it callback
+ * into the transaction and drive the state-transition.
+ *
+ * One instance of this per transaction.
+ *
+ * @author Mark Little (mark.little at arjuna.com)
+ * @version $Id: BAParticipantManager.java,v 1.5 2004/09/09 08:48:33 kconner Exp $
+ * @since XTS 1.0.
+ */
+
+public interface BA11ParticipantManager
+{
+
+    /**
+     * The participant has exited the business activity. The participant
+     * uses this to inform the coordinator that is has left the activity.
+     * It will not be informed when (and how) the business activity terminates.
+     */
+
+    public void exit () throws WrongStateException, UnknownTransactionException, SystemException;
+
+    /**
+     * The participant has completed it works, but wishes to continue in
+     * the business activity, so that it will eventually be told when (and how)
+     * the activity terminates. The participant may later be asked to
+     * compensate for the work it has done.
+     */
+
+    public void completed () throws WrongStateException, UnknownTransactionException, SystemException;
+
+    /**
+     * The participant cannot completed its work
+     */
+
+    public void cannotComplete() throws WrongStateException, UnknownTransactionException, SystemException;
+
+    /**
+     * Fail.
+     */
+
+    public void fail (final QName exceptionIdentifier) throws SystemException;
+    
+
+}


Property changes on: labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/wst/BA11ParticipantManager.java
___________________________________________________________________
Name: svn:keywords
   + Rev Date
Name: svn:eol-style
   + native

Added: labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/wst/messaging/CompletionCoordinator11ProcessorImpl.java
===================================================================
--- labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/wst/messaging/CompletionCoordinator11ProcessorImpl.java	                        (rev 0)
+++ labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/wst/messaging/CompletionCoordinator11ProcessorImpl.java	2007-08-14 12:43:41 UTC (rev 14200)
@@ -0,0 +1,228 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag.  All rights reserved. 
+ * See the copyright.txt in the distribution for a full listing 
+ * of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU General Public License, v. 2.0.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A 
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+ * PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+ * You should have received a copy of the GNU General Public License,
+ * v. 2.0 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+ * MA  02110-1301, USA.
+ * 
+ * (C) 2005-2006,
+ * @author JBoss Inc.
+ */
+package com.arjuna.wst.messaging;
+
+import java.text.MessageFormat;
+
+import com.arjuna.webservices.SoapFault;
+import com.arjuna.webservices.SoapFaultType;
+import com.arjuna.webservices.base.processors.ActivatedObjectProcessor;
+import com.arjuna.webservices.logging.WSTLogger;
+import com.arjuna.webservices.wsaddr2005.AddressingContext;
+import com.arjuna.webservices.wsjboss.JBossContext;
+import com.arjuna.webservices.wsjboss.InstanceIdentifier;
+import com.arjuna.webservices.wsat11.AtomicTransactionConstants;
+import com.arjuna.webservices.wsat11.NotificationType;
+import com.arjuna.webservices.wsat11.client.CompletionInitiatorClient;
+import com.arjuna.webservices.wsat11.processors.CompletionCoordinatorProcessor;
+import com.arjuna.wsc.messaging.MessageId;
+import com.arjuna.wst.CompletionCoordinatorParticipant;
+import com.arjuna.wst.TransactionRolledBackException;
+import com.arjuna.wst.UnknownTransactionException;
+
+/**
+ * The Completion Coordinator processor.
+ * @author kevin
+ * @message com.arjuna.wst.messaging.CompletionCoordinator11ProcessorImpl_1 [com.arjuna.wst.messaging.CompletionCoordinator11ProcessorImpl_1] - Unknown transaction
+ * @message com.arjuna.wst.messaging.CompletionCoordinator11ProcessorImpl_2 [com.arjuna.wst.messaging.CompletionCoordinator11ProcessorImpl_2] - Unknown error: {0}
+ * @message com.arjuna.wst.messaging.CompletionCoordinator11ProcessorImpl_3 [com.arjuna.wst.messaging.CompletionCoordinator11ProcessorImpl_3] - Unexpected exception thrown from commit: 
+ * @message com.arjuna.wst.messaging.CompletionCoordinator11ProcessorImpl_4 [com.arjuna.wst.messaging.CompletionCoordinator11ProcessorImpl_4] - Commit called on unknown participant: {0}
+ * @message com.arjuna.wst.messaging.CompletionCoordinator11ProcessorImpl_5 [com.arjuna.wst.messaging.CompletionCoordinator11ProcessorImpl_5] - Unknown participant
+ * @message com.arjuna.wst.messaging.CompletionCoordinator11ProcessorImpl_6 [com.arjuna.wst.messaging.CompletionCoordinator11ProcessorImpl_6] - Unknown transaction
+ * @message com.arjuna.wst.messaging.CompletionCoordinator11ProcessorImpl_7 [com.arjuna.wst.messaging.CompletionCoordinator11ProcessorImpl_7] - Unknown error: {0}
+ * @message com.arjuna.wst.messaging.CompletionCoordinator11ProcessorImpl_8 [com.arjuna.wst.messaging.CompletionCoordinator11ProcessorImpl_8] - Unexpected exception thrown from rollback: 
+ * @message com.arjuna.wst.messaging.CompletionCoordinator11ProcessorImpl_9 [com.arjuna.wst.messaging.CompletionCoordinator11ProcessorImpl_9] - Rollback called on unknown participant: {0}
+ * @message com.arjuna.wst.messaging.CompletionCoordinator11ProcessorImpl_10 [com.arjuna.wst.messaging.CompletionCoordinator11ProcessorImpl_10] - Unknown participant
+ */
+public class CompletionCoordinator11ProcessorImpl extends CompletionCoordinatorProcessor
+{
+    /**
+     * The activated object processor.
+     */
+    private final ActivatedObjectProcessor activatedObjectProcessor = new ActivatedObjectProcessor() ;
+
+    /**
+     * Activate the participant.
+     * @param participant The participant.
+     * @param identifier The identifier.
+     */
+    public void activateParticipant(final CompletionCoordinatorParticipant participant, final String identifier)
+    {
+        activatedObjectProcessor.activateObject(participant, identifier) ;
+    }
+
+    /**
+     * Deactivate the participant.
+     * @param participant The participant.
+     */
+    public void deactivateParticipant(final CompletionCoordinatorParticipant participant)
+    {
+        activatedObjectProcessor.deactivateObject(participant) ;
+    }
+    
+    /**
+     * Get the participant with the specified identifier.
+     * @param instanceIdentifier The participant identifier.
+     * @return The participant or null if not known.
+     */
+    private CompletionCoordinatorParticipant getParticipant(final InstanceIdentifier instanceIdentifier)
+    {
+        final String identifier = (instanceIdentifier != null ? instanceIdentifier.getInstanceIdentifier() : null) ;
+        return (CompletionCoordinatorParticipant)activatedObjectProcessor.getObject(identifier) ;
+    }
+    
+    /**
+     * Commit.
+     * @param commit The commit notification.
+     * @param addressingContext The addressing context.
+     * @param jbossContext The jboss context.
+     */
+    public void commit(final NotificationType commit, final AddressingContext addressingContext,
+        final JBossContext jbossContext)
+    {
+        final InstanceIdentifier instanceIdentifier = jbossContext.getInstanceIdentifier() ;
+        final CompletionCoordinatorParticipant participant = getParticipant(instanceIdentifier) ;
+
+        try
+        {
+            final String messageId = MessageId.getMessageId() ;
+            if (participant != null)
+            {
+                try
+                {
+                    participant.commit() ;
+                }
+                catch (final TransactionRolledBackException trbe)
+                {
+                    final AddressingContext responseAddressingContext =
+                        AddressingContext.createRequestContext(addressingContext.getFrom(), messageId) ;
+                    CompletionInitiatorClient.getClient().sendAborted(responseAddressingContext) ;
+                    return ;
+                }
+                catch (final UnknownTransactionException ute)
+                {
+                    addressingContext.setReplyTo(addressingContext.getFrom()) ;
+                    final AddressingContext faultAddressingContext = AddressingContext.createFaultContext(addressingContext, messageId) ;
+                    final SoapFault soapFault = new SoapFault(SoapFaultType.FAULT_SENDER, AtomicTransactionConstants.WSAT_ERROR_CODE_UNKNOWN_TRANSACTION_QNAME,
+                        WSTLogger.log_mesg.getString("com.arjuna.wst.messaging.CompletionCoordinator11ProcessorImpl_1")) ;
+                    CompletionInitiatorClient.getClient().sendSoapFault(faultAddressingContext, soapFault) ;
+                    return ;
+                }
+                catch (final Throwable th)
+                {
+                    if (WSTLogger.arjLoggerI18N.isDebugEnabled())
+                    {
+                        WSTLogger.arjLoggerI18N.debug("com.arjuna.wst.messaging.CompletionCoordinator11ProcessorImpl_3", th) ;
+                    }
+                    addressingContext.setReplyTo(addressingContext.getFrom()) ;
+                    final AddressingContext faultAddressingContext = AddressingContext.createFaultContext(addressingContext, messageId) ;
+                    final String pattern = WSTLogger.log_mesg.getString("com.arjuna.wst.messaging.CompletionCoordinator11ProcessorImpl_2") ;
+                    final String message = MessageFormat.format(pattern, new Object[] {th}) ;
+                    final SoapFault soapFault = new SoapFault(SoapFaultType.FAULT_SENDER, AtomicTransactionConstants.WSAT_ERROR_CODE_INCONSISTENT_INTERNAL_STATE_QNAME, message) ;
+                    CompletionInitiatorClient.getClient().sendSoapFault(faultAddressingContext, soapFault) ;
+                    return ;
+                }
+                final AddressingContext responseAddressingContext =
+                    AddressingContext.createRequestContext(addressingContext.getFrom(), messageId) ;
+                CompletionInitiatorClient.getClient().sendCommitted(responseAddressingContext) ;
+            }
+            else
+            {
+                if (WSTLogger.arjLoggerI18N.isDebugEnabled())
+                {
+                    WSTLogger.arjLoggerI18N.debug("com.arjuna.wst.messaging.CompletionCoordinator11ProcessorImpl_4", new Object[] {instanceIdentifier}) ;
+                }
+                final AddressingContext faultAddressingContext = AddressingContext.createFaultContext(addressingContext, messageId) ;
+                final SoapFault soapFault = new SoapFault(SoapFaultType.FAULT_SENDER, AtomicTransactionConstants.WSAT_ERROR_CODE_UNKNOWN_TRANSACTION_QNAME,
+                        WSTLogger.log_mesg.getString("com.arjuna.wst.messaging.CompletionCoordinator11ProcessorImpl_5")) ;
+                CompletionInitiatorClient.getClient().sendSoapFault(faultAddressingContext, soapFault) ;
+            }
+        }
+        catch (Throwable throwable)
+        {
+            throwable.printStackTrace(System.err);
+        }
+    }
+    
+    /**
+     * Rollback.
+     * @param rollback The rollback notification.
+     * @param addressingContext The addressing context.
+     * @param jbossContext The jboss context.
+     */
+    public void rollback(final NotificationType rollback, final AddressingContext addressingContext,
+        final JBossContext jbossContext)
+    {
+        final InstanceIdentifier instanceIdentifier = jbossContext.getInstanceIdentifier() ;
+        final CompletionCoordinatorParticipant participant = getParticipant(instanceIdentifier) ;
+
+        try
+        {
+            final String messageId = MessageId.getMessageId() ;
+            if (participant != null)
+            {
+                try
+                {
+                    participant.rollback() ;
+                }
+                catch (final UnknownTransactionException ute)
+                {
+                    final AddressingContext faultAddressingContext = AddressingContext.createFaultContext(addressingContext, messageId) ;
+                    final SoapFault soapFault = new SoapFault(SoapFaultType.FAULT_SENDER, AtomicTransactionConstants.WSAT_ERROR_CODE_UNKNOWN_TRANSACTION_QNAME,
+                        WSTLogger.log_mesg.getString("com.arjuna.wst.messaging.CompletionCoordinator11ProcessorImpl_6")) ;
+                    CompletionInitiatorClient.getClient().sendSoapFault(faultAddressingContext, soapFault) ;
+                    return ;
+                }
+                catch (final Throwable th)
+                {
+                    if (WSTLogger.arjLoggerI18N.isDebugEnabled())
+                    {
+                        WSTLogger.arjLoggerI18N.debug("com.arjuna.wst.messaging.CompletionCoordinator11ProcessorImpl_8", th) ;
+                    }
+                    final AddressingContext faultAddressingContext = AddressingContext.createFaultContext(addressingContext, messageId) ;
+                    final String pattern = WSTLogger.log_mesg.getString("com.arjuna.wst.messaging.CompletionCoordinator11ProcessorImpl_7") ;
+                    final String message = MessageFormat.format(pattern, new Object[] {th}) ;
+                    final SoapFault soapFault = new SoapFault(SoapFaultType.FAULT_SENDER, AtomicTransactionConstants.WSAT_ERROR_CODE_INCONSISTENT_INTERNAL_STATE_QNAME, message) ;
+                    CompletionInitiatorClient.getClient().sendSoapFault(faultAddressingContext, soapFault) ;
+                    return ;
+                }
+                final AddressingContext responseAddressingContext =
+                    AddressingContext.createRequestContext(addressingContext.getFrom(), messageId) ;
+                CompletionInitiatorClient.getClient().sendAborted(responseAddressingContext) ;
+            }
+            else
+            {
+                if (WSTLogger.arjLoggerI18N.isDebugEnabled())
+                {
+                    WSTLogger.arjLoggerI18N.debug("com.arjuna.wst.messaging.CompletionCoordinator11ProcessorImpl_9", new Object[] {instanceIdentifier}) ;
+                }
+                final AddressingContext faultAddressingContext = AddressingContext.createFaultContext(addressingContext, messageId) ;
+                final SoapFault soapFault = new SoapFault(SoapFaultType.FAULT_SENDER, AtomicTransactionConstants.WSAT_ERROR_CODE_UNKNOWN_TRANSACTION_QNAME,
+                    WSTLogger.log_mesg.getString("com.arjuna.wst.messaging.CompletionCoordinator11ProcessorImpl_10")) ;
+                CompletionInitiatorClient.getClient().sendSoapFault(faultAddressingContext, soapFault) ;
+            }
+        }
+        catch (Throwable throwable)
+        {
+            throwable.printStackTrace(System.err);
+        }
+    }
+}


Property changes on: labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/wst/messaging/CompletionCoordinator11ProcessorImpl.java
___________________________________________________________________
Name: svn:keywords
   + Rev Date
Name: svn:eol-style
   + native

Added: labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/wst/messaging/Coordinator11ProcessorImpl.java
===================================================================
--- labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/wst/messaging/Coordinator11ProcessorImpl.java	                        (rev 0)
+++ labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/wst/messaging/Coordinator11ProcessorImpl.java	2007-08-14 12:43:41 UTC (rev 14200)
@@ -0,0 +1,332 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag.  All rights reserved. 
+ * See the copyright.txt in the distribution for a full listing 
+ * of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU General Public License, v. 2.0.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A 
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+ * PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+ * You should have received a copy of the GNU General Public License,
+ * v. 2.0 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+ * MA  02110-1301, USA.
+ * 
+ * (C) 2005-2006,
+ * @author JBoss Inc.
+ */
+package com.arjuna.wst.messaging;
+
+import com.arjuna.webservices.SoapFault;
+import com.arjuna.webservices.SoapFaultType;
+import com.arjuna.webservices.base.processors.ActivatedObjectProcessor;
+import com.arjuna.webservices.logging.WSTLogger;
+import com.arjuna.webservices.wsaddr2005.AddressingContext;
+import com.arjuna.webservices.wsaddr2005.AttributedURIType;
+import com.arjuna.webservices.wsaddr2005.RelatesToType;
+import com.arjuna.webservices.wsjboss.JBossContext;
+import com.arjuna.webservices.wsjboss.InstanceIdentifier;
+import com.arjuna.webservices.wsat11.AtomicTransactionConstants;
+import com.arjuna.webservices.wsat11.NotificationType;
+import com.arjuna.webservices.wsat11.CoordinatorInboundEvents;
+import com.arjuna.webservices.wsat11.client.ParticipantClient;
+import com.arjuna.webservices.wsat11.processors.CoordinatorProcessor;
+import com.arjuna.wsc.messaging.MessageId;
+
+/**
+ * The Coordinator processor.
+ * @author kevin
+ */
+public class Coordinator11ProcessorImpl extends CoordinatorProcessor
+{
+    /**
+     * The activated object processor.
+     */
+    private final ActivatedObjectProcessor activatedObjectProcessor = new ActivatedObjectProcessor() ;
+
+    /**
+     * Activate the coordinator.
+     * @param coordinator The coordinator.
+     * @param identifier The identifier.
+     */
+    public void activateCoordinator(final CoordinatorInboundEvents coordinator, final String identifier)
+    {
+        activatedObjectProcessor.activateObject(coordinator, identifier) ;
+    }
+
+    /**
+     * Deactivate the coordinator.
+     * @param coordinator The coordinator.
+     */
+    public void deactivateCoordinator(final CoordinatorInboundEvents coordinator)
+    {
+        activatedObjectProcessor.deactivateObject(coordinator) ;
+    }
+    
+    /**
+     * Get the coordinator with the specified identifier.
+     * @param instanceIdentifier The coordinator identifier.
+     * @return The coordinator or null if not known.
+     */
+    private CoordinatorInboundEvents getCoordinator(final InstanceIdentifier instanceIdentifier)
+    {
+        final String identifier = (instanceIdentifier != null ? instanceIdentifier.getInstanceIdentifier() : null) ;
+        return (CoordinatorInboundEvents)activatedObjectProcessor.getObject(identifier) ;
+    }
+    
+    /**
+     * Aborted.
+     * @param aborted The aborted notification.
+     * @param addressingContext The addressing context.
+     * @param jbossContext The jboss context.
+     * 
+     * @message com.arjuna.wst.messaging.Coordinator11ProcessorImpl.aborted_1 [com.arjuna.wst.messaging.Coordinator11ProcessorImpl.aborted_1] - Unexpected exception thrown from aborted:
+     * @message com.arjuna.wst.messaging.Coordinator11ProcessorImpl.aborted_2 [com.arjuna.wst.messaging.Coordinator11ProcessorImpl.aborted_2] - Aborted called on unknown coordinator: {0}
+     */
+    public void aborted(final NotificationType aborted, final AddressingContext addressingContext,
+        final JBossContext jbossContext)
+    {
+        final InstanceIdentifier instanceIdentifier = jbossContext.getInstanceIdentifier() ;
+        final CoordinatorInboundEvents coordinator = getCoordinator(instanceIdentifier) ;
+        
+        if (coordinator != null)
+        {
+            try
+            {
+                coordinator.aborted(aborted, addressingContext, jbossContext) ;
+            }
+            catch (final Throwable th)
+            {
+                if (WSTLogger.arjLoggerI18N.isWarnEnabled())
+                {
+                    WSTLogger.arjLoggerI18N.warn("com.arjuna.wst.messaging.Coordinator11ProcessorImpl.aborted_1", th) ; 
+                }
+            }
+        }
+        else if (WSTLogger.arjLoggerI18N.isWarnEnabled())
+        {
+            WSTLogger.arjLoggerI18N.warn("com.arjuna.wst.messaging.Coordinator11ProcessorImpl.aborted_2", new Object[] {instanceIdentifier}) ; 
+        }
+    }
+    
+    /**
+     * Committed.
+     * @param committed The committed notification.
+     * @param addressingContext The addressing context.
+     * @param jbossContext The jboss context.
+     * 
+     * @message com.arjuna.wst.messaging.Coordinator11ProcessorImpl.committed_1 [com.arjuna.wst.messaging.Coordinator11ProcessorImpl.committed_1] - Unexpected exception thrown from committed:
+     * @message com.arjuna.wst.messaging.Coordinator11ProcessorImpl.committed_2 [com.arjuna.wst.messaging.Coordinator11ProcessorImpl.committed_2] - Aborted called on unknown coordinator: {0}
+     */
+    public void committed(final NotificationType committed, final AddressingContext addressingContext,
+        final JBossContext jbossContext)
+    {
+        final InstanceIdentifier instanceIdentifier = jbossContext.getInstanceIdentifier() ;
+        final CoordinatorInboundEvents coordinator = getCoordinator(instanceIdentifier) ;
+        
+        if (coordinator != null)
+        {
+            try
+            {
+                coordinator.committed(committed, addressingContext, jbossContext) ;
+            }
+            catch (final Throwable th)
+            {
+                if (WSTLogger.arjLoggerI18N.isWarnEnabled())
+                {
+                    WSTLogger.arjLoggerI18N.warn("com.arjuna.wst.messaging.Coordinator11ProcessorImpl.committed_1", th) ; 
+                }
+            }
+        }
+        else if (WSTLogger.arjLoggerI18N.isWarnEnabled())
+        {
+            WSTLogger.arjLoggerI18N.warn("com.arjuna.wst.messaging.Coordinator11ProcessorImpl.committed_2", new Object[] {instanceIdentifier}) ; 
+        }
+    }
+    
+    /**
+     * Prepared.
+     * @param prepared The prepared notification.
+     * @param addressingContext The addressing context.
+     * @param jbossContext The jboss context.
+     * 
+     * @message com.arjuna.wst.messaging.Coordinator11ProcessorImpl.prepared_1 [com.arjuna.wst.messaging.Coordinator11ProcessorImpl.prepared_1] - Unexpected exception thrown from prepared:
+     * @message com.arjuna.wst.messaging.Coordinator11ProcessorImpl.prepared_2 [com.arjuna.wst.messaging.Coordinator11ProcessorImpl.prepared_2] - Aborted called on unknown coordinator: {0}
+     */
+    public void prepared(final NotificationType prepared, final AddressingContext addressingContext,
+        final JBossContext jbossContext)
+    {
+        final InstanceIdentifier instanceIdentifier = jbossContext.getInstanceIdentifier() ;
+        final CoordinatorInboundEvents coordinator = getCoordinator(instanceIdentifier) ;
+        
+        if (coordinator != null)
+        {
+            try
+            {
+                coordinator.prepared(prepared, addressingContext, jbossContext) ;
+            }
+            catch (final Throwable th)
+            {
+                if (WSTLogger.arjLoggerI18N.isWarnEnabled())
+                {
+                    WSTLogger.arjLoggerI18N.warn("com.arjuna.wst.messaging.Coordinator11ProcessorImpl.prepared_1", th) ; 
+                }
+            }
+        }
+        else
+        {
+            if (WSTLogger.arjLoggerI18N.isWarnEnabled())
+            {
+                WSTLogger.arjLoggerI18N.warn("com.arjuna.wst.messaging.Coordinator11ProcessorImpl.prepared_2", new Object[] {instanceIdentifier}) ; 
+            }
+            
+            final String identifierValue = instanceIdentifier.getInstanceIdentifier() ;
+            if ((identifierValue != null) && (identifierValue.length() > 0) && (identifierValue.charAt(0) == 'D'))
+            {
+                sendRollback(addressingContext, jbossContext) ;
+            }
+            else
+            {
+                sendUnknownTransaction(addressingContext) ;
+            }
+        }
+    }
+    
+    /**
+     * Read only.
+     * @param readOnly The read only notification.
+     * @param addressingContext The addressing context.
+     * @param jbossContext The jboss context.
+     * 
+     * @message com.arjuna.wst.messaging.Coordinator11ProcessorImpl.readOnly_1 [com.arjuna.wst.messaging.Coordinator11ProcessorImpl.readOnly_1] - Unexpected exception thrown from readOnly:
+     * @message com.arjuna.wst.messaging.Coordinator11ProcessorImpl.readOnly_2 [com.arjuna.wst.messaging.Coordinator11ProcessorImpl.readOnly_2] - Aborted called on unknown coordinator: {0}
+     */
+    public void readOnly(final NotificationType readOnly, final AddressingContext addressingContext,
+        final JBossContext jbossContext)
+    {
+        final InstanceIdentifier instanceIdentifier = jbossContext.getInstanceIdentifier() ;
+        final CoordinatorInboundEvents coordinator = getCoordinator(instanceIdentifier) ;
+        
+        if (coordinator != null)
+        {
+            try
+            {
+                coordinator.readOnly(readOnly, addressingContext, jbossContext) ;
+            }
+            catch (final Throwable th)
+            {
+                if (WSTLogger.arjLoggerI18N.isWarnEnabled())
+                {
+                    WSTLogger.arjLoggerI18N.warn("com.arjuna.wst.messaging.Coordinator11ProcessorImpl.readOnly_1", th) ; 
+                }
+            }
+        }
+        else if (WSTLogger.arjLoggerI18N.isWarnEnabled())
+        {
+            WSTLogger.arjLoggerI18N.warn("com.arjuna.wst.messaging.Coordinator11ProcessorImpl.readOnly_2", new Object[] {instanceIdentifier}) ; 
+        }
+    }
+
+    /**
+     * SOAP Fault.
+     * @param soapFault The SOAP fault notification.
+     * @param addressingContext The addressing context.
+     * @param jbossContext The jboss context.
+     * 
+     * @message com.arjuna.wst.messaging.Coordinator11ProcessorImpl.soapFault_1 [com.arjuna.wst.messaging.Coordinator11ProcessorImpl.soapFault_1] - Unexpected exception thrown from soapFault: 
+     * @message com.arjuna.wst.messaging.Coordinator11ProcessorImpl.soapFault_2 [com.arjuna.wst.messaging.Coordinator11ProcessorImpl.soapFault_2] - SoapFault called on unknown coordinator: {0}
+     */
+    public void soapFault(final SoapFault fault, final AddressingContext addressingContext,
+        final JBossContext jbossContext)
+    {
+        final InstanceIdentifier instanceIdentifier = jbossContext.getInstanceIdentifier() ;
+        final CoordinatorInboundEvents coordinator = getCoordinator(instanceIdentifier) ;
+
+        if (coordinator != null)
+        {
+            try
+            {
+                coordinator.soapFault(fault, addressingContext, jbossContext) ;
+            }
+            catch (final Throwable th)
+            {
+                if (WSTLogger.arjLoggerI18N.isWarnEnabled())
+                {
+                    WSTLogger.arjLoggerI18N.warn("com.arjuna.wst.messaging.Coordinator11ProcessorImpl.soapFault_1", th) ;
+                }
+            }
+        }
+        else
+        {
+            if (WSTLogger.arjLoggerI18N.isWarnEnabled())
+            {
+                WSTLogger.arjLoggerI18N.warn("com.arjuna.wst.messaging.Coordinator11ProcessorImpl.soapFault_2", new Object[] {instanceIdentifier}) ;
+            }
+        }
+    }
+    
+    /**
+     * Send an unknown transaction fault.
+     * 
+     * @param addressingContext The addressing context.
+     * 
+     * @message com.arjuna.wst.messaging.Coordinator11ProcessorImpl.sendUnknownTransaction_1 [com.arjuna.wst.messaging.Coordinator11ProcessorImpl.sendUnknownTransaction_1] - Unknown Transaction.
+     * @message com.arjuna.wst.messaging.Coordinator11ProcessorImpl.sendUnknownTransaction_2 [com.arjuna.wst.messaging.Coordinator11ProcessorImpl.sendUnknownTransaction_2] - Unexpecting exception while sending UnknownTransaction
+     */
+    private void sendUnknownTransaction(final AddressingContext addressingContext)
+    {
+        // KEV add check for recovery
+        final String responseMessageId = MessageId.getMessageId() ;
+        final AddressingContext responseAddressingContext = AddressingContext.createRequestContext(addressingContext.getFrom(), responseMessageId) ;
+        
+        final AttributedURIType requestMessageId = addressingContext.getMessageID() ;
+        if (requestMessageId != null)
+        {
+            responseAddressingContext.addRelatesTo(new RelatesToType(requestMessageId.getValue())) ;
+        }
+        
+        try
+        {
+            final String message = WSTLogger.log_mesg.getString("com.arjuna.wst.messaging.Coordinator11ProcessorImpl.sendUnknownTransaction_1") ;
+            final SoapFault soapFault = new SoapFault(SoapFaultType.FAULT_SENDER, AtomicTransactionConstants.WSAT_ERROR_CODE_UNKNOWN_TRANSACTION_QNAME, message) ;
+            ParticipantClient.getClient().sendSoapFault(responseAddressingContext, soapFault) ;
+        }
+        catch (final Throwable th)
+        {
+            if (WSTLogger.arjLoggerI18N.isDebugEnabled())
+            {
+                WSTLogger.arjLoggerI18N.debug("com.arjuna.wst.messaging.Coordinator11ProcessorImpl.sendUnknownTransaction_2", th) ;
+            }
+        }
+    }
+    
+    /**
+     * Send a rollback message.
+     * 
+     * @param addressingContext The addressing context.
+     * @param jbossContext The jboss context.
+     * 
+     * @message com.arjuna.wst.messaging.Coordinator11ProcessorImpl.sendRollback_1 [com.arjuna.wst.messaging.Coordinator11ProcessorImpl.sendRollback_1] - Unexpected exception while sending Rollback
+     */
+    private void sendRollback(final AddressingContext addressingContext, final JBossContext jbossContext)
+    {
+        // KEV add check for recovery
+        final String messageId = MessageId.getMessageId() ;
+        final AddressingContext responseAddressingContext = AddressingContext.createRequestContext(addressingContext.getFrom(), messageId) ;
+        final InstanceIdentifier instanceIdentifier = jbossContext.getInstanceIdentifier() ;
+        try
+        {
+            ParticipantClient.getClient().sendRollback(responseAddressingContext, instanceIdentifier) ;
+        }
+        catch (final Throwable th)
+        {
+            if (WSTLogger.arjLoggerI18N.isDebugEnabled())
+            {
+                WSTLogger.arjLoggerI18N.debug("com.arjuna.wst.messaging.Coordinator11ProcessorImpl.sendRollback_1", th) ;
+            }
+        }
+    }
+}


Property changes on: labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/wst/messaging/Coordinator11ProcessorImpl.java
___________________________________________________________________
Name: svn:keywords
   + Rev Date
Name: svn:eol-style
   + native

Added: labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/wst/messaging/CoordinatorCompletionCoordinator11ProcessorImpl.java
===================================================================
--- labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/wst/messaging/CoordinatorCompletionCoordinator11ProcessorImpl.java	                        (rev 0)
+++ labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/wst/messaging/CoordinatorCompletionCoordinator11ProcessorImpl.java	2007-08-14 12:43:41 UTC (rev 14200)
@@ -0,0 +1,511 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag.  All rights reserved. 
+ * See the copyright.txt in the distribution for a full listing 
+ * of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU General Public License, v. 2.0.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A 
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+ * PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+ * You should have received a copy of the GNU General Public License,
+ * v. 2.0 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+ * MA  02110-1301, USA.
+ * 
+ * (C) 2005-2006,
+ * @author JBoss Inc.
+ */
+package com.arjuna.wst.messaging;
+
+import com.arjuna.webservices.SoapFault;
+import com.arjuna.webservices.base.processors.ActivatedObjectProcessor;
+import com.arjuna.webservices.logging.WSTLogger;
+import com.arjuna.webservices.wsaddr2005.AddressingContext;
+import com.arjuna.webservices.wsjboss.JBossContext;
+import com.arjuna.webservices.wsjboss.InstanceIdentifier;
+import com.arjuna.webservices.wsba11.CoordinatorCompletionCoordinatorInboundEvents;
+import com.arjuna.webservices.wsba11.ExceptionType;
+import com.arjuna.webservices.wsba11.NotificationType;
+import com.arjuna.webservices.wsba11.StatusType;
+import com.arjuna.webservices.wsba11.client.CoordinatorCompletionParticipantClient;
+import com.arjuna.webservices.wsba11.processors.CoordinatorCompletionCoordinatorProcessor;
+import com.arjuna.wsc.messaging.MessageId;
+
+
+/**
+ * The Coordinator Completion Coordinator processor.
+ * @author kevin
+ */
+public class CoordinatorCompletionCoordinator11ProcessorImpl extends CoordinatorCompletionCoordinatorProcessor
+{
+    /**
+     * The activated object processor.
+     */
+    private final ActivatedObjectProcessor activatedObjectProcessor = new ActivatedObjectProcessor() ;
+    
+    /**
+     * Activate the coordinator.
+     * @param coordinator The coordinator.
+     * @param identifier The identifier.
+     */
+    public void activateCoordinator(final CoordinatorCompletionCoordinatorInboundEvents coordinator, final String identifier)
+    {
+        activatedObjectProcessor.activateObject(coordinator, identifier) ;
+    }
+
+    /**
+     * Deactivate the coordinator.
+     * @param coordinator The coordinator.
+     */
+    public void deactivateCoordinator(final CoordinatorCompletionCoordinatorInboundEvents coordinator)
+    {
+        activatedObjectProcessor.deactivateObject(coordinator) ;
+    }
+    
+    /**
+     * Get the coordinator associated with the specified identifier.
+     * @param instanceIdentifier The coordinator identifier.
+     * @return The coordinator or null if not known.
+     */
+    private CoordinatorCompletionCoordinatorInboundEvents getCoordinator(final InstanceIdentifier instanceIdentifier)
+    {
+        final String identifier = (instanceIdentifier != null ? instanceIdentifier.getInstanceIdentifier() : null) ;
+        return (CoordinatorCompletionCoordinatorInboundEvents)activatedObjectProcessor.getObject(identifier) ;
+    }
+    
+    /**
+     * Cancelled.
+     * @param cancelled The cancelled notification.
+     * @param addressingContext The addressing context.
+     * @param jbossContext The jboss context.
+     * 
+     * @message com.arjuna.wst.messaging.CoordinatorCompletionCoordinator11ProcessorImpl.cancelled_1 [com.arjuna.wst.messaging.CoordinatorCompletionCoordinator11ProcessorImpl.cancelled_1] - Unexpected exception thrown from cancelled:
+     * @message com.arjuna.wst.messaging.CoordinatorCompletionCoordinator11ProcessorImpl.cancelled_2 [com.arjuna.wst.messaging.CoordinatorCompletionCoordinator11ProcessorImpl.cancelled_2] - Cancelled called on unknown coordinator: {0}
+     */
+    public void cancelled(final NotificationType cancelled, final AddressingContext addressingContext, final JBossContext jbossContext)
+    {
+        final InstanceIdentifier instanceIdentifier = jbossContext.getInstanceIdentifier() ;
+        final CoordinatorCompletionCoordinatorInboundEvents coordinator = getCoordinator(instanceIdentifier) ;
+
+        if (coordinator != null)
+        {
+            try
+            {
+                coordinator.cancelled(cancelled, addressingContext, jbossContext) ;
+            }
+            catch (final Throwable th)
+            {
+                if (WSTLogger.arjLoggerI18N.isDebugEnabled())
+                {
+                    WSTLogger.arjLoggerI18N.debug("com.arjuna.wst.messaging.CoordinatorCompletionCoordinator11ProcessorImpl.cancelled_1", th) ;
+                }
+            }
+        }
+        else if (WSTLogger.arjLoggerI18N.isDebugEnabled())
+        {
+            WSTLogger.arjLoggerI18N.debug("com.arjuna.wst.messaging.CoordinatorCompletionCoordinator11ProcessorImpl.cancelled_2", new Object[] {instanceIdentifier}) ;
+        }
+    }
+    
+    /**
+     * Closed.
+     * @param closed The closed notification.
+     * @param addressingContext The addressing context.
+     * @param jbossContext The jboss context.
+     * 
+     * @message com.arjuna.wst.messaging.CoordinatorCompletionCoordinator11ProcessorImpl.closed_1 [com.arjuna.wst.messaging.CoordinatorCompletionCoordinator11ProcessorImpl.closed_1] - Unexpected exception thrown from closed:
+     * @message com.arjuna.wst.messaging.CoordinatorCompletionCoordinator11ProcessorImpl.closed_2 [com.arjuna.wst.messaging.CoordinatorCompletionCoordinator11ProcessorImpl.closed_2] - Closed called on unknown coordinator: {0}
+     */
+    public void closed(final NotificationType closed, final AddressingContext addressingContext, final JBossContext jbossContext)
+    {
+        final InstanceIdentifier instanceIdentifier = jbossContext.getInstanceIdentifier() ;
+        final CoordinatorCompletionCoordinatorInboundEvents coordinator = getCoordinator(instanceIdentifier) ;
+
+        if (coordinator != null)
+        {
+            try
+            {
+                coordinator.closed(closed, addressingContext, jbossContext) ;
+            }
+            catch (final Throwable th)
+            {
+                if (WSTLogger.arjLoggerI18N.isDebugEnabled())
+                {
+                    WSTLogger.arjLoggerI18N.debug("com.arjuna.wst.messaging.CoordinatorCompletionCoordinator11ProcessorImpl.closed_1", th) ;
+                }
+            }
+        }
+        else if (WSTLogger.arjLoggerI18N.isDebugEnabled())
+        {
+            WSTLogger.arjLoggerI18N.debug("com.arjuna.wst.messaging.CoordinatorCompletionCoordinator11ProcessorImpl.closed_2", new Object[] {instanceIdentifier}) ;
+        }
+    }
+    
+    /**
+     * Compensated.
+     * @param compensated The compensated notification.
+     * @param addressingContext The addressing context.
+     * @param jbossContext The jboss context.
+     * 
+     * @message com.arjuna.wst.messaging.CoordinatorCompletionCoordinator11ProcessorImpl.compensated_1 [com.arjuna.wst.messaging.CoordinatorCompletionCoordinator11ProcessorImpl.compensated_1] - Unexpected exception thrown from compensated:
+     * @message com.arjuna.wst.messaging.CoordinatorCompletionCoordinator11ProcessorImpl.compensated_2 [com.arjuna.wst.messaging.CoordinatorCompletionCoordinator11ProcessorImpl.compensated_2] - Compensated called on unknown coordinator: {0}
+     */
+    public void compensated(final NotificationType compensated, final AddressingContext addressingContext, final JBossContext jbossContext)
+    {
+        final InstanceIdentifier instanceIdentifier = jbossContext.getInstanceIdentifier() ;
+        final CoordinatorCompletionCoordinatorInboundEvents coordinator = getCoordinator(instanceIdentifier) ;
+
+        if (coordinator != null)
+        {
+            try
+            {
+                coordinator.compensated(compensated, addressingContext, jbossContext) ;
+            }
+            catch (final Throwable th)
+            {
+                if (WSTLogger.arjLoggerI18N.isDebugEnabled())
+                {
+                    WSTLogger.arjLoggerI18N.debug("com.arjuna.wst.messaging.CoordinatorCompletionCoordinator11ProcessorImpl.compensated_1", th) ;
+                }
+            }
+        }
+        else if (WSTLogger.arjLoggerI18N.isDebugEnabled())
+        {
+            WSTLogger.arjLoggerI18N.debug("com.arjuna.wst.messaging.CoordinatorCompletionCoordinator11ProcessorImpl.compensated_2", new Object[] {instanceIdentifier}) ;
+        }
+    }
+
+    /**
+     * Completed.
+     * @param completed The completed notification.
+     * @param addressingContext The addressing context.
+     * @param jbossContext The jboss context.
+     * 
+     * @message com.arjuna.wst.messaging.CoordinatorCompletionCoordinator11ProcessorImpl.completed_1 [com.arjuna.wst.messaging.CoordinatorCompletionCoordinator11ProcessorImpl.completed_1] - Unexpected exception thrown from completed:
+     * @message com.arjuna.wst.messaging.CoordinatorCompletionCoordinator11ProcessorImpl.completed_2 [com.arjuna.wst.messaging.CoordinatorCompletionCoordinator11ProcessorImpl.completed_2] - Completed called on unknown coordinator: {0}
+     */
+    public void completed(final NotificationType completed, final AddressingContext addressingContext,
+        final JBossContext jbossContext)
+    {
+        final InstanceIdentifier instanceIdentifier = jbossContext.getInstanceIdentifier() ;
+        final CoordinatorCompletionCoordinatorInboundEvents coordinator = getCoordinator(instanceIdentifier) ;
+
+        if (coordinator != null)
+        {
+            try
+            {
+                coordinator.completed(completed, addressingContext, jbossContext) ;
+            }
+            catch (final Throwable th)
+            {
+                if (WSTLogger.arjLoggerI18N.isDebugEnabled())
+                {
+                    WSTLogger.arjLoggerI18N.debug("com.arjuna.wst.messaging.CoordinatorCompletionCoordinator11ProcessorImpl.completed_1", th) ;
+                }
+            }
+        }
+        else if (WSTLogger.arjLoggerI18N.isDebugEnabled())
+        {
+            WSTLogger.arjLoggerI18N.debug("com.arjuna.wst.messaging.CoordinatorCompletionCoordinator11ProcessorImpl.completed_2", new Object[] {instanceIdentifier}) ;
+        }
+    }
+    
+    /**
+     * Exit.
+     * @param exit The exit notification.
+     * @param addressingContext The addressing context.
+     * @param jbossContext The jboss context.
+     * 
+     * @message com.arjuna.wst.messaging.CoordinatorCompletionCoordinator11ProcessorImpl.exit_1 [com.arjuna.wst.messaging.CoordinatorCompletionCoordinator11ProcessorImpl.exit_1] - Unexpected exception thrown from exit:
+     * @message com.arjuna.wst.messaging.CoordinatorCompletionCoordinator11ProcessorImpl.exit_2 [com.arjuna.wst.messaging.CoordinatorCompletionCoordinator11ProcessorImpl.exit_2] - Exit called on unknown coordinator: {0}
+     */
+    public void exit(final NotificationType exit, final AddressingContext addressingContext, final JBossContext jbossContext)
+    {
+        final InstanceIdentifier instanceIdentifier = jbossContext.getInstanceIdentifier() ;
+        final CoordinatorCompletionCoordinatorInboundEvents coordinator = getCoordinator(instanceIdentifier) ;
+
+        if (coordinator != null)
+        {
+            try
+            {
+                coordinator.exit(exit, addressingContext, jbossContext) ;
+            }
+            catch (final Throwable th)
+            {
+                if (WSTLogger.arjLoggerI18N.isDebugEnabled())
+                {
+                    WSTLogger.arjLoggerI18N.debug("com.arjuna.wst.messaging.CoordinatorCompletionCoordinator11ProcessorImpl.exit_1", th) ;
+                }
+            }
+        }
+        else
+        {
+            if (WSTLogger.arjLoggerI18N.isDebugEnabled())
+            {
+                WSTLogger.arjLoggerI18N.debug("com.arjuna.wst.messaging.CoordinatorCompletionCoordinator11ProcessorImpl.exit_2", new Object[] {instanceIdentifier}) ;
+            }
+            sendExited(addressingContext, jbossContext) ;
+        }
+    }
+
+    /**
+     * Fail.
+     * @param fail The fail notification.
+     * @param addressingContext The addressing context.
+     * @param jbossContext The jboss context.
+     * 
+     * @message com.arjuna.wst.messaging.CoordinatorCompletionCoordinator11ProcessorImpl.fail_1 [com.arjuna.wst.messaging.CoordinatorCompletionCoordinator11ProcessorImpl.fail_1] - Unexpected exception thrown from fail:
+     * @message com.arjuna.wst.messaging.CoordinatorCompletionCoordinator11ProcessorImpl.fail_2 [com.arjuna.wst.messaging.CoordinatorCompletionCoordinator11ProcessorImpl.fail_2] - Fail called on unknown coordinator: {0}
+     */
+    public void fail(final ExceptionType fail, final AddressingContext addressingContext,
+        final JBossContext jbossContext)
+    {
+        final InstanceIdentifier instanceIdentifier = jbossContext.getInstanceIdentifier() ;
+        final CoordinatorCompletionCoordinatorInboundEvents coordinator = getCoordinator(instanceIdentifier) ;
+
+        if (coordinator != null)
+        {
+            try
+            {
+                coordinator.fail(fail, addressingContext, jbossContext) ;
+            }
+            catch (final Throwable th)
+            {
+                if (WSTLogger.arjLoggerI18N.isDebugEnabled())
+                {
+                    WSTLogger.arjLoggerI18N.debug("com.arjuna.wst.messaging.CoordinatorCompletionCoordinator11ProcessorImpl.fail_1", th) ;
+                }
+            }
+        }
+        else
+        {
+            if (WSTLogger.arjLoggerI18N.isDebugEnabled())
+            {
+                WSTLogger.arjLoggerI18N.debug("com.arjuna.wst.messaging.CoordinatorCompletionCoordinator11ProcessorImpl.fail_2", new Object[] {instanceIdentifier}) ;
+            }
+            sendFailed(addressingContext, jbossContext) ;
+        }
+    }
+    
+    /**
+     * CannotComplete.
+     * @param cannotComplete The cannotComplete exception.
+     * @param addressingContext The addressing context.
+     * @param jbossContext The jboss context.
+     * 
+     * @message com.arjuna.wst.messaging.CoordinatorCompletionCoordinator11ProcessorImpl.cannotComplete_1 [com.arjuna.wst.messaging.CoordinatorCompletionCoordinator11ProcessorImpl.cannotComplete_1] - Unexpected exception thrown from cannotComplete:
+     * @message com.arjuna.wst.messaging.CoordinatorCompletionCoordinator11ProcessorImpl.cannotComplete_2 [com.arjuna.wst.messaging.CoordinatorCompletionCoordinator11ProcessorImpl.cannotComplete_2] - CannotComplete called on unknown coordinator: {0}
+     */
+    public void cannotComplete(final NotificationType cannotComplete, final AddressingContext addressingContext,
+        final JBossContext jbossContext)
+    {
+        final InstanceIdentifier instanceIdentifier = jbossContext.getInstanceIdentifier() ;
+        final CoordinatorCompletionCoordinatorInboundEvents coordinator = getCoordinator(instanceIdentifier) ;
+
+        if (coordinator != null)
+        {
+            try
+            {
+                coordinator.cannotComplete(cannotComplete, addressingContext, jbossContext) ;
+            }
+            catch (final Throwable th)
+            {
+                if (WSTLogger.arjLoggerI18N.isDebugEnabled())
+                {
+                    WSTLogger.arjLoggerI18N.debug("com.arjuna.wst.messaging.CoordinatorCompletionCoordinator11ProcessorImpl.cannotComplete_1", th) ;
+                }
+            }
+        }
+        else
+        {
+            if (WSTLogger.arjLoggerI18N.isDebugEnabled())
+            {
+                WSTLogger.arjLoggerI18N.debug("com.arjuna.wst.messaging.CoordinatorCompletionCoordinator11ProcessorImpl.cannotComplete_2", new Object[] {instanceIdentifier}) ;
+            }
+            sendNotCompleted(addressingContext, jbossContext) ;
+        }
+    }
+    
+    /**
+     * Get Status.
+     * @param getStatus The get status notification.
+     * @param addressingContext The addressing context.
+     * @param jbossContext The jboss context.
+     * 
+     * @message com.arjuna.wst.messaging.CoordinatorCompletionCoordinator11ProcessorImpl.getStatus_1 [com.arjuna.wst.messaging.CoordinatorCompletionCoordinator11ProcessorImpl.getStatus_1] - Unexpected exception thrown from getStatus:
+     * @message com.arjuna.wst.messaging.CoordinatorCompletionCoordinator11ProcessorImpl.getStatus_2 [com.arjuna.wst.messaging.CoordinatorCompletionCoordinator11ProcessorImpl.getStatus_2] - GetStatus called on unknown coordinator: {0}
+     */
+    public void getStatus(final NotificationType getStatus, final AddressingContext addressingContext, final JBossContext jbossContext)
+    {
+        final InstanceIdentifier instanceIdentifier = jbossContext.getInstanceIdentifier() ;
+        final CoordinatorCompletionCoordinatorInboundEvents coordinator = getCoordinator(instanceIdentifier) ;
+
+        if (coordinator != null)
+        {
+            try
+            {
+                coordinator.getStatus(getStatus, addressingContext, jbossContext) ;
+            }
+            catch (final Throwable th)
+            {
+                if (WSTLogger.arjLoggerI18N.isDebugEnabled())
+                {
+                    WSTLogger.arjLoggerI18N.debug("com.arjuna.wst.messaging.CoordinatorCompletionCoordinator11ProcessorImpl.getStatus_1", th) ;
+                }
+            }
+        }
+        else if (WSTLogger.arjLoggerI18N.isDebugEnabled())
+        {
+            WSTLogger.arjLoggerI18N.debug("com.arjuna.wst.messaging.CoordinatorCompletionCoordinator11ProcessorImpl.getStatus_2", new Object[] {instanceIdentifier}) ;
+        }
+    }
+    
+    /**
+     * Status.
+     * @param status The status.
+     * @param addressingContext The addressing context.
+     * @param jbossContext The jboss context.
+     * 
+     * @message com.arjuna.wst.messaging.CoordinatorCompletionCoordinator11ProcessorImpl.status_1 [com.arjuna.wst.messaging.CoordinatorCompletionCoordinator11ProcessorImpl.status_1] - Unexpected exception thrown from status:
+     * @message com.arjuna.wst.messaging.CoordinatorCompletionCoordinator11ProcessorImpl.status_2 [com.arjuna.wst.messaging.CoordinatorCompletionCoordinator11ProcessorImpl.status_2] - Status called on unknown coordinator: {0}
+     */
+    public void status(final StatusType status, final AddressingContext addressingContext, final JBossContext jbossContext)
+    {
+        final InstanceIdentifier instanceIdentifier = jbossContext.getInstanceIdentifier() ;
+        final CoordinatorCompletionCoordinatorInboundEvents coordinator = getCoordinator(instanceIdentifier) ;
+
+        if (coordinator != null)
+        {
+            try
+            {
+                coordinator.status(status, addressingContext, jbossContext) ;
+            }
+            catch (final Throwable th)
+            {
+                if (WSTLogger.arjLoggerI18N.isDebugEnabled())
+                {
+                    WSTLogger.arjLoggerI18N.debug("com.arjuna.wst.messaging.CoordinatorCompletionCoordinator11ProcessorImpl.status_1", th) ;
+                }
+            }
+        }
+        else if (WSTLogger.arjLoggerI18N.isDebugEnabled())
+        {
+            WSTLogger.arjLoggerI18N.debug("com.arjuna.wst.messaging.CoordinatorCompletionCoordinator11ProcessorImpl.status_2", new Object[] {instanceIdentifier}) ;
+        }
+    }
+    
+    /**
+     * SOAP fault.
+     * @param soapFault The SOAP fault.
+     * @param addressingContext The addressing context.
+     * @param jbossContext The jboss context.
+     * 
+     * @message com.arjuna.wst.messaging.CoordinatorCompletionCoordinator11ProcessorImpl.soapFault_1 [com.arjuna.wst.messaging.CoordinatorCompletionCoordinator11ProcessorImpl.soapFault_1] - Unexpected exception thrown from soapFault:
+     * @message com.arjuna.wst.messaging.CoordinatorCompletionCoordinator11ProcessorImpl.soapFault_2 [com.arjuna.wst.messaging.CoordinatorCompletionCoordinator11ProcessorImpl.soapFault_2] - SOAP Fault called on unknown coordinator: {0}
+     */
+    public void soapFault(final SoapFault soapFault, final AddressingContext addressingContext, final JBossContext jbossContext)
+    {
+        final InstanceIdentifier instanceIdentifier = jbossContext.getInstanceIdentifier() ;
+        final CoordinatorCompletionCoordinatorInboundEvents coordinator = getCoordinator(instanceIdentifier) ;
+
+        if (coordinator != null)
+        {
+            try
+            {
+                coordinator.soapFault(soapFault, addressingContext, jbossContext) ;
+            }
+            catch (final Throwable th)
+            {
+                if (WSTLogger.arjLoggerI18N.isDebugEnabled())
+                {
+                    WSTLogger.arjLoggerI18N.debug("com.arjuna.wst.messaging.CoordinatorCompletionCoordinator11ProcessorImpl.soapFault_1", th) ;
+                }
+            }
+        }
+        else if (WSTLogger.arjLoggerI18N.isDebugEnabled())
+        {
+            WSTLogger.arjLoggerI18N.debug("com.arjuna.wst.messaging.CoordinatorCompletionCoordinator11ProcessorImpl.soapFault_2", new Object[] {instanceIdentifier}) ;
+        }
+    }
+    
+    /**
+     * Send an exited message.
+     * 
+     * @param addressingContext The addressing context.
+     * @param jbossContext The jboss context.
+     * 
+     * @message com.arjuna.wst.messaging.CoordinatorCompletionCoordinator11ProcessorImpl.sendExited_1 [com.arjuna.wst.messaging.CoordinatorCompletionCoordinator11ProcessorImpl.sendExited_1] - Unexpected exception while sending Exited
+     */
+    private void sendExited(final AddressingContext addressingContext, final JBossContext jbossContext)
+    {
+        // KEV add check for recovery
+        final String messageId = MessageId.getMessageId() ;
+        final AddressingContext responseAddressingContext = AddressingContext.createRequestContext(addressingContext.getFrom(), messageId) ;
+        try
+        {
+            CoordinatorCompletionParticipantClient.getClient().sendExited(responseAddressingContext, jbossContext.getInstanceIdentifier()) ;
+        }
+        catch (final Throwable th)
+        {
+            if (WSTLogger.arjLoggerI18N.isDebugEnabled())
+            {
+                WSTLogger.arjLoggerI18N.debug("com.arjuna.wst.messaging.CoordinatorCompletionCoordinator11ProcessorImpl.sendExited_1", th) ;
+            }
+        }
+    }
+    
+    /**
+     * Send a failed message.
+     * 
+     * @param addressingContext The addressing context.
+     * @param jbossContext The jboss context.
+     * 
+     * @message com.arjuna.wst.messaging.CoordinatorCompletionCoordinator11ProcessorImpl.sendFailed_1 [com.arjuna.wst.messaging.CoordinatorCompletionCoordinator11ProcessorImpl.sendFailed_1] - Unexpected exception while sending Failed
+     */
+    private void sendFailed(final AddressingContext addressingContext, final JBossContext jbossContext)
+    {
+        // KEV add check for recovery
+        final String messageId = MessageId.getMessageId() ;
+        final AddressingContext responseAddressingContext = AddressingContext.createRequestContext(addressingContext.getFrom(), messageId) ;
+        try
+        {
+            CoordinatorCompletionParticipantClient.getClient().sendFailed(responseAddressingContext, jbossContext.getInstanceIdentifier()) ;
+        }
+        catch (final Throwable th)
+        {
+            if (WSTLogger.arjLoggerI18N.isDebugEnabled())
+            {
+                WSTLogger.arjLoggerI18N.debug("com.arjuna.wst.messaging.CoordinatorCompletionCoordinator11ProcessorImpl.sendFailed_1", th) ;
+            }
+        }
+    }
+    
+    /**
+     * Send a not completed message.
+     * 
+     * @param addressingContext The addressing context.
+     * @param jbossContext The jboss context.
+     * 
+     * @message com.arjuna.wst.messaging.CoordinatorCompletionCoordinator11ProcessorImpl.sendNotCompleted_1 [com.arjuna.wst.messaging.CoordinatorCompletionCoordinator11ProcessorImpl.sendNotCompleted_1] - Unexpected exception while sending NotCompleted
+     */
+    private void sendNotCompleted(final AddressingContext addressingContext, final JBossContext jbossContext)
+    {
+        // KEV add check for recovery
+        final String messageId = MessageId.getMessageId() ;
+        final AddressingContext responseAddressingContext = AddressingContext.createRequestContext(addressingContext.getFrom(), messageId) ;
+        try
+        {
+            CoordinatorCompletionParticipantClient.getClient().sendNotCompleted(responseAddressingContext, jbossContext.getInstanceIdentifier()) ;
+        }
+        catch (final Throwable th)
+        {
+            if (WSTLogger.arjLoggerI18N.isDebugEnabled())
+            {
+                WSTLogger.arjLoggerI18N.debug("com.arjuna.wst.messaging.CoordinatorCompletionCoordinator11ProcessorImpl.sendNotCompleted_1", th) ;
+            }
+        }
+    }
+}


Property changes on: labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/wst/messaging/CoordinatorCompletionCoordinator11ProcessorImpl.java
___________________________________________________________________
Name: svn:keywords
   + Rev Date
Name: svn:eol-style
   + native

Added: labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/wst/messaging/CoordinatorCompletionParticipant11ProcessorImpl.java
===================================================================
--- labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/wst/messaging/CoordinatorCompletionParticipant11ProcessorImpl.java	                        (rev 0)
+++ labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/wst/messaging/CoordinatorCompletionParticipant11ProcessorImpl.java	2007-08-14 12:43:41 UTC (rev 14200)
@@ -0,0 +1,541 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag.  All rights reserved. 
+ * See the copyright.txt in the distribution for a full listing 
+ * of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU General Public License, v. 2.0.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A 
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+ * PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+ * You should have received a copy of the GNU General Public License,
+ * v. 2.0 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+ * MA  02110-1301, USA.
+ * 
+ * (C) 2005-2006,
+ * @author JBoss Inc.
+ */
+package com.arjuna.wst.messaging;
+
+import javax.xml.namespace.QName;
+
+import com.arjuna.webservices.SoapFault;
+import com.arjuna.webservices.base.processors.ActivatedObjectProcessor;
+import com.arjuna.webservices.logging.WSTLogger;
+import com.arjuna.webservices.wsaddr2005.AddressingContext;
+import com.arjuna.webservices.wsjboss.JBossContext;
+import com.arjuna.webservices.wsjboss.InstanceIdentifier;
+import com.arjuna.webservices.wsba11.CoordinatorCompletionParticipantInboundEvents;
+import com.arjuna.webservices.wsba11.NotificationType;
+import com.arjuna.webservices.wsba11.State;
+import com.arjuna.webservices.wsba11.StatusType;
+import com.arjuna.webservices.wsba11.client.CoordinatorCompletionCoordinatorClient;
+import com.arjuna.webservices.wsba11.processors.CoordinatorCompletionParticipantProcessor;
+import com.arjuna.wsc.messaging.MessageId;
+
+
+/**
+ * The Coordinator Completion Participant processor.
+ * @author kevin
+ */
+public class CoordinatorCompletionParticipant11ProcessorImpl extends CoordinatorCompletionParticipantProcessor
+{
+    /**
+     * The activated object processor.
+     */
+    private final ActivatedObjectProcessor activatedObjectProcessor = new ActivatedObjectProcessor() ;
+    
+    /**
+     * Activate the participant.
+     * @param participant The participant.
+     * @param identifier The identifier.
+     */
+    public void activateParticipant(final CoordinatorCompletionParticipantInboundEvents participant, final String identifier)
+    {
+        activatedObjectProcessor.activateObject(participant, identifier) ;
+    }
+
+    /**
+     * Deactivate the participant.
+     * @param participant The participant.
+     */
+    public void deactivateParticipant(final CoordinatorCompletionParticipantInboundEvents participant)
+    {
+        activatedObjectProcessor.deactivateObject(participant) ;
+    }
+    
+    /**
+     * Get the participant with the specified identifier.
+     * @param instanceIdentifier The participant identifier.
+     * @return The participant or null if not known.
+     */
+    private CoordinatorCompletionParticipantInboundEvents getParticipant(final InstanceIdentifier instanceIdentifier)
+    {
+        final String identifier = (instanceIdentifier != null ? instanceIdentifier.getInstanceIdentifier() : null) ;
+        return (CoordinatorCompletionParticipantInboundEvents)activatedObjectProcessor.getObject(identifier) ;
+    }
+
+    /**
+     * Cancel.
+     * @param cancel The cancel notification.
+     * @param addressingContext The addressing context.
+     * @param jbossContext The jboss context.
+     * 
+     * @message com.arjuna.wst.messaging.CoordinatorCompletionParticipant11ProcessorImpl.cancel_1 [com.arjuna.wst.messaging.CoordinatorCompletionParticipant11ProcessorImpl.cancel_1] - Unexpected exception thrown from cancel:
+     * @message com.arjuna.wst.messaging.CoordinatorCompletionParticipant11ProcessorImpl.cancel_2 [com.arjuna.wst.messaging.CoordinatorCompletionParticipant11ProcessorImpl.cancel_2] - Cancel called on unknown participant: {0}
+     */
+    public void cancel(final NotificationType cancel, final AddressingContext addressingContext, final JBossContext jbossContext)
+    {
+        final InstanceIdentifier instanceIdentifier = jbossContext.getInstanceIdentifier() ;
+        final CoordinatorCompletionParticipantInboundEvents participant = getParticipant(instanceIdentifier) ;
+
+        if (participant != null)
+        {
+            try
+            {
+                participant.cancel(cancel, addressingContext, jbossContext) ;
+            }
+            catch (final Throwable th)
+            {
+                if (WSTLogger.arjLoggerI18N.isDebugEnabled())
+                {
+                    WSTLogger.arjLoggerI18N.debug("com.arjuna.wst.messaging.CoordinatorCompletionParticipant11ProcessorImpl.cancel_1", th) ;
+                }
+            }
+        }
+        else
+        {
+            if (WSTLogger.arjLoggerI18N.isDebugEnabled())
+            {
+                WSTLogger.arjLoggerI18N.debug("com.arjuna.wst.messaging.CoordinatorCompletionParticipant11ProcessorImpl.cancel_2", new Object[] {instanceIdentifier}) ;
+            }
+            sendCancelled(addressingContext, jbossContext) ;
+        }
+    }
+    
+    /**
+     * Close.
+     * @param close The close notification.
+     * @param addressingContext The addressing context.
+     * @param jbossContext The jboss context.
+     * 
+     * @message com.arjuna.wst.messaging.CoordinatorCompletionParticipant11ProcessorImpl.close_1 [com.arjuna.wst.messaging.CoordinatorCompletionParticipant11ProcessorImpl.close_1] - Unexpected exception thrown from close:
+     * @message com.arjuna.wst.messaging.CoordinatorCompletionParticipant11ProcessorImpl.close_2 [com.arjuna.wst.messaging.CoordinatorCompletionParticipant11ProcessorImpl.close_2] - Close called on unknown participant: {0}
+     */
+    public void close(final NotificationType close, final AddressingContext addressingContext, final JBossContext jbossContext)
+    {
+        final InstanceIdentifier instanceIdentifier = jbossContext.getInstanceIdentifier() ;
+        final CoordinatorCompletionParticipantInboundEvents participant = getParticipant(instanceIdentifier) ;
+
+        if (participant != null)
+        {
+            try
+            {
+                participant.close(close, addressingContext, jbossContext) ;
+            }
+            catch (final Throwable th)
+            {
+                if (WSTLogger.arjLoggerI18N.isDebugEnabled())
+                {
+                    WSTLogger.arjLoggerI18N.debug("com.arjuna.wst.messaging.CoordinatorCompletionParticipant11ProcessorImpl.close_1", th) ;
+                }
+            }
+        }
+        else
+        {
+            if (WSTLogger.arjLoggerI18N.isDebugEnabled())
+            {
+                WSTLogger.arjLoggerI18N.debug("com.arjuna.wst.messaging.CoordinatorCompletionParticipant11ProcessorImpl.close_2", new Object[] {instanceIdentifier}) ;
+            }
+            sendClosed(addressingContext, jbossContext) ;
+        }
+    }
+    
+    /**
+     * Compensate.
+     * @param compensate The compensate notification.
+     * @param addressingContext The addressing context.
+     * @param jbossContext The jboss context.
+     * 
+     * @message com.arjuna.wst.messaging.CoordinatorCompletionParticipant11ProcessorImpl.compensate_1 [com.arjuna.wst.messaging.CoordinatorCompletionParticipant11ProcessorImpl.compensate_1] - Unexpected exception thrown from compensate:
+     * @message com.arjuna.wst.messaging.CoordinatorCompletionParticipant11ProcessorImpl.compensate_2 [com.arjuna.wst.messaging.CoordinatorCompletionParticipant11ProcessorImpl.compensate_2] - Compensate called on unknown participant: {0}
+     */
+    public void compensate(final NotificationType compensate, final AddressingContext addressingContext, final JBossContext jbossContext)
+    {
+        final InstanceIdentifier instanceIdentifier = jbossContext.getInstanceIdentifier() ;
+        final CoordinatorCompletionParticipantInboundEvents participant = getParticipant(instanceIdentifier) ;
+
+        if (participant != null)
+        {
+            try
+            {
+                participant.compensate(compensate, addressingContext, jbossContext) ;
+            }
+            catch (final Throwable th)
+            {
+                if (WSTLogger.arjLoggerI18N.isDebugEnabled())
+                {
+                    WSTLogger.arjLoggerI18N.debug("com.arjuna.wst.messaging.CoordinatorCompletionParticipant11ProcessorImpl.compensate_1", th) ;
+                }
+            }
+        }
+        else
+        {
+            if (WSTLogger.arjLoggerI18N.isDebugEnabled())
+            {
+                WSTLogger.arjLoggerI18N.debug("com.arjuna.wst.messaging.CoordinatorCompletionParticipant11ProcessorImpl.compensate_2", new Object[] {instanceIdentifier}) ;
+            }
+            sendCompensated(addressingContext, jbossContext) ;
+        }
+    }
+    
+    /**
+     * Complete.
+     * @param complete The complete notification.
+     * @param addressingContext The addressing context.
+     * @param jbossContext The jboss context.
+     * 
+     * @message com.arjuna.wst.messaging.CoordinatorCompletionParticipant11ProcessorImpl.complete_1 [com.arjuna.wst.messaging.CoordinatorCompletionParticipant11ProcessorImpl.complete_1] - Unexpected exception thrown from complete:
+     * @message com.arjuna.wst.messaging.CoordinatorCompletionParticipant11ProcessorImpl.complete_2 [com.arjuna.wst.messaging.CoordinatorCompletionParticipant11ProcessorImpl.complete_2] - Complete called on unknown participant: {0}
+     */
+    public void complete(final NotificationType complete, final AddressingContext addressingContext, final JBossContext jbossContext)
+    {
+        final InstanceIdentifier instanceIdentifier = jbossContext.getInstanceIdentifier() ;
+        final CoordinatorCompletionParticipantInboundEvents participant = getParticipant(instanceIdentifier) ;
+
+        if (participant != null)
+        {
+            try
+            {
+                participant.complete(complete, addressingContext, jbossContext) ;
+            }
+            catch (final Throwable th)
+            {
+                if (WSTLogger.arjLoggerI18N.isDebugEnabled())
+                {
+                    WSTLogger.arjLoggerI18N.debug("com.arjuna.wst.messaging.CoordinatorCompletionParticipant11ProcessorImpl.complete_1", th) ;
+                }
+            }
+        }
+        else
+        {
+            if (WSTLogger.arjLoggerI18N.isDebugEnabled())
+            {
+                WSTLogger.arjLoggerI18N.debug("com.arjuna.wst.messaging.CoordinatorCompletionParticipant11ProcessorImpl.complete_2", new Object[] {instanceIdentifier}) ;
+            }
+            sendFail(addressingContext, jbossContext, State.STATE_ENDED.getValue()) ;
+        }
+    }
+    
+    /**
+     * Exited.
+     * @param exited The exited notification.
+     * @param addressingContext The addressing context.
+     * @param jbossContext The jboss context.
+     * 
+     * @message com.arjuna.wst.messaging.CoordinatorCompletionParticipant11ProcessorImpl.exited_1 [com.arjuna.wst.messaging.CoordinatorCompletionParticipant11ProcessorImpl.exited_1] - Unexpected exception thrown from exited:
+     * @message com.arjuna.wst.messaging.CoordinatorCompletionParticipant11ProcessorImpl.exited_2 [com.arjuna.wst.messaging.CoordinatorCompletionParticipant11ProcessorImpl.exited_2] - Exited called on unknown participant: {0}
+     */
+    public void exited(final NotificationType exited, final AddressingContext addressingContext, final JBossContext jbossContext)
+    {
+        final InstanceIdentifier instanceIdentifier = jbossContext.getInstanceIdentifier() ;
+        final CoordinatorCompletionParticipantInboundEvents participant = getParticipant(instanceIdentifier) ;
+
+        if (participant != null)
+        {
+            try
+            {
+                participant.exited(exited, addressingContext, jbossContext) ;
+            }
+            catch (final Throwable th)
+            {
+                if (WSTLogger.arjLoggerI18N.isDebugEnabled())
+                {
+                    WSTLogger.arjLoggerI18N.debug("com.arjuna.wst.messaging.CoordinatorCompletionParticipant11ProcessorImpl.exited_1", th) ;
+                }
+            }
+        }
+        else if (WSTLogger.arjLoggerI18N.isDebugEnabled())
+        {
+            WSTLogger.arjLoggerI18N.debug("com.arjuna.wst.messaging.CoordinatorCompletionParticipant11ProcessorImpl.exited_2", new Object[] {instanceIdentifier}) ;
+        }
+    }
+    
+    /**
+     * Failed.
+     * @param failed The failed notification.
+     * @param addressingContext The addressing context.
+     * @param jbossContext The jboss context.
+     * 
+     * @message com.arjuna.wst.messaging.CoordinatorCompletionParticipant11ProcessorImpl.failed_1 [com.arjuna.wst.messaging.CoordinatorCompletionParticipant11ProcessorImpl.failed_1] - Unexpected exception thrown from failed:
+     * @message com.arjuna.wst.messaging.CoordinatorCompletionParticipant11ProcessorImpl.failed_2 [com.arjuna.wst.messaging.CoordinatorCompletionParticipant11ProcessorImpl.failed_2] - Failed called on unknown participant: {0}
+     */
+    public void failed(final NotificationType failed, final AddressingContext addressingContext, final JBossContext jbossContext)
+    {
+        final InstanceIdentifier instanceIdentifier = jbossContext.getInstanceIdentifier() ;
+        final CoordinatorCompletionParticipantInboundEvents participant = getParticipant(instanceIdentifier) ;
+
+        if (participant != null)
+        {
+            try
+            {
+                participant.failed(failed, addressingContext, jbossContext) ;
+            }
+            catch (final Throwable th)
+            {
+                if (WSTLogger.arjLoggerI18N.isDebugEnabled())
+                {
+                    WSTLogger.arjLoggerI18N.debug("com.arjuna.wst.messaging.CoordinatorCompletionParticipant11ProcessorImpl.failed_1", th) ;
+                }
+            }
+        }
+        else if (WSTLogger.arjLoggerI18N.isDebugEnabled())
+        {
+            WSTLogger.arjLoggerI18N.debug("com.arjuna.wst.messaging.CoordinatorCompletionParticipant11ProcessorImpl.failed_2", new Object[] {instanceIdentifier}) ;
+        }
+    }
+    
+    /**
+     * NotCompleted.
+     * @param notCompleted The notCompleted notification.
+     * @param addressingContext The addressing context.
+     * @param jbossContext The jboss context.
+     * 
+     * @message com.arjuna.wst.messaging.CoordinatorCompletionParticipant11ProcessorImpl.notCompleted_1 [com.arjuna.wst.messaging.CoordinatorCompletionParticipant11ProcessorImpl.notCompleted_1] - Unexpected exception thrown from notCompleted:
+     * @message com.arjuna.wst.messaging.CoordinatorCompletionParticipant11ProcessorImpl.notCompleted_2 [com.arjuna.wst.messaging.CoordinatorCompletionParticipant11ProcessorImpl.notCompleted_2] - NotCompleted called on unknown participant: {0}
+     */
+    public void notCompleted(final NotificationType notCompleted, final AddressingContext addressingContext, final JBossContext jbossContext)
+    {
+        final InstanceIdentifier instanceIdentifier = jbossContext.getInstanceIdentifier() ;
+        final CoordinatorCompletionParticipantInboundEvents participant = getParticipant(instanceIdentifier) ;
+
+        if (participant != null)
+        {
+            try
+            {
+                participant.notCompleted(notCompleted, addressingContext, jbossContext) ;
+            }
+            catch (final Throwable th)
+            {
+                if (WSTLogger.arjLoggerI18N.isDebugEnabled())
+                {
+                    WSTLogger.arjLoggerI18N.debug("com.arjuna.wst.messaging.CoordinatorCompletionParticipant11ProcessorImpl.notCompleted_1", th) ;
+                }
+            }
+        }
+        else if (WSTLogger.arjLoggerI18N.isDebugEnabled())
+        {
+            WSTLogger.arjLoggerI18N.debug("com.arjuna.wst.messaging.CoordinatorCompletionParticipant11ProcessorImpl.notCompleted_2", new Object[] {instanceIdentifier}) ;
+        }
+    }
+    
+    /**
+     * Get Status.
+     * @param getStatus The get status notification.
+     * @param addressingContext The addressing context.
+     * @param jbossContext The jboss context.
+     * 
+     * @message com.arjuna.wst.messaging.CoordinatorCompletionParticipant11ProcessorImpl.getStatus_1 [com.arjuna.wst.messaging.CoordinatorCompletionParticipant11ProcessorImpl.getStatus_1] - Unexpected exception thrown from getStatus:
+     * @message com.arjuna.wst.messaging.CoordinatorCompletionParticipant11ProcessorImpl.getStatus_2 [com.arjuna.wst.messaging.CoordinatorCompletionParticipant11ProcessorImpl.getStatus_2] - GetStatus called on unknown participant: {0}
+     */
+    public void getStatus(final NotificationType getStatus, final AddressingContext addressingContext, final JBossContext jbossContext)
+    {
+        final InstanceIdentifier instanceIdentifier = jbossContext.getInstanceIdentifier() ;
+        final CoordinatorCompletionParticipantInboundEvents participant = getParticipant(instanceIdentifier) ;
+
+        if (participant != null)
+        {
+            try
+            {
+                participant.getStatus(getStatus, addressingContext, jbossContext) ;
+            }
+            catch (final Throwable th)
+            {
+                if (WSTLogger.arjLoggerI18N.isDebugEnabled())
+                {
+                    WSTLogger.arjLoggerI18N.debug("com.arjuna.wst.messaging.CoordinatorCompletionParticipant11ProcessorImpl.getStatus_1", th) ;
+                }
+            }
+        }
+        else if (WSTLogger.arjLoggerI18N.isDebugEnabled())
+        {
+            WSTLogger.arjLoggerI18N.debug("com.arjuna.wst.messaging.CoordinatorCompletionParticipant11ProcessorImpl.getStatus_2", new Object[] {instanceIdentifier}) ;
+        }
+    }
+    
+    /**
+     * Status.
+     * @param status The status.
+     * @param addressingContext The addressing context.
+     * @param jbossContext The jboss context.
+     * 
+     * @message com.arjuna.wst.messaging.CoordinatorCompletionParticipant11ProcessorImpl.status_1 [com.arjuna.wst.messaging.CoordinatorCompletionParticipant11ProcessorImpl.status_1] - Unexpected exception thrown from status:
+     * @message com.arjuna.wst.messaging.CoordinatorCompletionParticipant11ProcessorImpl.status_2 [com.arjuna.wst.messaging.CoordinatorCompletionParticipant11ProcessorImpl.status_2] - Status called on unknown participant: {0}
+     */
+    public void status(final StatusType status, final AddressingContext addressingContext, final JBossContext jbossContext)
+    {
+        final InstanceIdentifier instanceIdentifier = jbossContext.getInstanceIdentifier() ;
+        final CoordinatorCompletionParticipantInboundEvents participant = getParticipant(instanceIdentifier) ;
+
+        if (participant != null)
+        {
+            try
+            {
+                participant.status(status, addressingContext, jbossContext) ;
+            }
+            catch (final Throwable th)
+            {
+                if (WSTLogger.arjLoggerI18N.isDebugEnabled())
+                {
+                    WSTLogger.arjLoggerI18N.debug("com.arjuna.wst.messaging.CoordinatorCompletionParticipant11ProcessorImpl.status_1", th) ;
+                }
+            }
+        }
+        else if (WSTLogger.arjLoggerI18N.isDebugEnabled())
+        {
+            WSTLogger.arjLoggerI18N.debug("com.arjuna.wst.messaging.CoordinatorCompletionParticipant11ProcessorImpl.status_2", new Object[] {instanceIdentifier}) ;
+        }
+    }
+    
+    /**
+     * SOAP fault.
+     * @param soapFault The SOAP fault.
+     * @param addressingContext The addressing context.
+     * @param jbossContext The jboss context.
+     * 
+     * @message com.arjuna.wst.messaging.CoordinatorCompletionParticipant11ProcessorImpl.soapFault_1 [com.arjuna.wst.messaging.CoordinatorCompletionParticipant11ProcessorImpl.soapFault_1] - Unexpected exception thrown from soapFault:
+     * @message com.arjuna.wst.messaging.CoordinatorCompletionParticipant11ProcessorImpl.soapFault_2 [com.arjuna.wst.messaging.CoordinatorCompletionParticipant11ProcessorImpl.soapFault_2] - SOAP Fault called on unknown coordinator: {0}
+     */
+    public void soapFault(final SoapFault soapFault, final AddressingContext addressingContext, final JBossContext jbossContext)
+    {
+        final InstanceIdentifier instanceIdentifier = jbossContext.getInstanceIdentifier() ;
+        final CoordinatorCompletionParticipantInboundEvents coordinator = getParticipant(instanceIdentifier) ;
+
+        if (coordinator != null)
+        {
+            try
+            {
+                coordinator.soapFault(soapFault, addressingContext, jbossContext) ;
+            }
+            catch (final Throwable th)
+            {
+                if (WSTLogger.arjLoggerI18N.isDebugEnabled())
+                {
+                    WSTLogger.arjLoggerI18N.debug("com.arjuna.wst.messaging.CoordinatorCompletionParticipant11ProcessorImpl.soapFault_1", th) ;
+                }
+            }
+        }
+        else if (WSTLogger.arjLoggerI18N.isDebugEnabled())
+        {
+            WSTLogger.arjLoggerI18N.debug("com.arjuna.wst.messaging.CoordinatorCompletionParticipant11ProcessorImpl.soapFault_2", new Object[] {instanceIdentifier}) ;
+        }
+    }
+    
+    /**
+     * Send a cancelled message.
+     * 
+     * @param addressingContext The addressing context.
+     * @param jbossContext The jboss context.
+     * 
+     * @message com.arjuna.wst.messaging.CoordinatorCompletionCoordinator11ProcessorImpl.sendCancelled_1 [com.arjuna.wst.messaging.CoordinatorCompletionCoordinator11ProcessorImpl.sendCancelled_1] - Unexpected exception while sending Cancelled
+     */
+    private void sendCancelled(final AddressingContext addressingContext, final JBossContext jbossContext)
+    {
+        // KEV add check for recovery
+        final String messageId = MessageId.getMessageId() ;
+        final AddressingContext responseAddressingContext = AddressingContext.createRequestContext(addressingContext.getFrom(), messageId) ;
+        try
+        {
+            CoordinatorCompletionCoordinatorClient.getClient().sendCancelled(responseAddressingContext, jbossContext.getInstanceIdentifier()) ;
+        }
+        catch (final Throwable th)
+        {
+            if (WSTLogger.arjLoggerI18N.isDebugEnabled())
+            {
+                WSTLogger.arjLoggerI18N.debug("com.arjuna.wst.messaging.CoordinatorCompletionCoordinator11ProcessorImpl.sendCancelled_1", th) ;
+            }
+        }
+    }
+    
+    /**
+     * Send a closed message.
+     * 
+     * @param addressingContext The addressing context.
+     * @param jbossContext The jboss context.
+     * 
+     * @message com.arjuna.wst.messaging.CoordinatorCompletionCoordinator11ProcessorImpl.sendClosed_1 [com.arjuna.wst.messaging.CoordinatorCompletionCoordinator11ProcessorImpl.sendClosed_1] - Unexpected exception while sending Closed
+     */
+    private void sendClosed(final AddressingContext addressingContext, final JBossContext jbossContext)
+    {
+        // KEV add check for recovery
+        final String messageId = MessageId.getMessageId() ;
+        final AddressingContext responseAddressingContext = AddressingContext.createRequestContext(addressingContext.getFrom(), messageId) ;
+        try
+        {
+            CoordinatorCompletionCoordinatorClient.getClient().sendClosed(responseAddressingContext, jbossContext.getInstanceIdentifier()) ;
+        }
+        catch (final Throwable th)
+        {
+            if (WSTLogger.arjLoggerI18N.isDebugEnabled())
+            {
+                WSTLogger.arjLoggerI18N.debug("com.arjuna.wst.messaging.CoordinatorCompletionCoordinator11ProcessorImpl.sendClosed_1", th) ;
+            }
+        }
+    }
+    
+    /**
+     * Send a compensated message.
+     * 
+     * @param addressingContext The addressing context.
+     * @param jbossContext The jboss context.
+     * 
+     * @message com.arjuna.wst.messaging.CoordinatorCompletionCoordinator11ProcessorImpl.sendCompensated_1 [com.arjuna.wst.messaging.CoordinatorCompletionCoordinator11ProcessorImpl.sendCompensated_1] - Unexpected exception while sending Compensated
+     */
+    private void sendCompensated(final AddressingContext addressingContext, final JBossContext jbossContext)
+    {
+        // KEV add check for recovery
+        final String messageId = MessageId.getMessageId() ;
+        final AddressingContext responseAddressingContext = AddressingContext.createRequestContext(addressingContext.getFrom(), messageId) ;
+        try
+        {
+            CoordinatorCompletionCoordinatorClient.getClient().sendCompensated(responseAddressingContext, jbossContext.getInstanceIdentifier()) ;
+        }
+        catch (final Throwable th)
+        {
+            if (WSTLogger.arjLoggerI18N.isDebugEnabled())
+            {
+                WSTLogger.arjLoggerI18N.debug("com.arjuna.wst.messaging.CoordinatorCompletionCoordinator11ProcessorImpl.sendCompensated_1", th) ;
+            }
+        }
+    }
+    
+    /**
+     * Send a fail message.
+     * 
+     * @param addressingContext The addressing context.
+     * @param jbossContext The jboss context.
+     * @param exceptionIdentifier The exception identifier.
+     * 
+     * @message com.arjuna.wst.messaging.CoordinatorCompletionCoordinator11ProcessorImpl.sendFail_1 [com.arjuna.wst.messaging.CoordinatorCompletionCoordinator11ProcessorImpl.sendFail_1] - Unexpected exception while sending Fail
+     */
+    private void sendFail(final AddressingContext addressingContext, final JBossContext jbossContext, final QName exceptionIdentifier)
+    {
+        // KEV add check for recovery
+        final String messageId = MessageId.getMessageId() ;
+        final AddressingContext responseAddressingContext = AddressingContext.createRequestContext(addressingContext.getFrom(), messageId) ;
+        try
+        {
+            CoordinatorCompletionCoordinatorClient.getClient().sendFail(responseAddressingContext, jbossContext.getInstanceIdentifier(), exceptionIdentifier) ;
+        }
+        catch (final Throwable th)
+        {
+            if (WSTLogger.arjLoggerI18N.isDebugEnabled())
+            {
+                WSTLogger.arjLoggerI18N.debug("com.arjuna.wst.messaging.CoordinatorCompletionCoordinator11ProcessorImpl.sendFail_1", th) ;
+            }
+        }
+    }
+}


Property changes on: labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/wst/messaging/CoordinatorCompletionParticipant11ProcessorImpl.java
___________________________________________________________________
Name: svn:keywords
   + Rev Date
Name: svn:eol-style
   + native

Added: labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/wst/messaging/Participant11ProcessorImpl.java
===================================================================
--- labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/wst/messaging/Participant11ProcessorImpl.java	                        (rev 0)
+++ labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/wst/messaging/Participant11ProcessorImpl.java	2007-08-14 12:43:41 UTC (rev 14200)
@@ -0,0 +1,282 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag.  All rights reserved. 
+ * See the copyright.txt in the distribution for a full listing 
+ * of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU General Public License, v. 2.0.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A 
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+ * PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+ * You should have received a copy of the GNU General Public License,
+ * v. 2.0 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+ * MA  02110-1301, USA.
+ * 
+ * (C) 2005-2006,
+ * @author JBoss Inc.
+ */
+package com.arjuna.wst.messaging;
+
+import com.arjuna.webservices.SoapFault;
+import com.arjuna.webservices.base.processors.ActivatedObjectProcessor;
+import com.arjuna.webservices.logging.WSTLogger;
+import com.arjuna.webservices.wsaddr2005.AddressingContext;
+import com.arjuna.webservices.wsjboss.JBossContext;
+import com.arjuna.webservices.wsjboss.InstanceIdentifier;
+import com.arjuna.webservices.wsat11.NotificationType;
+import com.arjuna.webservices.wsat11.ParticipantInboundEvents;
+import com.arjuna.webservices.wsat11.client.CoordinatorClient;
+import com.arjuna.webservices.wsat11.processors.ParticipantProcessor;
+import com.arjuna.wsc.messaging.MessageId;
+
+/**
+ * The Participant processor.
+ * @author kevin
+ */
+public class Participant11ProcessorImpl extends ParticipantProcessor
+{
+    /**
+     * The activated object processor.
+     */
+    private final ActivatedObjectProcessor activatedObjectProcessor = new ActivatedObjectProcessor() ;
+
+    /**
+     * Activate the participant.
+     * @param participant The participant.
+     * @param identifier The identifier.
+     */
+    public void activateParticipant(final ParticipantInboundEvents participant, final String identifier)
+    {
+        activatedObjectProcessor.activateObject(participant, identifier) ;
+    }
+
+    /**
+     * Deactivate the participant.
+     * @param participant The participant.
+     */
+    public void deactivateParticipant(final ParticipantInboundEvents participant)
+    {
+        activatedObjectProcessor.deactivateObject(participant) ;
+    }
+    
+    /**
+     * Get the participant with the specified identifier.
+     * @param instanceIdentifier The participant identifier.
+     * @return The participant or null if not known.
+     */
+    private ParticipantInboundEvents getParticipant(final InstanceIdentifier instanceIdentifier)
+    {
+        final String identifier = (instanceIdentifier != null ? instanceIdentifier.getInstanceIdentifier() : null) ;
+        return (ParticipantInboundEvents)activatedObjectProcessor.getObject(identifier) ;
+    }
+
+    /**
+     * Commit.
+     * @param commit The commit notification.
+     * @param addressingContext The addressing context.
+     * @param jbossContext The jboss context.
+     * 
+     * @message com.arjuna.wst.messaging.Participant11ProcessorImpl.commit_1 [com.arjuna.wst.messaging.Participant11ProcessorImpl.commit_1] - Unexpected exception thrown from commit:
+     * @message com.arjuna.wst.messaging.Participant11ProcessorImpl.commit_2 [com.arjuna.wst.messaging.Participant11ProcessorImpl.commit_2] - Commit called on unknown participant: {0}
+     */
+    public void commit(final NotificationType commit, final AddressingContext addressingContext,
+        final JBossContext jbossContext)
+    {
+        final InstanceIdentifier instanceIdentifier = jbossContext.getInstanceIdentifier() ;
+        final ParticipantInboundEvents participant = getParticipant(instanceIdentifier) ;
+        
+        if (participant != null)
+        {
+            try
+            {
+                participant.commit(commit, addressingContext, jbossContext) ;
+            }
+            catch (final Throwable th)
+            {
+                if (WSTLogger.arjLoggerI18N.isWarnEnabled())
+                {
+                    WSTLogger.arjLoggerI18N.warn("com.arjuna.wst.messaging.Participant11ProcessorImpl.commit_1", th) ; 
+                }
+            }
+        }
+        else
+        {
+            if (WSTLogger.arjLoggerI18N.isWarnEnabled())
+            {
+                WSTLogger.arjLoggerI18N.warn("com.arjuna.wst.messaging.Participant11ProcessorImpl.commit_2", new Object[] {instanceIdentifier}) ; 
+            }
+            sendCommitted(addressingContext, jbossContext) ;
+        }
+    }
+    
+    /**
+     * Prepare.
+     * @param prepare The prepare notification.
+     * @param addressingContext The addressing context.
+     * @param jbossContext The jboss context.
+     * 
+     * @message com.arjuna.wst.messaging.Participant11ProcessorImpl.prepare_1 [com.arjuna.wst.messaging.Participant11ProcessorImpl.prepare_1] - Unexpected exception thrown from prepare: 
+     * @message com.arjuna.wst.messaging.Participant11ProcessorImpl.prepare_2 [com.arjuna.wst.messaging.Participant11ProcessorImpl.prepare_2] - Prepare called on unknown participant: {0}
+     */
+    public void prepare(final NotificationType prepare, final AddressingContext addressingContext,
+        final JBossContext jbossContext)
+    {
+        final InstanceIdentifier instanceIdentifier = jbossContext.getInstanceIdentifier() ;
+        final ParticipantInboundEvents participant = getParticipant(instanceIdentifier) ;
+
+        if (participant != null)
+        {
+            try
+            {
+                participant.prepare(prepare, addressingContext, jbossContext) ;
+            }
+            catch (final Throwable th)
+            {
+                if (WSTLogger.arjLoggerI18N.isWarnEnabled())
+                {
+                    WSTLogger.arjLoggerI18N.warn("com.arjuna.wst.messaging.Participant11ProcessorImpl.prepare_1", th) ; 
+                }
+            }
+        }
+        else
+        {
+            if (WSTLogger.arjLoggerI18N.isWarnEnabled())
+            {
+                WSTLogger.arjLoggerI18N.warn("com.arjuna.wst.messaging.Participant11ProcessorImpl.prepare_2", new Object[] {instanceIdentifier}) ;
+            }
+            sendAborted(addressingContext, jbossContext) ;
+        }
+    }
+    
+    /**
+     * Rollback.
+     * @param rollback The rollback notification.
+     * @param addressingContext The addressing context.
+     * @param jbossContext The jboss context.
+     * 
+     * @message com.arjuna.wst.messaging.Participant11ProcessorImpl.rollback_1 [com.arjuna.wst.messaging.Participant11ProcessorImpl.rollback_1] - Unexpected exception thrown from rollback: 
+     * @message com.arjuna.wst.messaging.Participant11ProcessorImpl.rollback_2 [com.arjuna.wst.messaging.Participant11ProcessorImpl.rollback_2] - Rollback called on unknown participant: {0}
+     */
+    public void rollback(final NotificationType rollback, final AddressingContext addressingContext,
+        final JBossContext jbossContext)
+    {
+        final InstanceIdentifier instanceIdentifier = jbossContext.getInstanceIdentifier() ;
+        final ParticipantInboundEvents participant = getParticipant(instanceIdentifier) ;
+
+        if (participant != null)
+        {
+            try
+            {
+                participant.rollback(rollback, addressingContext, jbossContext) ;
+            }
+            catch (final Throwable th)
+            {
+                if (WSTLogger.arjLoggerI18N.isWarnEnabled())
+                {
+                    WSTLogger.arjLoggerI18N.warn("com.arjuna.wst.messaging.Participant11ProcessorImpl.rollback_1", th) ;
+                }
+            }
+        }
+        else
+        {
+            if (WSTLogger.arjLoggerI18N.isWarnEnabled())
+            {
+                WSTLogger.arjLoggerI18N.warn("com.arjuna.wst.messaging.Participant11ProcessorImpl.rollback_2", new Object[] {instanceIdentifier}) ;
+            }
+            sendAborted(addressingContext, jbossContext) ;
+        }
+    }
+
+    /**
+     * SOAP Fault.
+     * @param soapFault The SOAP fault notification.
+     * @param addressingContext The addressing context.
+     * @param jbossContext The jboss context.
+     * 
+     * @message com.arjuna.wst.messaging.Participant11ProcessorImpl.soapFault_1 [com.arjuna.wst.messaging.Participant11ProcessorImpl.soapFault_1] - Unexpected exception thrown from soapFault: 
+     * @message com.arjuna.wst.messaging.Participant11ProcessorImpl.soapFault_2 [com.arjuna.wst.messaging.Participant11ProcessorImpl.soapFault_2] - SoapFault called on unknown participant: {0}
+     */
+    public void soapFault(final SoapFault fault, final AddressingContext addressingContext,
+        final JBossContext jbossContext)
+    {
+        final InstanceIdentifier instanceIdentifier = jbossContext.getInstanceIdentifier() ;
+        final ParticipantInboundEvents participant = getParticipant(instanceIdentifier) ;
+
+        if (participant != null)
+        {
+            try
+            {
+                participant.soapFault(fault, addressingContext, jbossContext) ;
+            }
+            catch (final Throwable th)
+            {
+                if (WSTLogger.arjLoggerI18N.isWarnEnabled())
+                {
+                    WSTLogger.arjLoggerI18N.warn("com.arjuna.wst.messaging.Participant11ProcessorImpl.soapFault_1", th) ;
+                }
+            }
+        }
+        else
+        {
+            if (WSTLogger.arjLoggerI18N.isWarnEnabled())
+            {
+                WSTLogger.arjLoggerI18N.warn("com.arjuna.wst.messaging.Participant11ProcessorImpl.soapFault_2", new Object[] {instanceIdentifier}) ;
+            }
+        }
+    }
+    
+    /**
+     * Send a committed message.
+     * 
+     * @param addressingContext The addressing context.
+     * @param jbossContext The jboss context.
+     * 
+     * @message com.arjuna.wst.messaging.Participant11ProcessorImpl.sendCommitted_1 [com.arjuna.wst.messaging.Participant11ProcessorImpl.sendCommitted_1] - Unexpected exception while sending Committed
+     */
+    private void sendCommitted(final AddressingContext addressingContext, final JBossContext jbossContext)
+    {
+        // KEV add check for recovery
+        final String messageId = MessageId.getMessageId() ;
+        final AddressingContext responseAddressingContext = AddressingContext.createRequestContext(addressingContext.getFrom(), messageId) ;
+        try
+        {
+            CoordinatorClient.getClient().sendCommitted(responseAddressingContext) ;
+        }
+        catch (final Throwable th)
+        {
+            if (WSTLogger.arjLoggerI18N.isDebugEnabled())
+            {
+                WSTLogger.arjLoggerI18N.debug("com.arjuna.wst.messaging.Participant11ProcessorImpl.sendCommitted_1", th) ;
+            }
+        }
+    }
+    
+    /**
+     * Send an aborted message.
+     * 
+     * @param addressingContext The addressing context.
+     * @param jbossContext The jboss context.
+     * 
+     * @message com.arjuna.wst.messaging.Participant11ProcessorImpl.sendAborted_1 [com.arjuna.wst.messaging.Participant11ProcessorImpl.sendAborted_1] - Unexpected exception while sending Aborted
+     */
+    private void sendAborted(final AddressingContext addressingContext, final JBossContext jbossContext)
+    {
+        // KEV add check for recovery
+        final String messageId = MessageId.getMessageId() ;
+        final AddressingContext responseAddressingContext = AddressingContext.createRequestContext(addressingContext.getFrom(), messageId) ;
+        try
+        {
+            CoordinatorClient.getClient().sendAborted(responseAddressingContext) ;
+        }
+        catch (final Throwable th)
+        {
+            if (WSTLogger.arjLoggerI18N.isDebugEnabled())
+            {
+                WSTLogger.arjLoggerI18N.debug("com.arjuna.wst.messaging.Participant11ProcessorImpl.sendAborted_1", th) ;
+            }
+        }
+    }
+}


Property changes on: labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/wst/messaging/Participant11ProcessorImpl.java
___________________________________________________________________
Name: svn:keywords
   + Rev Date
Name: svn:eol-style
   + native

Added: labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/wst/messaging/ParticipantCompletionCoordinator11ProcessorImpl.java
===================================================================
--- labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/wst/messaging/ParticipantCompletionCoordinator11ProcessorImpl.java	                        (rev 0)
+++ labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/wst/messaging/ParticipantCompletionCoordinator11ProcessorImpl.java	2007-08-14 12:43:41 UTC (rev 14200)
@@ -0,0 +1,511 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag.  All rights reserved. 
+ * See the copyright.txt in the distribution for a full listing 
+ * of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU General Public License, v. 2.0.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A 
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+ * PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+ * You should have received a copy of the GNU General Public License,
+ * v. 2.0 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+ * MA  02110-1301, USA.
+ * 
+ * (C) 2005-2006,
+ * @author JBoss Inc.
+ */
+package com.arjuna.wst.messaging;
+
+import com.arjuna.webservices.SoapFault;
+import com.arjuna.webservices.base.processors.ActivatedObjectProcessor;
+import com.arjuna.webservices.logging.WSTLogger;
+import com.arjuna.webservices.wsaddr2005.AddressingContext;
+import com.arjuna.webservices.wsba11.ExceptionType;
+import com.arjuna.webservices.wsba11.NotificationType;
+import com.arjuna.webservices.wsba11.ParticipantCompletionCoordinatorInboundEvents;
+import com.arjuna.webservices.wsba11.StatusType;
+import com.arjuna.webservices.wsba11.client.ParticipantCompletionParticipantClient;
+import com.arjuna.webservices.wsba11.processors.ParticipantCompletionCoordinatorProcessor;
+import com.arjuna.webservices.wsjboss.InstanceIdentifier;
+import com.arjuna.webservices.wsjboss.JBossContext;
+import com.arjuna.wsc.messaging.MessageId;
+
+
+/**
+ * The Participant Completion Coordinator processor.
+ * @author kevin
+ */
+public class ParticipantCompletionCoordinator11ProcessorImpl extends ParticipantCompletionCoordinatorProcessor
+{
+    /**
+     * The activated object processor.
+     */
+    private final ActivatedObjectProcessor activatedObjectProcessor = new ActivatedObjectProcessor() ;
+    
+    /**
+     * Activate the coordinator.
+     * @param coordinator The coordinator.
+     * @param identifier The identifier.
+     */
+    public void activateCoordinator(final ParticipantCompletionCoordinatorInboundEvents coordinator, final String identifier)
+    {
+        activatedObjectProcessor.activateObject(coordinator, identifier) ;
+    }
+
+    /**
+     * Deactivate the coordinator.
+     * @param coordinator The coordinator.
+     */
+    public void deactivateCoordinator(final ParticipantCompletionCoordinatorInboundEvents coordinator)
+    {
+        activatedObjectProcessor.deactivateObject(coordinator) ;
+    }
+    
+    /**
+     * Get the coordinator with the specified identifier.
+     * @param instanceIdentifier The coordinator identifier.
+     * @return The coordinator or null if not known.
+     */
+    private ParticipantCompletionCoordinatorInboundEvents getCoordinator(final InstanceIdentifier instanceIdentifier)
+    {
+        final String identifier = (instanceIdentifier != null ? instanceIdentifier.getInstanceIdentifier() : null) ;
+        return (ParticipantCompletionCoordinatorInboundEvents)activatedObjectProcessor.getObject(identifier) ;
+    }
+    
+    /**
+     * Cancelled.
+     * @param cancelled The cancelled notification.
+     * @param addressingContext The addressing context.
+     * @param jbossContext The arjuna context.
+     * 
+     * @message com.arjuna.wst.messaging.ParticipantCompletionCoordinator11ProcessorImpl.cancelled_1 [com.arjuna.wst.messaging.ParticipantCompletionCoordinator11ProcessorImpl.cancelled_1] - Unexpected exception thrown from cancelled:
+     * @message com.arjuna.wst.messaging.ParticipantCompletionCoordinator11ProcessorImpl.cancelled_2 [com.arjuna.wst.messaging.ParticipantCompletionCoordinator11ProcessorImpl.cancelled_2] - Cancelled called on unknown coordinator: {0}
+     */
+    public void cancelled(final NotificationType cancelled, final AddressingContext addressingContext, final JBossContext jbossContext)
+    {
+        final InstanceIdentifier instanceIdentifier = jbossContext.getInstanceIdentifier() ;
+        final ParticipantCompletionCoordinatorInboundEvents coordinator = getCoordinator(instanceIdentifier) ;
+
+        if (coordinator != null)
+        {
+            try
+            {
+                coordinator.cancelled(cancelled, addressingContext, jbossContext) ;
+            }
+            catch (final Throwable th)
+            {
+                if (WSTLogger.arjLoggerI18N.isDebugEnabled())
+                {
+                    WSTLogger.arjLoggerI18N.debug("com.arjuna.wst.messaging.ParticipantCompletionCoordinator11ProcessorImpl.cancelled_1", th) ;
+                }
+            }
+        }
+        else if (WSTLogger.arjLoggerI18N.isDebugEnabled())
+        {
+            WSTLogger.arjLoggerI18N.debug("com.arjuna.wst.messaging.ParticipantCompletionCoordinator11ProcessorImpl.cancelled_2", new Object[] {instanceIdentifier}) ;
+        }
+    }
+    
+    /**
+     * Closed.
+     * @param closed The closed notification.
+     * @param addressingContext The addressing context.
+     * @param jbossContext The arjuna context.
+     * 
+     * @message com.arjuna.wst.messaging.ParticipantCompletionCoordinator11ProcessorImpl.closed_1 [com.arjuna.wst.messaging.ParticipantCompletionCoordinator11ProcessorImpl.closed_1] - Unexpected exception thrown from closed:
+     * @message com.arjuna.wst.messaging.ParticipantCompletionCoordinator11ProcessorImpl.closed_2 [com.arjuna.wst.messaging.ParticipantCompletionCoordinator11ProcessorImpl.closed_2] - Closed called on unknown coordinator: {0}
+     */
+    public void closed(final NotificationType closed, final AddressingContext addressingContext, final JBossContext jbossContext)
+    {
+        final InstanceIdentifier instanceIdentifier = jbossContext.getInstanceIdentifier() ;
+        final ParticipantCompletionCoordinatorInboundEvents coordinator = getCoordinator(instanceIdentifier) ;
+
+        if (coordinator != null)
+        {
+            try
+            {
+                coordinator.closed(closed, addressingContext, jbossContext) ;
+            }
+            catch (final Throwable th)
+            {
+                if (WSTLogger.arjLoggerI18N.isDebugEnabled())
+                {
+                    WSTLogger.arjLoggerI18N.debug("com.arjuna.wst.messaging.ParticipantCompletionCoordinator11ProcessorImpl.closed_1", th) ;
+                }
+            }
+        }
+        else if (WSTLogger.arjLoggerI18N.isDebugEnabled())
+        {
+            WSTLogger.arjLoggerI18N.debug("com.arjuna.wst.messaging.ParticipantCompletionCoordinator11ProcessorImpl.closed_2", new Object[] {instanceIdentifier}) ;
+        }
+    }
+    
+    /**
+     * Compensated.
+     * @param compensated The compensated notification.
+     * @param addressingContext The addressing context.
+     * @param jbossContext The arjuna context.
+     * 
+     * @message com.arjuna.wst.messaging.ParticipantCompletionCoordinator11ProcessorImpl.compensated_1 [com.arjuna.wst.messaging.ParticipantCompletionCoordinator11ProcessorImpl.compensated_1] - Unexpected exception thrown from compensated:
+     * @message com.arjuna.wst.messaging.ParticipantCompletionCoordinator11ProcessorImpl.compensated_2 [com.arjuna.wst.messaging.ParticipantCompletionCoordinator11ProcessorImpl.compensated_2] - Compensated called on unknown coordinator: {0}
+     */
+    public void compensated(final NotificationType compensated, final AddressingContext addressingContext, final JBossContext jbossContext)
+    {
+        final InstanceIdentifier instanceIdentifier = jbossContext.getInstanceIdentifier() ;
+        final ParticipantCompletionCoordinatorInboundEvents coordinator = getCoordinator(instanceIdentifier) ;
+
+        if (coordinator != null)
+        {
+            try
+            {
+                coordinator.compensated(compensated, addressingContext, jbossContext) ;
+            }
+            catch (final Throwable th)
+            {
+                if (WSTLogger.arjLoggerI18N.isDebugEnabled())
+                {
+                    WSTLogger.arjLoggerI18N.debug("com.arjuna.wst.messaging.ParticipantCompletionCoordinator11ProcessorImpl.compensated_1", th) ;
+                }
+            }
+        }
+        else if (WSTLogger.arjLoggerI18N.isDebugEnabled())
+        {
+            WSTLogger.arjLoggerI18N.debug("com.arjuna.wst.messaging.ParticipantCompletionCoordinator11ProcessorImpl.compensated_2", new Object[] {instanceIdentifier}) ;
+        }
+    }
+    
+    /**
+     * Completed.
+     * @param completed The completed notification.
+     * @param addressingContext The addressing context.
+     * @param jbossContext The arjuna context.
+     * 
+     * @message com.arjuna.wst.messaging.ParticipantCompletionCoordinator11ProcessorImpl.completed_1 [com.arjuna.wst.messaging.ParticipantCompletionCoordinator11ProcessorImpl.completed_1] - Unexpected exception thrown from completed:
+     * @message com.arjuna.wst.messaging.ParticipantCompletionCoordinator11ProcessorImpl.completed_2 [com.arjuna.wst.messaging.ParticipantCompletionCoordinator11ProcessorImpl.completed_2] - Completed called on unknown coordinator: {0}
+     */
+    public void completed(final NotificationType completed, final AddressingContext addressingContext,
+        final JBossContext jbossContext)
+    {
+        final InstanceIdentifier instanceIdentifier = jbossContext.getInstanceIdentifier() ;
+        final ParticipantCompletionCoordinatorInboundEvents coordinator = getCoordinator(instanceIdentifier) ;
+
+        if (coordinator != null)
+        {
+            try
+            {
+                coordinator.completed(completed, addressingContext, jbossContext) ;
+            }
+            catch (final Throwable th)
+            {
+                if (WSTLogger.arjLoggerI18N.isDebugEnabled())
+                {
+                    WSTLogger.arjLoggerI18N.debug("com.arjuna.wst.messaging.ParticipantCompletionCoordinator11ProcessorImpl.completed_1", th) ;
+                }
+            }
+        }
+        else if (WSTLogger.arjLoggerI18N.isDebugEnabled())
+        {
+            WSTLogger.arjLoggerI18N.debug("com.arjuna.wst.messaging.ParticipantCompletionCoordinator11ProcessorImpl.completed_2", new Object[] {instanceIdentifier}) ;
+        }
+    }
+    
+    /**
+     * Exit.
+     * @param exit The exit notification.
+     * @param addressingContext The addressing context.
+     * @param jbossContext The arjuna context.
+     * 
+     * @message com.arjuna.wst.messaging.ParticipantCompletionCoordinator11ProcessorImpl.exit_1 [com.arjuna.wst.messaging.ParticipantCompletionCoordinator11ProcessorImpl.exit_1] - Unexpected exception thrown from exit:
+     * @message com.arjuna.wst.messaging.ParticipantCompletionCoordinator11ProcessorImpl.exit_2 [com.arjuna.wst.messaging.ParticipantCompletionCoordinator11ProcessorImpl.exit_2] - Exit called on unknown coordinator: {0}
+     */
+    public void exit(final NotificationType exit, final AddressingContext addressingContext, final JBossContext jbossContext)
+    {
+        final InstanceIdentifier instanceIdentifier = jbossContext.getInstanceIdentifier() ;
+        final ParticipantCompletionCoordinatorInboundEvents coordinator = getCoordinator(instanceIdentifier) ;
+
+        if (coordinator != null)
+        {
+            try
+            {
+                coordinator.exit(exit, addressingContext, jbossContext) ;
+            }
+            catch (final Throwable th)
+            {
+                if (WSTLogger.arjLoggerI18N.isDebugEnabled())
+                {
+                    WSTLogger.arjLoggerI18N.debug("com.arjuna.wst.messaging.ParticipantCompletionCoordinator11ProcessorImpl.exit_1", th) ;
+                }
+            }
+        }
+        else
+        {
+            if (WSTLogger.arjLoggerI18N.isDebugEnabled())
+            {
+                WSTLogger.arjLoggerI18N.debug("com.arjuna.wst.messaging.ParticipantCompletionCoordinator11ProcessorImpl.exit_2", new Object[] {instanceIdentifier}) ;
+            }
+            sendExited(addressingContext, jbossContext) ;
+        }
+    }
+    
+    /**
+     * Fail.
+     * @param fail The fail notification.
+     * @param addressingContext The addressing context.
+     * @param jbossContext The arjuna context.
+     * 
+     * @message com.arjuna.wst.messaging.ParticipantCompletionCoordinator11ProcessorImpl.fail_1 [com.arjuna.wst.messaging.ParticipantCompletionCoordinator11ProcessorImpl.fail_1] - Unexpected exception thrown from fail:
+     * @message com.arjuna.wst.messaging.ParticipantCompletionCoordinator11ProcessorImpl.fail_2 [com.arjuna.wst.messaging.ParticipantCompletionCoordinator11ProcessorImpl.fail_2] - Fail called on unknown coordinator: {0}
+     */
+    public void fail(final ExceptionType fail, final AddressingContext addressingContext,
+        final JBossContext jbossContext)
+    {
+        final InstanceIdentifier instanceIdentifier = jbossContext.getInstanceIdentifier() ;
+        final ParticipantCompletionCoordinatorInboundEvents coordinator = getCoordinator(instanceIdentifier) ;
+
+        if (coordinator != null)
+        {
+            try
+            {
+                coordinator.fail(fail, addressingContext, jbossContext) ;
+            }
+            catch (final Throwable th)
+            {
+                if (WSTLogger.arjLoggerI18N.isDebugEnabled())
+                {
+                    WSTLogger.arjLoggerI18N.debug("com.arjuna.wst.messaging.ParticipantCompletionCoordinator11ProcessorImpl.fail_1", th) ;
+                }
+            }
+        }
+        else
+        {
+            if (WSTLogger.arjLoggerI18N.isDebugEnabled())
+            {
+                WSTLogger.arjLoggerI18N.debug("com.arjuna.wst.messaging.ParticipantCompletionCoordinator11ProcessorImpl.fail_2", new Object[] {instanceIdentifier}) ;
+            }
+            sendFailed(addressingContext, jbossContext) ;
+        }
+    }
+    
+    /**
+     * CannotComplete.
+     * @param cannotComplete The cannotComplete exception.
+     * @param addressingContext The addressing context.
+     * @param jbossContext The jboss context.
+     * 
+     * @message com.arjuna.wst.messaging.ParticipantCompletionCoordinator11ProcessorImpl.cannotComplete_1 [com.arjuna.wst.messaging.ParticipantCompletionCoordinator11ProcessorImpl.cannotComplete_1] - Unexpected exception thrown from cannotComplete:
+     * @message com.arjuna.wst.messaging.ParticipantCompletionCoordinator11ProcessorImpl.cannotComplete_2 [com.arjuna.wst.messaging.ParticipantCompletionCoordinator11ProcessorImpl.cannotComplete_2] - CannotComplete called on unknown coordinator: {0}
+     */
+    public void cannotComplete(final NotificationType cannotComplete, final AddressingContext addressingContext,
+        final JBossContext jbossContext)
+    {
+        final InstanceIdentifier instanceIdentifier = jbossContext.getInstanceIdentifier() ;
+        final ParticipantCompletionCoordinatorInboundEvents coordinator = getCoordinator(instanceIdentifier) ;
+
+        if (coordinator != null)
+        {
+            try
+            {
+                coordinator.cannotComplete(cannotComplete, addressingContext, jbossContext) ;
+            }
+            catch (final Throwable th)
+            {
+                if (WSTLogger.arjLoggerI18N.isDebugEnabled())
+                {
+                    WSTLogger.arjLoggerI18N.debug("com.arjuna.wst.messaging.ParticipantCompletionCoordinator11ProcessorImpl.cannotComplete_1", th) ;
+                }
+            }
+        }
+        else
+        {
+            if (WSTLogger.arjLoggerI18N.isDebugEnabled())
+            {
+                WSTLogger.arjLoggerI18N.debug("com.arjuna.wst.messaging.ParticipantCompletionCoordinator11ProcessorImpl.cannotComplete_2", new Object[] {instanceIdentifier}) ;
+            }
+            sendNotCompleted(addressingContext, jbossContext) ;
+        }
+    }
+    
+    /**
+     * Get Status.
+     * @param getStatus The get status notification.
+     * @param addressingContext The addressing context.
+     * @param jbossContext The arjuna context.
+     * 
+     * @message com.arjuna.wst.messaging.ParticipantCompletionCoordinator11ProcessorImpl.getStatus_1 [com.arjuna.wst.messaging.ParticipantCompletionCoordinator11ProcessorImpl.getStatus_1] - Unexpected exception thrown from getStatus:
+     * @message com.arjuna.wst.messaging.ParticipantCompletionCoordinator11ProcessorImpl.getStatus_2 [com.arjuna.wst.messaging.ParticipantCompletionCoordinator11ProcessorImpl.getStatus_2] - GetStatus called on unknown coordinator: {0}
+     */
+    public void getStatus(final NotificationType getStatus, final AddressingContext addressingContext, final JBossContext jbossContext)
+    {
+        final InstanceIdentifier instanceIdentifier = jbossContext.getInstanceIdentifier() ;
+        final ParticipantCompletionCoordinatorInboundEvents coordinator = getCoordinator(instanceIdentifier) ;
+
+        if (coordinator != null)
+        {
+            try
+            {
+                coordinator.getStatus(getStatus, addressingContext, jbossContext) ;
+            }
+            catch (final Throwable th)
+            {
+                if (WSTLogger.arjLoggerI18N.isDebugEnabled())
+                {
+                    WSTLogger.arjLoggerI18N.debug("com.arjuna.wst.messaging.ParticipantCompletionCoordinator11ProcessorImpl.getStatus_1", th) ;
+                }
+            }
+        }
+        else if (WSTLogger.arjLoggerI18N.isDebugEnabled())
+        {
+            WSTLogger.arjLoggerI18N.debug("com.arjuna.wst.messaging.ParticipantCompletionCoordinator11ProcessorImpl.getStatus_2", new Object[] {instanceIdentifier}) ;
+        }
+    }
+    
+    /**
+     * Status.
+     * @param status The status.
+     * @param addressingContext The addressing context.
+     * @param jbossContext The arjuna context.
+     * 
+     * @message com.arjuna.wst.messaging.ParticipantCompletionCoordinator11ProcessorImpl.status_1 [com.arjuna.wst.messaging.ParticipantCompletionCoordinator11ProcessorImpl.status_1] - Unexpected exception thrown from status:
+     * @message com.arjuna.wst.messaging.ParticipantCompletionCoordinator11ProcessorImpl.status_2 [com.arjuna.wst.messaging.ParticipantCompletionCoordinator11ProcessorImpl.status_2] - Status called on unknown coordinator: {0}
+     */
+    public void status(final StatusType status, final AddressingContext addressingContext, final JBossContext jbossContext)
+    {
+        final InstanceIdentifier instanceIdentifier = jbossContext.getInstanceIdentifier() ;
+        final ParticipantCompletionCoordinatorInboundEvents coordinator = getCoordinator(instanceIdentifier) ;
+
+        if (coordinator != null)
+        {
+            try
+            {
+                coordinator.status(status, addressingContext, jbossContext) ;
+            }
+            catch (final Throwable th)
+            {
+                if (WSTLogger.arjLoggerI18N.isDebugEnabled())
+                {
+                    WSTLogger.arjLoggerI18N.debug("com.arjuna.wst.messaging.ParticipantCompletionCoordinator11ProcessorImpl.status_1", th) ;
+                }
+            }
+        }
+        else if (WSTLogger.arjLoggerI18N.isDebugEnabled())
+        {
+            WSTLogger.arjLoggerI18N.debug("com.arjuna.wst.messaging.ParticipantCompletionCoordinator11ProcessorImpl.status_2", new Object[] {instanceIdentifier}) ;
+        }
+    }
+    
+    /**
+     * SOAP fault.
+     * @param soapFault The SOAP fault.
+     * @param addressingContext The addressing context.
+     * @param jbossContext The jboss context.
+     * 
+     * @message com.arjuna.wst.messaging.ParticipantCompletionCoordinator11ProcessorImpl.soapFault_1 [com.arjuna.wst.messaging.ParticipantCompletionCoordinator11ProcessorImpl.soapFault_1] - Unexpected exception thrown from soapFault:
+     * @message com.arjuna.wst.messaging.ParticipantCompletionCoordinator11ProcessorImpl.soapFault_2 [com.arjuna.wst.messaging.ParticipantCompletionCoordinator11ProcessorImpl.soapFault_2] - SOAP Fault called on unknown coordinator: {0}
+     */
+    public void soapFault(final SoapFault soapFault, final AddressingContext addressingContext, final JBossContext jbossContext)
+    {
+        final InstanceIdentifier instanceIdentifier = jbossContext.getInstanceIdentifier() ;
+        final ParticipantCompletionCoordinatorInboundEvents coordinator = getCoordinator(instanceIdentifier) ;
+
+        if (coordinator != null)
+        {
+            try
+            {
+                coordinator.soapFault(soapFault, addressingContext, jbossContext) ;
+            }
+            catch (final Throwable th)
+            {
+                if (WSTLogger.arjLoggerI18N.isDebugEnabled())
+                {
+                    WSTLogger.arjLoggerI18N.debug("com.arjuna.wst.messaging.ParticipantCompletionCoordinator11ProcessorImpl.soapFault_1", th) ;
+                }
+            }
+        }
+        else if (WSTLogger.arjLoggerI18N.isDebugEnabled())
+        {
+            WSTLogger.arjLoggerI18N.debug("com.arjuna.wst.messaging.ParticipantCompletionCoordinator11ProcessorImpl.soapFault_2", new Object[] {instanceIdentifier}) ;
+        }
+    }
+    
+    /**
+     * Send an exited message.
+     * 
+     * @param addressingContext The addressing context.
+     * @param jbossContext The jboss context.
+     * 
+     * @message com.arjuna.wst.messaging.ParticipantCompletionCoordinator11ProcessorImpl.sendExited_1 [com.arjuna.wst.messaging.ParticipantCompletionCoordinator11ProcessorImpl.sendExited_1] - Unexpected exception while sending Exited
+     */
+    private void sendExited(final AddressingContext addressingContext, final JBossContext jbossContext)
+    {
+        // KEV add check for recovery
+        final String messageId = MessageId.getMessageId() ;
+        final AddressingContext responseAddressingContext = AddressingContext.createRequestContext(addressingContext.getFrom(), messageId) ;
+        try
+        {
+            ParticipantCompletionParticipantClient.getClient().sendExited(responseAddressingContext, jbossContext.getInstanceIdentifier()) ;
+        }
+        catch (final Throwable th)
+        {
+            if (WSTLogger.arjLoggerI18N.isDebugEnabled())
+            {
+                WSTLogger.arjLoggerI18N.debug("com.arjuna.wst.messaging.ParticipantCompletionCoordinator11ProcessorImpl.sendExited_1", th) ;
+            }
+        }
+    }
+    
+    /**
+     * Send a failed message.
+     * 
+     * @param addressingContext The addressing context.
+     * @param jbossContext The jboss context.
+     * 
+     * @message com.arjuna.wst.messaging.ParticipantCompletionCoordinator11ProcessorImpl.sendFailed_1 [com.arjuna.wst.messaging.ParticipantCompletionCoordinator11ProcessorImpl.sendFailed_1] - Unexpected exception while sending Failed
+     */
+    private void sendFailed(final AddressingContext addressingContext, final JBossContext jbossContext)
+    {
+        // KEV add check for recovery
+        final String messageId = MessageId.getMessageId() ;
+        final AddressingContext responseAddressingContext = AddressingContext.createRequestContext(addressingContext.getFrom(), messageId) ;
+        try
+        {
+            ParticipantCompletionParticipantClient.getClient().sendFailed(responseAddressingContext, jbossContext.getInstanceIdentifier()) ;
+        }
+        catch (final Throwable th)
+        {
+            if (WSTLogger.arjLoggerI18N.isDebugEnabled())
+            {
+                WSTLogger.arjLoggerI18N.debug("com.arjuna.wst.messaging.ParticipantCompletionCoordinator11ProcessorImpl.sendFailed_1", th) ;
+            }
+        }
+    }
+    
+    /**
+     * Send a not completed message.
+     * 
+     * @param addressingContext The addressing context.
+     * @param jbossContext The jboss context.
+     * 
+     * @message com.arjuna.wst.messaging.ParticipantCompletionCoordinator11ProcessorImpl.sendNotCompleted_1 [com.arjuna.wst.messaging.ParticipantCompletionCoordinator11ProcessorImpl.sendNotCompleted_1] - Unexpected exception while sending NotCompleted
+     */
+    private void sendNotCompleted(final AddressingContext addressingContext, final JBossContext jbossContext)
+    {
+        // KEV add check for recovery
+        final String messageId = MessageId.getMessageId() ;
+        final AddressingContext responseAddressingContext = AddressingContext.createRequestContext(addressingContext.getFrom(), messageId) ;
+        try
+        {
+            ParticipantCompletionParticipantClient.getClient().sendNotCompleted(responseAddressingContext, jbossContext.getInstanceIdentifier()) ;
+        }
+        catch (final Throwable th)
+        {
+            if (WSTLogger.arjLoggerI18N.isDebugEnabled())
+            {
+                WSTLogger.arjLoggerI18N.debug("com.arjuna.wst.messaging.ParticipantCompletionCoordinator11ProcessorImpl.sendNotCompleted_1", th) ;
+            }
+        }
+    }
+}


Property changes on: labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/wst/messaging/ParticipantCompletionCoordinator11ProcessorImpl.java
___________________________________________________________________
Name: svn:keywords
   + Rev Date
Name: svn:eol-style
   + native

Added: labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/wst/messaging/ParticipantCompletionParticipant11ProcessorImpl.java
===================================================================
--- labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/wst/messaging/ParticipantCompletionParticipant11ProcessorImpl.java	                        (rev 0)
+++ labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/wst/messaging/ParticipantCompletionParticipant11ProcessorImpl.java	2007-08-14 12:43:41 UTC (rev 14200)
@@ -0,0 +1,473 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag.  All rights reserved. 
+ * See the copyright.txt in the distribution for a full listing 
+ * of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU General Public License, v. 2.0.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A 
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+ * PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+ * You should have received a copy of the GNU General Public License,
+ * v. 2.0 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+ * MA  02110-1301, USA.
+ * 
+ * (C) 2005-2006,
+ * @author JBoss Inc.
+ */
+package com.arjuna.wst.messaging;
+
+import com.arjuna.webservices.SoapFault;
+import com.arjuna.webservices.base.processors.ActivatedObjectProcessor;
+import com.arjuna.webservices.logging.WSTLogger;
+import com.arjuna.webservices.wsaddr2005.AddressingContext;
+import com.arjuna.webservices.wsba11.NotificationType;
+import com.arjuna.webservices.wsba11.ParticipantCompletionParticipantInboundEvents;
+import com.arjuna.webservices.wsba11.StatusType;
+import com.arjuna.webservices.wsba11.client.ParticipantCompletionCoordinatorClient;
+import com.arjuna.webservices.wsba11.processors.ParticipantCompletionParticipantProcessor;
+import com.arjuna.webservices.wsjboss.InstanceIdentifier;
+import com.arjuna.webservices.wsjboss.JBossContext;
+import com.arjuna.wsc.messaging.MessageId;
+
+
+/**
+ * The Participant Completion Participant processor.
+ * @author kevin
+ */
+public class ParticipantCompletionParticipant11ProcessorImpl extends ParticipantCompletionParticipantProcessor
+{
+    /**
+     * The activated object processor.
+     */
+    private final ActivatedObjectProcessor activatedObjectProcessor = new ActivatedObjectProcessor() ;
+    
+    /**
+     * Activate the participant.
+     * @param participant The participant.
+     * @param identifier The identifier.
+     */
+    public void activateParticipant(final ParticipantCompletionParticipantInboundEvents participant, final String identifier)
+    {
+        activatedObjectProcessor.activateObject(participant, identifier) ;
+    }
+
+    /**
+     * Deactivate the participant.
+     * @param participant The participant.
+     */
+    public void deactivateParticipant(final ParticipantCompletionParticipantInboundEvents participant)
+    {
+        activatedObjectProcessor.deactivateObject(participant) ;
+    }
+    
+    /**
+     * Get the participant with the specified identifier.
+     * @param instanceIdentifier The participant identifier.
+     * @return The participant or null if not known.
+     */
+    private ParticipantCompletionParticipantInboundEvents getParticipant(final InstanceIdentifier instanceIdentifier)
+    {
+        final String identifier = (instanceIdentifier != null ? instanceIdentifier.getInstanceIdentifier() : null) ;
+        return (ParticipantCompletionParticipantInboundEvents)activatedObjectProcessor.getObject(identifier) ;
+    }
+
+    /**
+     * Cancel.
+     * @param cancel The cancel notification.
+     * @param addressingContext The addressing context.
+     * @param jbossContext The jboss context.
+     * 
+     * @message com.arjuna.wst.messaging.ParticipantCompletionParticipant11ProcessorImpl.cancel_1 [com.arjuna.wst.messaging.ParticipantCompletionParticipant11ProcessorImpl.cancel_1] - Unexpected exception thrown from cancel:
+     * @message com.arjuna.wst.messaging.ParticipantCompletionParticipant11ProcessorImpl.cancel_2 [com.arjuna.wst.messaging.ParticipantCompletionParticipant11ProcessorImpl.cancel_2] - Cancel called on unknown participant: {0}
+     */
+    public void cancel(final NotificationType cancel, final AddressingContext addressingContext, final JBossContext jbossContext)
+    {
+        final InstanceIdentifier instanceIdentifier = jbossContext.getInstanceIdentifier() ;
+        final ParticipantCompletionParticipantInboundEvents participant = getParticipant(instanceIdentifier) ;
+
+        if (participant != null)
+        {
+            try
+            {
+                participant.cancel(cancel, addressingContext, jbossContext) ;
+            }
+            catch (final Throwable th)
+            {
+                if (WSTLogger.arjLoggerI18N.isDebugEnabled())
+                {
+                    WSTLogger.arjLoggerI18N.debug("com.arjuna.wst.messaging.ParticipantCompletionParticipant11ProcessorImpl.cancel_1", th) ;
+                }
+            }
+        }
+        else
+        {
+            if (WSTLogger.arjLoggerI18N.isDebugEnabled())
+            {
+                WSTLogger.arjLoggerI18N.debug("com.arjuna.wst.messaging.ParticipantCompletionParticipant11ProcessorImpl.cancel_2", new Object[] {instanceIdentifier}) ;
+            }
+            sendCancelled(addressingContext, jbossContext) ;
+        }
+    }
+
+    /**
+     * Close.
+     * @param close The close notification.
+     * @param addressingContext The addressing context.
+     * @param jbossContext The jboss context.
+     * 
+     * @message com.arjuna.wst.messaging.ParticipantCompletionParticipant11ProcessorImpl.close_1 [com.arjuna.wst.messaging.ParticipantCompletionParticipant11ProcessorImpl.close_1] - Unexpected exception thrown from close:
+     * @message com.arjuna.wst.messaging.ParticipantCompletionParticipant11ProcessorImpl.close_2 [com.arjuna.wst.messaging.ParticipantCompletionParticipant11ProcessorImpl.close_2] - Close called on unknown participant: {0}
+     */
+    public void close(final NotificationType close, final AddressingContext addressingContext, final JBossContext jbossContext)
+    {
+        final InstanceIdentifier instanceIdentifier = jbossContext.getInstanceIdentifier() ;
+        final ParticipantCompletionParticipantInboundEvents participant = getParticipant(instanceIdentifier) ;
+
+        if (participant != null)
+        {
+            try
+            {
+                participant.close(close, addressingContext, jbossContext) ;
+            }
+            catch (final Throwable th)
+            {
+                if (WSTLogger.arjLoggerI18N.isDebugEnabled())
+                {
+                    WSTLogger.arjLoggerI18N.debug("com.arjuna.wst.messaging.ParticipantCompletionParticipant11ProcessorImpl.close_1", th) ;
+                }
+            }
+        }
+        else
+        {
+            if (WSTLogger.arjLoggerI18N.isDebugEnabled())
+            {
+                WSTLogger.arjLoggerI18N.debug("com.arjuna.wst.messaging.ParticipantCompletionParticipant11ProcessorImpl.close_2", new Object[] {instanceIdentifier}) ;
+            }
+            sendClosed(addressingContext, jbossContext) ;
+        }
+    }
+    
+    /**
+     * Compensate.
+     * @param compensate The compensate notification.
+     * @param addressingContext The addressing context.
+     * @param jbossContext The jboss context.
+     * 
+     * @message com.arjuna.wst.messaging.ParticipantCompletionParticipant11ProcessorImpl.compensate_1 [com.arjuna.wst.messaging.ParticipantCompletionParticipant11ProcessorImpl.compensate_1] - Unexpected exception thrown from compensate:
+     * @message com.arjuna.wst.messaging.ParticipantCompletionParticipant11ProcessorImpl.compensate_2 [com.arjuna.wst.messaging.ParticipantCompletionParticipant11ProcessorImpl.compensate_2] - Compensate called on unknown participant: {0}
+     */
+    public void compensate(final NotificationType compensate, final AddressingContext addressingContext, final JBossContext jbossContext)
+    {
+        final InstanceIdentifier instanceIdentifier = jbossContext.getInstanceIdentifier() ;
+        final ParticipantCompletionParticipantInboundEvents participant = getParticipant(instanceIdentifier) ;
+
+        if (participant != null)
+        {
+            try
+            {
+                participant.compensate(compensate, addressingContext, jbossContext) ;
+            }
+            catch (final Throwable th)
+            {
+                if (WSTLogger.arjLoggerI18N.isDebugEnabled())
+                {
+                    WSTLogger.arjLoggerI18N.debug("com.arjuna.wst.messaging.ParticipantCompletionParticipant11ProcessorImpl.compensate_1", th) ;
+                }
+            }
+        }
+        else
+        {
+            if (WSTLogger.arjLoggerI18N.isDebugEnabled())
+            {
+                WSTLogger.arjLoggerI18N.debug("com.arjuna.wst.messaging.ParticipantCompletionParticipant11ProcessorImpl.compensate_2", new Object[] {instanceIdentifier}) ;
+            }
+            sendCompensated(addressingContext, jbossContext) ;
+        }
+    }
+    
+    /**
+     * Exited.
+     * @param exited The exited notification.
+     * @param addressingContext The addressing context.
+     * @param jbossContext The jboss context.
+     * 
+     * @message com.arjuna.wst.messaging.ParticipantCompletionParticipant11ProcessorImpl.exited_1 [com.arjuna.wst.messaging.ParticipantCompletionParticipant11ProcessorImpl.exited_1] - Unexpected exception thrown from exited:
+     * @message com.arjuna.wst.messaging.ParticipantCompletionParticipant11ProcessorImpl.exited_2 [com.arjuna.wst.messaging.ParticipantCompletionParticipant11ProcessorImpl.exited_2] - Exited called on unknown participant: {0}
+     */
+    public void exited(final NotificationType exited, final AddressingContext addressingContext, final JBossContext jbossContext)
+    {
+        final InstanceIdentifier instanceIdentifier = jbossContext.getInstanceIdentifier() ;
+        final ParticipantCompletionParticipantInboundEvents participant = getParticipant(instanceIdentifier) ;
+
+        if (participant != null)
+        {
+            try
+            {
+                participant.exited(exited, addressingContext, jbossContext) ;
+            }
+            catch (final Throwable th)
+            {
+                if (WSTLogger.arjLoggerI18N.isDebugEnabled())
+                {
+                    WSTLogger.arjLoggerI18N.debug("com.arjuna.wst.messaging.ParticipantCompletionParticipant11ProcessorImpl.exited_1", th) ;
+                }
+            }
+        }
+        else if (WSTLogger.arjLoggerI18N.isDebugEnabled())
+        {
+            WSTLogger.arjLoggerI18N.debug("com.arjuna.wst.messaging.ParticipantCompletionParticipant11ProcessorImpl.exited_2", new Object[] {instanceIdentifier}) ;
+        }
+    }
+    
+    /**
+     * Failed.
+     * @param failed The failed notification.
+     * @param addressingContext The addressing context.
+     * @param jbossContext The jboss context.
+     * 
+     * @message com.arjuna.wst.messaging.ParticipantCompletionParticipant11ProcessorImpl.failed_1 [com.arjuna.wst.messaging.ParticipantCompletionParticipant11ProcessorImpl.failed_1] - Unexpected exception thrown from failed:
+     * @message com.arjuna.wst.messaging.ParticipantCompletionParticipant11ProcessorImpl.failed_2 [com.arjuna.wst.messaging.ParticipantCompletionParticipant11ProcessorImpl.failed_2] - Failed called on unknown participant: {0}
+     */
+    public void failed(final NotificationType failed, final AddressingContext addressingContext, final JBossContext jbossContext)
+    {
+        final InstanceIdentifier instanceIdentifier = jbossContext.getInstanceIdentifier() ;
+        final ParticipantCompletionParticipantInboundEvents participant = getParticipant(instanceIdentifier) ;
+
+        if (participant != null)
+        {
+            try
+            {
+                participant.failed(failed, addressingContext, jbossContext) ;
+            }
+            catch (final Throwable th)
+            {
+                if (WSTLogger.arjLoggerI18N.isDebugEnabled())
+                {
+                    WSTLogger.arjLoggerI18N.debug("com.arjuna.wst.messaging.ParticipantCompletionParticipant11ProcessorImpl.failed_1", th) ;
+                }
+            }
+        }
+        else if (WSTLogger.arjLoggerI18N.isDebugEnabled())
+        {
+            WSTLogger.arjLoggerI18N.debug("com.arjuna.wst.messaging.ParticipantCompletionParticipant11ProcessorImpl.failed_2", new Object[] {instanceIdentifier}) ;
+        }
+    }
+    
+    /**
+     * NotCompleted.
+     * @param notCompleted The notCompleted notification.
+     * @param addressingContext The addressing context.
+     * @param jbossContext The jboss context.
+     * 
+     * @message com.arjuna.wst.messaging.ParticipantCompletionParticipant11ProcessorImpl.notCompleted_1 [com.arjuna.wst.messaging.ParticipantCompletionParticipant11ProcessorImpl.notCompleted_1] - Unexpected exception thrown from notCompleted:
+     * @message com.arjuna.wst.messaging.ParticipantCompletionParticipant11ProcessorImpl.notCompleted_2 [com.arjuna.wst.messaging.ParticipantCompletionParticipant11ProcessorImpl.notCompleted_2] - NotCompleted called on unknown participant: {0}
+     */
+    public void notCompleted(final NotificationType notCompleted, final AddressingContext addressingContext, final JBossContext jbossContext)
+    {
+        final InstanceIdentifier instanceIdentifier = jbossContext.getInstanceIdentifier() ;
+        final ParticipantCompletionParticipantInboundEvents participant = getParticipant(instanceIdentifier) ;
+
+        if (participant != null)
+        {
+            try
+            {
+                participant.notCompleted(notCompleted, addressingContext, jbossContext) ;
+            }
+            catch (final Throwable th)
+            {
+                if (WSTLogger.arjLoggerI18N.isDebugEnabled())
+                {
+                    WSTLogger.arjLoggerI18N.debug("com.arjuna.wst.messaging.ParticipantCompletionParticipant11ProcessorImpl.notCompleted_1", th) ;
+                }
+            }
+        }
+        else if (WSTLogger.arjLoggerI18N.isDebugEnabled())
+        {
+            WSTLogger.arjLoggerI18N.debug("com.arjuna.wst.messaging.ParticipantCompletionParticipant11ProcessorImpl.notCompleted_2", new Object[] {instanceIdentifier}) ;
+        }
+    }
+    
+    /**
+     * Get Status.
+     * @param getStatus The get status notification.
+     * @param addressingContext The addressing context.
+     * @param jbossContext The jboss context.
+     * 
+     * @message com.arjuna.wst.messaging.ParticipantCompletionParticipant11ProcessorImpl.getStatus_1 [com.arjuna.wst.messaging.ParticipantCompletionParticipant11ProcessorImpl.getStatus_1] - Unexpected exception thrown from getStatus:
+     * @message com.arjuna.wst.messaging.ParticipantCompletionParticipant11ProcessorImpl.getStatus_2 [com.arjuna.wst.messaging.ParticipantCompletionParticipant11ProcessorImpl.getStatus_2] - Complete called on unknown participant: {0}
+     */
+    public void getStatus(final NotificationType getStatus, final AddressingContext addressingContext, final JBossContext jbossContext)
+    {
+        final InstanceIdentifier instanceIdentifier = jbossContext.getInstanceIdentifier() ;
+        final ParticipantCompletionParticipantInboundEvents participant = getParticipant(instanceIdentifier) ;
+
+        if (participant != null)
+        {
+            try
+            {
+                participant.getStatus(getStatus, addressingContext, jbossContext) ;
+            }
+            catch (final Throwable th)
+            {
+                if (WSTLogger.arjLoggerI18N.isDebugEnabled())
+                {
+                    WSTLogger.arjLoggerI18N.debug("com.arjuna.wst.messaging.ParticipantCompletionParticipant11ProcessorImpl.getStatus_1", th) ;
+                }
+            }
+        }
+        else if (WSTLogger.arjLoggerI18N.isDebugEnabled())
+        {
+            WSTLogger.arjLoggerI18N.debug("com.arjuna.wst.messaging.ParticipantCompletionParticipant11ProcessorImpl.getStatus_2", new Object[] {instanceIdentifier}) ;
+        }
+    }
+    
+    /**
+     * Status.
+     * @param status The status type.
+     * @param addressingContext The addressing context.
+     * @param jbossContext The jboss context.
+     * 
+     * @message com.arjuna.wst.messaging.ParticipantCompletionParticipant11ProcessorImpl.status_1 [com.arjuna.wst.messaging.ParticipantCompletionParticipant11ProcessorImpl.status_1] - Unexpected exception thrown from status:
+     * @message com.arjuna.wst.messaging.ParticipantCompletionParticipant11ProcessorImpl.status_2 [com.arjuna.wst.messaging.ParticipantCompletionParticipant11ProcessorImpl.status_2] - Status called on unknown participant: {0}
+     */
+    public void status(final StatusType status, final AddressingContext addressingContext, final JBossContext jbossContext)
+    {
+        final InstanceIdentifier instanceIdentifier = jbossContext.getInstanceIdentifier() ;
+        final ParticipantCompletionParticipantInboundEvents participant = getParticipant(instanceIdentifier) ;
+
+        if (participant != null)
+        {
+            try
+            {
+                participant.status(status, addressingContext, jbossContext) ;
+            }
+            catch (final Throwable th)
+            {
+                if (WSTLogger.arjLoggerI18N.isDebugEnabled())
+                {
+                    WSTLogger.arjLoggerI18N.debug("com.arjuna.wst.messaging.ParticipantCompletionParticipant11ProcessorImpl.status_1", th) ;
+                }
+            }
+        }
+        else if (WSTLogger.arjLoggerI18N.isDebugEnabled())
+        {
+            WSTLogger.arjLoggerI18N.debug("com.arjuna.wst.messaging.ParticipantCompletionParticipant11ProcessorImpl.status_2", new Object[] {instanceIdentifier}) ;
+        }
+    }
+    
+    /**
+     * SOAP fault.
+     * @param soapFault The SOAP fault.
+     * @param addressingContext The addressing context.
+     * @param jbossContext The jboss context.
+     * 
+     * @message com.arjuna.wst.messaging.ParticipantCompletionParticipant11ProcessorImpl.soapFault_1 [com.arjuna.wst.messaging.ParticipantCompletionParticipant11ProcessorImpl.soapFault_1] - Unexpected exception thrown from soapFault:
+     * @message com.arjuna.wst.messaging.ParticipantCompletionParticipant11ProcessorImpl.soapFault_2 [com.arjuna.wst.messaging.ParticipantCompletionParticipant11ProcessorImpl.soapFault_2] - SOAP Fault called on unknown coordinator: {0}
+     */
+    public void soapFault(final SoapFault soapFault, final AddressingContext addressingContext, final JBossContext jbossContext)
+    {
+        final InstanceIdentifier instanceIdentifier = jbossContext.getInstanceIdentifier() ;
+        final ParticipantCompletionParticipantInboundEvents coordinator = getParticipant(instanceIdentifier) ;
+
+        if (coordinator != null)
+        {
+            try
+            {
+                coordinator.soapFault(soapFault, addressingContext, jbossContext) ;
+            }
+            catch (final Throwable th)
+            {
+                if (WSTLogger.arjLoggerI18N.isDebugEnabled())
+                {
+                    WSTLogger.arjLoggerI18N.debug("com.arjuna.wst.messaging.ParticipantCompletionParticipant11ProcessorImpl.soapFault_1", th) ;
+                }
+            }
+        }
+        else if (WSTLogger.arjLoggerI18N.isDebugEnabled())
+        {
+            WSTLogger.arjLoggerI18N.debug("com.arjuna.wst.messaging.ParticipantCompletionParticipant11ProcessorImpl.soapFault_2", new Object[] {instanceIdentifier}) ;
+        }
+    }
+    
+    /**
+     * Send a cancelled message.
+     * 
+     * @param addressingContext The addressing context.
+     * @param jbossContext The jboss context.
+     * 
+     * @message com.arjuna.wst.messaging.ParticipantCompletionParticipant11ProcessorImpl.sendCancelled_1 [com.arjuna.wst.messaging.ParticipantCompletionParticipant11ProcessorImpl.sendCancelled_1] - Unexpected exception while sending Cancelled
+     */
+    private void sendCancelled(final AddressingContext addressingContext, final JBossContext jbossContext)
+    {
+        // KEV add check for recovery
+        final String messageId = MessageId.getMessageId() ;
+        final AddressingContext responseAddressingContext = AddressingContext.createRequestContext(addressingContext.getFrom(), messageId) ;
+        try
+        {
+            ParticipantCompletionCoordinatorClient.getClient().sendCancelled(responseAddressingContext, jbossContext.getInstanceIdentifier()) ;
+        }
+        catch (final Throwable th)
+        {
+            if (WSTLogger.arjLoggerI18N.isDebugEnabled())
+            {
+                WSTLogger.arjLoggerI18N.debug("com.arjuna.wst.messaging.ParticipantCompletionParticipant11ProcessorImpl.sendCancelled_1", th) ;
+            }
+        }
+    }
+    
+    /**
+     * Send a closed message.
+     * 
+     * @param addressingContext The addressing context.
+     * @param jbossContext The jboss context.
+     * 
+     * @message com.arjuna.wst.messaging.ParticipantCompletionParticipant11ProcessorImpl.sendClosed_1 [com.arjuna.wst.messaging.ParticipantCompletionParticipant11ProcessorImpl.sendClosed_1] - Unexpected exception while sending Closed
+     */
+    private void sendClosed(final AddressingContext addressingContext, final JBossContext jbossContext)
+    {
+        // KEV add check for recovery
+        final String messageId = MessageId.getMessageId() ;
+        final AddressingContext responseAddressingContext = AddressingContext.createRequestContext(addressingContext.getFrom(), messageId) ;
+        try
+        {
+            ParticipantCompletionCoordinatorClient.getClient().sendClosed(responseAddressingContext, jbossContext.getInstanceIdentifier()) ;
+        }
+        catch (final Throwable th)
+        {
+            if (WSTLogger.arjLoggerI18N.isDebugEnabled())
+            {
+                WSTLogger.arjLoggerI18N.debug("com.arjuna.wst.messaging.ParticipantCompletionParticipant11ProcessorImpl.sendClosed_1", th) ;
+            }
+        }
+    }
+    
+    /**
+     * Send a compensated message.
+     * 
+     * @param addressingContext The addressing context.
+     * @param jbossContext The jboss context.
+     * 
+     * @message com.arjuna.wst.messaging.ParticipantCompletionParticipant11ProcessorImpl.sendCompensated_1 [com.arjuna.wst.messaging.ParticipantCompletionParticipant11ProcessorImpl.sendCompensated_1] - Unexpected exception while sending Compensated
+     */
+    private void sendCompensated(final AddressingContext addressingContext, final JBossContext jbossContext)
+    {
+        // KEV add check for recovery
+        final String messageId = MessageId.getMessageId() ;
+        final AddressingContext responseAddressingContext = AddressingContext.createRequestContext(addressingContext.getFrom(), messageId) ;
+        try
+        {
+            ParticipantCompletionCoordinatorClient.getClient().sendCompensated(responseAddressingContext, jbossContext.getInstanceIdentifier()) ;
+        }
+        catch (final Throwable th)
+        {
+            if (WSTLogger.arjLoggerI18N.isDebugEnabled())
+            {
+                WSTLogger.arjLoggerI18N.debug("com.arjuna.wst.messaging.ParticipantCompletionParticipant11ProcessorImpl.sendCompensated_1", th) ;
+            }
+        }
+    }
+}


Property changes on: labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/wst/messaging/ParticipantCompletionParticipant11ProcessorImpl.java
___________________________________________________________________
Name: svn:keywords
   + Rev Date
Name: svn:eol-style
   + native

Added: labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/wst/messaging/TerminatorParticipant11ProcessorImpl.java
===================================================================
--- labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/wst/messaging/TerminatorParticipant11ProcessorImpl.java	                        (rev 0)
+++ labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/wst/messaging/TerminatorParticipant11ProcessorImpl.java	2007-08-14 12:43:41 UTC (rev 14200)
@@ -0,0 +1,312 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag.  All rights reserved. 
+ * See the copyright.txt in the distribution for a full listing 
+ * of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU General Public License, v. 2.0.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A 
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+ * PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+ * You should have received a copy of the GNU General Public License,
+ * v. 2.0 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+ * MA  02110-1301, USA.
+ * 
+ * (C) 2005-2006,
+ * @author JBoss Inc.
+ */
+package com.arjuna.wst.messaging;
+
+import java.text.MessageFormat;
+
+import com.arjuna.webservices.SoapFault;
+import com.arjuna.webservices.SoapFaultType;
+import com.arjuna.webservices.base.processors.ActivatedObjectProcessor;
+import com.arjuna.webservices.logging.WSTLogger;
+import com.arjuna.webservices.wsaddr2005.AddressingContext;
+import com.arjuna.webservices.wsjboss.InstanceIdentifier;
+import com.arjuna.webservices.wsjboss.JBossContext;
+import com.arjuna.webservices.wsjbosstx.JBossTXConstants;
+import com.arjuna.webservices.wsjbosstx.NotificationType;
+import com.arjuna.webservices.wsjbosstx.processors.TerminationCoordinatorProcessor;
+import com.arjuna.wst.BusinessActivityTerminator;
+import com.arjuna.wst.FaultedException;
+import com.arjuna.wst.SystemException;
+import com.arjuna.wst.TransactionRolledBackException;
+import com.arjuna.wst.UnknownTransactionException;
+
+/**
+ * The Terminator Participant processor.
+ * @author kevin
+ * 
+ * @message com.arjuna.wst.messaging.TerminatorParticipant11ProcessorImpl_1 [com.arjuna.wst.messaging.TerminatorParticipant11ProcessorImpl_1] - Unknown transaction
+ * @message com.arjuna.wst.messaging.TerminatorParticipant11ProcessorImpl_2 [com.arjuna.wst.messaging.TerminatorParticipant11ProcessorImpl_2] - Unknown error: {0}
+ * @message com.arjuna.wst.messaging.TerminatorParticipant11ProcessorImpl_3 [com.arjuna.wst.messaging.TerminatorParticipant11ProcessorImpl_3] - Unexpected exception thrown from cancel:
+ * @message com.arjuna.wst.messaging.TerminatorParticipant11ProcessorImpl_4 [com.arjuna.wst.messaging.TerminatorParticipant11ProcessorImpl_4] - Cancel called on unknown participant: {0}
+ * @message com.arjuna.wst.messaging.TerminatorParticipant11ProcessorImpl_5 [com.arjuna.wst.messaging.TerminatorParticipant11ProcessorImpl_5] - Unknown participant
+ * @message com.arjuna.wst.messaging.TerminatorParticipant11ProcessorImpl_6 [com.arjuna.wst.messaging.TerminatorParticipant11ProcessorImpl_6] - Unknown transaction
+ * @message com.arjuna.wst.messaging.TerminatorParticipant11ProcessorImpl_7 [com.arjuna.wst.messaging.TerminatorParticipant11ProcessorImpl_7] - Transaction rolled back
+ * @message com.arjuna.wst.messaging.TerminatorParticipant11ProcessorImpl_8 [com.arjuna.wst.messaging.TerminatorParticipant11ProcessorImpl_8] - Unknown error: {0}
+ * @message com.arjuna.wst.messaging.TerminatorParticipant11ProcessorImpl_9 [com.arjuna.wst.messaging.TerminatorParticipant11ProcessorImpl_9] - Unexpected exception thrown from close:
+ * @message com.arjuna.wst.messaging.TerminatorParticipant11ProcessorImpl_10 [com.arjuna.wst.messaging.TerminatorParticipant11ProcessorImpl_10] - Close called on unknown participant: {0}
+ * @message com.arjuna.wst.messaging.TerminatorParticipant11ProcessorImpl_11 [com.arjuna.wst.messaging.TerminatorParticipant11ProcessorImpl_11] - Unknown participant
+ * @message com.arjuna.wst.messaging.TerminatorParticipant11ProcessorImpl_12 [com.arjuna.wst.messaging.TerminatorParticipant11ProcessorImpl_12] - Unknown transaction
+ * @message com.arjuna.wst.messaging.TerminatorParticipant11ProcessorImpl_13 [com.arjuna.wst.messaging.TerminatorParticipant11ProcessorImpl_13] - Unknown error: {0}
+ * @message com.arjuna.wst.messaging.TerminatorParticipant11ProcessorImpl_14 [com.arjuna.wst.messaging.TerminatorParticipant11ProcessorImpl_14] - Unexpected exception thrown from complete:
+ * @message com.arjuna.wst.messaging.TerminatorParticipant11ProcessorImpl_15 [com.arjuna.wst.messaging.TerminatorParticipant11ProcessorImpl_15] - Complete called on unknown participant: {0}
+ * @message com.arjuna.wst.messaging.TerminatorParticipant11ProcessorImpl_16 [com.arjuna.wst.messaging.TerminatorParticipant11ProcessorImpl_16] - Unknown participant
+ *
+ * @message com.arjuna.wst.messaging.TerminatorParticipant11ProcessorImpl_17 [com.arjuna.wst.messaging.TerminatorParticipant11ProcessorImpl_17] - Cancel operation faulted.
+ * @message com.arjuna.wst.messaging.TerminatorParticipant11ProcessorImpl_18 [com.arjuna.wst.messaging.TerminatorParticipant11ProcessorImpl_18] - Complete operation faulted.
+ * 
+ **/
+public class TerminatorParticipant11ProcessorImpl extends TerminationCoordinatorProcessor
+{
+    /**
+     * The activated object processor.
+     */
+    private final ActivatedObjectProcessor activatedObjectProcessor = new ActivatedObjectProcessor() ;
+
+    /**
+     * Activate the participant.
+     * @param participant The participant.
+     * @param identifier The identifier.
+     */
+    public void activateParticipant(final BusinessActivityTerminator participant, final String identifier)
+    {
+        activatedObjectProcessor.activateObject(participant, identifier) ;
+    }
+
+    /**
+     * Deactivate the participant.
+     * @param participant The participant.
+     */
+    public void deactivateParticipant(final BusinessActivityTerminator participant)
+    {
+        activatedObjectProcessor.deactivateObject(participant) ;
+    }
+    
+    /**
+     * Get the participant with the specified identifier.
+     * @param instanceIdentifier The participant identifier.
+     * @return The participant or null if not known.
+     */
+    private BusinessActivityTerminator getParticipant(final InstanceIdentifier instanceIdentifier)
+    {
+        final String identifier = (instanceIdentifier != null ? instanceIdentifier.getInstanceIdentifier() : null) ;
+        return (BusinessActivityTerminator)activatedObjectProcessor.getObject(identifier) ;
+    }
+    
+    /**
+     * Cancel.
+     * @param cancel The cancel notification.
+     * @param addressingContext The addressing context.
+     * @param jbossContext The jboss context.
+     */
+    public void cancel(final NotificationType cancel, final AddressingContext addressingContext,
+        final JBossContext jbossContext)
+    	throws SoapFault
+    {
+        final InstanceIdentifier instanceIdentifier = jbossContext.getInstanceIdentifier() ;
+        final BusinessActivityTerminator participant = getParticipant(instanceIdentifier) ;
+
+        try
+        {
+            if (participant != null)
+            {
+                try
+                {
+                    participant.cancel() ;
+                }
+                catch (final FaultedException fe)
+                {
+                    final SoapFault soapFault = new SoapFault(SoapFaultType.FAULT_SENDER, JBossTXConstants.FAULTED_ERROR_CODE_QNAME,
+                        WSTLogger.log_mesg.getString("com.arjuna.wst.messaging.TerminatorParticipant11ProcessorImpl_17")) ;
+                    throw soapFault ;
+                }
+                catch (final UnknownTransactionException ute)
+                {
+                    final SoapFault soapFault = new SoapFault(SoapFaultType.FAULT_SENDER, JBossTXConstants.UNKNOWNTRANSACTION_ERROR_CODE_QNAME,
+                        WSTLogger.log_mesg.getString("com.arjuna.wst.messaging.TerminatorParticipant11ProcessorImpl_1")) ;
+                    throw soapFault ;
+                }
+                catch (final SystemException se)
+                {
+                    final String pattern = WSTLogger.log_mesg.getString("com.arjuna.wst.messaging.TerminatorParticipant11ProcessorImpl_2") ;
+                    final String message = MessageFormat.format(pattern, new Object[] {se}) ;
+                    final SoapFault soapFault = new SoapFault(SoapFaultType.FAULT_SENDER, JBossTXConstants.UNKNOWNERROR_ERROR_CODE_QNAME, message) ;
+                    throw soapFault ;
+                }
+                catch (final Throwable th)
+                {
+                    if (WSTLogger.arjLoggerI18N.isDebugEnabled())
+                    {
+                        WSTLogger.arjLoggerI18N.debug("com.arjuna.wst.messaging.TerminatorParticipant11ProcessorImpl_3", th) ;
+                    }
+                    throw new SoapFault(th) ;
+                }
+            }
+            else
+            {
+                if (WSTLogger.arjLoggerI18N.isDebugEnabled())
+                {
+                    WSTLogger.arjLoggerI18N.debug("com.arjuna.wst.messaging.TerminatorParticipant11ProcessorImpl_4", new Object[] {instanceIdentifier}) ;
+                }
+                final SoapFault soapFault = new SoapFault(SoapFaultType.FAULT_SENDER, JBossTXConstants.UNKNOWNTRANSACTION_ERROR_CODE_QNAME,
+                    WSTLogger.log_mesg.getString("com.arjuna.wst.messaging.TerminatorParticipant11ProcessorImpl_5")) ;
+                throw soapFault ;
+            }
+        }
+        catch (final SoapFault soapFault)
+        {
+            throw soapFault ;
+        }
+        catch (Throwable throwable)
+        {
+            throwable.printStackTrace(System.err);
+        }
+    }
+    
+    /**
+     * Close.
+     * @param close The close notification.
+     * @param addressingContext The addressing context.
+     * @param jbossContext The jboss context.
+     */
+    public void close(final NotificationType close, final AddressingContext addressingContext,
+        final JBossContext jbossContext)
+    	throws SoapFault
+    {
+        final InstanceIdentifier instanceIdentifier = jbossContext.getInstanceIdentifier() ;
+        final BusinessActivityTerminator participant = getParticipant(instanceIdentifier) ;
+
+        try
+        {
+            if (participant != null)
+            {
+                try
+                {
+                    participant.close() ;
+                }
+                catch (final UnknownTransactionException ute)
+                {
+                    final SoapFault soapFault = new SoapFault(SoapFaultType.FAULT_SENDER, JBossTXConstants.UNKNOWNTRANSACTION_ERROR_CODE_QNAME,
+                        WSTLogger.log_mesg.getString("com.arjuna.wst.messaging.TerminatorParticipant11ProcessorImpl_6")) ;
+                    throw soapFault ;
+                }
+                catch (final TransactionRolledBackException trbe)
+                {
+                    final SoapFault soapFault = new SoapFault(SoapFaultType.FAULT_SENDER, JBossTXConstants.TRANSACTIONROLLEDBACK_ERROR_CODE_QNAME,
+                        WSTLogger.log_mesg.getString("com.arjuna.wst.messaging.TerminatorParticipant11ProcessorImpl_7")) ;
+                    throw soapFault ;
+                }
+                catch (final SystemException se)
+                {
+                    final String pattern = WSTLogger.log_mesg.getString("com.arjuna.wst.messaging.TerminatorParticipant11ProcessorImpl_8") ;
+                    final String message = MessageFormat.format(pattern, new Object[] {se}) ;
+                    final SoapFault soapFault = new SoapFault(SoapFaultType.FAULT_SENDER, JBossTXConstants.UNKNOWNERROR_ERROR_CODE_QNAME, message) ;
+                    throw soapFault ;
+                }
+                catch (final Throwable th)
+                {
+                    if (WSTLogger.arjLoggerI18N.isDebugEnabled())
+                    {
+                        WSTLogger.arjLoggerI18N.debug("com.arjuna.wst.messaging.TerminatorParticipant11ProcessorImpl_9", th) ;
+                    }
+                    throw new SoapFault(th) ;
+                }
+            }
+            else
+            {
+                if (WSTLogger.arjLoggerI18N.isDebugEnabled())
+                {
+                    WSTLogger.arjLoggerI18N.debug("com.arjuna.wst.messaging.TerminatorParticipant11ProcessorImpl_10", new Object[] {instanceIdentifier}) ;
+                }
+                final SoapFault soapFault = new SoapFault(SoapFaultType.FAULT_SENDER, JBossTXConstants.UNKNOWNTRANSACTION_ERROR_CODE_QNAME,
+                    WSTLogger.log_mesg.getString("com.arjuna.wst.messaging.TerminatorParticipant11ProcessorImpl_11")) ;
+                throw soapFault ;
+            }
+        }
+        catch (final SoapFault soapFault)
+        {
+            throw soapFault ;
+        }
+        catch (Throwable throwable)
+        {
+            throwable.printStackTrace(System.err);
+        }
+    }
+    
+    /**
+     * Complete.
+     * @param complete The complete notification.
+     * @param addressingContext The addressing context.
+     * @param jbossContext The jboss context.
+     */
+    public void complete(final NotificationType complete, final AddressingContext addressingContext,
+        final JBossContext jbossContext)
+    	throws SoapFault
+    {
+        final InstanceIdentifier instanceIdentifier = jbossContext.getInstanceIdentifier() ;
+        final BusinessActivityTerminator participant = getParticipant(instanceIdentifier) ;
+
+        try
+        {
+            if (participant != null)
+            {
+                try
+                {
+                    participant.complete() ;
+                }
+                catch (final FaultedException fe)
+                {
+                    final SoapFault soapFault = new SoapFault(SoapFaultType.FAULT_SENDER, JBossTXConstants.FAULTED_ERROR_CODE_QNAME,
+                        WSTLogger.log_mesg.getString("com.arjuna.wst.messaging.TerminatorParticipant11ProcessorImpl_18")) ;
+                    throw soapFault ;
+                }
+                catch (final UnknownTransactionException ute)
+                {
+                    final SoapFault soapFault = new SoapFault(SoapFaultType.FAULT_SENDER, JBossTXConstants.UNKNOWNTRANSACTION_ERROR_CODE_QNAME,
+                        WSTLogger.log_mesg.getString("com.arjuna.wst.messaging.TerminatorParticipant11ProcessorImpl_12")) ;
+                    throw soapFault ;
+                }
+                catch (final SystemException se)
+                {
+                    final String pattern = WSTLogger.log_mesg.getString("com.arjuna.wst.messaging.TerminatorParticipant11ProcessorImpl_13") ;
+                    final String message = MessageFormat.format(pattern, new Object[] {se}) ;
+                    final SoapFault soapFault = new SoapFault(SoapFaultType.FAULT_SENDER, JBossTXConstants.UNKNOWNERROR_ERROR_CODE_QNAME, message) ;
+                    throw soapFault ;
+                }
+                catch (final Throwable th)
+                {
+                    if (WSTLogger.arjLoggerI18N.isDebugEnabled())
+                    {
+                        WSTLogger.arjLoggerI18N.debug("com.arjuna.wst.messaging.TerminatorParticipant11ProcessorImpl_14", th) ;
+                    }
+                    throw new SoapFault(th) ;
+                }
+            }
+            else
+            {
+                if (WSTLogger.arjLoggerI18N.isDebugEnabled())
+                {
+                    WSTLogger.arjLoggerI18N.debug("com.arjuna.wst.messaging.TerminatorParticipant11ProcessorImpl_15", new Object[] {instanceIdentifier}) ;
+                }
+                final SoapFault soapFault = new SoapFault(SoapFaultType.FAULT_SENDER, JBossTXConstants.UNKNOWNTRANSACTION_ERROR_CODE_QNAME,
+                    WSTLogger.log_mesg.getString("com.arjuna.wst.messaging.TerminatorParticipant11ProcessorImpl_16")) ;
+                throw soapFault ;
+            }
+        }
+        catch (final SoapFault soapFault)
+        {
+            throw soapFault ;
+        }
+        catch (Throwable throwable)
+        {
+            throwable.printStackTrace(System.err);
+        }
+    }
+}


Property changes on: labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/wst/messaging/TerminatorParticipant11ProcessorImpl.java
___________________________________________________________________
Name: svn:keywords
   + Rev Date
Name: svn:eol-style
   + native

Added: labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/wst/messaging/deploy/Transaction11Initialisation.java
===================================================================
--- labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/wst/messaging/deploy/Transaction11Initialisation.java	                        (rev 0)
+++ labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/wst/messaging/deploy/Transaction11Initialisation.java	2007-08-14 12:43:41 UTC (rev 14200)
@@ -0,0 +1,74 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag.  All rights reserved. 
+ * See the copyright.txt in the distribution for a full listing 
+ * of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU General Public License, v. 2.0.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A 
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+ * PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+ * You should have received a copy of the GNU General Public License,
+ * v. 2.0 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+ * MA  02110-1301, USA.
+ * 
+ * (C) 2005-2006,
+ * @author JBoss Inc.
+ */
+package com.arjuna.wst.messaging.deploy;
+
+import javax.servlet.ServletContextEvent;
+import javax.servlet.ServletContextListener;
+
+import com.arjuna.common.util.SharedTimer;
+import com.arjuna.webservices.wsjbosstx.processors.TerminationCoordinatorProcessor;
+import com.arjuna.webservices.wsat11.processors.CompletionCoordinatorProcessor;
+import com.arjuna.webservices.wsat11.processors.CoordinatorProcessor;
+import com.arjuna.webservices.wsat11.processors.ParticipantProcessor;
+import com.arjuna.webservices.wsba11.processors.CoordinatorCompletionCoordinatorProcessor;
+import com.arjuna.webservices.wsba11.processors.CoordinatorCompletionParticipantProcessor;
+import com.arjuna.webservices.wsba11.processors.ParticipantCompletionCoordinatorProcessor;
+import com.arjuna.webservices.wsba11.processors.ParticipantCompletionParticipantProcessor;
+import com.arjuna.wst.messaging.CompletionCoordinator11ProcessorImpl;
+import com.arjuna.wst.messaging.Coordinator11ProcessorImpl;
+import com.arjuna.wst.messaging.CoordinatorCompletionCoordinator11ProcessorImpl;
+import com.arjuna.wst.messaging.CoordinatorCompletionParticipant11ProcessorImpl;
+import com.arjuna.wst.messaging.Participant11ProcessorImpl;
+import com.arjuna.wst.messaging.ParticipantCompletionCoordinator11ProcessorImpl;
+import com.arjuna.wst.messaging.ParticipantCompletionParticipant11ProcessorImpl;
+import com.arjuna.wst.messaging.TerminatorParticipant11ProcessorImpl;
+
+/**
+ * Initialise the transaction services.
+ * @author kevin
+ */
+public class Transaction11Initialisation implements ServletContextListener
+{
+    /**
+     * The context has been initialized.
+     * @param servletContextEvent The servlet context event.
+     */
+    public void contextInitialized(final ServletContextEvent servletContextEvent)
+    {
+        CompletionCoordinatorProcessor.setProcessor(new CompletionCoordinator11ProcessorImpl()) ;
+        ParticipantProcessor.setProcessor(new Participant11ProcessorImpl()) ;
+        CoordinatorProcessor.setProcessor(new Coordinator11ProcessorImpl()) ;
+        TerminationCoordinatorProcessor.setProcessor(new TerminatorParticipant11ProcessorImpl()) ;
+        CoordinatorCompletionParticipantProcessor.setProcessor(new CoordinatorCompletionParticipant11ProcessorImpl()) ;
+        ParticipantCompletionParticipantProcessor.setProcessor(new ParticipantCompletionParticipant11ProcessorImpl()) ;
+        CoordinatorCompletionCoordinatorProcessor.setProcessor(new CoordinatorCompletionCoordinator11ProcessorImpl()) ;
+        ParticipantCompletionCoordinatorProcessor.setProcessor(new ParticipantCompletionCoordinator11ProcessorImpl()) ;
+    }
+
+    /**
+     * The context is about to be destroyed.
+     * @param servletContextEvent The servlet context event.
+     */
+    public void contextDestroyed(final ServletContextEvent servletContextEvent)
+    {
+        SharedTimer.getTimer().cancel() ;
+    }
+}


Property changes on: labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/wst/messaging/deploy/Transaction11Initialisation.java
___________________________________________________________________
Name: svn:keywords
   + Rev Date
Name: svn:eol-style
   + native

Added: labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/wst/messaging/engines/Coordinator11Engine.java
===================================================================
--- labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/wst/messaging/engines/Coordinator11Engine.java	                        (rev 0)
+++ labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/wst/messaging/engines/Coordinator11Engine.java	2007-08-14 12:43:41 UTC (rev 14200)
@@ -0,0 +1,668 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag.  All rights reserved. 
+ * See the copyright.txt in the distribution for a full listing 
+ * of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU General Public License, v. 2.0.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A 
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+ * PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+ * You should have received a copy of the GNU General Public License,
+ * v. 2.0 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+ * MA  02110-1301, USA.
+ * 
+ * (C) 2005-2006,
+ * @author JBoss Inc.
+ */
+package com.arjuna.wst.messaging.engines;
+
+import java.util.TimerTask;
+
+import javax.xml.namespace.QName;
+
+import com.arjuna.webservices.SoapFault;
+import com.arjuna.webservices.SoapFaultType;
+import com.arjuna.webservices.logging.WSTLogger;
+import com.arjuna.webservices.util.TransportTimer;
+import com.arjuna.webservices.wsaddr2005.AddressingContext;
+import com.arjuna.webservices.wsaddr2005.AttributedURIType;
+import com.arjuna.webservices.wsaddr2005.EndpointReferenceType;
+import com.arjuna.webservices.wsaddr2005.RelatesToType;
+import com.arjuna.webservices.wsjboss.JBossContext;
+import com.arjuna.webservices.wsjboss.InstanceIdentifier;
+import com.arjuna.webservices.wsat11.AtomicTransactionConstants;
+import com.arjuna.webservices.wsat11.CoordinatorInboundEvents;
+import com.arjuna.webservices.wsat11.NotificationType;
+import com.arjuna.webservices.wsat11.State;
+import com.arjuna.webservices.wsat11.client.ParticipantClient;
+import com.arjuna.webservices.wsat11.processors.CoordinatorProcessor;
+import com.arjuna.wsc.messaging.MessageId;
+
+/**
+ * The coordinator state engine
+ * @author kevin
+ */
+public class Coordinator11Engine implements CoordinatorInboundEvents
+{
+    /**
+     * Flag indicating this is a coordinator for a durable participant.
+     */
+    private final boolean durable ;
+    /**
+     * The coordinator id.
+     */
+    private final String id ;
+    /**
+     * The instance identifier.
+     */
+    private final InstanceIdentifier instanceIdentifier ;
+    /**
+     * The participant endpoint reference.
+     */
+    private final EndpointReferenceType participant ;
+    /**
+     * The current state.
+     */
+    private State state ;
+    /**
+     * The flag indicating a read only response.
+     */
+    private boolean readOnly ;
+    /**
+     * The associated timer task or null.
+     */
+    private TimerTask timerTask ;
+    
+    /**
+     * Construct the initial engine for the coordinator.
+     * @param id The coordinator id.
+     * @param durable true if the participant is durable, false if volatile. 
+     * @param participant The participant endpoint reference.
+     */
+    public Coordinator11Engine(final String id, final boolean durable, final EndpointReferenceType participant)
+    {
+        this(id, durable, participant, State.STATE_ACTIVE) ;
+    }
+    
+    /**
+     * Construct the engine for the coordinator in a specified state.
+     * @param id The coordinator id.
+     * @param durable true if the participant is durable, false if volatile. 
+     * @param participant The participant endpoint reference.
+     * @param state The initial state.
+     */
+    public Coordinator11Engine(final String id, final boolean durable, final EndpointReferenceType participant, final State state)
+    {
+        this.id = id ;
+        this.instanceIdentifier = new InstanceIdentifier(id) ;
+        this.durable = durable ;
+        this.participant = participant ;
+        this.state = state ;
+        CoordinatorProcessor.getProcessor().activateCoordinator(this, id) ;
+    }
+    
+    /**
+     * Handle the aborted event.
+     * @param aborted The aborted notification.
+     * @param addressingContext The addressing context.
+     * @param jbossContext The jboss context.
+     * 
+     * None -> None (ignore)
+     * Active -> Aborting (forget)
+     * Preparing -> Aborting (forget)
+     * PreparedSuccess -> PreparedSuccess (return InconsistentInternalState)
+     * Committing -> Committing (return InconsistentInternalState)
+     * Aborting -> Aborting (forget)
+     */
+    public void aborted(final NotificationType aborted, final AddressingContext addressingContext, final JBossContext jbossContext)
+    {
+        final State current ;
+        synchronized(this)
+        {
+            current = state ;
+            if ((current == State.STATE_ACTIVE) || (current == State.STATE_PREPARING) ||
+                (current == State.STATE_ABORTING))
+            {
+                forget() ;
+            }
+        }
+        
+        if ((current == State.STATE_PREPARED_SUCCESS) || (current == State.STATE_COMMITTING))
+        {
+            sendInconsistentInternalState(addressingContext) ;
+        }
+    }
+    
+    /**
+     * Handle the committed event.
+     * @param committed The committed notification.
+     * @param addressingContext The addressing context.
+     * @param jbossContext The jboss context.
+     * 
+     * None -> None (ignore)
+     * Active -> Aborting (invalid state)
+     * Preparing -> Aborting (invalid state)
+     * PreparedSuccess -> PreparedSuccess (return InconsistentInternalState)
+     * Committing -> Committing (forget)
+     * Aborting -> Aborting (return InconsistentInternalState)
+     */
+    public void committed(final NotificationType committed, final AddressingContext addressingContext, final JBossContext jbossContext)
+    {
+        final State current ;
+        synchronized(this)
+        {
+            current = state ;
+            if (current == State.STATE_ACTIVE)
+            {
+                changeState(State.STATE_ABORTING) ;
+            }
+            else if ((current == State.STATE_PREPARING) || (current == State.STATE_COMMITTING))
+            {
+                forget() ;
+            }
+        }
+        
+        if ((current == State.STATE_PREPARED_SUCCESS) || (current == State.STATE_ABORTING))
+        {
+            sendInconsistentInternalState(addressingContext) ;
+        }
+    }
+    
+    /**
+     * Handle the prepared event.
+     * @param prepared The prepared notification.
+     * @param addressingContext The addressing context.
+     * @param jbossContext The jboss context.
+     * 
+     * None -> Durable: (send rollback), Volatile: (send Unknown Transaction)
+     * Active -> Aborting (invalid state)
+     * Preparing -> PreparedSuccess (Record Vote)
+     * PreparedSuccess -> PreparedSuccess (ignore)
+     * Committing -> Committing (resend Commit)
+     * Aborting -> Aborting (resend Rollback and forget)
+     */
+    public void prepared(final NotificationType prepared, final AddressingContext addressingContext, final JBossContext jbossContext)
+    {
+        final State current ;
+        synchronized(this)
+        {
+            current = state ;
+            if (current == State.STATE_ACTIVE)
+            {
+                changeState(State.STATE_ABORTING) ;
+            }
+            else if (current == State.STATE_PREPARING)
+            {
+                changeState(State.STATE_PREPARED_SUCCESS) ;
+            }
+        }
+        if (current == State.STATE_COMMITTING)
+        {
+            sendCommit() ;
+        }
+        else if ((current == State.STATE_ABORTING) || ((current == null) && !readOnly))
+        {
+            if (durable)
+            {
+                sendRollback() ;
+            }
+            else
+            {
+                sendUnknownTransaction(addressingContext) ;
+            }
+            if (current != null)
+            {
+                forget() ;
+            }
+        }
+    }
+    
+    /**
+     * Handle the readOnly event.
+     * @param readOnly The readOnly notification.
+     * @param addressingContext The addressing context.
+     * @param jbossContext The jboss context.
+     * 
+     * None -> None (ignore)
+     * Active -> Active (forget)
+     * Preparing -> Preparing (forget)
+     * PreparedSuccess -> PreparedSuccess (return InconsistentInternalState)
+     * Committing -> Committing (return InconsistentInternalState)
+     * Aborting -> Aborting (forget)
+     */
+    public void readOnly(final NotificationType readOnly, final AddressingContext addressingContext, final JBossContext jbossContext)
+    {
+        final State current ;
+        synchronized(this)
+        {
+            current = state ;
+            if ((current == State.STATE_ACTIVE) || (current == State.STATE_PREPARING) ||
+                (current == State.STATE_ABORTING))
+            {
+                if (current != State.STATE_ABORTING)
+                {
+                    this.readOnly = true ;
+                }
+                forget() ;
+            }
+        }
+        
+        if ((current == State.STATE_PREPARED_SUCCESS) || (current == State.STATE_COMMITTING))
+        {
+            sendInconsistentInternalState(addressingContext) ;
+        }
+    }
+
+    /**
+     * Handle the soap fault event.
+     * @param soapFault The soap fault.
+     * @param addressingContext The addressing context.
+     * @param jbossContext The jboss context.
+     * 
+     * @message com.arjuna.wst.messaging.engines.Coordinator11Engine.soapFault_1 [com.arjuna.wst.messaging.engines.Coordinator11Engine.soapFault_1] - Unexpected SOAP fault for coordinator {0}: {1} {2}
+     */
+    public void soapFault(final SoapFault soapFault, final AddressingContext addressingContext, final JBossContext jbossContext)
+    {
+        if (WSTLogger.arjLoggerI18N.isDebugEnabled())
+        {
+            final InstanceIdentifier instanceIdentifier = jbossContext.getInstanceIdentifier() ;
+            final SoapFaultType soapFaultType = soapFault.getSoapFaultType() ;
+            final QName subCode = soapFault.getSubcode() ;
+            WSTLogger.arjLoggerI18N.debug("com.arjuna.wst.messaging.engines.Coordinator11Engine.soapFault_1", new Object[] {instanceIdentifier, soapFaultType, subCode}) ;
+        }
+    }
+    
+    /**
+     * Handle the prepare event.
+     * 
+     * None -> None (invalid state)
+     * Active -> Preparing (send prepare)
+     * Preparing -> Preparing (resend prepare)
+     * PreparedSuccess -> PreparedSuccess (do nothing)
+     * Committing -> Committing (invalid state)
+     * Aborting -> Aborting (invalid state)
+     */
+    public State prepare()
+    {
+        final State current ;
+        synchronized(this)
+        {
+            current = state ;
+            if (current == State.STATE_ACTIVE)
+            {
+                changeState(State.STATE_PREPARING) ;
+            }
+        }
+        
+        if ((current == State.STATE_ACTIVE) || (current == State.STATE_PREPARING))
+        {
+            sendPrepare() ;
+        }
+        
+        final State result = waitForState(State.STATE_PREPARING, TransportTimer.getTransportTimeout()) ;
+        if (result != State.STATE_PREPARING)
+        {
+            return result ;
+        }
+        
+        synchronized(this)
+        {
+            if ((state == State.STATE_PREPARING) && (timerTask != null))
+            {
+                timerTask.cancel() ;
+            }
+            return state ;
+        }
+    }
+    
+    /**
+     * Handle the commit event.
+     * 
+     * None -> None (invalid state)
+     * Active -> Active (invalid state)
+     * Preparing -> Preparing (invalid state)
+     * PreparedSuccess -> Committing (send commit)
+     * Committing -> Committing (resend commit)
+     * Aborting -> Aborting (invalid state)
+     */
+    public State commit()
+    {
+        final State current ;
+        synchronized(this)
+        {
+            current = state ;
+            if (current == State.STATE_PREPARED_SUCCESS)
+            {
+                changeState(State.STATE_COMMITTING) ;
+            }
+        }
+        
+        if ((current == State.STATE_PREPARED_SUCCESS) || (current == State.STATE_COMMITTING))
+        {
+            sendCommit() ;
+        }
+        
+        final State result = waitForState(State.STATE_COMMITTING, TransportTimer.getTransportTimeout()) ;
+        if (result != State.STATE_COMMITTING)
+        {
+            return result ;
+        }
+        
+        synchronized(this)
+        {
+            if ((state == State.STATE_COMMITTING) && (timerTask != null))
+            {
+                timerTask.cancel() ;
+            }
+            return state ;
+        }
+    }
+    
+    /**
+     * Handle the rollback event.
+     * 
+     * None -> None (invalid state)
+     * Active -> Aborting (send rollback)
+     * Preparing -> Aborting (send rollback)
+     * PreparedSuccess -> Aborting (send rollback)
+     * Committing -> Committing (invalid state)
+     * Aborting -> Aborting (do nothing)
+     */
+    public State rollback()
+    {
+        final State current ;
+        synchronized(this)
+        {
+            current = state ;
+            if ((current == State.STATE_ACTIVE) || (current == State.STATE_PREPARING) ||
+                (current == State.STATE_PREPARED_SUCCESS))
+            {
+                changeState(State.STATE_ABORTING) ;
+            }
+        }
+        
+        if ((current == State.STATE_ACTIVE) || (current == State.STATE_PREPARING) ||
+            (current == State.STATE_PREPARED_SUCCESS))
+        {
+            sendRollback() ;
+        }
+        else if (current == State.STATE_ABORTING)
+        {
+            forget() ;
+        }
+        
+        return waitForState(State.STATE_ABORTING, TransportTimer.getTransportTimeout()) ;
+    }
+    
+    /**
+     * Handle the comms timeout event.
+     *
+     * Preparing -> Preparing (resend Prepare)
+     * Committing -> Committing (resend Commit)
+     */
+    private void commsTimeout()
+    {
+        final State current ;
+        synchronized(this)
+        {
+            current = state ;
+        }
+        
+        if (current == State.STATE_PREPARING)
+        {
+            sendPrepare() ;
+        }
+        else if (current == State.STATE_COMMITTING)
+        {
+            sendCommit() ;
+        }
+    }
+    
+    /**
+     * Get the coordinator id.
+     * @return The coordinator id.
+     */
+    public String getId()
+    {
+        return id ;
+    }
+    
+    /**
+     * Get the participant endpoint reference
+     * @return The participant endpoint reference
+     */
+    public EndpointReferenceType getParticipant()
+    {
+        return participant ;
+    }
+    
+    /**
+     * Is the participant durable?
+     * @return true if durable, false otherwise.
+     */
+    public boolean isDurable()
+    {
+        return durable ;
+    }
+    
+    /**
+     * Was this a read only response?
+     * @return true if a read only response, false otherwise.
+     */
+    public synchronized boolean isReadOnly()
+    {
+        return readOnly ;
+    }
+    
+    /**
+     * Change the state and notify any listeners.
+     * @param state The new state.
+     */
+    private synchronized void changeState(final State state)
+    {
+        if (this.state != state)
+        {
+            this.state = state ;
+            notifyAll() ;
+        }
+    }
+    
+    /**
+     * Wait for the state to change from the specified state.
+     * @param origState The original state.
+     * @param delay The maximum time to wait for (in milliseconds).
+     * @return The current state.
+     */
+    private State waitForState(final State origState, final long delay)
+    {
+        final long end = System.currentTimeMillis() + delay ;
+        synchronized(this)
+        {
+            while(state == origState)
+            {
+                final long remaining = end - System.currentTimeMillis() ;
+                if (remaining <= 0)
+                {
+                    break ;
+                }
+                try
+                {
+                    wait(remaining) ;
+                }
+                catch (final InterruptedException ie) {} // ignore
+            }
+            return state ;
+        }
+    }
+    
+    /**
+     * Forget the current coordinator.
+     */
+    private void forget()
+    {
+        changeState(null) ;
+        CoordinatorProcessor.getProcessor().deactivateCoordinator(this) ;
+    }
+    
+    /**
+     * Send the prepare message.
+     * 
+     * @message com.arjuna.wst.messaging.engines.Coordinator11Engine.sendPrepare_1 [com.arjuna.wst.messaging.engines.Coordinator11Engine.sendPrepare_1] - Unexpecting exception while sending Prepare
+     */
+    private void sendPrepare()
+    {
+        try
+        {
+            ParticipantClient.getClient().sendPrepare(createContext(), instanceIdentifier) ;
+        }
+        catch (final Throwable th)
+        {
+            if (WSTLogger.arjLoggerI18N.isDebugEnabled())
+            {
+                WSTLogger.arjLoggerI18N.debug("com.arjuna.wst.messaging.engines.Coordinator11Engine.sendRollback_1", th) ;
+            }
+        }
+        
+        initiateTimer() ;
+    }
+    
+    /**
+     * Send the commit message.
+     * 
+     * @message com.arjuna.wst.messaging.engines.Coordinator11Engine.sendCommit_1 [com.arjuna.wst.messaging.engines.Coordinator11Engine.sendCommit_1] - Unexpecting exception while sending Commit
+     */
+    private void sendCommit()
+    {
+        try
+        {
+            ParticipantClient.getClient().sendCommit(createContext(), instanceIdentifier) ;
+        }
+        catch (final Throwable th)
+        {
+            if (WSTLogger.arjLoggerI18N.isDebugEnabled())
+            {
+                WSTLogger.arjLoggerI18N.debug("com.arjuna.wst.messaging.engines.Coordinator11Engine.sendCommit_1", th) ;
+            }
+        }
+        
+        initiateTimer() ;
+    }
+    
+    /**
+     * Send the rollback message.
+     * 
+     * @message com.arjuna.wst.messaging.engines.Coordinator11Engine.sendRollback_1 [com.arjuna.wst.messaging.engines.Coordinator11Engine.sendRollback_1] - Unexpecting exception while sending Rollback
+     */
+    private void sendRollback()
+    {
+        try
+        {
+            ParticipantClient.getClient().sendRollback(createContext(), instanceIdentifier) ;
+        }
+        catch (final Throwable th)
+        {
+            if (WSTLogger.arjLoggerI18N.isDebugEnabled())
+            {
+                WSTLogger.arjLoggerI18N.debug("com.arjuna.wst.messaging.engines.Coordinator11Engine.sendRollback_1", th) ;
+            }
+        }
+    }
+    
+    /**
+     * Send the InconsistentInternalState message.
+     * 
+     * @message com.arjuna.wst.messaging.engines.Coordinator11Engine.sendInconsistentInternalState_1 [com.arjuna.wst.messaging.engines.Coordinator11Engine.sendInconsistentInternalState_1] - Inconsistent internal state.
+     * @message com.arjuna.wst.messaging.engines.Coordinator11Engine.sendInconsistentInternalState_2 [com.arjuna.wst.messaging.engines.Coordinator11Engine.sendInconsistentInternalState_2] - Unexpecting exception while sending InconsistentInternalState
+     */
+    private void sendInconsistentInternalState(final AddressingContext addressingContext)
+    {
+        try
+        {
+            final AddressingContext responseContext = createContext() ;
+            final AttributedURIType messageId = addressingContext.getMessageID() ;
+            if (messageId != null)
+            {
+                responseContext.addRelatesTo(new RelatesToType(messageId.getValue())) ;
+            }
+            
+            final String message = WSTLogger.log_mesg.getString("com.arjuna.wst.messaging.engines.Coordinator11Engine.sendInconsistentInternalState_1") ;
+            final SoapFault soapFault = new SoapFault(SoapFaultType.FAULT_SENDER, AtomicTransactionConstants.WSAT_ERROR_CODE_INCONSISTENT_INTERNAL_STATE_QNAME, message) ;
+            ParticipantClient.getClient().sendSoapFault(responseContext, soapFault) ;
+        }
+        catch (final Throwable th)
+        {
+            if (WSTLogger.arjLoggerI18N.isDebugEnabled())
+            {
+                WSTLogger.arjLoggerI18N.debug("com.arjuna.wst.messaging.engines.Coordinator11Engine.sendInconsistentInternalState_2", th) ;
+            }
+        }
+    }
+    
+    /**
+     * Send the UnknownTransaction message.
+     * 
+     * @message com.arjuna.wst.messaging.engines.Coordinator11Engine.sendUnknownTransaction_1 [com.arjuna.wst.messaging.engines.Coordinator11Engine.sendUnknownTransaction_1] - Unknown Transaction.
+     * @message com.arjuna.wst.messaging.engines.Coordinator11Engine.sendUnknownTransaction_2 [com.arjuna.wst.messaging.engines.Coordinator11Engine.sendUnknownTransaction_2] - Unexpecting exception while sending UnknownTransaction
+     */
+    private void sendUnknownTransaction(final AddressingContext addressingContext)
+    {
+        try
+        {
+            final AddressingContext responseContext = createContext() ;
+            final AttributedURIType messageId = addressingContext.getMessageID() ;
+            if (messageId != null)
+            {
+                responseContext.addRelatesTo(new RelatesToType(messageId.getValue())) ;
+            }
+            
+            final String message = WSTLogger.log_mesg.getString("com.arjuna.wst.messaging.engines.Coordinator11Engine.sendUnknownTransaction_1") ;
+            final SoapFault soapFault = new SoapFault(SoapFaultType.FAULT_SENDER, AtomicTransactionConstants.WSAT_ERROR_CODE_UNKNOWN_TRANSACTION_QNAME, message) ;
+            ParticipantClient.getClient().sendSoapFault(responseContext, soapFault) ;
+        }
+        catch (final Throwable th)
+        {
+            if (WSTLogger.arjLoggerI18N.isDebugEnabled())
+            {
+                WSTLogger.arjLoggerI18N.debug("com.arjuna.wst.messaging.engines.Coordinator11Engine.sendUnknownTransaction_2", th) ;
+            }
+        }
+    }
+    
+    /**
+     * Initiate the timer.
+     */
+    private synchronized void initiateTimer()
+    {
+        if (timerTask != null)
+        {
+            timerTask.cancel() ;
+        }
+        if ((state == State.STATE_PREPARING) || (state == State.STATE_COMMITTING))
+        {
+            timerTask = new TimerTask() {
+                public void run() {
+                    commsTimeout() ;
+                }
+            } ;
+            TransportTimer.getTimer().schedule(timerTask, TransportTimer.getTransportPeriod()) ;
+        }
+        else
+        {
+            timerTask = null ;
+        }
+    }
+    
+    /**
+     * Create a context for the outgoing message.
+     * @return The addressing context.
+     */
+    private AddressingContext createContext()
+    {
+        final String messageId = MessageId.getMessageId() ;
+        return AddressingContext.createRequestContext(participant, messageId) ;
+    }
+}


Property changes on: labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/wst/messaging/engines/Coordinator11Engine.java
___________________________________________________________________
Name: svn:keywords
   + Rev Date
Name: svn:eol-style
   + native

Added: labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/wst/messaging/engines/CoordinatorCompletionCoordinator11Engine.java
===================================================================
--- labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/wst/messaging/engines/CoordinatorCompletionCoordinator11Engine.java	                        (rev 0)
+++ labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/wst/messaging/engines/CoordinatorCompletionCoordinator11Engine.java	2007-08-14 12:43:41 UTC (rev 14200)
@@ -0,0 +1,988 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag.  All rights reserved. 
+ * See the copyright.txt in the distribution for a full listing 
+ * of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU General Public License, v. 2.0.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A 
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+ * PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+ * You should have received a copy of the GNU General Public License,
+ * v. 2.0 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+ * MA  02110-1301, USA.
+ * 
+ * (C) 2005-2006,
+ * @author JBoss Inc.
+ */
+package com.arjuna.wst.messaging.engines;
+
+import java.io.IOException;
+
+import javax.xml.namespace.QName;
+
+import com.arjuna.webservices.SoapFault;
+import com.arjuna.webservices.SoapFaultType;
+import com.arjuna.webservices.logging.WSTLogger;
+import com.arjuna.webservices.util.TransportTimer;
+import com.arjuna.webservices.wsaddr2005.AddressingContext;
+import com.arjuna.webservices.wsaddr2005.EndpointReferenceType;
+import com.arjuna.webservices.wsba11.CoordinatorCompletionCoordinatorInboundEvents;
+import com.arjuna.webservices.wsba11.ExceptionType;
+import com.arjuna.webservices.wsba11.NotificationType;
+import com.arjuna.webservices.wsba11.State;
+import com.arjuna.webservices.wsba11.StatusType;
+import com.arjuna.webservices.wsba11.client.CoordinatorCompletionParticipantClient;
+import com.arjuna.webservices.wsba11.processors.CoordinatorCompletionCoordinatorProcessor;
+import com.arjuna.webservices.wscoor11.CoordinationConstants;
+import com.arjuna.webservices.wsjboss.InstanceIdentifier;
+import com.arjuna.webservices.wsjboss.JBossContext;
+import com.arjuna.wsc.messaging.MessageId;
+import com.arjuna.wst.BA11ParticipantManager;
+
+/**
+ * The coordinator completion coordinator state engine
+ * @author kevin
+ */
+public class CoordinatorCompletionCoordinator11Engine implements CoordinatorCompletionCoordinatorInboundEvents
+{
+    /**
+     * The coordinator id.
+     */
+    private final String id ;
+    /**
+     * The instance identifier.
+     */
+    private final InstanceIdentifier instanceIdentifier ;
+    /**
+     * The participant endpoint reference.
+     */
+    private final EndpointReferenceType participant ;
+    /**
+     * The associated coordinator
+     */
+    private BA11ParticipantManager coordinator ;
+    /**
+     * The current state.
+     */
+    private State state ;
+    
+    /**
+     * Construct the initial engine for the coordinator.
+     * @param id The coordinator id.
+     * @param participant The participant endpoint reference.
+     */
+    public CoordinatorCompletionCoordinator11Engine(final String id, final EndpointReferenceType participant)
+    {
+        this(id, participant, State.STATE_ACTIVE) ;
+    }
+    
+    /**
+     * Construct the engine for the coordinator in a specified state.
+     * @param id The coordinator id.
+     * @param participant The participant endpoint reference.
+     * @param state The initial state.
+     */
+    public CoordinatorCompletionCoordinator11Engine(final String id, final EndpointReferenceType participant,
+        final State state)
+    {
+        this.id = id ;
+        this.instanceIdentifier = new InstanceIdentifier(id) ;
+        this.participant = participant ;
+        this.state = state ;
+    }
+    
+    /**
+     * Set the coordinator and register
+     * @param coordinator
+     */
+    public void setCoordinator(final BA11ParticipantManager coordinator)
+    {
+        this.coordinator = coordinator ;
+        CoordinatorCompletionCoordinatorProcessor.getProcessor().activateCoordinator(this, id) ;
+    }
+    
+    /**
+     * Handle the cancelled event.
+     * @param cancelled The cancelled notification.
+     * @param addressingContext The addressing context.
+     * @param jbossContext The jboss context.
+     * 
+     * Active -> Active (invalid state)
+     * Canceling-Active -> Ended
+     * Canceling-Completing -> Ended
+     * Completing -> Completing (invalid state)
+     * Completed -> Completed (invalid state)
+     * Closing -> Closing (invalid state)
+     * Compensating -> Compensating (invalid state)
+     * Failing-Active -> Failing-Active (invalid state)
+     * Failing-Canceling -> Failing-Canceling (invalid state)
+     * Failing-Completing -> Failing-Completing (invalid state)
+     * Failing-Compensating -> Failing-Compensating (invalid state)
+     * NotCompleting -> NotCompleting (invalid state)
+     * Exiting -> Exiting (invalid state)
+     * Ended -> Ended
+     */
+    public void cancelled(final NotificationType cancelled, final AddressingContext addressingContext, final JBossContext jbossContext)
+    {
+        final State current ;
+        synchronized(this)
+        {
+            current = state ;
+            if ((current == State.STATE_CANCELING_ACTIVE) || (current == State.STATE_CANCELING_COMPLETING))
+            {
+        	ended() ;
+            }
+        }
+    }
+    
+    /**
+     * Handle the closed event.
+     * @param closed The closed notification.
+     * @param addressingContext The addressing context.
+     * @param jbossContext The jboss context.
+     * 
+     * Active -> Active (invalid state)
+     * Canceling-Active -> Canceling-Active (invalid state)
+     * Canceling-Completing -> Canceling-Completing (invalid state)
+     * Completing -> Completing (invalid state)
+     * Completed -> Completed (invalid state)
+     * Closing -> Ended
+     * Compensating -> Compensating (invalid state)
+     * Failing-Active -> Failing-Active (invalid state)
+     * Failing-Canceling -> Failing-Canceling (invalid state)
+     * Failing-Completing -> Failing-Completing (invalid state)
+     * Failing-Compensating -> Failing-Compensating (invalid state)
+     * NotCompleting -> NotCompleting (invalid state)
+     * Exiting -> Exiting (invalid state)
+     * Ended -> Ended
+     */
+    public void closed(final NotificationType closed, final AddressingContext addressingContext, final JBossContext jbossContext)
+    {
+        final State current ;
+        synchronized(this)
+        {
+            current = state ;
+            if (current == State.STATE_CLOSING)
+            {
+                ended() ;
+            }
+        }
+    }
+    
+    /**
+     * Handle the compensated event.
+     * @param compensated The compensated notification.
+     * @param addressingContext The addressing context.
+     * @param jbossContext The jboss context.
+     * 
+     * Active -> Active (invalid state)
+     * Canceling-Active -> Canceling-Active (invalid state)
+     * Canceling-Completing -> Canceling-Completing (invalid state)
+     * Completing -> Completing (invalid state)
+     * Completed -> Completed (invalid state)
+     * Closing -> Closing (invalid state)
+     * Compensating -> Ended
+     * Failing-Active -> Failing-Active (invalid state)
+     * Failing-Canceling -> Failing-Canceling (invalid state)
+     * Failing-Completing -> Failing-Completing (invalid state)
+     * Failing-Compensating -> Failing-Compensating (invalid state)
+     * NotCompleting -> NotCompleting (invalid state)
+     * Exiting -> Exiting (invalid state)
+     * Ended -> Ended
+     */
+    public void compensated(final NotificationType compensated, final AddressingContext addressingContext, final JBossContext jbossContext)
+    {
+        final State current ;
+        synchronized(this)
+        {
+            current = state ;
+            if (current == State.STATE_COMPENSATING)
+            {
+                ended() ;
+            }
+        }
+    }
+    
+    /**
+     * Handle the completed event.
+     * @param completed The completed notification.
+     * @param addressingContext The addressing context.
+     * @param jbossContext The jboss context.
+     * 
+     * Active -> Active (invalid state)
+     * Canceling-Active -> Canceling-Active (invalid state)
+     * Canceling-Completing -> Completed
+     * Completing -> Completed
+     * Completed -> Completed
+     * Closing -> Closing (resend Close)
+     * Compensating -> Compensating (resend Compensate)
+     * Failing-Active -> Failing-Active (invalid state)
+     * Failing-Canceling -> Failing-Canceling (invalid state)
+     * Failing-Completing -> Failing-Completing (invalid state)
+     * Failing-Compensating -> Failing-Compensating
+     * NotCompleting -> NotCompleting (invalid state)
+     * Exiting -> Exiting (invalid state)
+     * Ended -> Ended
+     */
+    public void completed(final NotificationType completed, final AddressingContext addressingContext,
+        final JBossContext jbossContext)
+    {
+        final State current ;
+        synchronized(this)
+        {
+            current = state ;
+            if ((current == State.STATE_CANCELING_COMPLETING) || (current == State.STATE_COMPLETING))
+            {
+                changeState(State.STATE_COMPLETED) ;
+            }
+            else if (current == State.STATE_ACTIVE)
+            {
+        	ended() ;
+            }
+        }
+        
+        if (current == State.STATE_CLOSING)
+        {
+            sendClose() ;
+        }
+        else if (current == State.STATE_COMPENSATING)
+        {
+            sendCompensate() ;
+        }
+        else if (current == State.STATE_ACTIVE)
+        {
+            sendInvalidStateFault() ;
+        }
+    }
+    
+    /**
+     * Handle the exit event.
+     * @param exit The exit notification.
+     * @param addressingContext The addressing context.
+     * @param jbossContext The jboss context.
+     * 
+     * Active -> Exiting
+     * Canceling-Active -> Exiting
+     * Canceling-Completing -> Exiting
+     * Completing -> Exiting
+     * Completed -> Completed (invalid state)
+     * Closing -> Closing (invalid state)
+     * Compensating -> Compensating (invalid state)
+     * Failing-Active -> Failing-Active (invalid state)
+     * Failing-Canceling -> Failing-Canceling (invalid state)
+     * Failing-Completing -> Failing-Completing (invalid state)
+     * Failing-Compensating -> Failing-Compensating (invalid state)
+     * NotCompleting -> NotCompleting (invalid state)
+     * Exiting -> Exiting
+     * Ended -> Ended (resend Exited)
+     */
+    public void exit(final NotificationType exit, final AddressingContext addressingContext, final JBossContext jbossContext)
+    {
+        final State current ;
+        synchronized(this)
+        {
+            current = state ;
+            if ((current == State.STATE_ACTIVE) || (current == State.STATE_CANCELING_ACTIVE) ||
+        	(current == State.STATE_CANCELING_COMPLETING) || (current == State.STATE_COMPLETING))
+            {
+                changeState(State.STATE_EXITING) ;
+            }
+        }
+        
+        if ((current == State.STATE_ACTIVE) || (current == State.STATE_CANCELING_ACTIVE) ||
+            (current == State.STATE_CANCELING_COMPLETING) || (current == State.STATE_COMPLETING))
+        {
+            executeExit() ;
+        }
+        else if (current == State.STATE_ENDED)
+        {
+            sendExited() ;
+        }
+    }
+    
+    /**
+     * Handle the fail event.
+     * @param fail The fail exception.
+     * @param addressingContext The addressing context.
+     * @param jbossContext The jboss context.
+     * 
+     * Active -> Failing-Active
+     * Canceling-Active -> Failing-Canceling
+     * Canceling-Completing -> Failing-Canceling
+     * Completing -> Failing-Completing
+     * Completed -> Completed (invalid state)
+     * Closing -> Closing (invalid state)
+     * Compensating -> Failing-Compensating
+     * Failing-Active -> Failing-Active
+     * Failing-Canceling -> Failing-Canceling
+     * Failing-Completing -> Failing-Completing
+     * Failing-Compensating -> Failing-Compensating
+     * NotCompleting -> NotCompleting (invalid state)
+     * Exiting -> Exiting (invalid state)
+     * Ended -> Ended (resend Failed)
+     */
+    public void fail(final ExceptionType fail, final AddressingContext addressingContext,
+        final JBossContext jbossContext)
+    {
+        final State current ;
+        synchronized(this)
+        {
+            current = state ;
+            if (current == State.STATE_ACTIVE)
+            {
+                changeState(State.STATE_FAILING_ACTIVE) ;
+            }
+            else if ((current == State.STATE_CANCELING_ACTIVE) || (current == State.STATE_CANCELING_COMPLETING))
+            {
+                changeState(State.STATE_FAILING_CANCELING) ;
+            }
+            else if (current == State.STATE_COMPLETING)
+            {
+                changeState(State.STATE_FAILING_COMPLETING) ;
+            }
+            else if (current == State.STATE_COMPENSATING)
+            {
+                changeState(State.STATE_FAILING_COMPENSATING) ;
+            }
+        }
+        
+        if (current == State.STATE_ACTIVE)
+        {
+            executeFail(fail.getExceptionIdentifier()) ;
+        }
+        else if ((current == State.STATE_CANCELING_ACTIVE) || (current == State.STATE_CANCELING_COMPLETING) ||
+        	 (current == State.STATE_COMPLETING) || (current == State.STATE_COMPENSATING))
+        {
+            sendFailed() ;
+            ended() ;
+        }
+        else if (current == State.STATE_ENDED)
+        {
+            sendFailed() ;
+        }
+    }
+    
+    /**
+     * Handle the cannot complete event.
+     * @param cannotComplete The cannotComplete exception.
+     * @param addressingContext The addressing context.
+     * @param jbossContext The jboss context.
+     * 
+     * Active -> NotComleting
+     * Canceling-Active -> NotCompleting
+     * Canceling-Completing -> NotCompleting
+     * Completing -> NotCompleting
+     * Completed -> Completed (invalid state)
+     * Closing -> Closing (invalid state)
+     * Compensating -> Compensating (invalid state)
+     * Failing-Active -> Failing-Active (invalid state)
+     * Failing-Canceling -> Failing-Canceling (invalid state)
+     * Failing-Completing -> Failing-Completing (invalid state)
+     * Failing-Compensating -> Failing-Compensating (invalid state)
+     * NotCompleting -> NotCompleting
+     * Exiting -> Exiting (invalid state)
+     * Ended -> Ended (resend NotCompleted)
+     */
+    public void cannotComplete(final NotificationType cannotComplete, final AddressingContext addressingContext,
+        final JBossContext jbossContext)
+    {
+        final State current ;
+        synchronized(this)
+        {
+            current = state ;
+            if ((current == State.STATE_ACTIVE) || (current == State.STATE_CANCELING_ACTIVE) ||
+        	(current == State.STATE_CANCELING_COMPLETING) || (current == State.STATE_COMPLETING))
+            {
+                changeState(State.STATE_NOT_COMPLETING) ;
+            }
+        }
+        
+        if ((current == State.STATE_ACTIVE) || (current == State.STATE_CANCELING_ACTIVE) ||
+            (current == State.STATE_CANCELING_COMPLETING) || (current == State.STATE_COMPLETING))
+        {
+            executeCannotComplete() ;
+        }
+        else if (current == State.STATE_ENDED)
+        {
+            sendNotCompleted() ;
+        }
+    }
+    
+    /**
+     * Handle the getStatus event.
+     * @param getStatus The getStatus notification.
+     * @param addressingContext The addressing context.
+     * @param jbossContext The jboss context.
+     */
+    public void getStatus(final NotificationType getStatus, final AddressingContext addressingContext, final JBossContext jbossContext)
+    {
+	final State current ;
+	synchronized(this)
+	{
+	    current = state ;
+	}
+	sendStatus(current) ;
+    }
+    
+    /**
+     * Handle the status event.
+     * @param status The status.
+     * @param addressingContext The addressing context.
+     * @param jbossContext The jboss context.
+     */
+    public void status(final StatusType status, final AddressingContext addressingContext, final JBossContext jbossContext)
+    {
+        // KEV - implement
+    }
+    
+    /**
+     * Handle the SOAP fault event.
+     * @param soapFault The SOAP fault.
+     * @param addressingContext The addressing context.
+     * @param jbossContext The jboss context.
+     */
+    public void soapFault(final SoapFault soapFault, final AddressingContext addressingContext, final JBossContext jbossContext)
+    {
+	ended() ;
+	try
+	{
+	    coordinator.fail(soapFault.getSubcode()) ;
+	}
+	catch (final Throwable th) {} // ignore
+    }
+    
+    /**
+     * Handle the get status event.
+     * @return The state.
+     */
+    public synchronized State getStatus()
+    {
+        return state ;
+    }
+    
+    /**
+     * Handle the cancel event.
+     * @return The state.
+     * 
+     * Active -> Canceling-Active
+     * Canceling-Active -> Canceling-Active
+     * Canceling-Completing -> Canceling-Completing
+     * Completing -> Canceling-Completing
+     * Completed -> Completed (invalid state)
+     * Closing -> Closing (invalid state)
+     * Compensating -> Compensating (invalid state)
+     * Failing-Active -> Failing-Active (invalid state)
+     * Failing-Canceling -> Failing-Canceling (invalid state)
+     * Failing-Completing -> Failing-Completing (invalid state)
+     * Failing-Compensating -> Failing-Compensating (invalid state)
+     * NotCompleting -> NotCompleting (invalid state)
+     * Exiting -> Exiting (invalid state)
+     * Ended -> Ended (invalid state)
+     */
+    public State cancel()
+    {
+        final State current ;
+        synchronized(this)
+        {
+            current = state ;
+            if (current == State.STATE_ACTIVE)
+            {
+                changeState(State.STATE_CANCELING_ACTIVE) ;
+            }
+            else if (current == State.STATE_COMPLETING)
+            {
+                changeState(State.STATE_CANCELING_COMPLETING) ;
+            }
+        }
+        
+        if (current == State.STATE_ACTIVE)
+        {
+            sendCancel() ;
+            return waitForState(State.STATE_CANCELING_ACTIVE, TransportTimer.getTransportTimeout()) ;
+        }
+        else if (current == State.STATE_COMPLETING)
+        {
+            sendCancel() ;
+            return waitForState(State.STATE_CANCELING_COMPLETING, TransportTimer.getTransportTimeout()) ;
+        }
+        return current ;
+    }
+    
+    /**
+     * Handle the compensate event.
+     * @return The state.
+     * 
+     * Active -> Active (invalid state)
+     * Canceling-Active -> Canceling-Active (invalid state)
+     * Canceling-Completing -> Canceling-Completing (invalid state)
+     * Completing -> Completing (invalid state)
+     * Completed -> Compensating
+     * Closing -> Closing (invalid state)
+     * Compensating -> Compensating
+     * Failing-Active -> Failing-Active (invalid state)
+     * Failing-Canceling -> Failing-Canceling (invalid state)
+     * Failing-Completing -> Failing-Completing (invalid state)
+     * Failing-Compensating -> Failing-Compensating (invalid state)
+     * NotCompleting -> NotCompleting (invalid state)
+     * Exiting -> Exiting (invalid state)
+     * Ended -> Ended (invalid state)
+     */
+    public State compensate()
+    {
+        final State current ;
+        synchronized(this)
+        {
+            current = state ;
+            if (current == State.STATE_COMPLETED)
+            {
+                changeState(State.STATE_COMPENSATING) ;
+            }
+        }
+        
+        if (current == State.STATE_COMPLETED)
+        {
+            sendCompensate() ;
+            return waitForState(State.STATE_COMPENSATING, TransportTimer.getTransportTimeout()) ;
+        }
+        
+        return current ;
+    }
+    
+    /**
+     * Handle the complete event.
+     * @return The state.
+     * 
+     * Active -> Completing
+     * Canceling-Active -> Canceling-Active (invalid state)
+     * Canceling-Completing -> Canceling-Completing (invalid state)
+     * Completing -> Completing
+     * Completed -> Completed (invalid state)
+     * Closing -> Closing (invalid state)
+     * Compensating -> Compensating (invalid state)
+     * Failing-Active -> Failing-Active (invalid state)
+     * Failing-Canceling -> Failing-Canceling (invalid state)
+     * Failing-Completing -> Failing-Completing (invalid state)
+     * Failing-Compensating -> Failing-Compensating (invalid state)
+     * NotCompleting -> NotCompleting (invalid state)
+     * Exiting -> Exiting (invalid state)
+     * Ended -> Ended (invalid state)
+     */
+    public State complete()
+    {
+        final State current ;
+        synchronized(this)
+        {
+            current = state ;
+            if (current == State.STATE_ACTIVE)
+            {
+                changeState(State.STATE_COMPLETING) ;
+            }
+        }
+        
+        if (current == State.STATE_ACTIVE)
+        {
+            sendComplete() ;
+            return waitForState(State.STATE_COMPLETING, TransportTimer.getTransportTimeout()) ;
+        }
+        return current ;
+    }
+    
+    /**
+     * Handle the close event.
+     * @return The state.
+     * 
+     * Active -> Active (invalid state)
+     * Canceling-Active -> Canceling-Active (invalid state)
+     * Canceling-Completing -> Canceling-Completing (invalid state)
+     * Completing -> Completing (invalid state)
+     * Completed -> Closing
+     * Closing -> Closing
+     * Compensating -> Compensating (invalid state)
+     * Failing-Active -> Failing-Active (invalid state)
+     * Failing-Canceling -> Failing-Canceling (invalid state)
+     * Failing-Completing -> Failing-Completing (invalid state)
+     * Failing-Compensating -> Failing-Compensating (invalid state)
+     * NotCompleting -> NotCompleting (invalid state)
+     * Exiting -> Exiting (invalid state)
+     * Ended -> Ended (invalid state)
+     */
+    public State close()
+    {
+        final State current ;
+        synchronized(this)
+        {
+            current = state ;
+            if (current == State.STATE_COMPLETED)
+            {
+                changeState(State.STATE_CLOSING) ;
+            }
+        }
+        
+        if (current == State.STATE_COMPLETED)
+        {
+            sendClose() ;
+            return waitForState(State.STATE_CLOSING, TransportTimer.getTransportTimeout()) ;
+        }
+        return current ;
+    }
+    
+    /**
+     * Send the close message.
+     * 
+     * @message com.arjuna.wst.messaging.engines.CoordinatorCompletionCoordinator11Engine.sendClose_1 [com.arjuna.wst.messaging.engines.CoordinatorCompletionCoordinator11Engine.sendClose_1] - Unexpected exception while sending Close
+     */
+    private void sendClose()
+    {
+        final AddressingContext addressingContext = createContext() ;
+        try
+        {
+            CoordinatorCompletionParticipantClient.getClient().sendClose(addressingContext, instanceIdentifier) ;
+        }
+        catch (final Throwable th)
+        {
+            if (WSTLogger.arjLoggerI18N.isDebugEnabled())
+            {
+                WSTLogger.arjLoggerI18N.debug("com.arjuna.wst.messaging.engines.CoordinatorCompletionCoordinator11Engine.sendClose_1", th) ;
+            }
+        }
+    }
+    
+    /**
+     * Send the compensate message.
+     * 
+     * @message com.arjuna.wst.messaging.engines.CoordinatorCompletionCoordinator11Engine.sendCompensate_1 [com.arjuna.wst.messaging.engines.CoordinatorCompletionCoordinator11Engine.sendCompensate_1] - Unexpected exception while sending Compensate
+     */
+    private void sendCompensate()
+    {
+        final AddressingContext addressingContext = createContext() ;
+        try
+        {
+            CoordinatorCompletionParticipantClient.getClient().sendCompensate(addressingContext, instanceIdentifier) ;
+        }
+        catch (final Throwable th)
+        {
+            if (WSTLogger.arjLoggerI18N.isDebugEnabled())
+            {
+                WSTLogger.arjLoggerI18N.debug("com.arjuna.wst.messaging.engines.CoordinatorCompletionCoordinator11Engine.sendCompensate_1", th) ;
+            }
+        }
+    }
+    
+    /**
+     * Send the complete message.
+     * 
+     * @message com.arjuna.wst.messaging.engines.CoordinatorCompletionCoordinator11Engine.sendComplete_1 [com.arjuna.wst.messaging.engines.CoordinatorCompletionCoordinator11Engine.sendComplete_1] - Unexpected exception while sending Complete
+     */
+    private void sendComplete()
+    {
+        final AddressingContext addressingContext = createContext() ;
+        try
+        {
+            CoordinatorCompletionParticipantClient.getClient().sendComplete(addressingContext, instanceIdentifier) ;
+        }
+        catch (final Throwable th)
+        {
+            if (WSTLogger.arjLoggerI18N.isDebugEnabled())
+            {
+                WSTLogger.arjLoggerI18N.debug("com.arjuna.wst.messaging.engines.CoordinatorCompletionCoordinator11Engine.sendComplete_1", th) ;
+            }
+        }
+    }
+    
+    /**
+     * Send the cancel message.
+     * 
+     * @message com.arjuna.wst.messaging.engines.CoordinatorCompletionCoordinator11Engine.sendCancel_1 [com.arjuna.wst.messaging.engines.CoordinatorCompletionCoordinator11Engine.sendCancel_1] - Unexpected exception while sending Cancel
+     */
+    private void sendCancel()
+    {
+        final AddressingContext addressingContext = createContext() ;
+        try
+        {
+            CoordinatorCompletionParticipantClient.getClient().sendCancel(addressingContext, instanceIdentifier) ;
+        }
+        catch (final Throwable th)
+        {
+            if (WSTLogger.arjLoggerI18N.isDebugEnabled())
+            {
+                WSTLogger.arjLoggerI18N.debug("com.arjuna.wst.messaging.engines.CoordinatorCompletionCoordinator11Engine.sendCancel_1", th) ;
+            }
+        }
+    }
+    
+    /**
+     * Send the exited message.
+     * 
+     * @message com.arjuna.wst.messaging.engines.CoordinatorCompletionCoordinator11Engine.sendExited_1 [com.arjuna.wst.messaging.engines.CoordinatorCompletionCoordinator11Engine.sendExited_1] - Unexpected exception while sending Exited
+     */
+    private void sendExited()
+    {
+        final AddressingContext addressingContext = createContext() ;
+        try
+        {
+            CoordinatorCompletionParticipantClient.getClient().sendExited(addressingContext, instanceIdentifier) ;
+        }
+        catch (final Throwable th)
+        {
+            if (WSTLogger.arjLoggerI18N.isDebugEnabled())
+            {
+                WSTLogger.arjLoggerI18N.debug("com.arjuna.wst.messaging.engines.CoordinatorCompletionCoordinator11Engine.sendExited_1", th) ;
+            }
+        }
+    }
+    
+    /**
+     * Send the failed message.
+     * 
+     * @message com.arjuna.wst.messaging.engines.CoordinatorCompletionCoordinator11Engine.sendFailed_1 [com.arjuna.wst.messaging.engines.CoordinatorCompletionCoordinator11Engine.sendFailed_1] - Unexpected exception while sending Failed
+     */
+    private void sendFailed()
+    {
+        final AddressingContext addressingContext = createContext() ;
+        try
+        {
+            CoordinatorCompletionParticipantClient.getClient().sendFailed(addressingContext, instanceIdentifier) ;
+        }
+        catch (final Throwable th)
+        {
+            if (WSTLogger.arjLoggerI18N.isDebugEnabled())
+            {
+                WSTLogger.arjLoggerI18N.debug("com.arjuna.wst.messaging.engines.CoordinatorCompletionCoordinator11Engine.sendFailed_1", th) ;
+            }
+        }
+    }
+    
+    /**
+     * Send the not completed message.
+     * 
+     * @message com.arjuna.wst.messaging.engines.CoordinatorCompletionCoordinator11Engine.sendNotCompleted_1 [com.arjuna.wst.messaging.engines.CoordinatorCompletionCoordinator11Engine.sendNotCompleted_1] - Unexpected exception while sending NotCompleted
+     */
+    private void sendNotCompleted()
+    {
+        final AddressingContext addressingContext = createContext() ;
+        try
+        {
+            CoordinatorCompletionParticipantClient.getClient().sendNotCompleted(addressingContext, instanceIdentifier) ;
+        }
+        catch (final Throwable th)
+        {
+            if (WSTLogger.arjLoggerI18N.isDebugEnabled())
+            {
+                WSTLogger.arjLoggerI18N.debug("com.arjuna.wst.messaging.engines.CoordinatorCompletionCoordinator11Engine.sendNotCompleted_1", th) ;
+            }
+        }
+    }
+    
+    /**
+     * Send the status message.
+     * @param state The state.
+     * 
+     * @message com.arjuna.wst.messaging.engines.CoordinatorCompletionCoordinator11Engine.sendStatus_1 [com.arjuna.wst.messaging.engines.CoordinatorCompletionCoordinator11Engine.sendStatus_1] - Unexpected exception while sending Status
+     */
+    private void sendStatus(final State state)
+    {
+        final AddressingContext addressingContext = createContext() ;
+        try
+        {
+            CoordinatorCompletionParticipantClient.getClient().sendStatus(addressingContext, instanceIdentifier, state) ;
+        }
+        catch (final Throwable th)
+        {
+            if (WSTLogger.arjLoggerI18N.isDebugEnabled())
+            {
+                WSTLogger.arjLoggerI18N.debug("com.arjuna.wst.messaging.engines.CoordinatorCompletionCoordinator11Engine.sendStatus_1", th) ;
+            }
+        }
+    }
+    
+    /**
+     * Send the invalid state fault message.
+     * 
+     * @message com.arjuna.wst.messaging.engines.CoordinatorCompletionCoordinator11Engine.sendInvalidStateFault_1 [com.arjuna.wst.messaging.engines.CoordinatorCompletionCoordinator11Engine.sendInvalidStateFault_1] - Unexpected exception while sending InvalidStateFault
+     * @message com.arjuna.wsc.messaging.engines.CoordinatorCompletionCoordinator11Engine.sendInvalidStateFault_2 [com.arjuna.wsc.messaging.engines.CoordinatorCompletionCoordinator11Engine.sendInvalidStateFault_2] - Invalid coordinator completion coordinator state
+     */
+    private void sendInvalidStateFault()
+    {
+        final AddressingContext addressingContext = createContext() ;
+        try
+        {
+            final SoapFault soapFault = new SoapFault(SoapFaultType.FAULT_SENDER, CoordinationConstants.WSCOOR_ERROR_CODE_INVALID_STATE_QNAME,
+        	WSTLogger.log_mesg.getString("com.arjuna.wsc.messaging.engines.CoordinatorCompletionCoordinator11Engine.sendInvalidStateFault_2")) ;
+            CoordinatorCompletionParticipantClient.getClient().sendSoapFault(addressingContext, instanceIdentifier, soapFault,
+        	CoordinationConstants.WSCOOR_ACTION_FAULT) ;
+        }
+        catch (final Throwable th)
+        {
+            if (WSTLogger.arjLoggerI18N.isDebugEnabled())
+            {
+                WSTLogger.arjLoggerI18N.debug("com.arjuna.wst.messaging.engines.CoordinatorCompletionCoordinator11Engine.sendInvalidStateFault_1", th) ;
+            }
+        }
+    }
+    
+    /**
+     * Get the coordinator id.
+     * @return The coordinator id.
+     */
+    public String getId()
+    {
+        return id ;
+    }
+    
+    /**
+     * Get the participant endpoint reference
+     * @return The participant endpoint reference
+     */
+    public EndpointReferenceType getParticipant()
+    {
+        return participant ;
+    }
+    
+    /**
+     * Get the associated coordinator.
+     * @return The associated coordinator.
+     */
+    public BA11ParticipantManager getCoordinator()
+    {
+        return coordinator ;
+    }
+    
+    /**
+     * Change the state and notify any listeners.
+     * @param state The new state.
+     */
+    private synchronized void changeState(final State state)
+    {
+        if (this.state != state)
+        {
+            this.state = state ;
+            notifyAll() ;
+        }
+    }
+    
+    /**
+     * Wait for the state to change from the specified state.
+     * @param origState The original state.
+     * @param delay The maximum time to wait for (in milliseconds).
+     * @return The current state.
+     */
+    private State waitForState(final State origState, final long delay)
+    {
+        final long end = System.currentTimeMillis() + delay ;
+        synchronized(this)
+        {
+            while(state == origState)
+            {
+                final long remaining = end - System.currentTimeMillis() ;
+                if (remaining <= 0)
+                {
+                    break ;
+                }
+                try
+                {
+                    wait(remaining) ;
+                }
+                catch (final InterruptedException ie) {} // ignore
+            }
+            return state ;
+        }
+    }
+    
+    /**
+     * Execute the exit transition.
+     * 
+     * @message com.arjuna.wst.messaging.engines.CoordinatorCompletionCoordinator11Engine.executeExit_1 [com.arjuna.wst.messaging.engines.CoordinatorCompletionCoordinator11Engine.executeExit_1] - Unexpected exception from coordinator exit
+     */
+    private void executeExit()
+    {
+        try
+        {
+            coordinator.exit() ;
+        }
+        catch (final Throwable th)
+        {
+            if (WSTLogger.arjLoggerI18N.isDebugEnabled())
+            {
+                WSTLogger.arjLoggerI18N.debug("com.arjuna.wst.messaging.engines.CoordinatorCompletionCoordinator11Engine.executeExit_1", th) ;
+            }
+            return ;
+        }
+        sendExited() ;
+        ended() ;
+    }
+    
+    /**
+     * Executing the fail transition.
+     * 
+     * @throws SoapFault for SOAP errors.
+     * @throws IOException for transport errors.
+     * 
+     * @message com.arjuna.wst.messaging.engines.CoordinatorCompletionCoordinator11Engine.executeFail_1 [com.arjuna.wst.messaging.engines.CoordinatorCompletionCoordinator11Engine.executeFail_1] - Unexpected exception from coordinator fault
+     */
+    private void executeFail(final QName exceptionIdentifier)
+    {
+        try
+        {
+            coordinator.fail(exceptionIdentifier) ;
+        }
+        catch (final Throwable th)
+        {
+            if (WSTLogger.arjLoggerI18N.isDebugEnabled())
+            {
+                WSTLogger.arjLoggerI18N.debug("com.arjuna.wst.messaging.engines.CoordinatorCompletionCoordinator11Engine.executeFail_1", th) ;
+            }
+            return ;
+        }
+        sendFailed() ;
+        ended() ;
+    }
+    
+    /**
+     * Executing the cannot complete transition.
+     * 
+     * @throws SoapFault for SOAP errors.
+     * @throws IOException for transport errors.
+     * 
+     * @message com.arjuna.wst.messaging.engines.CoordinatorCompletionCoordinator11Engine.executeCannotComplete_1 [com.arjuna.wst.messaging.engines.CoordinatorCompletionCoordinator11Engine.executeCannotComplete_1] - Unexpected exception from coordinator error
+     */
+    private void executeCannotComplete()
+    {
+        try
+        {
+            coordinator.cannotComplete() ;
+        }
+        catch (final Throwable th)
+        {
+            if (WSTLogger.arjLoggerI18N.isDebugEnabled())
+            {
+                WSTLogger.arjLoggerI18N.debug("com.arjuna.wst.messaging.engines.CoordinatorCompletionCoordinator11Engine.executeCannotComplete_1", th) ;
+            }
+            return ;
+        }
+        sendNotCompleted() ;
+        ended() ;
+    }
+    
+    /**
+     * End the current coordinator.
+     */
+    private void ended()
+    {
+        changeState(State.STATE_ENDED) ;
+        CoordinatorCompletionCoordinatorProcessor.getProcessor().deactivateCoordinator(this) ;
+    }
+    
+    /**
+     * Create a context for the outgoing message.
+     * @return The addressing context.
+     */
+    private AddressingContext createContext()
+    {
+        final String messageId = MessageId.getMessageId() ;
+        return AddressingContext.createRequestContext(participant, messageId) ;
+    }
+}


Property changes on: labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/wst/messaging/engines/CoordinatorCompletionCoordinator11Engine.java
___________________________________________________________________
Name: svn:keywords
   + Rev Date
Name: svn:eol-style
   + native

Added: labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/wst/messaging/engines/CoordinatorCompletionParticipant11Engine.java
===================================================================
--- labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/wst/messaging/engines/CoordinatorCompletionParticipant11Engine.java	                        (rev 0)
+++ labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/wst/messaging/engines/CoordinatorCompletionParticipant11Engine.java	2007-08-14 12:43:41 UTC (rev 14200)
@@ -0,0 +1,1100 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag.  All rights reserved. 
+ * See the copyright.txt in the distribution for a full listing 
+ * of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU General Public License, v. 2.0.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A 
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+ * PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+ * You should have received a copy of the GNU General Public License,
+ * v. 2.0 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+ * MA  02110-1301, USA.
+ * 
+ * (C) 2005-2006,
+ * @author JBoss Inc.
+ */
+package com.arjuna.wst.messaging.engines;
+
+import java.util.TimerTask;
+
+import javax.xml.namespace.QName;
+
+import com.arjuna.webservices.SoapFault;
+import com.arjuna.webservices.SoapFaultType;
+import com.arjuna.webservices.logging.WSTLogger;
+import com.arjuna.webservices.util.TransportTimer;
+import com.arjuna.webservices.wsaddr2005.AddressingContext;
+import com.arjuna.webservices.wsaddr2005.EndpointReferenceType;
+import com.arjuna.webservices.wsba11.CoordinatorCompletionParticipantInboundEvents;
+import com.arjuna.webservices.wsba11.NotificationType;
+import com.arjuna.webservices.wsba11.State;
+import com.arjuna.webservices.wsba11.StatusType;
+import com.arjuna.webservices.wsba11.client.CoordinatorCompletionCoordinatorClient;
+import com.arjuna.webservices.wsba11.processors.CoordinatorCompletionParticipantProcessor;
+import com.arjuna.webservices.wscoor11.CoordinationConstants;
+import com.arjuna.webservices.wsjboss.InstanceIdentifier;
+import com.arjuna.webservices.wsjboss.JBossContext;
+import com.arjuna.webservices.wsjbosstx.JBossTXConstants;
+import com.arjuna.wsc.messaging.MessageId;
+import com.arjuna.wst.BusinessAgreementWithCoordinatorCompletionParticipant;
+import com.arjuna.wst.FaultedException;
+
+/**
+ * The coordinator completion participant state engine
+ * @author kevin
+ */
+public class CoordinatorCompletionParticipant11Engine implements CoordinatorCompletionParticipantInboundEvents
+{
+    /**
+     * The participant id.
+     */
+    private final String id ;
+    /**
+     * The instance identifier.
+     */
+    private final InstanceIdentifier instanceIdentifier ;
+    /**
+     * The coordinator endpoint reference.
+     */
+    private final EndpointReferenceType coordinator ;
+    /**
+     * The associated participant
+     */
+    private final BusinessAgreementWithCoordinatorCompletionParticipant participant ;
+    /**
+     * The current state.
+     */
+    private State state ;
+    /**
+     * The associated timer task or null.
+     */
+    private TimerTask timerTask ;
+    
+    /**
+     * Construct the initial engine for the participant.
+     * @param id The participant id.
+     * @param coordinator The coordinator endpoint reference.
+     * @param participant The participant.
+     */
+    public CoordinatorCompletionParticipant11Engine(final String id, final EndpointReferenceType coordinator,
+        final BusinessAgreementWithCoordinatorCompletionParticipant participant)
+    {
+        this(id, coordinator, participant, State.STATE_ACTIVE) ;
+    }
+    
+    /**
+     * Construct the engine for the participant in a specified state.
+     * @param id The participant id.
+     * @param coordinator The coordinator endpoint reference.
+     * @param participant The participant.
+     * @param state The initial state.
+     */
+    public CoordinatorCompletionParticipant11Engine(final String id, final EndpointReferenceType coordinator,
+        final BusinessAgreementWithCoordinatorCompletionParticipant participant, final State state)
+    {
+        this.id = id ;
+        this.instanceIdentifier = new InstanceIdentifier(id) ;
+        this.coordinator = coordinator ;
+        this.participant = participant ;
+        this.state = state ;
+    }
+    
+    /**
+     * Handle the cancel event.
+     * @param cancel The cancel notification.
+     * @param addressingContext The addressing context.
+     * @param jbossContext The jboss context.
+     * 
+     * Active -> Canceling
+     * Canceling -> Canceling
+     * Completing -> Canceling
+     * Completed -> Completed (resend Completed)
+     * Closing -> Closing
+     * Compensating -> Compensating
+     * Failing-Active -> Failing-Active (resend Fail)
+     * Failing-Canceling -> Failing-Canceling (resend Fail)
+     * Failing-Completing -> Failing-Completing (resend Fail)
+     * Failing-Compensating -> Failing-Compensating
+     * NotCompleting -> NotCompleting (resend CannotComplete)
+     * Exiting -> Exiting (resend Exit)
+     * Ended -> Ended (send Canceled)
+     */
+    public void cancel(final NotificationType cancel, final AddressingContext addressingContext, final JBossContext jbossContext)
+    {
+        final State current ;
+        synchronized(this)
+        {
+            current = state ;
+            if ((current == State.STATE_ACTIVE) || (current == State.STATE_COMPLETING))
+            {
+                changeState(State.STATE_CANCELING) ;
+            }
+        }
+        
+        if ((current == State.STATE_ACTIVE) || (current == State.STATE_COMPLETING))
+        {
+            executeCancel() ;
+        }
+        else if (current == State.STATE_COMPLETED)
+        {
+            sendCompleted() ;
+        }
+        else if ((current == State.STATE_FAILING_ACTIVE) || (current == State.STATE_FAILING_CANCELING) ||
+        	 (current == State.STATE_FAILING_COMPLETING))
+        {
+            sendFail(current.getValue()) ;
+        }
+        else if (current == State.STATE_NOT_COMPLETING)
+        {
+            sendCannotComplete() ;
+        }
+        else if (current == State.STATE_EXITING)
+        {
+            sendExit() ;
+        }
+        else if (current == State.STATE_ENDED)
+        {
+            sendCancelled() ;
+        }
+    }
+    
+    /**
+     * Handle the close event.
+     * @param close The close notification.
+     * @param addressingContext The addressing context.
+     * @param jbossContext The jboss context.
+     * 
+     * Active -> Active (invalid state)
+     * Canceling -> Canceling (invalid state)
+     * Completing -> Completing (invalid state)
+     * Completed -> Closing
+     * Closing -> Closing
+     * Compensating -> Compensating (invalid state)
+     * Failing-Active -> Failing-Active (invalid state)
+     * Failing-Canceling -> Failing-Canceling (invalid state)
+     * Failing-Completing -> Failing-Completing (invalid state)
+     * Failing-Compensating -> Failing-Compensating (invalid state)
+     * NotCompleting -> NotCompleting (invalid state)
+     * Exiting -> Exiting (invalid state)
+     * Ended -> Ended (send Closed)
+     */
+    public void close(final NotificationType close, final AddressingContext addressingContext, final JBossContext jbossContext)
+    {
+        final State current ;
+        synchronized(this)
+        {
+            current = state ;
+            if (current == State.STATE_COMPLETED)
+            {
+                changeState(State.STATE_CLOSING) ;
+            }
+        }
+        
+        if (current == State.STATE_COMPLETED)
+        {
+            if (timerTask != null)
+            {
+                timerTask.cancel() ;
+            }
+            executeClose() ;
+        }
+        else if (current == State.STATE_ENDED)
+        {
+            sendClosed() ;
+        }
+    }
+    
+    /**
+     * Handle the compensate event.
+     * @param compensate The compensate notification.
+     * @param addressingContext The addressing context.
+     * @param jbossContext The jboss context.
+     * 
+     * Active -> Active (invalid state)
+     * Canceling -> Canceling (invalid state)
+     * Completing -> Completing (invalid state)
+     * Completed -> Compensating
+     * Closing -> Closing (invalid state)
+     * Compensating -> Compensating
+     * Failing-Active -> Failing-Active (invalid state)
+     * Failing-Canceling -> Failing-Canceling (invalid state)
+     * Failing-Completing -> Failing-Completing (invalid state)
+     * Failing-Compensating -> Failing-Compensating (resend Fail)
+     * NotCompleting -> NotCompleting (invalid state)
+     * Exiting -> Exiting (invalid state)
+     * Ended -> Ended (send Compensated)
+     */
+    public void compensate(final NotificationType compensate, final AddressingContext addressingContext, final JBossContext jbossContext)
+    {
+        final State current ;
+        synchronized(this)
+        {
+            current = state ;
+            if (current == State.STATE_COMPLETED)
+            {
+                changeState(State.STATE_COMPENSATING) ;
+            }
+        }
+        
+        if (current == State.STATE_COMPLETED)
+        {
+            if (timerTask != null)
+            {
+                timerTask.cancel() ;
+            }
+            executeCompensate() ;
+        }
+        else if (current == State.STATE_FAILING_COMPENSATING)
+        {
+            sendFail(current.getValue()) ;
+        }
+        else if (current == State.STATE_ENDED)
+        {
+            sendCompensated() ;
+        }
+    }
+    
+    /**
+     * Handle the complete event.
+     * @param complete The complete notification.
+     * @param addressingContext The addressing context.
+     * @param jbossContext The jboss context.
+     * 
+     * Active -> Completing
+     * Canceling -> Canceling
+     * Completing -> Completing
+     * Completed -> Completed (resend Completed)
+     * Closing -> Closing
+     * Compensating -> Compensating
+     * Failing-Active -> Failing-Active (resend Fail)
+     * Failing-Canceling -> Failing-Canceling (resend Fail)
+     * Failing-Completing -> Failing-Completing (resend Fail)
+     * Failing-Compensating -> Failing-Compensating
+     * NotCompleting -> NotCompleting (resend CannotComplete)
+     * Exiting -> Exiting (resend Exit)
+     * Ended -> Ended (send Fail)
+     */
+    public void complete(final NotificationType complete, final AddressingContext addressingContext, final JBossContext jbossContext)
+    {
+        final State current ;
+        synchronized(this)
+        {
+            current = state ;
+            if (current == State.STATE_ACTIVE)
+            {
+                changeState(State.STATE_COMPLETING) ;
+            }
+        }
+        
+        if (current == State.STATE_ACTIVE)
+        {
+            executeComplete() ;
+        }
+        else if (current == State.STATE_COMPLETED)
+        {
+            sendCompleted() ;
+        }
+        else if ((current == State.STATE_FAILING_ACTIVE) || (current == State.STATE_FAILING_CANCELING) ||
+        	 (current == State.STATE_FAILING_COMPLETING) || (current == State.STATE_ENDED))
+        {
+            sendFail(current.getValue()) ;
+        }
+        else if (current == State.STATE_NOT_COMPLETING)
+        {
+            sendCannotComplete() ;
+        }
+        else if (current == State.STATE_EXITING)
+        {
+            sendExit() ;
+        }
+    }
+    
+    /**
+     * Handle the exited event.
+     * @param exited The exited notification.
+     * @param addressingContext The addressing context.
+     * @param jbossContext The jboss context.
+     * 
+     * Active -> Active (invalid state)
+     * Canceling -> Canceling (invalid state)
+     * Completing -> Completing (invalid state)
+     * Completed -> Completed (invalid state)
+     * Closing -> Closing (invalid state)
+     * Compensating -> Compensating (invalid state)
+     * Failing-Active -> Failing-Active (invalid state)
+     * Failing-Canceling -> Failing-Canceling (invalid state)
+     * Failing-Completing -> Failing-Completing (invalid state)
+     * Failing-Compensating -> Failing-Compensating (invalid state)
+     * NotCompleting -> NotCompleting (invalid state)
+     * Exiting -> Ended
+     * Ended -> Ended
+     */
+    public void exited(final NotificationType exited, final AddressingContext addressingContext, final JBossContext jbossContext)
+    {
+        final State current ;
+        synchronized(this)
+        {
+            current = state ;
+            if (current == State.STATE_EXITING)
+            {
+                ended() ;
+            }
+        }
+    }
+    
+    /**
+     * Handle the failed event.
+     * @param failed The failed notification.
+     * @param addressingContext The addressing context.
+     * @param jbossContext The jboss context.
+     * 
+     * Active -> Active (invalid state)
+     * Canceling -> Canceling (invalid state)
+     * Completing -> Completing (invalid state)
+     * Completed -> Completed (invalid state)
+     * Closing -> Closing (invalid state)
+     * Compensating -> Compensating (invalid state)
+     * Failing-Active -> Ended
+     * Failing-Canceling -> Ended
+     * Failing-Completing -> Ended
+     * Failing-Compensating -> Ended
+     * NotCompleting -> NotCompleting (invalid state)
+     * Exiting -> Exiting (invalid state)
+     * Ended -> Ended
+     */
+    public void failed(final NotificationType failed, final AddressingContext addressingContext, final JBossContext jbossContext)
+    {
+        final State current ;
+        synchronized(this)
+        {
+            current = state ;
+            if ((current == State.STATE_FAILING_ACTIVE) || (current == State.STATE_FAILING_CANCELING) ||
+                (current == State.STATE_FAILING_COMPLETING) || (current == State.STATE_FAILING_COMPENSATING))
+            {
+                ended() ;
+            }
+        }
+    }
+    
+    /**
+     * Handle the not completed event.
+     * @param notCompleted The notCompleted notification.
+     * @param addressingContext The addressing context.
+     * @param jbossContext The jboss context.
+     * 
+     * Active -> Active (invalid state)
+     * Canceling -> Canceling (invalid state)
+     * Completing -> Completing (invalid state)
+     * Completed -> Completed (invalid state)
+     * Closing -> Closing (invalid state)
+     * Compensating -> Compensating (invalid state)
+     * Failing-Active -> Failing-Active (invalid state)
+     * Failing-Canceling -> Failing-Canceling (invalid state)
+     * Failing-Completing -> Failing-Completing (invalid state)
+     * Failing-Compensating -> Failing-Compensating (invalid state)
+     * NotCompleting -> Ended
+     * Exiting -> Exiting (invalid state)
+     * Ended -> Ended
+     */
+    public void notCompleted(final NotificationType notCompleted, final AddressingContext addressingContext, final JBossContext jbossContext)
+    {
+        final State current ;
+        synchronized(this)
+        {
+            current = state ;
+            if (current == State.STATE_NOT_COMPLETING)
+            {
+        	ended() ;
+            }
+        }
+    }
+    
+    /**
+     * Handle the getStatus event.
+     * @param getStatus The getStatus notification.
+     * @param addressingContext The addressing context.
+     * @param jbossContext The jboss context.
+     */
+    public void getStatus(final NotificationType getStatus, final AddressingContext addressingContext, final JBossContext jbossContext)
+    {
+	final State current ;
+	synchronized(this)
+	{
+	    current = state ;
+	}
+	sendStatus(current) ;
+    }
+    
+    /**
+     * Handle the status event.
+     * @param status The status type.
+     * @param addressingContext The addressing context.
+     * @param jbossContext The jboss context.
+     */
+    public void status(final StatusType status, final AddressingContext addressingContext, final JBossContext jbossContext)
+    {
+        // KEV - implement
+    }
+    
+    /**
+     * Handle the SOAP fault event.
+     * @param soapFault The SOAP fault.
+     * @param addressingContext The addressing context.
+     * @param jbossContext The jboss context.
+     */
+    public void soapFault(final SoapFault soapFault, final AddressingContext addressingContext, final JBossContext jbossContext)
+    {
+	ended() ;
+	try
+	{
+	    participant.error() ;
+	}
+	catch (final Throwable th) {} // ignore
+    }
+    
+    /**
+     * Handle the completed event.
+     * 
+     * Active -> Active (invalid state)
+     * Canceling -> Canceling (invalid state)
+     * Completing -> Completed
+     * Completed -> Completed
+     * Closing -> Closing (invalid state)
+     * Compensating -> Compensating (invalid state)
+     * Failing-Active -> Failing-Active (invalid state)
+     * Failing-Canceling -> Failing-Canceling (invalid state)
+     * Failing-Completing -> Failing-Completing (invalid state)
+     * Failing-Compensating -> Failing-Compensating (invalid state)
+     * Exiting -> Exiting (invalid state)
+     * NotCompleting -> NotCompleting (invalid state)
+     * Ended -> Ended (invalid state)
+     */
+    public State completed()
+    {
+        final State current ;
+        synchronized(this)
+        {
+            current = state ;
+            if (current == State.STATE_COMPLETING)
+            {
+                changeState(State.STATE_COMPLETED) ;
+            }
+        }
+        
+        if ((current == State.STATE_COMPLETING) || (current == State.STATE_COMPLETED))
+        {
+            sendCompleted() ;
+        }
+        
+        return current ;
+    }
+    
+    /**
+     * Handle the exit event.
+     * 
+     * Active -> Exiting
+     * Canceling -> Canceling (invalid state)
+     * Completing -> Exiting
+     * Completed -> Completed (invalid state)
+     * Closing -> Closing (invalid state)
+     * Compensating -> Compensating (invalid state)
+     * Failing-Active -> Failing-Active (invalid state)
+     * Failing-Canceling -> Failing-Canceling (invalid state)
+     * Failing-Completing -> Failing-Completing (invalid state)
+     * Failing-Compensating -> Failing-Compensating (invalid state)
+     * Exiting -> Exiting
+     * NotCompleting -> NotCompleting (invalid state)
+     * Ended -> Ended (invalid state)
+     */
+    public State exit()
+    {
+        final State current ;
+        synchronized (this)
+        {
+            current = state ;
+            if ((current == State.STATE_ACTIVE) || (current == State.STATE_COMPLETING))
+            {
+                changeState(State.STATE_EXITING) ;
+            }
+        }
+        
+        if ((current == State.STATE_ACTIVE) || (current == State.STATE_COMPLETING) ||
+            (current == State.STATE_EXITING))
+        {
+            sendExit() ;
+            return waitForState(State.STATE_EXITING, TransportTimer.getTransportTimeout()) ;
+        }
+        return current ;
+    }
+    
+    /**
+     * Handle the fail event.
+     * 
+     * Active -> Failing-Active
+     * Canceling -> Failing-Canceling
+     * Completing -> Failing-Completing
+     * Completed -> Completed (invalid state)
+     * Closing -> Closing (invalid state)
+     * Compensating -> Failing-Compensating
+     * Failing-Active -> Failing-Active
+     * Failing-Canceling -> Failing-Canceling
+     * Failing-Completing -> Failing-Completing
+     * Failing-Compensating -> Failing-Compensating
+     * NotCompleting -> NotCompleting (invalid state)
+     * Exiting -> Exiting (invalid state)
+     * Ended -> Ended (invalid state)
+     */
+    public State fail(final QName exceptionIdentifier)
+    {
+        final State current ;
+        synchronized (this)
+        {
+            current = state ;
+            if (current == State.STATE_ACTIVE)
+            {
+                changeState(State.STATE_FAILING_ACTIVE) ;
+            }
+            else if (current == State.STATE_CANCELING)
+            {
+        	changeState(State.STATE_FAILING_CANCELING) ;
+            }
+            else if (current == State.STATE_COMPLETING)
+            {
+        	changeState(State.STATE_FAILING_COMPLETING) ;
+            }
+            else if (current == State.STATE_COMPENSATING)
+            {
+                changeState(State.STATE_FAILING_COMPENSATING) ;
+            }
+        }
+        
+        if (current == State.STATE_ACTIVE)
+        {
+            sendFail(exceptionIdentifier) ;
+            return waitForState(State.STATE_FAILING_ACTIVE, TransportTimer.getTransportTimeout()) ;
+        }
+        else if (current == State.STATE_CANCELING)
+        {
+            sendFail(exceptionIdentifier) ;
+            return waitForState(State.STATE_FAILING_CANCELING, TransportTimer.getTransportTimeout()) ;
+        }
+        else if (current == State.STATE_COMPLETING)
+        {
+            sendFail(exceptionIdentifier) ;
+            return waitForState(State.STATE_FAILING_COMPLETING, TransportTimer.getTransportTimeout()) ;
+        }
+        else if (current == State.STATE_COMPENSATING)
+        {
+            sendFail(exceptionIdentifier) ;
+            return waitForState(State.STATE_FAILING_COMPENSATING, TransportTimer.getTransportTimeout()) ;
+        }
+        
+        return current ;
+    }
+    
+    /**
+     * Handle the cannot complete event.
+     * 
+     * Active -> NotCompleting
+     * Canceling -> Canceling (invalid state)
+     * Completing -> NotCompleting
+     * Completed -> Completed (invalid state)
+     * Closing -> Closing (invalid state)
+     * Compensating -> Compensating (invalid state)
+     * Failing-Active -> Failing-Active (invalid state)
+     * Failing-Canceling -> Failing-Canceling (invalid state)
+     * Failing-Completing -> Failing-Completing (invalid state)
+     * Failing-Compensating -> Failing-Compensating (invalid state)
+     * NotCompleting -> NotCompleting
+     * Exiting -> Exiting (invalid state)
+     * Ended -> Ended (invalid state)
+     */
+    public State cannotComplete()
+    {
+        final State current ;
+        synchronized (this)
+        {
+            current = state ;
+            if ((current == State.STATE_ACTIVE) || (current == State.STATE_COMPLETING))
+            {
+                changeState(State.STATE_NOT_COMPLETING) ;
+            }
+        }
+        
+        if ((current == State.STATE_ACTIVE) || (current == State.STATE_COMPLETING) ||
+            (current == State.STATE_NOT_COMPLETING))
+        {
+            sendCannotComplete() ;
+            return waitForState(State.STATE_NOT_COMPLETING, TransportTimer.getTransportTimeout()) ;
+        }
+        return current ;
+    }
+    
+    /**
+     * Handle the comms timeout event.
+     * 
+     * Completed -> Completed (resend Completed)
+     */
+    private void commsTimeout()
+    {
+        final State current ;
+        synchronized(this)
+        {
+            current = state ;
+        }
+        
+        if (current == State.STATE_COMPLETED)
+        {
+            sendCompleted() ;
+        }
+    }
+    
+    /**
+     * Send the exit message.
+     * 
+     * @message com.arjuna.wst.messaging.engines.CoordinatorCompletionParticipant11Engine.sendExit_1 [com.arjuna.wst.messaging.engines.CoordinatorCompletionParticipant11Engine.sendExit_1] - Unexpected exception while sending Exit
+     */
+    private void sendExit()
+    {
+        final AddressingContext addressingContext = createContext() ;
+        try
+        {
+            CoordinatorCompletionCoordinatorClient.getClient().sendExit(addressingContext, instanceIdentifier) ;
+        }
+        catch (final Throwable th)
+        {
+            if (WSTLogger.arjLoggerI18N.isDebugEnabled())
+            {
+                WSTLogger.arjLoggerI18N.debug("com.arjuna.wst.messaging.engines.CoordinatorCompletionParticipant11Engine.sendExit_1", th) ;
+            }
+        }
+    }
+    
+    /**
+     * Send the completed message.
+     * 
+     * @message com.arjuna.wst.messaging.engines.CoordinatorCompletionParticipant11Engine.sendCompleted_1 [com.arjuna.wst.messaging.engines.CoordinatorCompletionParticipant11Engine.sendCompleted_1] - Unexpected exception while sending Completed
+     */
+    private void sendCompleted()
+    {
+        final AddressingContext addressingContext = createContext() ;
+        try
+        {
+            CoordinatorCompletionCoordinatorClient.getClient().sendCompleted(addressingContext, instanceIdentifier) ;
+        }
+        catch (final Throwable th)
+        {
+            if (WSTLogger.arjLoggerI18N.isDebugEnabled())
+            {
+                WSTLogger.arjLoggerI18N.debug("com.arjuna.wst.messaging.engines.CoordinatorCompletionParticipant11Engine.sendCompleted_1", th) ;
+            }
+        }
+        
+        initiateTimer() ;
+    }
+    
+    /**
+     * Send the fail message.
+     * @param exceptionIdentifier The exception identifier.
+     * 
+     * @message com.arjuna.wst.messaging.engines.CoordinatorCompletionParticipant11Engine.sendFail_1 [com.arjuna.wst.messaging.engines.CoordinatorCompletionParticipant11Engine.sendFail_1] - Unexpected exception while sending Fail
+     */
+    private void sendFail(final QName exceptionIdentifier)
+    {
+        final AddressingContext addressingContext = createContext() ;
+        try
+        {
+            CoordinatorCompletionCoordinatorClient.getClient().sendFail(addressingContext, instanceIdentifier, exceptionIdentifier) ;
+        }
+        catch (final Throwable th)
+        {
+            if (WSTLogger.arjLoggerI18N.isDebugEnabled())
+            {
+                WSTLogger.arjLoggerI18N.debug("com.arjuna.wst.messaging.engines.CoordinatorCompletionParticipant11Engine.sendFail_1", th) ;
+            }
+        }
+    }
+    
+    /**
+     * Send the cancelled message.
+     * 
+     * @message com.arjuna.wst.messaging.engines.CoordinatorCompletionParticipant11Engine.sendCancelled_1 [com.arjuna.wst.messaging.engines.CoordinatorCompletionParticipant11Engine.sendCancelled_1] - Unexpected exception while sending Cancelled
+     */
+    private void sendCancelled()
+    {
+        final AddressingContext addressingContext = createContext() ;
+        try
+        {
+            CoordinatorCompletionCoordinatorClient.getClient().sendCancelled(addressingContext, instanceIdentifier) ;
+        }
+        catch (final Throwable th)
+        {
+            if (WSTLogger.arjLoggerI18N.isDebugEnabled())
+            {
+                WSTLogger.arjLoggerI18N.debug("com.arjuna.wst.messaging.engines.CoordinatorCompletionParticipant11Engine.sendCancelled_1", th) ;
+            }
+        }
+    }
+    
+    /**
+     * Send the closed message.
+     * 
+     * @message com.arjuna.wst.messaging.engines.CoordinatorCompletionParticipant11Engine.sendClosed_1 [com.arjuna.wst.messaging.engines.CoordinatorCompletionParticipant11Engine.sendClosed_1] - Unexpected exception while sending Closed
+     */
+    private void sendClosed()
+    {
+        final AddressingContext addressingContext = createContext() ;
+        try
+        {
+            CoordinatorCompletionCoordinatorClient.getClient().sendClosed(addressingContext, instanceIdentifier) ;
+        }
+        catch (final Throwable th)
+        {
+            if (WSTLogger.arjLoggerI18N.isDebugEnabled())
+            {
+                WSTLogger.arjLoggerI18N.debug("com.arjuna.wst.messaging.engines.CoordinatorCompletionParticipant11Engine.sendClosed_1", th) ;
+            }
+        }
+    }
+    
+    /**
+     * Send the compensated message.
+     * 
+     * @message com.arjuna.wst.messaging.engines.CoordinatorCompletionParticipant11Engine.sendCompensated_1 [com.arjuna.wst.messaging.engines.CoordinatorCompletionParticipant11Engine.sendCompensated_1] - Unexpected exception while sending Compensated
+     */
+    private void sendCompensated()
+    {
+        final AddressingContext addressingContext = createContext() ;
+        try
+        {
+            CoordinatorCompletionCoordinatorClient.getClient().sendCompensated(addressingContext, instanceIdentifier) ;
+        }
+        catch (final Throwable th)
+        {
+            if (WSTLogger.arjLoggerI18N.isDebugEnabled())
+            {
+                WSTLogger.arjLoggerI18N.debug("com.arjuna.wst.messaging.engines.CoordinatorCompletionParticipant11Engine.sendCompensated_1", th) ;
+            }
+        }
+    }
+    
+    /**
+     * Send the status message.
+     * @param state The state.
+     * 
+     * @message com.arjuna.wst.messaging.engines.CoordinatorCompletionParticipant11Engine.sendStatus_1 [com.arjuna.wst.messaging.engines.CoordinatorCompletionParticipant11Engine.sendStatus_1] - Unexpected exception while sending Status
+     */
+    private void sendStatus(final State state)
+    {
+        final AddressingContext addressingContext = createContext() ;
+        try
+        {
+            CoordinatorCompletionCoordinatorClient.getClient().sendStatus(addressingContext, instanceIdentifier, state) ;
+        }
+        catch (final Throwable th)
+        {
+            if (WSTLogger.arjLoggerI18N.isDebugEnabled())
+            {
+                WSTLogger.arjLoggerI18N.debug("com.arjuna.wst.messaging.engines.CoordinatorCompletionParticipant11Engine.sendStatus_1", th) ;
+            }
+        }
+    }
+    
+    /**
+     * Send the cannot complete message.
+     * 
+     * @message com.arjuna.wst.messaging.engines.CoordinatorCompletionParticipant11Engine.sendCannotComplete_1 [com.arjuna.wst.messaging.engines.CoordinatorCompletionParticipant11Engine.sendCannotComplete_1] - Unexpected exception while sending CannotComplete
+     */
+    private void sendCannotComplete()
+    {
+        final AddressingContext addressingContext = createContext() ;
+        try
+        {
+            CoordinatorCompletionCoordinatorClient.getClient().sendCannotComplete(addressingContext, instanceIdentifier) ;
+        }
+        catch (final Throwable th)
+        {
+            if (WSTLogger.arjLoggerI18N.isDebugEnabled())
+            {
+                WSTLogger.arjLoggerI18N.debug("com.arjuna.wst.messaging.engines.CoordinatorCompletionParticipant11Engine.sendCannotComplete_1", th) ;
+            }
+        }
+    }
+    
+    /**
+     * Send the invalid state fault message.
+     * 
+     * @message com.arjuna.wst.messaging.engines.CoordinatorCompletionParticipant11Engine.sendInvalidStateFault_1 [com.arjuna.wst.messaging.engines.CoordinatorCompletionParticipant11Engine.sendInvalidStateFault_1] - Unexpected exception while sending InvalidStateFault
+     * @message com.arjuna.wsc.messaging.engines.CoordinatorCompletionParticipant11Engine.sendInvalidStateFault_2 [com.arjuna.wsc.messaging.engines.CoordinatorCompletionParticipant11Engine.sendInvalidStateFault_2] - Invalid coordinator completion coordinator state
+     */
+    private void sendInvalidStateFault()
+    {
+        final AddressingContext addressingContext = createContext() ;
+        try
+        {
+            final SoapFault soapFault = new SoapFault(SoapFaultType.FAULT_SENDER, CoordinationConstants.WSCOOR_ERROR_CODE_INVALID_STATE_QNAME,
+        	WSTLogger.log_mesg.getString("com.arjuna.wsc.messaging.engines.CoordinatorCompletionParticipant11Engine.sendInvalidStateFault_2")) ;
+            CoordinatorCompletionCoordinatorClient.getClient().sendSoapFault(addressingContext, instanceIdentifier, soapFault,
+            	CoordinationConstants.WSCOOR_ACTION_FAULT) ;
+        }
+        catch (final Throwable th)
+        {
+            if (WSTLogger.arjLoggerI18N.isDebugEnabled())
+            {
+                WSTLogger.arjLoggerI18N.debug("com.arjuna.wst.messaging.engines.CoordinatorCompletionParticipant11Engine.sendInvalidStateFault_1", th) ;
+            }
+        }
+    }
+    
+    /**
+     * Get the coordinator id.
+     * @return The coordinator id.
+     */
+    public String getId()
+    {
+        return id ;
+    }
+    
+    /**
+     * Get the coordinator endpoint reference
+     * @return The coordinator endpoint reference
+     */
+    public EndpointReferenceType getCoordinator()
+    {
+        return coordinator ;
+    }
+    
+    /**
+     * Get the associated participant.
+     * @return The associated participant.
+     */
+    public BusinessAgreementWithCoordinatorCompletionParticipant getParticipant()
+    {
+        return participant ;
+    }
+    
+    /**
+     * Change the state and notify any listeners.
+     * @param state The new state.
+     */
+    private synchronized void changeState(final State state)
+    {
+        if (this.state != state)
+        {
+System.out.println("KEV: CoordinatorCompletionParticipant: changing state from " + this.state + " to " + state) ;
+            this.state = state ;
+            notifyAll() ;
+        }
+    }
+    
+    /**
+     * Wait for the state to change from the specified state.
+     * @param origState The original state.
+     * @param delay The maximum time to wait for (in milliseconds).
+     * @return The current state.
+     */
+    private State waitForState(final State origState, final long delay)
+    {
+        final long end = System.currentTimeMillis() + delay ;
+        synchronized(this)
+        {
+            while(state == origState)
+            {
+                final long remaining = end - System.currentTimeMillis() ;
+                if (remaining <= 0)
+                {
+                    break ;
+                }
+                try
+                {
+                    wait(remaining) ;
+                }
+                catch (final InterruptedException ie) {} // ignore
+            }
+            return state ;
+        }
+    }
+
+    /**
+     * Execute the cancel transition.
+     * 
+     * @message com.arjuna.wst.messaging.engines.CoordinatorCompletionParticipant11Engine.executeCancel_1 [com.arjuna.wst.messaging.engines.CoordinatorCompletionParticipant11Engine.executeCancel_1] - Unexpected exception from participant cancel
+     */
+    private void executeCancel()
+    {
+        try
+        {
+            participant.cancel() ;
+        }
+        catch (final Throwable th)
+        {
+            if (WSTLogger.arjLoggerI18N.isDebugEnabled())
+            {
+                WSTLogger.arjLoggerI18N.debug("com.arjuna.wst.messaging.engines.CoordinatorCompletionParticipant11Engine.executeCancel_1", th) ;
+            }
+            return ;
+        }
+        sendCancelled() ;
+        ended() ;
+    }
+
+    /**
+     * Execute the close transition.
+     * 
+     * @message com.arjuna.wst.messaging.engines.CoordinatorCompletionParticipant11Engine.executeClose_1 [com.arjuna.wst.messaging.engines.CoordinatorCompletionParticipant11Engine.executeClose_1] - Unexpected exception from participant close
+     */
+    private void executeClose()
+    {
+        try
+        {
+            participant.close() ;
+        }
+        catch (final Throwable th)
+        {
+            if (WSTLogger.arjLoggerI18N.isDebugEnabled())
+            {
+                WSTLogger.arjLoggerI18N.debug("com.arjuna.wst.messaging.engines.CoordinatorCompletionParticipant11Engine.executeClose_1", th) ;
+            }
+            return ;
+        }
+        sendClosed() ;
+        ended() ;
+    }
+    
+    /**
+     * Execute the compensate transition.
+     * 
+     * @message com.arjuna.wst.messaging.engines.CoordinatorCompletionParticipant11Engine.executeCompensate_1 [com.arjuna.wst.messaging.engines.CoordinatorCompletionParticipant11Engine.executeCompensate_1] - Unexpected exception from participant compensate
+     */
+    private void executeCompensate()
+    {
+        try
+        {
+            participant.compensate() ;
+        }
+        catch (final FaultedException fe)
+        {
+            fail(JBossTXConstants.FAULTED_ERROR_CODE_QNAME) ;
+        }
+        catch (final Throwable th)
+        {
+            final State current ;
+            synchronized (this)
+            {
+                current = state ;
+                if (current == State.STATE_COMPENSATING)
+                {
+                    changeState(State.STATE_COMPLETED) ;
+                }
+            }
+            if (current == State.STATE_COMPENSATING)
+            {
+                initiateTimer() ;
+            }
+            
+            if (WSTLogger.arjLoggerI18N.isDebugEnabled())
+            {
+                WSTLogger.arjLoggerI18N.debug("com.arjuna.wst.messaging.engines.CoordinatorCompletionParticipant11Engine.executeCompensate_1", th) ;
+            }
+            return ;
+        }
+        
+        final State current ;
+        synchronized (this)
+        {
+            current = state ;
+            if (current == State.STATE_COMPENSATING)
+            {
+                ended() ;
+            }
+        }
+        if (current == State.STATE_COMPENSATING)
+        {
+            sendCompensated() ;
+        }
+    }
+    
+    /**
+     * Execute the complete transition.
+     * 
+     * @message com.arjuna.wst.messaging.engines.CoordinatorCompletionParticipant11Engine.executeComplete_1 [com.arjuna.wst.messaging.engines.CoordinatorCompletionParticipant11Engine.executeComplete_1] - Unexpected exception from participant compensate
+     */
+    private void executeComplete()
+    {
+        try
+        {
+            participant.complete() ;
+        }
+        catch (final Throwable th)
+        {
+            if (WSTLogger.arjLoggerI18N.isDebugEnabled())
+            {
+                WSTLogger.arjLoggerI18N.debug("com.arjuna.wst.messaging.engines.CoordinatorCompletionParticipant11Engine.executeComplete_1", th) ;
+            }
+            return ;
+        }
+        
+        final State current ;
+        synchronized (this)
+        {
+            current = state ;
+            if (current == State.STATE_COMPLETING)
+            {
+                changeState(State.STATE_COMPLETED) ;
+            }
+        }
+        if (current == State.STATE_COMPLETING)
+        {
+            sendCompleted() ;
+        }
+    }
+    
+    /**
+     * End the current participant.
+     */
+    private void ended()
+    {
+	changeState(State.STATE_ENDED) ;
+        CoordinatorCompletionParticipantProcessor.getProcessor().deactivateParticipant(this) ;
+    }
+    
+    /**
+     * Initiate the timer.
+     */
+    private synchronized void initiateTimer()
+    {
+        if (timerTask != null)
+        {
+            timerTask.cancel() ;
+        }
+        
+        if (state == State.STATE_COMPLETED)
+        {
+            timerTask = new TimerTask() {
+                public void run() {
+                    commsTimeout() ;
+                }
+            } ;
+            TransportTimer.getTimer().schedule(timerTask, TransportTimer.getTransportPeriod()) ;
+        }
+        else
+        {
+            timerTask = null ;
+        }
+    }
+    
+    /**
+     * Create a context for the outgoing message.
+     * @return The addressing context.
+     */
+    private AddressingContext createContext()
+    {
+        final String messageId = MessageId.getMessageId() ;
+        return AddressingContext.createRequestContext(coordinator, messageId) ;
+    }
+}


Property changes on: labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/wst/messaging/engines/CoordinatorCompletionParticipant11Engine.java
___________________________________________________________________
Name: svn:keywords
   + Rev Date
Name: svn:eol-style
   + native

Added: labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/wst/messaging/engines/Participant11Engine.java
===================================================================
--- labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/wst/messaging/engines/Participant11Engine.java	                        (rev 0)
+++ labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/wst/messaging/engines/Participant11Engine.java	2007-08-14 12:43:41 UTC (rev 14200)
@@ -0,0 +1,668 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag.  All rights reserved. 
+ * See the copyright.txt in the distribution for a full listing 
+ * of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU General Public License, v. 2.0.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A 
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+ * PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+ * You should have received a copy of the GNU General Public License,
+ * v. 2.0 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+ * MA  02110-1301, USA.
+ * 
+ * (C) 2005-2006,
+ * @author JBoss Inc.
+ */
+package com.arjuna.wst.messaging.engines;
+
+import java.util.TimerTask;
+
+import javax.xml.namespace.QName;
+
+import com.arjuna.webservices.SoapFault;
+import com.arjuna.webservices.SoapFaultType;
+import com.arjuna.webservices.logging.WSTLogger;
+import com.arjuna.webservices.util.TransportTimer;
+import com.arjuna.webservices.wsaddr2005.AddressingContext;
+import com.arjuna.webservices.wsaddr2005.AttributedURIType;
+import com.arjuna.webservices.wsaddr2005.EndpointReferenceType;
+import com.arjuna.webservices.wsaddr2005.RelatesToType;
+import com.arjuna.webservices.wsjboss.JBossContext;
+import com.arjuna.webservices.wsjboss.InstanceIdentifier;
+import com.arjuna.webservices.wsat11.AtomicTransactionConstants;
+import com.arjuna.webservices.wsat11.NotificationType;
+import com.arjuna.webservices.wsat11.ParticipantInboundEvents;
+import com.arjuna.webservices.wsat11.State;
+import com.arjuna.webservices.wsat11.client.CoordinatorClient;
+import com.arjuna.webservices.wsat11.client.ParticipantClient;
+import com.arjuna.webservices.wsat11.processors.ParticipantProcessor;
+import com.arjuna.wsc.messaging.MessageId;
+import com.arjuna.wst.Aborted;
+import com.arjuna.wst.Participant;
+import com.arjuna.wst.Prepared;
+import com.arjuna.wst.ReadOnly;
+import com.arjuna.wst.Vote;
+
+/**
+ * The participant state engine
+ * @author kevin
+ */
+public class Participant11Engine implements ParticipantInboundEvents
+{
+    /**
+     * The associated participant
+     */
+    private final Participant participant ;
+    /**
+     * The participant id.
+     */
+    private final String id ;
+    /**
+     * The coordinator endpoint reference.
+     */
+    private final EndpointReferenceType coordinator ;
+    /**
+     * The current state.
+     */
+    private State state ;
+    /**
+     * The associated timer task or null.
+     */
+    private TimerTask timerTask ;
+    
+    /**
+     * Construct the initial engine for the participant.
+     * @param participant The participant.
+     * @param coordinator The coordinator endpoint reference.
+     */
+    public Participant11Engine(final Participant participant, final String id, final EndpointReferenceType coordinator)
+    {
+        this(participant, id, State.STATE_ACTIVE, coordinator) ;
+    }
+    
+    /**
+     * Construct the engine for the participant in a specified state.
+     * @param participant The participant.
+     * @param state The initial state.
+     * @param coordinator The coordinator endpoint reference.
+     */
+    public Participant11Engine(final Participant participant, final String id, final State state, final EndpointReferenceType coordinator)
+    {
+        this.participant = participant ;
+        this.id = id ;
+        this.state = state ;
+        this.coordinator = coordinator ;
+    }
+    
+    /**
+     * Handle the commit event.
+     * @param commit The commit notification.
+     * @param addressingContext The addressing context.
+     * @param jbossContext The jboss context.
+     * 
+     * None -> None (send committed)
+     * Active -> Aborting (do nothing)
+     * Preparing -> Aborting (do nothing)
+     * PreparedSuccess -> Committing (initiate commit)
+     * Committing -> Committing (do nothing)
+     * Aborting -> Aborting (return InconsistentInternalState)
+     */
+    public void commit(final NotificationType commit, final AddressingContext addressingContext, final JBossContext jbossContext)
+    {
+        final State current ;
+        synchronized(this)
+        {
+            current = state ;
+            if (current == State.STATE_PREPARED_SUCCESS)
+            {
+                state = State.STATE_COMMITTING ;
+                if (timerTask != null)
+                {
+                    timerTask.cancel() ;
+                }
+            }
+            else if ((current == State.STATE_ACTIVE) || (current == State.STATE_PREPARING))
+            {
+                state = State.STATE_ABORTING ;
+            }
+        }
+        
+        if (current == State.STATE_PREPARED_SUCCESS)
+        {
+            executeCommit() ;
+        }
+        else if (current == State.STATE_ABORTING)
+        {
+            sendInconsistentInternalState(addressingContext) ;
+        }
+        else if (current == null)
+        {
+            sendCommitted() ;
+        }
+    }
+    
+    /**
+     * Handle the prepare event.
+     * @param prepare The prepare notification.
+     * @param addressingContext The addressing context.
+     * @param jbossContext The jboss context.
+     * 
+     * None -> None (send aborted)
+     * Active -> Preparing (execute prepare)
+     * Preparing -> Preparing (do nothing)
+     * PreparedSuccess -> PreparedSuccess (resend prepared)
+     * Committing -> Committing (ignore)
+     * Aborting -> Aborting (send aborted and forget)
+     */
+    public void prepare(final NotificationType prepare, final AddressingContext addressingContext, final JBossContext jbossContext)
+    {
+        final State current ;
+        synchronized(this)
+        {
+            current = state ;
+            if (current == State.STATE_ACTIVE)
+            {
+                state = State.STATE_PREPARING ;
+            }
+        }
+        
+        if (current == State.STATE_ACTIVE)
+        {
+            executePrepare() ;
+        }
+        else if (current == State.STATE_PREPARED_SUCCESS)
+        {
+            sendPrepared() ;
+        }
+        else if ((current == State.STATE_ABORTING) || (current == null))
+        {
+            sendAborted() ;
+            forget() ;
+        }
+    }
+    
+    /**
+     * Handle the rollback event.
+     * @param rollback The rollback notification.
+     * @param addressingContext The addressing context.
+     * @param jbossContext The jboss context.
+     * 
+     * None -> None (send aborted)
+     * Active -> Aborting (execute rollback, send aborted and forget)
+     * Preparing -> Aborting (execute rollback, send aborted and forget)
+     * PreparedSuccess -> Aborting (execute rollback, send aborted and forget)
+     * Committing -> Committing (return InconsistentInternalState)
+     * Aborting -> Aborting (send aborted and forget)
+     */
+    public void rollback(final NotificationType rollback, final AddressingContext addressingContext, final JBossContext jbossContext)
+    {
+        final State current ;
+        synchronized(this)
+        {
+            current = state ;
+            if ((current == State.STATE_ACTIVE) || (current == State.STATE_PREPARING) ||
+                (current == State.STATE_PREPARED_SUCCESS))
+            {
+                state = State.STATE_ABORTING ;
+            }
+        }
+        
+        if (current == State.STATE_COMMITTING)
+        {
+            sendInconsistentInternalState(addressingContext) ;
+        }
+        else
+        {
+            if ((current == State.STATE_ACTIVE) || (current == State.STATE_PREPARING) ||
+                (current == State.STATE_PREPARED_SUCCESS))
+            {
+                executeRollback() ;
+            }
+            
+            sendAborted() ;
+            
+            if (current != null)
+            {
+                forget() ;
+            }
+        }
+    }
+    
+    /**
+     * Handle the early rollback event.
+     * 
+     * None -> None
+     * Active -> Aborting (execute rollback, send aborted and forget)
+     * Preparing -> Aborting (execute rollback, send aborted and forget)
+     * PreparedSuccess -> PreparedSuccess
+     * Committing -> Committing
+     * Aborting -> Aborting
+     */
+    public void earlyRollback()
+    {
+        rollbackDecision() ;
+    }
+    
+    /**
+     * Handle the early readonly event.
+     * 
+     * None -> None
+     * Active -> None (send ReadOnly)
+     * Preparing -> None (send ReadOnly)
+     * PreparedSuccess -> PreparedSuccess
+     * Committing -> Committing
+     * Aborting -> Aborting
+     */
+    public void earlyReadonly()
+    {
+        readOnlyDecision() ;
+    }
+    
+    /**
+     * Handle the recovery event.
+     * 
+     * None -> None
+     * Active -> Active
+     * Preparing -> Preparing
+     * PreparedSuccess -> PreparedSuccess
+     * Committing -> PreparedSuccess (resend Prepared)
+     * Aborting -> Aborting
+     */
+    public void recovery()
+    {
+        final State current ;
+        synchronized(this)
+        {
+            current = state ;
+        }
+        
+        if (current == State.STATE_PREPARED_SUCCESS)
+        {
+            sendPrepared() ;
+        }
+    }
+    
+    /**
+     * Handle the soap fault event.
+     * @param soapFault The soap fault.
+     * @param addressingContext The addressing context.
+     * @param jbossContext The jboss context.
+     * 
+     * @message com.arjuna.wst.messaging.engines.Participant11Engine.soapFault_1 [com.arjuna.wst.messaging.engines.Participant11Engine.soapFault_1] - Unexpected SOAP fault for participant {0}: {1} {2}
+     */
+    public void soapFault(final SoapFault soapFault, final AddressingContext addressingContext, final JBossContext jbossContext)
+    {
+        if (WSTLogger.arjLoggerI18N.isDebugEnabled())
+        {
+            final InstanceIdentifier instanceIdentifier = jbossContext.getInstanceIdentifier() ;
+            final SoapFaultType soapFaultType = soapFault.getSoapFaultType() ;
+            final QName subCode = soapFault.getSubcode() ;
+            WSTLogger.arjLoggerI18N.debug("com.arjuna.wst.messaging.engines.Participant11Engine.soapFault_1", new Object[] {instanceIdentifier, soapFaultType, subCode}) ;
+        }
+        
+        if (AtomicTransactionConstants.WSAT_ERROR_CODE_UNKNOWN_TRANSACTION_QNAME.equals(soapFault.getSubcode()))
+        {
+            forget() ;
+        }
+    }
+    
+    /**
+     * Handle the commit decision event.
+     * 
+     * Preparing -> PreparedSuccess (send Prepared)
+     * Committing -> Committing (send committed and forget)
+     */
+    private void commitDecision()
+    {
+        final State current ;
+        synchronized(this)
+        {
+            current = state ;
+            if (current == State.STATE_PREPARING)
+            {
+                state = State.STATE_PREPARED_SUCCESS ;
+            }
+        }
+        
+        if (current == State.STATE_PREPARING)
+        {
+            sendPrepared() ;
+        }
+        else if (current == State.STATE_COMMITTING)
+        {
+            sendCommitted() ;
+            forget() ;
+        }
+    }
+    
+    /**
+     * Handle the readOnly decision event.
+     * 
+     * Active -> None (send ReadOnly)
+     * Preparing -> None (send ReadOnly)
+     */
+    private void readOnlyDecision()
+    {
+        final State current ;
+        synchronized(this)
+        {
+            current = state ;
+            if ((current == State.STATE_ACTIVE) || (current == State.STATE_PREPARING))
+            {
+                state = null ;
+            }
+        }
+        
+        if ((current == State.STATE_ACTIVE) || (current == State.STATE_PREPARING))
+        {
+            sendReadOnly() ;
+            forget() ;
+        }
+    }
+    
+    /**
+     * Handle the rollback decision event.
+     * 
+     * Active -> Aborting (send aborted)
+     * Preparing -> Aborting (send aborted)
+     */
+    private void rollbackDecision()
+    {
+        final State current ;
+        synchronized(this)
+        {
+            current = state ;
+            if ((current == State.STATE_PREPARING) || (current == State.STATE_ACTIVE))
+            {
+                state = State.STATE_ABORTING ;
+            }
+        }
+        
+        if ((current == State.STATE_PREPARING) || (current == State.STATE_ACTIVE))
+        {
+            sendAborted() ;
+            forget() ;
+        }
+    }
+    
+    /**
+     * Handle the comms timeout event.
+     * 
+     * PreparedSuccess -> PreparedSuccess (resend Prepared)
+     */
+    private void commsTimeout()
+    {
+        final State current ;
+        synchronized(this)
+        {
+            current = state ;
+        }
+        
+        if (current == State.STATE_PREPARED_SUCCESS)
+        {
+            sendPrepared() ;
+        }
+    }
+    
+    /**
+     * Execute the commit transition.
+     * 
+     * @message com.arjuna.wst.messaging.engines.Participant11Engine.executeCommit_1 [com.arjuna.wst.messaging.engines.Participant11Engine.executeCommit_1] - Unexpected exception from participant commit
+     */
+    private void executeCommit()
+    {
+        try
+        {
+            participant.commit() ;
+            commitDecision() ;
+        }
+        catch (final Throwable th)
+        {
+            synchronized(this)
+            {
+                if (state == State.STATE_COMMITTING)
+                {
+                    state = State.STATE_PREPARED_SUCCESS ;
+                }
+            }
+            if (WSTLogger.arjLoggerI18N.isDebugEnabled())
+            {
+                WSTLogger.arjLoggerI18N.debug("com.arjuna.wst.messaging.engines.Participant11Engine.executeCommit_1", th) ;
+            }
+        }
+    }
+    
+    /**
+     * Execute the rollback transition.
+     * 
+     * @message com.arjuna.wst.messaging.engines.Participant11Engine.executeRollback_1 [com.arjuna.wst.messaging.engines.Participant11Engine.executeRollback_1] - Unexpected exception from participant rollback
+     */
+    private void executeRollback()
+    {
+        try
+        {
+            participant.rollback() ;
+        }
+        catch (final Throwable th)
+        {
+            if (WSTLogger.arjLoggerI18N.isDebugEnabled())
+            {
+                WSTLogger.arjLoggerI18N.debug("com.arjuna.wst.messaging.engines.Participant11Engine.executeRollback_1", th) ;
+            }
+        }
+    }
+    
+    /**
+     * Execute the prepare transition.
+     * 
+     * @message com.arjuna.wst.messaging.engines.Participant11Engine.executePrepare_1 [com.arjuna.wst.messaging.engines.Participant11Engine.executePrepare_1] - Unexpected exception from participant prepare
+     * @message com.arjuna.wst.messaging.engines.Participant11Engine.executePrepare_2 [com.arjuna.wst.messaging.engines.Participant11Engine.executePrepare_2] - Unexpected result from participant prepare: {0}
+     */
+    private void executePrepare()
+    {
+        final Vote vote ;
+        try
+        {
+            vote = participant.prepare();
+        }
+        catch (final Throwable th)
+        {
+            if (WSTLogger.arjLoggerI18N.isDebugEnabled())
+            {
+                WSTLogger.arjLoggerI18N.debug("com.arjuna.wst.messaging.engines.Participant11Engine.executePrepare_1", th) ;
+            }
+            rollbackDecision() ;
+            return ;
+        }
+        
+        if (vote instanceof Prepared)
+        {
+            commitDecision() ;
+        }
+        else if (vote instanceof ReadOnly)
+        {
+            readOnlyDecision() ;
+        }
+        else if (vote instanceof Aborted)
+        {
+            rollbackDecision() ;
+        }
+        else
+        {
+            if (WSTLogger.arjLoggerI18N.isDebugEnabled())
+            {
+                WSTLogger.arjLoggerI18N.debug("com.arjuna.wst.messaging.engines.Participant11Engine.executePrepare_2", new Object[] {(vote == null ? "null" : vote.getClass().getName())}) ;
+            }
+            rollbackDecision() ;
+        }
+    }
+    
+    /**
+     * Forget the current participant.
+     */
+    private void forget()
+    {
+        synchronized(this)
+        {
+            state = null ;
+        }
+        ParticipantProcessor.getProcessor().deactivateParticipant(this) ;
+    }
+    
+    /**
+     * Send the committed message.
+     * 
+     * @message com.arjuna.wst.messaging.engines.Participant11Engine.sendCommitted_1 [com.arjuna.wst.messaging.engines.Participant11Engine.sendCommitted_1] - Unexpected exception while sending Committed
+     */
+    private void sendCommitted()
+    {
+        final AddressingContext responseAddressingContext = createContext() ;
+        try
+        {
+            CoordinatorClient.getClient().sendCommitted(responseAddressingContext) ;
+        }
+        catch (final Throwable th)
+        {
+            if (WSTLogger.arjLoggerI18N.isDebugEnabled())
+            {
+                WSTLogger.arjLoggerI18N.debug("com.arjuna.wst.messaging.engines.Participant11Engine.sendCommitted_1", th) ;
+            }
+        }
+    }
+    
+    /**
+     * Send the prepared message.
+     * 
+     * @message com.arjuna.wst.messaging.engines.Participant11Engine.sendPrepared_1 [com.arjuna.wst.messaging.engines.Participant11Engine.sendPrepared_1] - Unexpected exception while sending Prepared
+     */
+    private void sendPrepared()
+    {
+        final AddressingContext responseAddressingContext = createContext() ;
+        final InstanceIdentifier instanceIdentifier = new InstanceIdentifier(id) ;
+        try
+        {
+            CoordinatorClient.getClient().sendPrepared(responseAddressingContext, instanceIdentifier) ;
+        }
+        catch (final Throwable th)
+        {
+            if (WSTLogger.arjLoggerI18N.isDebugEnabled())
+            {
+                WSTLogger.arjLoggerI18N.debug("com.arjuna.wst.messaging.engines.Participant11Engine.sendPrepared_1", th) ;
+            }
+        }
+        
+        initiateTimer() ;
+    }
+    
+    /**
+     * Send the aborted message.
+     * 
+     * @message com.arjuna.wst.messaging.engines.Participant11Engine.sendAborted_1 [com.arjuna.wst.messaging.engines.Participant11Engine.sendAborted_1] - Unexpected exception while sending Aborted
+     */
+    private void sendAborted()
+    {
+        final AddressingContext responseAddressingContext = createContext() ;
+        try
+        {
+            CoordinatorClient.getClient().sendAborted(responseAddressingContext) ;
+        }
+        catch (final Throwable th)
+        {
+            if (WSTLogger.arjLoggerI18N.isDebugEnabled())
+            {
+                WSTLogger.arjLoggerI18N.debug("com.arjuna.wst.messaging.engines.Participant11Engine.sendAborted_1", th) ;
+            }
+        }
+    }
+    
+    /**
+     * Send the read only message.
+     * 
+     * @message com.arjuna.wst.messaging.engines.Participant11Engine.sendReadOnly_1 [com.arjuna.wst.messaging.engines.Participant11Engine.sendReadOnly_1] - Unexpected exception while sending ReadOnly
+     */
+    private void sendReadOnly()
+    {
+        final AddressingContext responseAddressingContext = createContext() ;
+        try
+        {
+            CoordinatorClient.getClient().sendReadOnly(responseAddressingContext) ;
+        }
+        catch (final Throwable th)
+        {
+            if (WSTLogger.arjLoggerI18N.isDebugEnabled())
+            {
+                WSTLogger.arjLoggerI18N.debug("com.arjuna.wst.messaging.engines.Participant11Engine.sendReadOnly_1", th) ;
+            }
+        }
+    }
+    
+    /**
+     * Send the InconsistentInternalState message.
+     * 
+     * @message com.arjuna.wst.messaging.engines.Participant11Engine.sendInconsistentInternalState_1 [com.arjuna.wst.messaging.engines.Participant11Engine.sendInconsistentInternalState_1] - Inconsistent internal state.
+     * @message com.arjuna.wst.messaging.engines.Participant11Engine.sendInconsistentInternalState_2 [com.arjuna.wst.messaging.engines.Participant11Engine.sendInconsistentInternalState_2] - Unexpecting exception while sending InconsistentInternalState
+     */
+    private void sendInconsistentInternalState(final AddressingContext addressingContext)
+    {
+        try
+        {
+            final AddressingContext responseContext = createContext() ;
+            final AttributedURIType messageId = addressingContext.getMessageID() ;
+            if (messageId != null)
+            {
+                responseContext.addRelatesTo(new RelatesToType(messageId.getValue())) ;
+            }
+            
+            final String message = WSTLogger.log_mesg.getString("com.arjuna.wst.messaging.engines.Participant11Engine.sendInconsistentInternalState_1") ;
+            final SoapFault soapFault = new SoapFault(SoapFaultType.FAULT_SENDER, AtomicTransactionConstants.WSAT_ERROR_CODE_INCONSISTENT_INTERNAL_STATE_QNAME, message) ;
+            ParticipantClient.getClient().sendSoapFault(responseContext, soapFault) ;
+        }
+        catch (final Throwable th)
+        {
+            if (WSTLogger.arjLoggerI18N.isDebugEnabled())
+            {
+                WSTLogger.arjLoggerI18N.debug("com.arjuna.wst.messaging.engines.Participant11Engine.sendInconsistentInternalState_2", th) ;
+            }
+        }
+    }
+    
+    /**
+     * Initiate the timer.
+     */
+    private synchronized void initiateTimer()
+    {
+        if (timerTask != null)
+        {
+            timerTask.cancel() ;
+        }
+        
+        if (state == State.STATE_PREPARED_SUCCESS)
+        {
+            timerTask = new TimerTask() {
+                public void run() {
+                    commsTimeout() ;
+                }
+            } ;
+            TransportTimer.getTimer().schedule(timerTask, TransportTimer.getTransportPeriod()) ;
+        }
+        else
+        {
+            timerTask = null ;
+        }
+    }
+    
+    /**
+     * Create a context for the outgoing message.
+     * @return The addressing context.
+     */
+    private AddressingContext createContext()
+    {
+        final String messageId = MessageId.getMessageId() ;
+        return AddressingContext.createRequestContext(coordinator, messageId) ;
+    }
+}


Property changes on: labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/wst/messaging/engines/Participant11Engine.java
___________________________________________________________________
Name: svn:keywords
   + Rev Date
Name: svn:eol-style
   + native

Added: labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/wst/messaging/engines/ParticipantCompletionCoordinator11Engine.java
===================================================================
--- labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/wst/messaging/engines/ParticipantCompletionCoordinator11Engine.java	                        (rev 0)
+++ labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/wst/messaging/engines/ParticipantCompletionCoordinator11Engine.java	2007-08-14 12:43:41 UTC (rev 14200)
@@ -0,0 +1,899 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag.  All rights reserved. 
+ * See the copyright.txt in the distribution for a full listing 
+ * of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU General Public License, v. 2.0.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A 
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+ * PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+ * You should have received a copy of the GNU General Public License,
+ * v. 2.0 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+ * MA  02110-1301, USA.
+ * 
+ * (C) 2005-2006,
+ * @author JBoss Inc.
+ */
+package com.arjuna.wst.messaging.engines;
+
+import java.io.IOException;
+
+import javax.xml.namespace.QName;
+
+import com.arjuna.webservices.SoapFault;
+import com.arjuna.webservices.SoapFaultType;
+import com.arjuna.webservices.logging.WSTLogger;
+import com.arjuna.webservices.util.TransportTimer;
+import com.arjuna.webservices.wsaddr2005.AddressingContext;
+import com.arjuna.webservices.wsaddr2005.EndpointReferenceType;
+import com.arjuna.webservices.wsba11.ExceptionType;
+import com.arjuna.webservices.wsba11.NotificationType;
+import com.arjuna.webservices.wsba11.ParticipantCompletionCoordinatorInboundEvents;
+import com.arjuna.webservices.wsba11.State;
+import com.arjuna.webservices.wsba11.StatusType;
+import com.arjuna.webservices.wsba11.client.ParticipantCompletionParticipantClient;
+import com.arjuna.webservices.wsba11.processors.ParticipantCompletionCoordinatorProcessor;
+import com.arjuna.webservices.wscoor11.CoordinationConstants;
+import com.arjuna.webservices.wsjboss.InstanceIdentifier;
+import com.arjuna.webservices.wsjboss.JBossContext;
+import com.arjuna.wsc.messaging.MessageId;
+import com.arjuna.wst.BA11ParticipantManager;
+
+/**
+ * The participant completion coordinator state engine
+ * @author kevin
+ */
+public class ParticipantCompletionCoordinator11Engine implements ParticipantCompletionCoordinatorInboundEvents
+{
+    /**
+     * The coordinator id.
+     */
+    private final String id ;
+    /**
+     * The instance identifier.
+     */
+    private final InstanceIdentifier instanceIdentifier ;
+    /**
+     * The participant endpoint reference.
+     */
+    private final EndpointReferenceType participant ;
+    /**
+     * The associated coordinator
+     */
+    private BA11ParticipantManager coordinator ;
+    /**
+     * The current state.
+     */
+    private State state ;
+    
+    /**
+     * Construct the initial engine for the coordinator.
+     * @param id The coordinator id.
+     * @param participant The participant endpoint reference.
+     */
+    public ParticipantCompletionCoordinator11Engine(final String id, final EndpointReferenceType participant)
+    {
+        this(id, participant, State.STATE_ACTIVE) ;
+    }
+    
+    /**
+     * Construct the engine for the coordinator in a specified state.
+     * @param id The coordinator id.
+     * @param participant The participant endpoint reference.
+     * @param state The initial state.
+     */
+    public ParticipantCompletionCoordinator11Engine(final String id, final EndpointReferenceType participant,
+        final State state)
+    {
+        this.id = id ;
+        this.instanceIdentifier = new InstanceIdentifier(id) ;
+        this.participant = participant ;
+        this.state = state ;
+    }
+    
+    /**
+     * Set the coordinator and register
+     * @param coordinator
+     */
+    public void setCoordinator(final BA11ParticipantManager coordinator)
+    {
+        this.coordinator = coordinator ;
+        ParticipantCompletionCoordinatorProcessor.getProcessor().activateCoordinator(this, id) ;
+    }
+    
+    /**
+     * Handle the cancelled event.
+     * @param cancelled The cancelled notification.
+     * @param addressingContext The addressing context.
+     * @param jbossContext The jboss context.
+     * 
+     * Active -> Active (invalid state)
+     * Canceling -> Ended
+     * Completed -> Completed (invalid state)
+     * Closing -> Closing (invalid state)
+     * Compensating -> Compensating (invalid state)
+     * Failing-Active -> Failing-Active (invalid state)
+     * Failing-Canceling -> Failing-Canceling (invalid state)
+     * Failing-Compensating -> Failing-Compensating (invalid state)
+     * NotCompleting -> NotCompleting (invalid state)
+     * Exiting -> Exiting (invalid state)
+     * Ended -> Ended
+     */
+    public void cancelled(final NotificationType cancelled, final AddressingContext addressingContext, final JBossContext jbossContext)
+    {
+        final State current ;
+        synchronized(this)
+        {
+            current = state ;
+            if (current == State.STATE_CANCELING)
+            {
+        	ended() ;
+            }
+        }
+    }
+    
+    /**
+     * Handle the closed event.
+     * @param closed The closed notification.
+     * @param addressingContext The addressing context.
+     * @param jbossContext The jboss context.
+     * 
+     * Active -> Active (invalid state)
+     * Canceling -> Canceling (invalid state)
+     * Completed -> Completed (invalid state)
+     * Closing -> Ended
+     * Compensating -> Compensating (invalid state)
+     * Failing-Active -> Failing-Active (invalid state)
+     * Failing-Canceling -> Failing-Canceling (invalid state)
+     * Failing-Compensating -> Failing-Compensating (invalid state)
+     * NotCompleting -> NotCompleting (invalid state)
+     * Exiting -> Exiting (invalid state)
+     * Ended -> Ended
+     */
+    public void closed(final NotificationType closed, final AddressingContext addressingContext, final JBossContext jbossContext)
+    {
+        final State current ;
+        synchronized(this)
+        {
+            current = state ;
+            if (current == State.STATE_CLOSING)
+            {
+        	ended() ;
+            }
+        }
+    }
+    
+    /**
+     * Handle the compensated event.
+     * @param compensated The compensated notification.
+     * @param addressingContext The addressing context.
+     * @param jbossContext The jboss context.
+     * 
+     * Active -> Active (invalid state)
+     * Canceling -> Canceling (invalid state)
+     * Completed -> Completed (invalid state)
+     * Closing -> Closing (invalid state)
+     * Compensating -> Ended
+     * Failing-Active -> Failing-Active (invalid state)
+     * Failing-Canceling -> Failing-Canceling (invalid state)
+     * Failing-Compensating -> Failing-Compensating (invalid state)
+     * NotCompleting -> NotCompleting (invalid state)
+     * Exiting -> Exiting (invalid state)
+     * Ended -> Ended
+     */
+    public void compensated(final NotificationType compensated, final AddressingContext addressingContext, final JBossContext jbossContext)
+    {
+        final State current ;
+        synchronized(this)
+        {
+            current = state ;
+            if (current == State.STATE_COMPENSATING)
+            {
+        	ended() ;
+            }
+        }
+    }
+    
+    /**
+     * Handle the completed event.
+     * @param completed The completed notification.
+     * @param addressingContext The addressing context.
+     * @param jbossContext The jboss context.
+     * 
+     * Active -> Completed
+     * Canceling -> Compensating
+     * Completed -> Completed
+     * Closing -> Closing (resend Close)
+     * Compensating -> (resend Compensate)
+     * Failing-Active -> Failing-Active (invalid state)
+     * Failing-Canceling -> Failing-Canceling (invalid state)
+     * Failing-Compensating -> Failing-Compensating
+     * NotCompleting -> NotCompleting (invalid state)
+     * Exiting -> Exiting (invalid state)
+     * Ended -> Ended
+     */
+    public void completed(final NotificationType completed, final AddressingContext addressingContext,
+        final JBossContext jbossContext)
+    {
+        final State current ;
+        synchronized(this)
+        {
+            current = state ;
+            if (current == State.STATE_ACTIVE)
+            {
+                changeState(State.STATE_COMPLETED) ;
+            }
+            else if (current == State.STATE_CANCELING)
+            {
+        	state = State.STATE_COMPENSATING ;
+            }
+        }
+        
+        if (current == State.STATE_ACTIVE)
+        {
+            executeCompleted() ;
+        }
+        else if (current == State.STATE_CLOSING)
+        {
+            sendClose() ;
+        }
+        else if ((current == State.STATE_CANCELING) || (current == State.STATE_COMPENSATING))
+        {
+            sendCompensate() ;
+        }
+    }
+    
+    /**
+     * Handle the exit event.
+     * @param exit The exit notification.
+     * @param addressingContext The addressing context.
+     * @param jbossContext The jboss context.
+     * 
+     * Active -> Exiting
+     * Canceling -> Exiting
+     * Completed -> Completed (invalid state)
+     * Closing -> Closing (invalid state)
+     * Compensating -> Compensating (invalid state)
+     * Failing-Active -> Failing-Active (invalid state)
+     * Failing-Canceling -> Failing-Canceling (invalid state)
+     * Failing-Compensating -> Failing-Compensating (invalid state)
+     * NotCompleting -> NotCompleting (invalid state)
+     * Exiting -> Exiting
+     * Ended -> Ended (resend Exited)
+     */
+    public void exit(final NotificationType exit, final AddressingContext addressingContext, final JBossContext jbossContext)
+    {
+        final State current ;
+        synchronized(this)
+        {
+            current = state ;
+            if ((current == State.STATE_ACTIVE) || (current == State.STATE_CANCELING))
+            {
+                changeState(State.STATE_EXITING) ;
+            }
+        }
+        
+        if ((current == State.STATE_ACTIVE) || (current == State.STATE_CANCELING))
+        {
+            executeExit() ;
+        }
+        else if (current == State.STATE_ENDED)
+        {
+            sendExited() ;
+        }
+    }
+    
+    /**
+     * Handle the fail event.
+     * @param fail The fail exception.
+     * @param addressingContext The addressing context.
+     * @param jbossContext The jboss context.
+     * 
+     * Active -> Failing-Active
+     * Canceling -> Failing-Canceling
+     * Completed -> Completed (invalid state)
+     * Closing -> Closing (invalid state)
+     * Compensating -> Failing-Compensating
+     * Failing-Active -> Failing-Active
+     * Failing-Canceling -> Failing-Canceling
+     * Failing-Compensating -> Failing-Compensating
+     * NotCompleting -> NotCompleting (invalid state)
+     * Exiting -> Exiting (invalid state)
+     * Ended -> Ended (resend Failed)
+     */
+    public void fail(final ExceptionType fail, final AddressingContext addressingContext,
+        final JBossContext jbossContext)
+    {
+        final State current ;
+        synchronized(this)
+        {
+            current = state ;
+            if (current == State.STATE_ACTIVE)
+            {
+        	changeState(State.STATE_FAILING_ACTIVE) ;
+            }
+            else if (current == State.STATE_CANCELING)
+            {
+                changeState(State.STATE_FAILING_CANCELING) ;
+            }
+            else if (current == State.STATE_COMPENSATING)
+            {
+                changeState(State.STATE_FAILING_COMPENSATING) ;
+            }
+        }
+        
+        if (current == State.STATE_ACTIVE)
+        {
+            executeFail(fail.getExceptionIdentifier()) ;
+        }
+        else if ((current == State.STATE_CANCELING) || (current == State.STATE_COMPENSATING))
+        {
+            sendFailed() ;
+            ended() ;
+        }
+        else if (current == State.STATE_ENDED)
+        {
+            sendFailed() ;
+        }
+    }
+    
+    /**
+     * Handle the cannot complete event.
+     * @param cannotComplete The cannotComplete exception.
+     * @param addressingContext The addressing context.
+     * @param jbossContext The jboss context.
+     * 
+     * Active -> NotCompleting
+     * Canceling -> NotCompleting
+     * Completed -> Completed (invalid state)
+     * Closing -> Closing (invalid state)
+     * Compensating -> Compensating (invalid state)
+     * Failing-Active -> Failing-Active (invalid state)
+     * Failing-Canceling -> Failing-Canceling (invalid state)
+     * Failing-Compensating -> Failing-Compensating (invalid state)
+     * NotCompleting -> NotCompleting
+     * Exiting -> Exiting (invalid state)
+     * Ended -> Ended (resend NotCompleted)
+     */
+    public void cannotComplete(final NotificationType cannotComplete, final AddressingContext addressingContext,
+        final JBossContext jbossContext)
+    {
+        final State current ;
+        synchronized(this)
+        {
+            current = state ;
+            if ((current == State.STATE_ACTIVE) || (state == State.STATE_CANCELING))
+            {
+        	changeState(State.STATE_NOT_COMPLETING) ;
+            }
+        }
+        
+        if ((current == State.STATE_ACTIVE) || (current == State.STATE_CANCELING))
+        {
+            executeCannotComplete() ;
+        }
+        else if (current == State.STATE_ENDED)
+        {
+            sendNotCompleted() ;
+        }
+    }
+    
+    /**
+     * Handle the getStatus event.
+     * @param getStatus The getStatus notification.
+     * @param addressingContext The addressing context.
+     * @param jbossContext The jboss context.
+     */
+    public void getStatus(final NotificationType getStatus, final AddressingContext addressingContext, final JBossContext jbossContext)
+    {
+	final State current ;
+	synchronized(this)
+	{
+	    current = state ;
+	}
+	sendStatus(current) ;
+    }
+    
+    /**
+     * Handle the status event.
+     * @param status The status.
+     * @param addressingContext The addressing context.
+     * @param jbossContext The jboss context.
+     */
+    public void status(final StatusType status, final AddressingContext addressingContext, final JBossContext jbossContext)
+    {
+        // KEV - implement
+    }
+    
+    /**
+     * Handle the SOAP fault event.
+     * @param soapFault The SOAP fault.
+     * @param addressingContext The addressing context.
+     * @param jbossContext The jboss context.
+     */
+    public void soapFault(final SoapFault soapFault, final AddressingContext addressingContext, final JBossContext jbossContext)
+    {
+	ended() ;
+	try
+	{
+	    coordinator.fail(soapFault.getSubcode()) ;
+	}
+	catch (final Throwable th) {} // ignore
+    }
+    
+    /**
+     * Handle the get status event.
+     * @return The state.
+     */
+    public synchronized State getStatus()
+    {
+        return state ;
+    }
+    
+    /**
+     * Handle the cancel event.
+     * @return The state.
+     * 
+     * Active -> Canceling
+     * Canceling -> Canceling
+     * Completed -> Completed (invalid state)
+     * Closing -> Closing (invalid state)
+     * Compensating -> Compensating (invalid state)
+     * Failing-Active -> Failing-Active (invalid state)
+     * Failing-Canceling -> Failing-Canceling (invalid state)
+     * Failing-Compensating -> Failing-Compensating (invalid state)
+     * NotCompleting -> NotCompleting (invalid state)
+     * Exiting -> Exiting (invalid state)
+     * Ended -> Ended (invalid state)
+     */
+    public State cancel()
+    {
+        final State current ;
+        synchronized(this)
+        {
+            current = state ;
+            if (current == State.STATE_ACTIVE)
+            {
+                changeState(State.STATE_CANCELING) ;
+            }
+        }
+        
+        if ((current == State.STATE_ACTIVE) || (current == State.STATE_CANCELING))
+        {
+            sendCancel() ;
+            return waitForState(State.STATE_CANCELING, TransportTimer.getTransportTimeout()) ;
+        }
+        return current ;
+    }
+    
+    /**
+     * Handle the compensate event.
+     * @return The state.
+     * 
+     * Active -> Active (invalid state)
+     * Canceling -> Canceling (invalid state)
+     * Completed -> Compensating
+     * Closing -> Closing (invalid state)
+     * Compensating -> Compensating
+     * Failing-Active -> Failing-Active (invalid state)
+     * Failing-Canceling -> Failing-Canceling (invalid state)
+     * Failing-Compensating -> Failing-Compensating (invalid state)
+     * NotCompleting -> NotCompleting (invalid state)
+     * Exiting -> Exiting (invalid state)
+     * Ended -> Ended (invalid state)
+     */
+    public State compensate()
+    {
+        final State current ;
+        synchronized(this)
+        {
+            current = state ;
+            if (current == State.STATE_COMPLETED)
+            {
+                changeState(State.STATE_COMPENSATING) ;
+            }
+        }
+        
+        if ((current == State.STATE_COMPLETED) || (current == State.STATE_COMPENSATING))
+        {
+            sendCompensate() ;
+            return waitForState(State.STATE_COMPENSATING, TransportTimer.getTransportTimeout()) ;
+        }
+        return current ;
+    }
+    
+    /**
+     * Handle the close event.
+     * @return The state.
+     * 
+     * Active -> Active (invalid state)
+     * Canceling -> Canceling (invalid state)
+     * Completed -> Closing
+     * Closing -> Closing
+     * Compensating -> Compensating (invalid state)
+     * Failing-Active -> Failing-Active (invalid state)
+     * Failing-Canceling -> Failing-Canceling (invalid state)
+     * Failing-Compensating -> Failing-Compensating (invalid state)
+     * NotCompleting -> NotCompleting (invalid state)
+     * Exiting -> Exiting (invalid state)
+     * Ended -> Ended (invalid state)
+     */
+    public State close()
+    {
+        final State current ;
+        synchronized(this)
+        {
+            current = state ;
+            if (current == State.STATE_COMPLETED)
+            {
+                changeState(State.STATE_CLOSING) ;
+            }
+        }
+        
+        if ((current == State.STATE_COMPLETED) || (current == State.STATE_CLOSING))
+        {
+            sendClose() ;
+            return waitForState(State.STATE_CLOSING, TransportTimer.getTransportTimeout()) ;
+        }
+        return current ;
+    }
+    
+    /**
+     * Send the close message.
+     * 
+     * @message com.arjuna.wst.messaging.engines.ParticipantCompletionCoordinator11Engine.sendClose_1 [com.arjuna.wst.messaging.engines.ParticipantCompletionCoordinator11Engine.sendClose_1] - Unexpected exception while sending Close
+     */
+    private void sendClose()
+    {
+        final AddressingContext addressingContext = createContext() ;
+        try
+        {
+            ParticipantCompletionParticipantClient.getClient().sendClose(addressingContext, instanceIdentifier) ;
+        }
+        catch (final Throwable th)
+        {
+            if (WSTLogger.arjLoggerI18N.isDebugEnabled())
+            {
+                WSTLogger.arjLoggerI18N.debug("com.arjuna.wst.messaging.engines.ParticipantCompletionCoordinator11Engine.sendClose_1", th) ;
+            }
+        }
+    }
+    
+    /**
+     * Send the compensate message.
+     * 
+     * @message com.arjuna.wst.messaging.engines.ParticipantCompletionCoordinator11Engine.sendCompensate_1 [com.arjuna.wst.messaging.engines.ParticipantCompletionCoordinator11Engine.sendCompensate_1] - Unexpected exception while sending Compensate
+     */
+    private void sendCompensate()
+    {
+        final AddressingContext addressingContext = createContext() ;
+        try
+        {
+            ParticipantCompletionParticipantClient.getClient().sendCompensate(addressingContext, instanceIdentifier) ;
+        }
+        catch (final Throwable th)
+        {
+            if (WSTLogger.arjLoggerI18N.isDebugEnabled())
+            {
+                WSTLogger.arjLoggerI18N.debug("com.arjuna.wst.messaging.engines.ParticipantCompletionCoordinator11Engine.sendCompensate_1", th) ;
+            }
+        }
+    }
+    
+    /**
+     * Send the cancel message.
+     * 
+     * @message com.arjuna.wst.messaging.engines.ParticipantCompletionCoordinator11Engine.sendCancel_1 [com.arjuna.wst.messaging.engines.ParticipantCompletionCoordinator11Engine.sendCancel_1] - Unexpected exception while sending Cancel
+     */
+    private void sendCancel()
+    {
+        final AddressingContext addressingContext = createContext() ;
+        try
+        {
+            ParticipantCompletionParticipantClient.getClient().sendCancel(addressingContext, instanceIdentifier) ;
+        }
+        catch (final Throwable th)
+        {
+            if (WSTLogger.arjLoggerI18N.isDebugEnabled())
+            {
+                WSTLogger.arjLoggerI18N.debug("com.arjuna.wst.messaging.engines.ParticipantCompletionCoordinator11Engine.sendCancel_1", th) ;
+            }
+        }
+    }
+    
+    /**
+     * Send the exited message.
+     * 
+     * @message com.arjuna.wst.messaging.engines.ParticipantCompletionCoordinator11Engine.sendExited_1 [com.arjuna.wst.messaging.engines.ParticipantCompletionCoordinator11Engine.sendExited_1] - Unexpected exception while sending Exited
+     */
+    private void sendExited()
+    {
+        final AddressingContext addressingContext = createContext() ;
+        try
+        {
+            ParticipantCompletionParticipantClient.getClient().sendExited(addressingContext, instanceIdentifier) ;
+        }
+        catch (final Throwable th)
+        {
+            if (WSTLogger.arjLoggerI18N.isDebugEnabled())
+            {
+                WSTLogger.arjLoggerI18N.debug("com.arjuna.wst.messaging.engines.ParticipantCompletionCoordinator11Engine.sendExited_1", th) ;
+            }
+        }
+    }
+    
+    /**
+     * Send the failed message.
+     * 
+     * @message com.arjuna.wst.messaging.engines.ParticipantCompletionCoordinator11Engine.sendFailed_1 [com.arjuna.wst.messaging.engines.ParticipantCompletionCoordinator11Engine.sendFailed_1] - Unexpected exception while sending Failed
+     */
+    private void sendFailed()
+    {
+        final AddressingContext addressingContext = createContext() ;
+        try
+        {
+            ParticipantCompletionParticipantClient.getClient().sendFailed(addressingContext, instanceIdentifier) ;
+        }
+        catch (final Throwable th)
+        {
+            if (WSTLogger.arjLoggerI18N.isDebugEnabled())
+            {
+                WSTLogger.arjLoggerI18N.debug("com.arjuna.wst.messaging.engines.ParticipantCompletionCoordinator11Engine.sendFailed_1", th) ;
+            }
+        }
+    }
+    
+    /**
+     * Send the not completed message.
+     * 
+     * @message com.arjuna.wst.messaging.engines.ParticipantCompletionCoordinator11Engine.sendNotCompleted_1 [com.arjuna.wst.messaging.engines.ParticipantCompletionCoordinator11Engine.sendNotCompleted_1] - Unexpected exception while sending NotCompleted
+     */
+    private void sendNotCompleted()
+    {
+        final AddressingContext addressingContext = createContext() ;
+        try
+        {
+            ParticipantCompletionParticipantClient.getClient().sendNotCompleted(addressingContext, instanceIdentifier) ;
+        }
+        catch (final Throwable th)
+        {
+            if (WSTLogger.arjLoggerI18N.isDebugEnabled())
+            {
+                WSTLogger.arjLoggerI18N.debug("com.arjuna.wst.messaging.engines.ParticipantCompletionCoordinator11Engine.sendNotCompleted_1", th) ;
+            }
+        }
+    }
+    
+    /**
+     * Send the status message.
+     * @param state The state.
+     * 
+     * @message com.arjuna.wst.messaging.engines.ParticipantCompletionCoordinator11Engine.sendStatus_1 [com.arjuna.wst.messaging.engines.ParticipantCompletionCoordinator11Engine.sendStatus_1] - Unexpected exception while sending Status
+     */
+    private void sendStatus(final State state)
+    {
+        final AddressingContext addressingContext = createContext() ;
+        try
+        {
+            ParticipantCompletionParticipantClient.getClient().sendStatus(addressingContext, instanceIdentifier, state) ;
+        }
+        catch (final Throwable th)
+        {
+            if (WSTLogger.arjLoggerI18N.isDebugEnabled())
+            {
+                WSTLogger.arjLoggerI18N.debug("com.arjuna.wst.messaging.engines.ParticipantCompletionCoordinator11Engine.sendStatus_1", th) ;
+            }
+        }
+    }
+    
+    /**
+     * Send the invalid state fault message.
+     * 
+     * @message com.arjuna.wst.messaging.engines.ParticipantCompletionCoordinator11Engine.sendInvalidStateFault_1 [com.arjuna.wst.messaging.engines.ParticipantCompletionCoordinator11Engine.sendInvalidStateFault_1] - Unexpected exception while sending InvalidStateFault
+     * @message com.arjuna.wsc.messaging.engines.ParticipantCompletionCoordinator11Engine.sendInvalidStateFault_2 [com.arjuna.wsc.messaging.engines.ParticipantCompletionCoordinator11Engine.sendInvalidStateFault_2] - Invalid coordinator completion coordinator state
+     */
+    private void sendInvalidStateFault()
+    {
+        final AddressingContext addressingContext = createContext() ;
+        try
+        {
+            final SoapFault soapFault = new SoapFault(SoapFaultType.FAULT_SENDER, CoordinationConstants.WSCOOR_ERROR_CODE_INVALID_STATE_QNAME,
+        	WSTLogger.log_mesg.getString("com.arjuna.wsc.messaging.engines.ParticipantCompletionCoordinator11Engine.sendInvalidStateFault_2")) ;
+            ParticipantCompletionParticipantClient.getClient().sendSoapFault(addressingContext, instanceIdentifier, soapFault,
+            	CoordinationConstants.WSCOOR_ACTION_FAULT) ;
+        }
+        catch (final Throwable th)
+        {
+            if (WSTLogger.arjLoggerI18N.isDebugEnabled())
+            {
+                WSTLogger.arjLoggerI18N.debug("com.arjuna.wst.messaging.engines.ParticipantCompletionCoordinator11Engine.sendInvalidStateFault_1", th) ;
+            }
+        }
+    }
+    
+    /**
+     * Get the coordinator id.
+     * @return The coordinator id.
+     */
+    public String getId()
+    {
+        return id ;
+    }
+    
+    /**
+     * Get the participant endpoint reference
+     * @return The participant endpoint reference
+     */
+    public EndpointReferenceType getParticipant()
+    {
+        return participant ;
+    }
+    
+    /**
+     * Get the associated coordinator.
+     * @return The associated coordinator.
+     */
+    public BA11ParticipantManager getCoordinator()
+    {
+        return coordinator ;
+    }
+    
+    /**
+     * Change the state and notify any listeners.
+     * @param state The new state.
+     */
+    private synchronized void changeState(final State state)
+    {
+        if (this.state != state)
+        {
+            this.state = state ;
+            notifyAll() ;
+        }
+    }
+    
+    /**
+     * Wait for the state to change from the specified state.
+     * @param origState The original state.
+     * @param delay The maximum time to wait for (in milliseconds).
+     * @return The current state.
+     */
+    private State waitForState(final State origState, final long delay)
+    {
+        final long end = System.currentTimeMillis() + delay ;
+        synchronized(this)
+        {
+            while(state == origState)
+            {
+                final long remaining = end - System.currentTimeMillis() ;
+                if (remaining <= 0)
+                {
+                    break ;
+                }
+                try
+                {
+                    wait(remaining) ;
+                }
+                catch (final InterruptedException ie) {} // ignore
+            }
+            return state ;
+        }
+    }
+    
+    /**
+     * Execute the completed transition.
+     * 
+     * @message com.arjuna.wst.messaging.engines.ParticipantCompletionCoordinator11Engine.executeCompleted_1 [com.arjuna.wst.messaging.engines.ParticipantCompletionCoordinator11Engine.executeCompleted_1] - Unexpected exception from coordinator completed
+     */
+    private void executeCompleted()
+    {
+        try
+        {
+            coordinator.completed() ;
+        }
+        catch (final Throwable th)
+        {
+            if (WSTLogger.arjLoggerI18N.isDebugEnabled())
+            {
+                WSTLogger.arjLoggerI18N.debug("com.arjuna.wst.messaging.engines.ParticipantCompletionCoordinator11Engine.executeCompleted_1", th) ;
+            }
+        }
+    }
+    
+    /**
+     * Execute the exit transition.
+     * 
+     * @message com.arjuna.wst.messaging.engines.ParticipantCompletionCoordinator11Engine.executeExit_1 [com.arjuna.wst.messaging.engines.ParticipantCompletionCoordinator11Engine.executeExit_1] - Unexpected exception from coordinator exit
+     */
+    private void executeExit()
+    {
+        try
+        {
+            coordinator.exit() ;
+        }
+        catch (final Throwable th)
+        {
+            if (WSTLogger.arjLoggerI18N.isDebugEnabled())
+            {
+                WSTLogger.arjLoggerI18N.debug("com.arjuna.wst.messaging.engines.ParticipantCompletionCoordinator11Engine.executeExit_1", th) ;
+            }
+            return ;
+        }
+        sendExited() ;
+        ended() ;
+    }
+    
+    /**
+     * Executing the fail transition.
+     * 
+     * @throws SoapFault for SOAP errors.
+     * @throws IOException for transport errors.
+     * 
+     * @message com.arjuna.wst.messaging.engines.ParticipantCompletionCoordinator11Engine.executeFail_1 [com.arjuna.wst.messaging.engines.ParticipantCompletionCoordinator11Engine.executeFail_1] - Unexpected exception from coordinator fault
+     */
+    private void executeFail(final QName exceptionIdentifier)
+    {
+        try
+        {
+            coordinator.fail(exceptionIdentifier) ;
+        }
+        catch (final Throwable th)
+        {
+            if (WSTLogger.arjLoggerI18N.isDebugEnabled())
+            {
+                WSTLogger.arjLoggerI18N.debug("com.arjuna.wst.messaging.engines.ParticipantCompletionCoordinator11Engine.executeFail_1", th) ;
+            }
+            return ;
+        }
+        sendFailed() ;
+        ended() ;
+    }
+    
+    /**
+     * Executing the cannot complete transition.
+     * 
+     * @throws SoapFault for SOAP errors.
+     * @throws IOException for transport errors.
+     * 
+     * @message com.arjuna.wst.messaging.engines.ParticipantCompletionCoordinator11Engine.executeCannotComplete_1 [com.arjuna.wst.messaging.engines.ParticipantCompletionCoordinator11Engine.executeCannotComplete_1] - Unexpected exception from coordinator error
+     */
+    private void executeCannotComplete()
+    {
+        try
+        {
+            coordinator.cannotComplete() ;
+        }
+        catch (final Throwable th)
+        {
+            if (WSTLogger.arjLoggerI18N.isDebugEnabled())
+            {
+                WSTLogger.arjLoggerI18N.debug("com.arjuna.wst.messaging.engines.ParticipantCompletionCoordinator11Engine.executeCannotComplete_1", th) ;
+            }
+            return ;
+        }
+        sendNotCompleted() ;
+        ended() ;
+    }
+    
+    /**
+     * End the current coordinator.
+     */
+    private void ended()
+    {
+        changeState(State.STATE_ENDED) ;
+        ParticipantCompletionCoordinatorProcessor.getProcessor().deactivateCoordinator(this) ;
+    }
+    
+    /**
+     * Create a context for the outgoing message.
+     * @return The addressing context.
+     */
+    private AddressingContext createContext()
+    {
+        final String messageId = MessageId.getMessageId() ;
+        return AddressingContext.createRequestContext(participant, messageId) ;
+    }
+}


Property changes on: labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/wst/messaging/engines/ParticipantCompletionCoordinator11Engine.java
___________________________________________________________________
Name: svn:keywords
   + Rev Date
Name: svn:eol-style
   + native

Added: labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/wst/messaging/engines/ParticipantCompletionParticipant11Engine.java
===================================================================
--- labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/wst/messaging/engines/ParticipantCompletionParticipant11Engine.java	                        (rev 0)
+++ labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/wst/messaging/engines/ParticipantCompletionParticipant11Engine.java	2007-08-14 12:43:41 UTC (rev 14200)
@@ -0,0 +1,978 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag.  All rights reserved. 
+ * See the copyright.txt in the distribution for a full listing 
+ * of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU General Public License, v. 2.0.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A 
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+ * PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+ * You should have received a copy of the GNU General Public License,
+ * v. 2.0 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+ * MA  02110-1301, USA.
+ * 
+ * (C) 2005-2006,
+ * @author JBoss Inc.
+ */
+package com.arjuna.wst.messaging.engines;
+
+import java.util.TimerTask;
+
+import javax.xml.namespace.QName;
+
+import com.arjuna.webservices.SoapFault;
+import com.arjuna.webservices.SoapFaultType;
+import com.arjuna.webservices.logging.WSTLogger;
+import com.arjuna.webservices.util.TransportTimer;
+import com.arjuna.webservices.wsaddr2005.AddressingContext;
+import com.arjuna.webservices.wsaddr2005.EndpointReferenceType;
+import com.arjuna.webservices.wsba11.NotificationType;
+import com.arjuna.webservices.wsba11.ParticipantCompletionParticipantInboundEvents;
+import com.arjuna.webservices.wsba11.State;
+import com.arjuna.webservices.wsba11.StatusType;
+import com.arjuna.webservices.wsba11.client.ParticipantCompletionCoordinatorClient;
+import com.arjuna.webservices.wsba11.processors.ParticipantCompletionParticipantProcessor;
+import com.arjuna.webservices.wscoor11.CoordinationConstants;
+import com.arjuna.webservices.wsjboss.InstanceIdentifier;
+import com.arjuna.webservices.wsjboss.JBossContext;
+import com.arjuna.webservices.wsjbosstx.JBossTXConstants;
+import com.arjuna.wsc.messaging.MessageId;
+import com.arjuna.wst.BusinessAgreementWithParticipantCompletionParticipant;
+import com.arjuna.wst.FaultedException;
+
+/**
+ * The participant completion participant state engine
+ * @author kevin
+ */
+public class ParticipantCompletionParticipant11Engine implements ParticipantCompletionParticipantInboundEvents
+{
+    /**
+     * The participant id.
+     */
+    private final String id ;
+    /**
+     * The instance identifier.
+     */
+    private final InstanceIdentifier instanceIdentifier ;
+    /**
+     * The coordinator endpoint reference.
+     */
+    private final EndpointReferenceType coordinator ;
+    /**
+     * The associated participant
+     */
+    private final BusinessAgreementWithParticipantCompletionParticipant participant ;
+    /**
+     * The current state.
+     */
+    private State state ;
+    /**
+     * The associated timer task or null.
+     */
+    private TimerTask timerTask ;
+    
+    /**
+     * Construct the initial engine for the participant.
+     * @param id The participant id.
+     * @param coordinator The coordinator endpoint reference.
+     * @param participant The participant.
+     */
+    public ParticipantCompletionParticipant11Engine(final String id, final EndpointReferenceType coordinator,
+        final BusinessAgreementWithParticipantCompletionParticipant participant)
+    {
+        this(id, coordinator, participant, State.STATE_ACTIVE) ;
+    }
+    
+    /**
+     * Construct the engine for the participant in a specified state.
+     * @param id The participant id.
+     * @param coordinator The coordinator endpoint reference.
+     * @param participant The participant.
+     * @param state The initial state.
+     */
+    public ParticipantCompletionParticipant11Engine(final String id, final EndpointReferenceType coordinator,
+        final BusinessAgreementWithParticipantCompletionParticipant participant, final State state)
+    {
+        this.id = id ;
+        this.instanceIdentifier = new InstanceIdentifier(id) ;
+        this.coordinator = coordinator ;
+        this.participant = participant ;
+        this.state = state ;
+    }
+    
+    /**
+     * Handle the cancel event.
+     * @param cancel The cancel notification.
+     * @param addressingContext The addressing context.
+     * @param jbossContext The jboss context.
+     * 
+     * Active -> Canceling
+     * Canceling -> Canceling
+     * Completed -> Completed (resend Completed)
+     * Closing -> Closing
+     * Compensating -> Compensating
+     * Failing-Active -> Failing-Active (resend Fail)
+     * Failing-Canceling -> Failing-Canceling (resend Fail)
+     * Failing-Compensating -> Failing-Compensating
+     * NotCompleting -> NotCompleting (resend CannotComplete)
+     * Exiting -> Exiting (resend Exit)
+     * Ended -> Ended (resend Cancelled)
+     */
+    public void cancel(final NotificationType cancel, final AddressingContext addressingContext, final JBossContext jbossContext)
+    {
+        final State current ;
+        synchronized(this)
+        {
+            current = state ;
+            if (current == State.STATE_ACTIVE)
+            {
+                changeState(State.STATE_CANCELING) ;
+            }
+        }
+        
+        if (current == State.STATE_ACTIVE)
+        {
+            executeCancel() ;
+        }
+        else if (current == State.STATE_COMPLETED)
+        {
+            sendCompleted() ;
+        }
+        else if ((current == State.STATE_FAILING_ACTIVE) || (current == State.STATE_FAILING_CANCELING))
+        {
+            sendFail(current.getValue()) ;
+        }
+        else if (current == State.STATE_NOT_COMPLETING)
+        {
+            sendCannotComplete() ;
+        }
+        else if (current == State.STATE_EXITING)
+        {
+            sendExit() ;
+        }
+        else if (current == State.STATE_ENDED)
+        {
+            sendCancelled() ;
+        }
+    }
+    
+    /**
+     * Handle the close event.
+     * @param close The close notification.
+     * @param addressingContext The addressing context.
+     * @param jbossContext The jboss context.
+     * 
+     * Active -> Active (invalid state)
+     * Canceling -> Canceling (invalid state)
+     * Completed -> Closing
+     * Closing -> Closing
+     * Compensating -> Compensating (invalid state)
+     * Failing-Active -> Failing-Active (invalid state)
+     * Failing-Canceling -> Failing-Canceling (invalid state)
+     * Failing-Compensating -> Failing-Compensating (invalid state)
+     * NotCompleting -> NotCompleting (invalid state)
+     * Exiting -> Exiting (invalid state)
+     * Ended -> Ended (send Closed)
+     */
+    public void close(final NotificationType close, final AddressingContext addressingContext, final JBossContext jbossContext)
+    {
+        final State current ;
+        synchronized(this)
+        {
+            current = state ;
+            if (current == State.STATE_COMPLETED)
+            {
+                changeState(State.STATE_CLOSING) ;
+            }
+        }
+        
+        if (current == State.STATE_COMPLETED)
+        {
+            if (timerTask != null)
+            {
+                timerTask.cancel() ;
+            }
+            executeClose() ;
+        }
+        else if (current == State.STATE_ENDED)
+        {
+            sendClosed() ;
+        }
+    }
+    
+    /**
+     * Handle the compensate event.
+     * @param compensate The compensate notification.
+     * @param addressingContext The addressing context.
+     * @param jbossContext The jboss context.
+     * 
+     * Active -> Active (invalid state)
+     * Canceling -> Canceling (invalid state)
+     * Completed -> Compensating
+     * Closing -> Closing (invalid state)
+     * Compensating -> Compensating
+     * Failing-Active -> Failing-Active (invalid state)
+     * Failing-Canceling -> Failing-Canceling (invalid state)
+     * Failing-Compensating -> Failing-Compensating (resend Fail)
+     * NotCompleting -> NotCompleting (invalid state)
+     * Exiting -> Exiting (invalid state)
+     * Ended -> Ended (send Compensated)
+     */
+    public void compensate(final NotificationType compensate, final AddressingContext addressingContext, final JBossContext jbossContext)
+    {
+        final State current ;
+        synchronized(this)
+        {
+            current = state ;
+            if (current == State.STATE_COMPLETED)
+            {
+                changeState(State.STATE_COMPENSATING) ;
+            }
+        }
+        
+        if (current == State.STATE_COMPLETED)
+        {
+            if (timerTask != null)
+            {
+                timerTask.cancel() ;
+            }
+            executeCompensate() ;
+        }
+        else if (current == State.STATE_FAILING_COMPENSATING)
+        {
+            sendFail(current.getValue()) ;
+        }
+        else if (current == State.STATE_ENDED)
+        {
+            sendCompensated() ;
+        }
+    }
+    
+    /**
+     * Handle the exited event.
+     * @param exited The exited notification.
+     * @param addressingContext The addressing context.
+     * @param jbossContext The jboss context.
+     * 
+     * Active -> Active (invalid state)
+     * Canceling -> Canceling (invalid state)
+     * Completed -> Completed (invalid state)
+     * Closing -> Closing (invalid state)
+     * Compensating -> Compensating (invalid state)
+     * Failing-Active -> Failing-Active (invalid state)
+     * Failing-Canceling -> Failing-Canceling (invalid state)
+     * Failing-Compensating -> Failing-Compensating (invalid state)
+     * NotCompleting -> NotCompleting (invalid state)
+     * Exiting -> Ended
+     * Ended -> Ended
+     */
+    public void exited(final NotificationType exited, final AddressingContext addressingContext, final JBossContext jbossContext)
+    {
+        final State current ;
+        synchronized(this)
+        {
+            current = state ;
+            if (current == State.STATE_EXITING)
+            {
+                ended() ;
+            }
+        }
+    }
+    
+    /**
+     * Handle the failed event.
+     * @param failed The failed notification.
+     * @param addressingContext The addressing context.
+     * @param jbossContext The jboss context.
+     * 
+     * Active -> Active (invalid state)
+     * Canceling -> Canceling (invalid state)
+     * Completed -> Completed (invalid state)
+     * Closing -> Closing (invalid state)
+     * Compensating -> Compensating (invalid state)
+     * Failing-Active -> Ended
+     * Failing-Canceling -> Ended
+     * Failing-Compensating -> Ended
+     * NotCompleting -> NotCompleting (invalid state)
+     * Exiting -> Exiting (invalid state)
+     * Ended -> Ended
+     */
+    public void failed(final NotificationType failed, final AddressingContext addressingContext, final JBossContext jbossContext)
+    {
+        final State current ;
+        synchronized(this)
+        {
+            current = state ;
+            if ((current == State.STATE_FAILING_ACTIVE) || (current == State.STATE_FAILING_CANCELING) ||
+                (current == State.STATE_FAILING_COMPENSATING))
+            {
+                ended() ;
+            }
+        }
+    }
+    
+    /**
+     * Handle the not completed event.
+     * @param notCompleted The notCompleted notification.
+     * @param addressingContext The addressing context.
+     * @param jbossContext The jboss context.
+     * 
+     * Active -> Active (invalid state)
+     * Canceling -> Canceling (invalid state)
+     * Completed -> Completed (invalid state)
+     * Closing -> Closing (invalid state)
+     * Compensating -> Compensating (invalid state)
+     * Failing-Active -> Failing-Active (invalid state)
+     * Failing-Canceling -> Failing-Canceling (invalid state)
+     * Failing-Compensating -> Failing-Compensating (invalid state)
+     * NotCompleting -> Ended
+     * Exiting -> Exiting (invalid state)
+     * Ended -> Ended
+     */
+    public void notCompleted(final NotificationType notCompleted, final AddressingContext addressingContext, final JBossContext jbossContext)
+    {
+        final State current ;
+        synchronized(this)
+        {
+            current = state ;
+            if (current == State.STATE_NOT_COMPLETING)
+            {
+        	ended() ;
+            }
+        }
+    }
+    
+    /**
+     * Handle the getStatus event.
+     * @param getStatus The getStatus notification.
+     * @param addressingContext The addressing context.
+     * @param jbossContext The jboss context.
+     */
+    public void getStatus(final NotificationType getStatus, final AddressingContext addressingContext, final JBossContext jbossContext)
+    {
+	final State current ;
+	synchronized(this)
+	{
+	    current = state ;
+	}
+	sendStatus(current) ;
+    }
+    
+    /**
+     * Handle the status event.
+     * @param status The status type.
+     * @param addressingContext The addressing context.
+     * @param jbossContext The jboss context.
+     */
+    public void status(final StatusType status, final AddressingContext addressingContext, final JBossContext jbossContext)
+    {
+        // KEV - implement
+    }
+    
+    /**
+     * Handle the SOAP fault event.
+     * @param soapFault The SOAP fault.
+     * @param addressingContext The addressing context.
+     * @param jbossContext The jboss context.
+     */
+    public void soapFault(final SoapFault soapFault, final AddressingContext addressingContext, final JBossContext jbossContext)
+    {
+	ended() ;
+	try
+	{
+	    participant.error() ;
+	}
+	catch (final Throwable th) {} // ignore
+    }
+    
+    /**
+     * Handle the completed event.
+     * 
+     * Active -> Completed
+     * Canceling -> Canceling (invalid state)
+     * Completed -> Completed
+     * Closing -> Closing (invalid state)
+     * Compensating -> Compensating (invalid state)
+     * Failing-Active -> Failing-Active (invalid state)
+     * Failing-Canceling -> Failing-Canceling (invalid state)
+     * Failing-Compensating -> Failing-Compensating (invalid state)
+     * NotCompleting -> NotCompleting (invalid state)
+     * Exiting -> Exiting (invalid state)
+     * Ended -> Ended (invalid state)
+     */
+    public State completed()
+    {
+        final State current ;
+        synchronized(this)
+        {
+            current = state ;
+            if (current == State.STATE_ACTIVE)
+            {
+                changeState(State.STATE_COMPLETED) ;
+            }
+        }
+        
+        if ((current == State.STATE_ACTIVE) || (current == State.STATE_COMPLETED))
+        {
+            sendCompleted() ;
+        }
+        
+        return current ;
+    }
+    
+    /**
+     * Handle the exit event.
+     * 
+     * Active -> Exiting
+     * Canceling -> Canceling (invalid state)
+     * Completed -> Completed (invalid state)
+     * Closing -> Closing (invalid state)
+     * Compensating -> Compensating (invalid state)
+     * Failing-Active -> Failing-Active (invalid state)
+     * Failing-Canceling -> Failing-Canceling (invalid state)
+     * Failing-Compensating -> Failing-Compensating (invalid state)
+     * NotCompleting -> NotCompleting (invalid state)
+     * Exiting -> Exiting
+     * Ended -> Ended (invalid state)
+     */
+    public State exit()
+    {
+        final State current ;
+        synchronized (this)
+        {
+            current = state ;
+            if (current == State.STATE_ACTIVE)
+            {
+                changeState(State.STATE_EXITING) ;
+            }
+        }
+        
+        if ((current == State.STATE_ACTIVE) || (current == State.STATE_EXITING))
+        {
+            sendExit() ;
+        }
+        
+        return waitForState(State.STATE_EXITING, TransportTimer.getTransportTimeout()) ;
+    }
+    
+    /**
+     * Handle the fail event.
+     * 
+     * Active -> Failing-Active
+     * Canceling -> Failing-Canceling
+     * Completed -> Completed (invalid state)
+     * Closing -> Closing (invalid state)
+     * Compensating -> Failing-Compensating
+     * Failing-Active -> Failing-Active
+     * Failing-Canceling -> Failing-Canceling
+     * Failing-Compensating -> Failing-Compensating
+     * NotCompleting -> NotCompleting (invalid state)
+     * Exiting -> Exiting (invalid state)
+     * Ended -> Ended (invalid state)
+     */
+    public State fail(final QName exceptionIdentifier)
+    {
+        final State current ;
+        synchronized (this)
+        {
+            current = state ;
+            if (current == State.STATE_ACTIVE)
+            {
+                changeState(State.STATE_FAILING_ACTIVE) ;
+            }
+            else if (current == State.STATE_CANCELING)
+            {
+        	changeState(State.STATE_FAILING_CANCELING) ;
+            }
+            else if (current == State.STATE_COMPENSATING)
+            {
+                changeState(State.STATE_FAILING_COMPENSATING) ;
+            }
+        }
+        
+        if ((current == State.STATE_ACTIVE) || (current == State.STATE_FAILING_ACTIVE))
+        {
+            sendFail(exceptionIdentifier) ;
+            return waitForState(State.STATE_FAILING_ACTIVE, TransportTimer.getTransportTimeout()) ;
+        }
+        else if ((current == State.STATE_CANCELING) || (current == State.STATE_FAILING_CANCELING))
+        {
+            sendFail(exceptionIdentifier) ;
+            return waitForState(State.STATE_FAILING_CANCELING, TransportTimer.getTransportTimeout()) ;
+        }
+        else if ((current == State.STATE_COMPENSATING) || (current == State.STATE_FAILING_COMPENSATING))
+        {
+            sendFail(exceptionIdentifier) ;
+            return waitForState(State.STATE_FAILING_COMPENSATING, TransportTimer.getTransportTimeout()) ;
+        }
+        
+        return current ;
+    }
+    
+    /**
+     * Handle the cannot complete event.
+     * 
+     * Active -> NotCompleting
+     * Canceling -> Canceling (invalid state)
+     * Completed -> Completed (invalid state)
+     * Closing -> Closing (invalid state)
+     * Compensating -> Compensating (invalid state)
+     * Failing-Active -> Failing-Active (invalid state)
+     * Failing-Canceling -> Failing-Canceling (invalid state)
+     * Failing-Compensating -> Failing-Compensating (invalid state)
+     * NotCompleting -> NotCompleting
+     * Exiting -> Exiting (invalid state)
+     * Ended -> Ended (invalid state)
+     */
+    public State cannotComplete()
+    {
+        final State current ;
+        synchronized (this)
+        {
+            current = state ;
+            if (current == State.STATE_ACTIVE)
+            {
+                changeState(State.STATE_NOT_COMPLETING) ;
+            }
+        }
+        
+        if ((current == State.STATE_ACTIVE) || (current == State.STATE_NOT_COMPLETING))
+        {
+            sendCannotComplete() ;
+            return waitForState(State.STATE_NOT_COMPLETING, TransportTimer.getTransportTimeout()) ;
+        }
+        return current ;
+    }
+    
+    /**
+     * Handle the comms timeout event.
+     * 
+     * Completed -> Completed (resend Completed)
+     */
+    private void commsTimeout()
+    {
+        final State current ;
+        synchronized(this)
+        {
+            current = state ;
+        }
+        
+        if (current == State.STATE_COMPLETED)
+        {
+            sendCompleted() ;
+        }
+    }
+    
+    /**
+     * Send the exit message.
+     * 
+     * @message com.arjuna.wst.messaging.engines.ParticipantCompletionParticipant11Engine.sendExit_1 [com.arjuna.wst.messaging.engines.ParticipantCompletionParticipant11Engine.sendExit_1] - Unexpected exception while sending Exit
+     */
+    private void sendExit()
+    {
+        final AddressingContext addressingContext = createContext() ;
+        try
+        {
+            ParticipantCompletionCoordinatorClient.getClient().sendExit(addressingContext, instanceIdentifier) ;
+        }
+        catch (final Throwable th)
+        {
+            if (WSTLogger.arjLoggerI18N.isDebugEnabled())
+            {
+                WSTLogger.arjLoggerI18N.debug("com.arjuna.wst.messaging.engines.ParticipantCompletionParticipant11Engine.sendExit_1", th) ;
+            }
+        }
+    }
+    
+    /**
+     * Send the completed message.
+     * 
+     * @message com.arjuna.wst.messaging.engines.ParticipantCompletionParticipant11Engine.sendCompleted_1 [com.arjuna.wst.messaging.engines.ParticipantCompletionParticipant11Engine.sendCompleted_1] - Unexpected exception while sending Completed
+     */
+    private void sendCompleted()
+    {
+        final AddressingContext addressingContext = createContext() ;
+        try
+        {
+            ParticipantCompletionCoordinatorClient.getClient().sendCompleted(addressingContext, instanceIdentifier) ;
+        }
+        catch (final Throwable th)
+        {
+            if (WSTLogger.arjLoggerI18N.isDebugEnabled())
+            {
+                WSTLogger.arjLoggerI18N.debug("com.arjuna.wst.messaging.engines.ParticipantCompletionParticipant11Engine.sendCompleted_1", th) ;
+            }
+        }
+        
+        initiateTimer() ;
+    }
+    
+    /**
+     * Send the fault message.
+     * @param exceptionIdentifier The exception identifier.
+     * 
+     * @message com.arjuna.wst.messaging.engines.ParticipantCompletionParticipant11Engine.sendFail_1 [com.arjuna.wst.messaging.engines.ParticipantCompletionParticipant11Engine.sendFail_1] - Unexpected exception while sending Fault
+     */
+    private void sendFail(final QName exceptionIdentifier)
+    {
+        final AddressingContext addressingContext = createContext() ;
+        try
+        {
+            ParticipantCompletionCoordinatorClient.getClient().sendFail(addressingContext, instanceIdentifier, exceptionIdentifier) ;
+        }
+        catch (final Throwable th)
+        {
+            if (WSTLogger.arjLoggerI18N.isDebugEnabled())
+            {
+                WSTLogger.arjLoggerI18N.debug("com.arjuna.wst.messaging.engines.ParticipantCompletionParticipant11Engine.sendFail_1", th) ;
+            }
+        }
+    }
+    
+    /**
+     * Send the cancelled message.
+     * 
+     * @message com.arjuna.wst.messaging.engines.ParticipantCompletionParticipant11Engine.sendCancelled_1 [com.arjuna.wst.messaging.engines.ParticipantCompletionParticipant11Engine.sendCancelled_1] - Unexpected exception while sending Cancelled
+     */
+    private void sendCancelled()
+    {
+        final AddressingContext addressingContext = createContext() ;
+        try
+        {
+            ParticipantCompletionCoordinatorClient.getClient().sendCancelled(addressingContext, instanceIdentifier) ;
+        }
+        catch (final Throwable th)
+        {
+            if (WSTLogger.arjLoggerI18N.isDebugEnabled())
+            {
+                WSTLogger.arjLoggerI18N.debug("com.arjuna.wst.messaging.engines.ParticipantCompletionParticipant11Engine.sendCancelled_1", th) ;
+            }
+        }
+    }
+    
+    /**
+     * Send the closed message.
+     * 
+     * @message com.arjuna.wst.messaging.engines.ParticipantCompletionParticipant11Engine.sendClosed_1 [com.arjuna.wst.messaging.engines.ParticipantCompletionParticipant11Engine.sendClosed_1] - Unexpected exception while sending Closed
+     */
+    private void sendClosed()
+    {
+        final AddressingContext addressingContext = createContext() ;
+        try
+        {
+            ParticipantCompletionCoordinatorClient.getClient().sendClosed(addressingContext, instanceIdentifier) ;
+        }
+        catch (final Throwable th)
+        {
+            if (WSTLogger.arjLoggerI18N.isDebugEnabled())
+            {
+                WSTLogger.arjLoggerI18N.debug("com.arjuna.wst.messaging.engines.ParticipantCompletionParticipant11Engine.sendClosed_1", th) ;
+            }
+        }
+    }
+    
+    /**
+     * Send the compensated message.
+     * 
+     * @message com.arjuna.wst.messaging.engines.ParticipantCompletionParticipant11Engine.sendCompensated_1 [com.arjuna.wst.messaging.engines.ParticipantCompletionParticipant11Engine.sendCompensated_1] - Unexpected exception while sending Compensated
+     */
+    private void sendCompensated()
+    {
+        final AddressingContext addressingContext = createContext() ;
+        try
+        {
+            ParticipantCompletionCoordinatorClient.getClient().sendCompensated(addressingContext, instanceIdentifier) ;
+        }
+        catch (final Throwable th)
+        {
+            if (WSTLogger.arjLoggerI18N.isDebugEnabled())
+            {
+                WSTLogger.arjLoggerI18N.debug("com.arjuna.wst.messaging.engines.ParticipantCompletionParticipant11Engine.sendCompensated_1", th) ;
+            }
+        }
+    }
+    
+    /**
+     * Send the status message.
+     * @param state The state.
+     * 
+     * @message com.arjuna.wst.messaging.engines.ParticipantCompletionParticipant11Engine.sendStatus_1 [com.arjuna.wst.messaging.engines.ParticipantCompletionParticipant11Engine.sendStatus_1] - Unexpected exception while sending Status
+     */
+    private void sendStatus(final State state)
+    {
+        final AddressingContext addressingContext = createContext() ;
+        try
+        {
+            ParticipantCompletionCoordinatorClient.getClient().sendStatus(addressingContext, instanceIdentifier, state) ;
+        }
+        catch (final Throwable th)
+        {
+            if (WSTLogger.arjLoggerI18N.isDebugEnabled())
+            {
+                WSTLogger.arjLoggerI18N.debug("com.arjuna.wst.messaging.engines.ParticipantCompletionParticipant11Engine.sendStatus_1", th) ;
+            }
+        }
+    }
+    
+    /**
+     * Send the cannot complete message.
+     * 
+     * @message com.arjuna.wst.messaging.engines.ParticipantCompletionParticipant11Engine.sendCannotComplete_1 [com.arjuna.wst.messaging.engines.ParticipantCompletionParticipant11Engine.sendCannotComplete_1] - Unexpected exception while sending CannotComplete
+     */
+    private void sendCannotComplete()
+    {
+        final AddressingContext addressingContext = createContext() ;
+        try
+        {
+            ParticipantCompletionCoordinatorClient.getClient().sendCannotComplete(addressingContext, instanceIdentifier) ;
+        }
+        catch (final Throwable th)
+        {
+            if (WSTLogger.arjLoggerI18N.isDebugEnabled())
+            {
+                WSTLogger.arjLoggerI18N.debug("com.arjuna.wst.messaging.engines.ParticipantCompletionParticipant11Engine.sendCannotComplete_1", th) ;
+            }
+        }
+    }
+    
+    /**
+     * Send the invalid state fault message.
+     * 
+     * @message com.arjuna.wst.messaging.engines.ParticipantCompletionParticipant11Engine.sendInvalidStateFault_1 [com.arjuna.wst.messaging.engines.ParticipantCompletionParticipant11Engine.sendInvalidStateFault_1] - Unexpected exception while sending InvalidStateFault
+     * @message com.arjuna.wsc.messaging.engines.ParticipantCompletionParticipant11Engine.sendInvalidStateFault_2 [com.arjuna.wsc.messaging.engines.ParticipantCompletionParticipant11Engine.sendInvalidStateFault_2] - Invalid coordinator completion coordinator state
+     */
+    private void sendInvalidStateFault()
+    {
+        final AddressingContext addressingContext = createContext() ;
+        try
+        {
+            final SoapFault soapFault = new SoapFault(SoapFaultType.FAULT_SENDER, CoordinationConstants.WSCOOR_ERROR_CODE_INVALID_STATE_QNAME,
+        	WSTLogger.log_mesg.getString("com.arjuna.wsc.messaging.engines.ParticipantCompletionParticipant11Engine.sendInvalidStateFault_2")) ;
+            ParticipantCompletionCoordinatorClient.getClient().sendSoapFault(addressingContext, instanceIdentifier, soapFault,
+            	CoordinationConstants.WSCOOR_ACTION_FAULT) ;
+        }
+        catch (final Throwable th)
+        {
+            if (WSTLogger.arjLoggerI18N.isDebugEnabled())
+            {
+                WSTLogger.arjLoggerI18N.debug("com.arjuna.wst.messaging.engines.ParticipantCompletionParticipant11Engine.sendInvalidStateFault_1", th) ;
+            }
+        }
+    }
+    
+    /**
+     * Get the coordinator id.
+     * @return The coordinator id.
+     */
+    public String getId()
+    {
+        return id ;
+    }
+    
+    /**
+     * Get the coordinator endpoint reference
+     * @return The coordinator endpoint reference
+     */
+    public EndpointReferenceType getCoordinator()
+    {
+        return coordinator ;
+    }
+    
+    /**
+     * Get the associated participant.
+     * @return The associated participant.
+     */
+    public BusinessAgreementWithParticipantCompletionParticipant getParticipant()
+    {
+        return participant ;
+    }
+    
+    /**
+     * Change the state and notify any listeners.
+     * @param state The new state.
+     */
+    private synchronized void changeState(final State state)
+    {
+        if (this.state != state)
+        {
+System.out.println("KEV: ParticipantCompletionParticipant: changing state from " + this.state + " to " + state) ;
+            this.state = state ;
+            notifyAll() ;
+        }
+    }
+    
+    /**
+     * Wait for the state to change from the specified state.
+     * @param origState The original state.
+     * @param delay The maximum time to wait for (in milliseconds).
+     * @return The current state.
+     */
+    private State waitForState(final State origState, final long delay)
+    {
+        final long end = System.currentTimeMillis() + delay ;
+        synchronized(this)
+        {
+            while(state == origState)
+            {
+                final long remaining = end - System.currentTimeMillis() ;
+                if (remaining <= 0)
+                {
+                    break ;
+                }
+                try
+                {
+                    wait(remaining) ;
+                }
+                catch (final InterruptedException ie) {} // ignore
+            }
+            return state ;
+        }
+    }
+
+    /**
+     * Execute the cancel transition.
+     * 
+     * @message com.arjuna.wst.messaging.engines.ParticipantCompletionParticipant11Engine.executeCancel_1 [com.arjuna.wst.messaging.engines.ParticipantCompletionParticipant11Engine.executeCancel_1] - Unexpected exception from participant cancel
+     */
+    private void executeCancel()
+    {
+        try
+        {
+            participant.cancel() ;
+        }
+        catch (final Throwable th)
+        {
+            if (WSTLogger.arjLoggerI18N.isDebugEnabled())
+            {
+                WSTLogger.arjLoggerI18N.debug("com.arjuna.wst.messaging.engines.ParticipantCompletionParticipant11Engine.executeCancel_1", th) ;
+            }
+            return ;
+        }
+        sendCancelled() ;
+        ended() ;
+    }
+
+    /**
+     * Execute the close transition.
+     * 
+     * @message com.arjuna.wst.messaging.engines.ParticipantCompletionParticipant11Engine.executeClose_1 [com.arjuna.wst.messaging.engines.ParticipantCompletionParticipant11Engine.executeClose_1] - Unexpected exception from participant close
+     */
+    private void executeClose()
+    {
+        try
+        {
+            participant.close() ;
+        }
+        catch (final Throwable th)
+        {
+            if (WSTLogger.arjLoggerI18N.isDebugEnabled())
+            {
+                WSTLogger.arjLoggerI18N.debug("com.arjuna.wst.messaging.engines.ParticipantCompletionParticipant11Engine.executeClose_1", th) ;
+            }
+            return ;
+        }
+        sendClosed() ;
+        ended() ;
+    }
+    
+    /**
+     * Execute the compensate transition.
+     * 
+     * @message com.arjuna.wst.messaging.engines.ParticipantCompletionParticipant11Engine.executeCompensate_1 [com.arjuna.wst.messaging.engines.ParticipantCompletionParticipant11Engine.executeCompensate_1] - Unexpected exception from participant compensate
+     */
+    private void executeCompensate()
+    {
+        try
+        {
+            participant.compensate() ;
+        }
+        catch (final FaultedException fe)
+        {
+            fail(JBossTXConstants.FAULTED_ERROR_CODE_QNAME) ;
+        }
+        catch (final Throwable th)
+        {
+            final State current ;
+            synchronized (this)
+            {
+                current = state ;
+                if (current == State.STATE_COMPENSATING)
+                {
+                    changeState(State.STATE_COMPLETED) ;
+                }
+            }
+            if (current == State.STATE_COMPENSATING)
+            {
+                initiateTimer() ;
+            }
+            
+            if (WSTLogger.arjLoggerI18N.isDebugEnabled())
+            {
+                WSTLogger.arjLoggerI18N.debug("com.arjuna.wst.messaging.engines.ParticipantCompletionParticipant11Engine.executeClose_1", th) ;
+            }
+            return ;
+        }
+        
+        final State current ;
+        synchronized (this)
+        {
+            current = state ;
+            if (current == State.STATE_COMPENSATING)
+            {
+                ended() ;
+            }
+        }
+        if (current == State.STATE_COMPENSATING)
+        {
+            sendCompensated() ;
+        }
+    }
+    
+    /**
+     * End the current participant.
+     */
+    private void ended()
+    {
+	changeState(State.STATE_ENDED) ;
+        ParticipantCompletionParticipantProcessor.getProcessor().deactivateParticipant(this) ;
+    }
+    
+    /**
+     * Initiate the timer.
+     */
+    private synchronized void initiateTimer()
+    {
+        if (timerTask != null)
+        {
+            timerTask.cancel() ;
+        }
+        
+        if (state == State.STATE_COMPLETED)
+        {
+            timerTask = new TimerTask() {
+                public void run() {
+                    commsTimeout() ;
+                }
+            } ;
+            TransportTimer.getTimer().schedule(timerTask, TransportTimer.getTransportPeriod()) ;
+        }
+        else
+        {
+            timerTask = null ;
+        }
+    }
+    
+    /**
+     * Create a context for the outgoing message.
+     * @return The addressing context.
+     */
+    private AddressingContext createContext()
+    {
+        final String messageId = MessageId.getMessageId() ;
+        return AddressingContext.createRequestContext(coordinator, messageId) ;
+    }
+}


Property changes on: labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/wst/messaging/engines/ParticipantCompletionParticipant11Engine.java
___________________________________________________________________
Name: svn:keywords
   + Rev Date
Name: svn:eol-style
   + native

Added: labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/wst/stub/BACoordinatorCompletionParticipantManager11Stub.java
===================================================================
--- labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/wst/stub/BACoordinatorCompletionParticipantManager11Stub.java	                        (rev 0)
+++ labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/wst/stub/BACoordinatorCompletionParticipantManager11Stub.java	2007-08-14 12:43:41 UTC (rev 14200)
@@ -0,0 +1,135 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag.  All rights reserved. 
+ * See the copyright.txt in the distribution for a full listing 
+ * of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU General Public License, v. 2.0.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A 
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+ * PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+ * You should have received a copy of the GNU General Public License,
+ * v. 2.0 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+ * MA  02110-1301, USA.
+ * 
+ * (C) 2005-2006,
+ * @author JBoss Inc.
+ */
+package com.arjuna.wst.stub;
+
+import javax.xml.namespace.QName;
+
+import com.arjuna.webservices.wsba11.State;
+import com.arjuna.wst.BA11ParticipantManager;
+import com.arjuna.wst.SystemException;
+import com.arjuna.wst.UnknownTransactionException;
+import com.arjuna.wst.WrongStateException;
+import com.arjuna.wst.messaging.engines.CoordinatorCompletionParticipant11Engine;
+
+public class BACoordinatorCompletionParticipantManager11Stub implements BA11ParticipantManager
+{
+    private final CoordinatorCompletionParticipant11Engine coordinator ;
+    
+    public BACoordinatorCompletionParticipantManager11Stub (final CoordinatorCompletionParticipant11Engine coordinator)
+        throws Exception
+    {
+        this.coordinator = coordinator ;
+    }
+
+    public void exit ()
+        throws WrongStateException, UnknownTransactionException, SystemException
+    {
+        /*
+         * Active -> illegal state
+         * Canceling -> illegal state
+         * Completing -> illegal state
+         * Completed -> illegal state
+         * Closing -> illegal state
+         * Compensating -> illegal state
+         * Failing-Active -> illegal state
+         * Failing-Canceling -> illegal state
+         * Failing-Completing -> illegal state
+         * Failing-Compensating -> illegal state
+         * NotCompleting -> illegal state
+         * Exiting -> no response
+         * Ended -> ended
+         */
+        final State state = coordinator.exit() ;
+        if (state == State.STATE_EXITING)
+        {
+            throw new SystemException() ;
+        }
+        else if (state != State.STATE_ENDED)
+        {
+            throw new WrongStateException() ;
+        }
+    }
+
+    public void completed ()
+        throws WrongStateException, UnknownTransactionException, SystemException
+    {
+        // returns original state
+        final State state = coordinator.completed() ;
+        if ((state != State.STATE_COMPLETING) && (state != State.STATE_COMPLETED))
+        {
+            throw new WrongStateException() ;
+        }
+    }
+
+    public void cannotComplete()
+        throws WrongStateException, UnknownTransactionException, SystemException
+    {
+        /*
+         * Active -> illegal state
+         * Canceling -> illegal state
+         * Completing -> illegal state
+         * Completed -> illegal state
+         * Closing -> illegal state
+         * Compensating -> illegal state
+         * Failing-Active -> illegal state
+         * Failing-Canceling -> illegal state
+         * Failing-Completing -> illegal state
+         * Failing-Compensating -> illegal state
+         * NotCompleting -> no response
+         * Exiting -> illegal state
+         * Ended -> ended
+         */
+        final State state = coordinator.cannotComplete() ;
+        if (state == State.STATE_NOT_COMPLETING)
+        {
+            throw new SystemException() ;
+        }
+        else if (state != State.STATE_ENDED)
+        {
+            throw new WrongStateException() ;
+        }
+    }
+
+    public void fail (final QName exceptionIdentifier)
+        throws SystemException
+    {
+        /*
+         * Active -> illegal state
+         * Canceling -> illegal state
+         * Completing -> illegal state
+         * Completed -> illegal state
+         * Closing -> illegal state
+         * Compensating -> illegal state
+         * Failing-Active -> no response
+         * Failing-Canceling -> no response
+         * Failing-Completing -> no response
+         * Failing-Compensating -> no response
+         * NotCompleting -> illegal state
+         * Exiting -> illegal state
+         * Ended -> ended
+         */
+        final State state = coordinator.fail(exceptionIdentifier) ;
+        if (state != State.STATE_ENDED)
+        {
+            throw new SystemException() ;
+        }
+    }
+}


Property changes on: labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/wst/stub/BACoordinatorCompletionParticipantManager11Stub.java
___________________________________________________________________
Name: svn:keywords
   + Rev Date
Name: svn:eol-style
   + native

Added: labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/wst/stub/BAParticipantCompletionParticipantManager11Stub.java
===================================================================
--- labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/wst/stub/BAParticipantCompletionParticipantManager11Stub.java	                        (rev 0)
+++ labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/wst/stub/BAParticipantCompletionParticipantManager11Stub.java	2007-08-14 12:43:41 UTC (rev 14200)
@@ -0,0 +1,129 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag.  All rights reserved. 
+ * See the copyright.txt in the distribution for a full listing 
+ * of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU General Public License, v. 2.0.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A 
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+ * PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+ * You should have received a copy of the GNU General Public License,
+ * v. 2.0 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+ * MA  02110-1301, USA.
+ * 
+ * (C) 2005-2006,
+ * @author JBoss Inc.
+ */
+package com.arjuna.wst.stub;
+
+import javax.xml.namespace.QName;
+
+import com.arjuna.webservices.wsba11.State;
+import com.arjuna.wst.BA11ParticipantManager;
+import com.arjuna.wst.SystemException;
+import com.arjuna.wst.UnknownTransactionException;
+import com.arjuna.wst.WrongStateException;
+import com.arjuna.wst.messaging.engines.ParticipantCompletionParticipant11Engine;
+
+public class BAParticipantCompletionParticipantManager11Stub implements BA11ParticipantManager
+{
+    private final ParticipantCompletionParticipant11Engine coordinator ;
+    
+    public BAParticipantCompletionParticipantManager11Stub (final ParticipantCompletionParticipant11Engine coordinator)
+        throws Exception
+    {
+        this.coordinator = coordinator ;
+    }
+
+    public synchronized void exit ()
+        throws WrongStateException, UnknownTransactionException, SystemException
+    {
+        /*
+         * Active -> illegal state
+         * Canceling -> illegal state
+         * Completed -> illegal state
+         * Closing -> illegal state
+         * Compensating -> illegal state
+         * Failing-Active -> illegal state
+         * Failing-Canceling -> illegal state
+         * Failing-Compensating -> illegal state
+         * NotCompleting -> illegal state
+         * Exiting -> no response
+         * Ended -> ended
+         */
+        final State state = coordinator.exit() ;
+        if (state == State.STATE_EXITING)
+        {
+            throw new SystemException() ;
+        }
+        else if (state != State.STATE_ENDED)
+        {
+            throw new WrongStateException() ;
+        }
+    }
+
+    public synchronized void completed ()
+        throws WrongStateException, UnknownTransactionException, SystemException
+    {
+        // returns original state
+        final State state = coordinator.completed() ;
+        if ((state != State.STATE_ACTIVE) && (state != State.STATE_COMPLETED))
+        {
+            throw new WrongStateException() ;
+        }
+    }
+
+    public void cannotComplete()
+        throws WrongStateException, UnknownTransactionException, SystemException
+    {
+        /*
+         * Active -> illegal state
+         * Canceling -> illegal state
+         * Completed -> illegal state
+         * Closing -> illegal state
+         * Compensating -> illegal state
+         * Failing-Active -> illegal state
+         * Failing-Canceling -> illegal state
+         * Failing-Compensating -> illegal state
+         * NotCompleting -> no response
+         * Exiting -> illegal state
+         * Ended -> ended
+         */
+        final State state = coordinator.cannotComplete() ;
+        if (state == State.STATE_NOT_COMPLETING)
+        {
+            throw new SystemException() ;
+        }
+        else if (state != State.STATE_ENDED)
+        {
+            throw new WrongStateException() ;
+        }
+    }
+
+    public synchronized void fail (final QName exceptionIdentifier)
+        throws SystemException
+    {
+        /*
+         * Active -> illegal state
+         * Canceling -> illegal state
+         * Completed -> illegal state
+         * Closing -> illegal state
+         * Compensating -> illegal state
+         * Failing-Active -> no response
+         * Failing-Canceling -> no response
+         * Failing-Compensating -> no response
+         * NotCompleting -> illegal state
+         * Exiting -> illegal state
+         * Ended -> ended
+         */
+        final State state = coordinator.fail(exceptionIdentifier) ;
+        if (state != State.STATE_ENDED)
+        {
+            throw new SystemException() ;
+        }
+    }
+}


Property changes on: labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/wst/stub/BAParticipantCompletionParticipantManager11Stub.java
___________________________________________________________________
Name: svn:keywords
   + Rev Date
Name: svn:eol-style
   + native

Added: labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/wst/stub/BusinessActivityTerminator11Stub.java
===================================================================
--- labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/wst/stub/BusinessActivityTerminator11Stub.java	                        (rev 0)
+++ labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/wst/stub/BusinessActivityTerminator11Stub.java	2007-08-14 12:43:41 UTC (rev 14200)
@@ -0,0 +1,367 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag.  All rights reserved. 
+ * See the copyright.txt in the distribution for a full listing 
+ * of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU General Public License, v. 2.0.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A 
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+ * PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+ * You should have received a copy of the GNU General Public License,
+ * v. 2.0 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+ * MA  02110-1301, USA.
+ * 
+ * (C) 2005-2006,
+ * @author JBoss Inc.
+ */
+/*
+ * Copyright (c) 2003, Arjuna Technologies Limited.
+ *
+ * $Id: BusinessActivityTerminator11Stub.java,v 1.7.6.1 2005/11/22 10:35:29 kconner Exp $
+ */
+
+package com.arjuna.wst.stub;
+
+import javax.xml.namespace.QName;
+
+import com.arjuna.webservices.SoapFault;
+import com.arjuna.webservices.wsaddr2005.AddressingContext;
+import com.arjuna.webservices.wsaddr2005.EndpointReferenceType;
+import com.arjuna.webservices.wsjboss.JBossContext;
+import com.arjuna.webservices.wsjboss.InstanceIdentifier;
+import com.arjuna.webservices.wsjbosstx.JBossTXConstants;
+import com.arjuna.webservices.wsjbosstx.NotificationType;
+import com.arjuna.webservices.wsjbosstx.client.TerminationCoordinatorClient;
+import com.arjuna.webservices.wsjbosstx.processors.TerminationParticipantCallback;
+import com.arjuna.webservices.wsjbosstx.processors.TerminationParticipantProcessor;
+import com.arjuna.wsc.messaging.MessageId;
+import com.arjuna.wst.FaultedException;
+import com.arjuna.wst.SystemException;
+import com.arjuna.wst.TransactionRolledBackException;
+import com.arjuna.wst.UnknownTransactionException;
+
+public class BusinessActivityTerminator11Stub implements com.arjuna.wst.BusinessActivityTerminator
+{
+    private EndpointReferenceType          _terminationParticipant         = null;
+    private final String _id ;
+    
+    public BusinessActivityTerminator11Stub (final String id, final EndpointReferenceType terminationParticipant)
+        throws Exception
+    {
+        _terminationParticipant         = terminationParticipant;
+        _id = id ;
+    }
+
+    public void close ()
+        throws TransactionRolledBackException, UnknownTransactionException, SystemException
+    {
+        final AddressingContext addressingContext = AddressingContext.createRequestContext(_terminationParticipant, MessageId.getMessageId()) ;
+        
+        final RequestCallback callback = new RequestCallback() ;
+        final TerminationParticipantProcessor terminatorCoordinatorProcessor = TerminationParticipantProcessor.getProcessor() ;
+        terminatorCoordinatorProcessor.registerCallback(_id, callback) ;
+        try
+        {
+            TerminationCoordinatorClient.getClient().sendClose(addressingContext, new InstanceIdentifier(_id)) ;
+            callback.waitUntilTriggered() ;
+        }
+        catch (final Throwable th)
+        {
+            throw new SystemException() ;
+        }
+        finally
+        {
+            terminatorCoordinatorProcessor.removeCallback(_id) ;
+        }
+        
+        if (callback.hasTriggered())
+        {
+            if (callback.receivedClosed())
+            {
+                return ;
+            }
+            final SoapFault soapFault = callback.getSoapFault() ;
+            if (soapFault != null)
+            {
+                final QName subcode = soapFault.getSubcode() ;
+                if (JBossTXConstants.TRANSACTIONROLLEDBACK_ERROR_CODE_QNAME.equals(subcode))
+                {
+                    throw new TransactionRolledBackException();
+                }
+                else if (JBossTXConstants.UNKNOWNTRANSACTION_ERROR_CODE_QNAME.equals(subcode))
+                {
+                    throw new UnknownTransactionException() ;
+                }
+            }
+        }
+        throw new SystemException() ;
+    }
+
+    public void cancel ()
+        throws FaultedException, UnknownTransactionException, SystemException
+    {
+        final AddressingContext addressingContext = AddressingContext.createRequestContext(_terminationParticipant, MessageId.getMessageId()) ;
+        
+        final RequestCallback callback = new RequestCallback() ;
+        final TerminationParticipantProcessor terminatorCoordinatorProcessor = TerminationParticipantProcessor.getProcessor() ;
+        terminatorCoordinatorProcessor.registerCallback(_id, callback) ;
+        try
+        {
+            TerminationCoordinatorClient.getClient().sendCancel(addressingContext, new InstanceIdentifier(_id)) ;
+            callback.waitUntilTriggered() ;
+        }
+        catch (final Throwable th)
+        {
+            throw new SystemException() ;
+        }
+        finally
+        {
+            terminatorCoordinatorProcessor.removeCallback(_id) ;
+        }
+        
+        if (callback.hasTriggered())
+        {
+            if (callback.receivedCancelled())
+            {
+                return ;
+            }
+            else if (callback.receivedFaulted())
+            {
+                throw new FaultedException() ;
+            }
+            final SoapFault soapFault = callback.getSoapFault() ;
+            if (soapFault != null)
+            {
+                final QName subcode = soapFault.getSubcode() ;
+                if (JBossTXConstants.UNKNOWNTRANSACTION_ERROR_CODE_QNAME.equals(subcode))
+                {
+                    throw new UnknownTransactionException() ;
+                }
+            }
+        }
+        throw new SystemException() ;
+    }
+
+    public void complete ()
+        throws FaultedException, UnknownTransactionException, SystemException
+    {
+        final AddressingContext addressingContext = AddressingContext.createRequestContext(_terminationParticipant, MessageId.getMessageId()) ;
+        
+        final RequestCallback callback = new RequestCallback() ;
+        final TerminationParticipantProcessor terminatorCoordinatorProcessor = TerminationParticipantProcessor.getProcessor() ;
+        terminatorCoordinatorProcessor.registerCallback(_id, callback) ;
+        try
+        {
+            TerminationCoordinatorClient.getClient().sendComplete(addressingContext, new InstanceIdentifier(_id)) ;
+            callback.waitUntilTriggered() ;
+        }
+        catch (final Throwable th)
+        {
+            throw new SystemException() ;
+        }
+        finally
+        {
+            terminatorCoordinatorProcessor.removeCallback(_id) ;
+        }
+        
+        if (callback.hasTriggered())
+        {
+            if (callback.receivedCompleted())
+            {
+                return ;
+            }
+            else if (callback.receivedFaulted())
+            {
+                throw new FaultedException() ;
+            }
+            final SoapFault soapFault = callback.getSoapFault() ;
+            if (soapFault != null)
+            {
+                final QName subcode = soapFault.getSubcode() ;
+                if (JBossTXConstants.UNKNOWNTRANSACTION_ERROR_CODE_QNAME.equals(subcode))
+                {
+                    throw new UnknownTransactionException() ;
+                }
+            }
+        }
+        throw new SystemException() ;
+    }
+
+    public void unknown ()
+        throws SystemException
+    {
+	error() ;
+    }
+
+    public void error ()
+        throws SystemException
+    {
+	try
+	{
+	    cancel() ;
+	}
+	catch (final FaultedException fe)
+	{
+	    throw new SystemException(fe.getMessage()) ;
+	}
+	catch (final UnknownTransactionException ute)
+	{
+	    throw new SystemException(ute.getMessage()) ;
+	}
+    }
+
+    private static class RequestCallback extends TerminationParticipantCallback
+    {
+        /**
+         * The addressing context.
+         */
+        private AddressingContext addressingContext ;
+        /**
+         * The jboss context.
+         */
+        private JBossContext jbossContext ;
+        /**
+         * The SOAP fault.
+         */
+        private SoapFault soapFault ;
+        /**
+         * The completed notification flag.
+         */
+        private boolean completed ;
+        /**
+         * The cancelled notification flag.
+         */
+        private boolean cancelled ;
+        /**
+         * The closed notification flag.
+         */
+        private boolean closed ;
+        /**
+         * The faulted notification flag.
+         */
+        private boolean faulted ;
+        
+        /**
+         * Get the addressing context.
+         * @return The addressing context.
+         */
+        AddressingContext getAddressingContext()
+        {
+            return addressingContext ;
+        }
+        
+        /**
+         * Get the jboss context.
+         * @return The jboss context.
+         */
+        JBossContext getJBossContext()
+        {
+            return jbossContext ;
+        }
+        
+        /**
+         * Get the SOAP fault.
+         * @return The SOAP fault.
+         */
+        SoapFault getSoapFault()
+        {
+            return soapFault ;
+        }
+        
+        /**
+         * Did we receive a completed notification?
+         * @return True if completed, false otherwise.
+         */
+        boolean receivedCompleted()
+        {
+            return completed ;
+        }
+        
+        /**
+         * Did we receive a cancelled notification?
+         * @return True if cancelled, false otherwise.
+         */
+        boolean receivedCancelled()
+        {
+            return cancelled ;
+        }
+        
+        /**
+         * Did we receive a closed notification?
+         * @return True if closed, false otherwise.
+         */
+        boolean receivedClosed()
+        {
+            return closed ;
+        }
+        
+        /**
+         * Did we receive a faulted notification?
+         * @return True if faulted, false otherwise.
+         */
+        boolean receivedFaulted()
+        {
+            return faulted ;
+        }
+        
+        /**
+         * A completed response.
+         * @param completed The completed notification.
+         * @param addressingContext The addressing context.
+         * @param jbossContext The jboss context.
+         */
+        public void completed(final NotificationType completed, final AddressingContext addressingContext,
+            final JBossContext jbossContext)
+        {
+            this.completed = true ;
+            this.addressingContext = addressingContext ;
+            this.jbossContext = jbossContext ;
+        }
+
+        /**
+         * A cancelled response.
+         * @param cancelled The cancelled notification.
+         * @param addressingContext The addressing context.
+         * @param jbossContext The jboss context.
+         */
+        public void cancelled(final NotificationType cancelled, final AddressingContext addressingContext,
+            final JBossContext jbossContext)
+        {
+            this.cancelled  = true ;
+            this.addressingContext = addressingContext ;
+            this.jbossContext = jbossContext ;
+        }
+
+        /**
+         * A closed response.
+         * @param closed The closed notification.
+         * @param addressingContext The addressing context.
+         * @param jbossContext The jboss context.
+         */
+        public void closed(final NotificationType closed, final AddressingContext addressingContext,
+            final JBossContext jbossContext)
+        {
+            this.closed = true ;
+            this.addressingContext = addressingContext ;
+            this.jbossContext = jbossContext ;
+        }
+        
+        /**
+         * A SOAP fault response.
+         * @param soapFault The SOAP fault.
+         * @param addressingContext The addressing context.
+         * @param jbossContext The jboss context.
+         */
+        public void soapFault(final SoapFault soapFault, final AddressingContext addressingContext,
+            final JBossContext jbossContext)
+        {
+            this.soapFault = soapFault ;
+            this.addressingContext = addressingContext ;
+            this.jbossContext = jbossContext ;
+        }
+    }
+}


Property changes on: labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/wst/stub/BusinessActivityTerminator11Stub.java
___________________________________________________________________
Name: svn:keywords
   + Rev Date
Name: svn:eol-style
   + native

Added: labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/wst/stub/BusinessAgreementWithCoordinatorCompletion11Stub.java
===================================================================
--- labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/wst/stub/BusinessAgreementWithCoordinatorCompletion11Stub.java	                        (rev 0)
+++ labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/wst/stub/BusinessAgreementWithCoordinatorCompletion11Stub.java	2007-08-14 12:43:41 UTC (rev 14200)
@@ -0,0 +1,259 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag.  All rights reserved. 
+ * See the copyright.txt in the distribution for a full listing 
+ * of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU General Public License, v. 2.0.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A 
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+ * PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+ * You should have received a copy of the GNU General Public License,
+ * v. 2.0 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+ * MA  02110-1301, USA.
+ * 
+ * (C) 2005-2006,
+ * @author JBoss Inc.
+ */
+/*
+ * Copyright (c) 2003, Arjuna Technologies Limited.
+ *
+ * $Id: BusinessAgreementWithCoordinatorCompletion11Stub.java,v 1.1.2.2 2004/06/18 15:06:09 nmcl Exp $
+ */
+
+package com.arjuna.wst.stub;
+
+import java.io.StringWriter;
+
+import javax.xml.namespace.QName;
+import javax.xml.stream.XMLStreamWriter;
+
+import com.arjuna.ats.arjuna.state.InputObjectState;
+import com.arjuna.ats.arjuna.state.OutputObjectState;
+import com.arjuna.webservices.logging.WSTLogger;
+import com.arjuna.webservices.soap.SoapUtils;
+import com.arjuna.webservices.util.StreamHelper;
+import com.arjuna.webservices.wsba11.State;
+import com.arjuna.wst.BusinessAgreementWithCoordinatorCompletionParticipant;
+import com.arjuna.wst.FaultedException;
+import com.arjuna.wst.PersistableParticipant;
+import com.arjuna.wst.SystemException;
+import com.arjuna.wst.WrongStateException;
+import com.arjuna.wst.messaging.engines.CoordinatorCompletionCoordinator11Engine;
+
+public class BusinessAgreementWithCoordinatorCompletion11Stub implements BusinessAgreementWithCoordinatorCompletionParticipant, PersistableParticipant
+{
+    private static final QName QNAME_BACC_PARTICIPANT = new QName("baccParticipant") ;
+    private CoordinatorCompletionCoordinator11Engine participant ;
+
+    public BusinessAgreementWithCoordinatorCompletion11Stub (final CoordinatorCompletionCoordinator11Engine participant)
+        throws Exception
+    {
+        this.participant = participant ;
+    }
+
+    public synchronized void close ()
+        throws WrongStateException, SystemException
+    {
+        /*
+         * Active -> illegal state
+         * Canceling-Active -> illegal state
+         * Canceling-Completing -> illegal state
+         * Completing -> illegal state
+         * Completed -> illegal state
+         * Closing -> no response
+         * Compensating -> illegal state
+         * Failing-Active -> illegal state
+         * Failing-Canceling -> illegal state
+         * Failing-Completing -> illegal state
+         * Failing-Compensating -> illegal state
+         * NotCompleting -> illegal state
+         * Exiting -> illegal state
+         * Ended -> ended
+         */
+        final State state = participant.close() ;
+        
+        if (state == State.STATE_CLOSING)
+        {
+            throw new SystemException() ;
+        }
+        else if (state != State.STATE_ENDED)
+        {
+            throw new WrongStateException() ;
+        }
+    }
+
+    public synchronized void cancel ()
+        throws WrongStateException, SystemException
+    {
+        /*
+         * Active -> illegal state
+         * Canceling-Active -> no response
+         * Canceling-Completing -> no response
+         * Completing -> illegal state
+         * Completed -> illegal state
+         * Closing -> illegal state
+         * Compensating -> illegal state
+         * Failing-Active -> illegal state
+         * Failing-Canceling -> failing
+         * Failing-Completing -> illegal state
+         * Failing-Compensating -> illegal state
+         * NotCompleting -> illegal state
+         * Exiting -> illegal state
+         * Ended -> ended
+         */
+        final State state = participant.cancel() ;
+        
+        if ((state == State.STATE_CANCELING_ACTIVE) || (state == State.STATE_CANCELING_COMPLETING) ||
+            (state == State.STATE_FAILING_CANCELING))
+        {
+            throw new SystemException() ;
+        }
+        else if (state != State.STATE_ENDED)
+        {
+            throw new WrongStateException() ;
+        }
+    }
+
+    public synchronized void compensate ()
+        throws FaultedException, WrongStateException, SystemException
+    {
+        /*
+         * Active -> illegal state
+         * Canceling-Active -> illegal state
+         * Canceling-Completing -> illegal state
+         * Completing -> illegal state
+         * Completed -> illegal state
+         * Closing -> illegal state
+         * Compensating -> no response
+         * Failing-Active -> illegal state
+         * Failing-Canceling -> illegal state
+         * Failing-Completing -> illegal state
+         * Failing-Compensating -> failing
+         * NotCompleting -> illegal state
+         * Exiting -> illegal state
+         * Ended -> ended
+         */
+        final State state = participant.compensate() ;
+        if (state == State.STATE_COMPENSATING)
+        {
+            throw new SystemException() ;
+        }
+        else if (state == State.STATE_FAILING_COMPENSATING)
+        {
+            throw new FaultedException() ;
+        }
+        else if (state != State.STATE_ENDED)
+        {
+            throw new WrongStateException() ;
+        }
+    }
+
+    public synchronized void complete ()
+        throws WrongStateException, SystemException
+    {
+        /*
+         * Active -> illegal state
+         * Canceling-Active -> illegal state
+         * Canceling-Completing -> canceling
+         * Completing -> no response
+         * Completed -> completed
+         * Closing -> illegal state
+         * Compensating -> illegal state
+         * Failing-Active -> illegal state
+         * Failing-Canceling -> illegal state
+         * Failing-Completing -> failing
+         * Failing-Compensating -> illegal state
+         * NotCompleting -> not completing
+         * Exiting -> exiting
+         * Ended -> ended
+         */
+        final State state = participant.complete() ;
+        if (state == State.STATE_COMPLETED)
+        {
+            return ;
+        }
+        else if ((state == State.STATE_FAILING_COMPENSATING) || (state == State.STATE_CANCELING_COMPLETING) ||
+            (state == State.STATE_COMPLETING) || (state == State.STATE_EXITING))
+        {
+            throw new SystemException() ;
+        }
+        throw new WrongStateException() ;
+    }
+
+    public String status ()
+        throws SystemException
+    {
+        final State state = participant.getStatus() ;
+        return (state == null ? null : state.getValue().getLocalPart()) ;
+    }
+
+    public void unknown ()
+        throws SystemException
+    {
+        error() ;
+    }
+
+    public synchronized void error ()
+        throws SystemException
+    {
+        participant.cancel() ;
+    }
+    
+    /**
+     * @message com.arjuna.wst.stub.BusinessAgreementWithCoordinatorCompletion11Stub_2 [com.arjuna.wst.stub.BusinessAgreementWithCoordinatorCompletion11Stub_2] - Error persisting participant state
+     */
+    public boolean saveState(final OutputObjectState oos)
+    {
+        try
+        {
+            oos.packString(participant.getId()) ;
+            
+            final StringWriter sw = new StringWriter() ;
+            final XMLStreamWriter writer = SoapUtils.getXMLStreamWriter(sw) ;
+            StreamHelper.writeStartElement(writer, QNAME_BACC_PARTICIPANT) ;
+            participant.getParticipant().writeContent(writer) ;
+            StreamHelper.writeEndElement(writer, null, null) ;
+            writer.close() ;
+            
+            oos.packString(writer.toString()) ;
+            
+            return true ;
+        }
+        catch (final Throwable th)
+        {
+            WSTLogger.arjLoggerI18N.error("com.arjuna.wst.stub.BusinessAgreementWithCoordinatorCompletion11Stub_2", th) ;
+            return false ;
+        }
+    }
+    
+    /**
+     * @message com.arjuna.wst.stub.BusinessAgreementWithCoordinatorCompletion11Stub_3 [com.arjuna.wst.stub.BusinessAgreementWithCoordinatorCompletion11Stub_3] - Error restoring participant state
+     */
+    public boolean restoreState(final InputObjectState ios)
+    {
+        // KEV - rework
+        return false ;
+//        try
+//        {
+//            final String id = ios.unpackString() ;
+//            final String eprValue = ios.unpackString() ;
+//            
+//            final XMLStreamReader reader = SoapUtils.getXMLStreamReader(new StringReader(eprValue)) ;
+//            StreamHelper.checkNextStartTag(reader, QNAME_BACC_PARTICIPANT) ;
+//            final EndpointReferenceType endpointReferenceType = new EndpointReferenceType(reader) ;
+//            
+//            _id = id ;
+//            _businessAgreementWithCoordinatorCompletionParticipant = endpointReferenceType ;
+//            return true ;
+//        }
+//        catch (final Throwable th)
+//        {
+//            WSTLogger.arjLoggerI18N.error("com.arjuna.wst.stub.BusinessAgreementWithCoordinatorCompletion11Stub_3", th) ;
+//            return false ;
+//        }
+    }
+}


Property changes on: labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/wst/stub/BusinessAgreementWithCoordinatorCompletion11Stub.java
___________________________________________________________________
Name: svn:keywords
   + Rev Date
Name: svn:eol-style
   + native

Added: labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/wst/stub/BusinessAgreementWithParticipantCompletion11Stub.java
===================================================================
--- labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/wst/stub/BusinessAgreementWithParticipantCompletion11Stub.java	                        (rev 0)
+++ labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/wst/stub/BusinessAgreementWithParticipantCompletion11Stub.java	2007-08-14 12:43:41 UTC (rev 14200)
@@ -0,0 +1,218 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag.  All rights reserved. 
+ * See the copyright.txt in the distribution for a full listing 
+ * of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU General Public License, v. 2.0.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A 
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+ * PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+ * You should have received a copy of the GNU General Public License,
+ * v. 2.0 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+ * MA  02110-1301, USA.
+ * 
+ * (C) 2005-2006,
+ * @author JBoss Inc.
+ */
+/*
+ * Copyright (c) 2003, Arjuna Technologies Limited.
+ *
+ * $Id: BusinessAgreementWithParticipantCompletion11Stub.java,v 1.1.2.2 2004/06/18 15:06:09 nmcl Exp $
+ */
+
+package com.arjuna.wst.stub;
+
+import java.io.StringWriter;
+
+import javax.xml.namespace.QName;
+import javax.xml.stream.XMLStreamWriter;
+
+import com.arjuna.ats.arjuna.state.InputObjectState;
+import com.arjuna.ats.arjuna.state.OutputObjectState;
+import com.arjuna.webservices.logging.WSTLogger;
+import com.arjuna.webservices.soap.SoapUtils;
+import com.arjuna.webservices.util.StreamHelper;
+import com.arjuna.webservices.wsba11.State;
+import com.arjuna.wst.BusinessAgreementWithParticipantCompletionParticipant;
+import com.arjuna.wst.FaultedException;
+import com.arjuna.wst.PersistableParticipant;
+import com.arjuna.wst.SystemException;
+import com.arjuna.wst.WrongStateException;
+import com.arjuna.wst.messaging.engines.ParticipantCompletionCoordinator11Engine;
+
+public class BusinessAgreementWithParticipantCompletion11Stub implements BusinessAgreementWithParticipantCompletionParticipant, PersistableParticipant
+{
+    private static final QName QNAME_BAPC_PARTICIPANT = new QName("bapcParticipant") ;
+    
+    private ParticipantCompletionCoordinator11Engine participant ;
+    
+    public BusinessAgreementWithParticipantCompletion11Stub (final ParticipantCompletionCoordinator11Engine participant)
+        throws Exception
+    {
+        this.participant = participant ;
+    }
+
+    public synchronized void close ()
+        throws WrongStateException, SystemException
+    {
+        /*
+         * Active -> illegal state
+         * Canceling -> illegal state
+         * Completed -> illegal state
+         * Closing -> no response
+         * Compensating -> illegal state
+         * Failing-Active -> illegal state
+         * Failing-Canceling -> illegal state
+         * Failing-Compensating -> illegal state
+         * NotCompleting -> illegal state
+         * Exiting -> illegal state
+         * Ended -> ended
+         */
+        final State state = participant.close() ;
+        
+        if (state == State.STATE_CLOSING)
+        {
+            throw new SystemException() ;
+        }
+        else if (state != State.STATE_ENDED)
+        {
+            throw new WrongStateException() ;
+        }
+    }
+
+    public synchronized void cancel ()
+        throws WrongStateException, SystemException
+    {
+        /*
+         * Active -> illegal state
+         * Canceling -> no response
+         * Completed -> illegal state
+         * Closing -> illegal state
+         * Compensating -> illegal state
+         * Failing-Active -> illegal state
+         * Failing-Canceling -> failing
+         * Failing-Compensating -> illegal state
+         * NotCompleting -> illegal state
+         * Exiting -> illegal state
+         * Ended -> ended
+         */
+        final State state = participant.cancel() ;
+        
+        if ((state == State.STATE_CANCELING) || (state == State.STATE_FAILING_CANCELING) || (state == State.STATE_COMPENSATING))
+        {
+            throw new SystemException() ;
+        }
+        else if (state != State.STATE_ENDED)
+        {
+            throw new WrongStateException() ;
+        }
+    }
+
+    public synchronized void compensate ()
+        throws FaultedException, WrongStateException, SystemException
+    {
+        /*
+         * Active -> illegal state
+         * Canceling -> illegal state
+         * Completed -> illegal state
+         * Closing -> illegal state
+         * Compensating -> no answer
+         * Failing-Active -> illegal state
+         * Failing-Canceling -> illegal state
+         * Failing-Compensating -> failing
+         * NotCompleting -> illegal state
+         * Exiting -> illegal state
+         * Ended -> ended
+         */
+        final State state = participant.compensate() ;
+        if (state == State.STATE_COMPENSATING)
+        {
+            throw new SystemException() ;
+        }
+        else if (state == State.STATE_FAILING_COMPENSATING)
+        {
+            throw new FaultedException() ;
+        }
+        else if (state != State.STATE_ENDED)
+        {
+            throw new WrongStateException() ;
+        }
+    }
+
+    public String status ()
+        throws SystemException
+    {
+        final State state = participant.getStatus() ;
+        return (state == null ? null : state.getValue().getLocalPart()) ;
+    }
+
+    public void unknown ()
+        throws SystemException
+    {
+        error() ;
+    }
+
+    public synchronized void error ()
+        throws SystemException
+    {
+        participant.cancel() ;
+    }
+    
+    /**
+     * @message com.arjuna.wst.stub.BusinessAgreementWithParticipantCompletion11Stub_2 [com.arjuna.wst.stub.BusinessAgreementWithParticipantCompletion11Stub_2] - Error persisting participant state
+     */
+    public boolean saveState(final OutputObjectState oos)
+    {
+        try
+        {
+            oos.packString(participant.getId()) ;
+            
+            final StringWriter sw = new StringWriter() ;
+            final XMLStreamWriter writer = SoapUtils.getXMLStreamWriter(sw) ;
+            StreamHelper.writeStartElement(writer, QNAME_BAPC_PARTICIPANT) ;
+            participant.getParticipant().writeContent(writer) ;
+            StreamHelper.writeEndElement(writer, null, null) ;
+            writer.close() ;
+            
+            oos.packString(writer.toString()) ;
+            
+            return true ;
+        }
+        catch (final Throwable th)
+        {
+            WSTLogger.arjLoggerI18N.error("com.arjuna.wst.stub.BusinessAgreementWithParticipantCompletion11Stub_2", th) ;
+            return false ;
+        }
+    }
+    
+    /**
+     * @message com.arjuna.wst.stub.BusinessAgreementWithParticipantCompletion11Stub_3 [com.arjuna.wst.stub.BusinessAgreementWithParticipantCompletion11Stub_3] - Error restoring participant state
+     */
+    public boolean restoreState(final InputObjectState ios)
+    {
+        // KEV - rework
+        return false ;
+//        try
+//        {
+//            final String id = ios.unpackString() ;
+//            final String eprValue = ios.unpackString() ;
+//            
+//            final XMLStreamReader reader = SoapUtils.getXMLStreamReader(new StringReader(eprValue)) ;
+//            StreamHelper.checkNextStartTag(reader, QNAME_BAPC_PARTICIPANT) ;
+//            final EndpointReferenceType endpointReferenceType = new EndpointReferenceType(reader) ;
+//            
+//            _id = id ;
+//            _businessAgreementWithParticipantCompletionParticipant = endpointReferenceType ;
+//            return true ;
+//        }
+//        catch (final Throwable th)
+//        {
+//            WSTLogger.arjLoggerI18N.error("com.arjuna.wst.stub.BusinessAgreementWithParticipantCompletion11Stub_3", th) ;
+//            return false ;
+//        }
+    }
+}


Property changes on: labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/wst/stub/BusinessAgreementWithParticipantCompletion11Stub.java
___________________________________________________________________
Name: svn:keywords
   + Rev Date
Name: svn:eol-style
   + native

Added: labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/wst/stub/Completion11Stub.java
===================================================================
--- labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/wst/stub/Completion11Stub.java	                        (rev 0)
+++ labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/wst/stub/Completion11Stub.java	2007-08-14 12:43:41 UTC (rev 14200)
@@ -0,0 +1,248 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag.  All rights reserved. 
+ * See the copyright.txt in the distribution for a full listing 
+ * of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU General Public License, v. 2.0.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A 
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+ * PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+ * You should have received a copy of the GNU General Public License,
+ * v. 2.0 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+ * MA  02110-1301, USA.
+ * 
+ * (C) 2005-2006,
+ * @author JBoss Inc.
+ */
+/*
+ * Copyright (c) 2003, Arjuna Technologies Limited.
+ * 
+ * Completion11Stub.java
+ */
+
+package com.arjuna.wst.stub;
+
+import com.arjuna.webservices.SoapFault;
+import com.arjuna.webservices.wsaddr2005.AddressingContext;
+import com.arjuna.webservices.wsaddr2005.EndpointReferenceType;
+import com.arjuna.webservices.wsjboss.JBossContext;
+import com.arjuna.webservices.wsjboss.InstanceIdentifier;
+import com.arjuna.webservices.wsat11.AtomicTransactionConstants;
+import com.arjuna.webservices.wsat11.NotificationType;
+import com.arjuna.webservices.wsat11.client.CompletionCoordinatorClient;
+import com.arjuna.webservices.wsat11.processors.CompletionInitiatorCallback;
+import com.arjuna.webservices.wsat11.processors.CompletionInitiatorProcessor;
+import com.arjuna.wsc.messaging.MessageId;
+import com.arjuna.wst.CompletionCoordinatorParticipant;
+import com.arjuna.wst.SystemException;
+import com.arjuna.wst.TransactionRolledBackException;
+import com.arjuna.wst.UnknownTransactionException;
+
+public class Completion11Stub implements CompletionCoordinatorParticipant
+{
+    private EndpointReferenceType _completionCoordinator ;
+    private String _id;
+
+	public Completion11Stub (final String id, final EndpointReferenceType completionCoordinator)
+			throws Exception
+	{
+		_completionCoordinator = completionCoordinator;
+		_id = id;
+	}
+
+	public void commit () throws TransactionRolledBackException,
+			UnknownTransactionException, SystemException
+	{
+        final AddressingContext addressingContext = AddressingContext.createRequestContext(_completionCoordinator, MessageId.getMessageId()) ;
+        
+        final RequestCallback callback = new RequestCallback() ;
+        final CompletionInitiatorProcessor completionInitiator = CompletionInitiatorProcessor.getProcessor() ;
+        completionInitiator.registerCallback(_id, callback) ;
+        try
+        {
+            CompletionCoordinatorClient.getClient().sendCommit(addressingContext, new InstanceIdentifier(_id)) ;
+            callback.waitUntilTriggered() ;
+        }
+        catch (final Throwable th)
+        {
+            th.printStackTrace() ;
+            throw new SystemException() ;
+        }
+        finally
+        {
+            completionInitiator.removeCallback(_id) ;
+        }
+        
+        if (callback.hasTriggered())
+        {
+            if (callback.receivedCommitted())
+            {
+                return ;
+            }
+            else if (callback.receivedAborted())
+            {
+                throw new TransactionRolledBackException() ;
+            }
+            final SoapFault soapFault = callback.getSoapFault() ;
+            if ((soapFault != null) && AtomicTransactionConstants.WSAT_ERROR_CODE_UNKNOWN_TRANSACTION_QNAME.equals(soapFault.getSubcode()))
+            {
+                throw new UnknownTransactionException();
+            }
+        }
+        
+        throw new SystemException() ;
+	}
+
+	public void rollback () throws UnknownTransactionException, SystemException
+	{
+        final AddressingContext addressingContext = AddressingContext.createRequestContext(_completionCoordinator, MessageId.getMessageId()) ;
+        
+        final RequestCallback callback = new RequestCallback() ;
+        final CompletionInitiatorProcessor completionInitiator = CompletionInitiatorProcessor.getProcessor() ;
+        completionInitiator.registerCallback(_id, callback) ;
+        try
+        {
+            CompletionCoordinatorClient.getClient().sendRollback(addressingContext, new InstanceIdentifier(_id)) ;
+            callback.waitUntilTriggered() ;
+        }
+        catch (final Throwable th)
+        {
+            th.printStackTrace() ;
+            throw new SystemException() ;
+        }
+        finally
+        {
+            completionInitiator.removeCallback(_id) ;
+        }
+        
+        if (callback.hasTriggered())
+        {
+            if (callback.receivedAborted())
+            {
+                return ;
+            }
+            final SoapFault soapFault = callback.getSoapFault() ;
+            if ((soapFault != null) && AtomicTransactionConstants.WSAT_ERROR_CODE_UNKNOWN_TRANSACTION_QNAME.equals(soapFault.getSubcode()))
+            {
+                throw new UnknownTransactionException();
+            }
+        }
+        
+        throw new SystemException() ;
+	}
+    
+    private static class RequestCallback extends CompletionInitiatorCallback
+    {
+        /**
+         * The addressing context.
+         */
+        private AddressingContext addressingContext ;
+        /**
+         * The jboss context.
+         */
+        private JBossContext jbossContext ;
+        /**
+         * The SOAP fault.
+         */
+        private SoapFault soapFault ;
+        /**
+         * The aborted notification flag.
+         */
+        private boolean aborted ;
+        /**
+         * The committed notification flag.
+         */
+        private boolean committed ;
+        
+        /**
+         * Get the addressing context.
+         * @return The addressing context.
+         */
+        AddressingContext getAddressingContext()
+        {
+            return addressingContext ;
+        }
+        
+        /**
+         * Get the jboss context.
+         * @return The jboss context.
+         */
+        JBossContext getJBossContext()
+        {
+            return jbossContext ;
+        }
+        
+        /**
+         * Get the SOAP fault.
+         * @return The SOAP fault.
+         */
+        SoapFault getSoapFault()
+        {
+            return soapFault ;
+        }
+        
+        /**
+         * Did we receive a aborted notification?
+         * @return True if aborted, false otherwise.
+         */
+        boolean receivedAborted()
+        {
+            return aborted ;
+        }
+        
+        /**
+         * Did we receive a committed notification?
+         * @return True if committed, false otherwise.
+         */
+        boolean receivedCommitted()
+        {
+            return committed ;
+        }
+        
+        /**
+         * A aborted response.
+         * @param aborted The aborted notification.
+         * @param addressingContext The addressing context.
+         * @param jbossContext The jboss context.
+         */
+        public void aborted(final NotificationType aborted, final AddressingContext addressingContext,
+            final JBossContext jbossContext)
+        {
+            this.aborted = true ;
+            this.addressingContext = addressingContext ;
+            this.jbossContext = jbossContext ;
+        }
+
+        /**
+         * An committed response.
+         * @param committed The committed notification.
+         * @param addressingContext The addressing context.
+         * @param jbossContext The jboss context.
+         */
+        public void committed(final NotificationType committed, final AddressingContext addressingContext,
+            final JBossContext jbossContext)
+        {
+            this.committed  = true ;
+            this.addressingContext = addressingContext ;
+            this.jbossContext = jbossContext ;
+        }
+        
+        /**
+         * A SOAP fault response.
+         * @param soapFault The SOAP fault.
+         * @param addressingContext The addressing context.
+         * @param jbossContext The jboss context.
+         */
+        public void soapFault(final SoapFault soapFault, final AddressingContext addressingContext,
+            final JBossContext jbossContext)
+        {
+            this.soapFault = soapFault ;
+            this.addressingContext = addressingContext ;
+            this.jbossContext = jbossContext ;
+        }
+    }
+}


Property changes on: labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/wst/stub/Completion11Stub.java
___________________________________________________________________
Name: svn:keywords
   + Rev Date
Name: svn:eol-style
   + native

Added: labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/wst/stub/Durable2PC11Stub.java
===================================================================
--- labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/wst/stub/Durable2PC11Stub.java	                        (rev 0)
+++ labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/wst/stub/Durable2PC11Stub.java	2007-08-14 12:43:41 UTC (rev 14200)
@@ -0,0 +1,41 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag.  All rights reserved. 
+ * See the copyright.txt in the distribution for a full listing 
+ * of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU General Public License, v. 2.0.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A 
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+ * PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+ * You should have received a copy of the GNU General Public License,
+ * v. 2.0 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+ * MA  02110-1301, USA.
+ * 
+ * (C) 2005-2006,
+ * @author JBoss Inc.
+ */
+/*
+ * Copyright (c) 2003, 2004,
+ *
+ * Arjuna Technologies Limited.
+ *
+ * $Id: Durable2PC11Stub.java,v 1.1.2.3 2004/06/18 15:06:09 nmcl Exp $
+ */
+
+package com.arjuna.wst.stub;
+
+import com.arjuna.webservices.wsaddr2005.EndpointReferenceType;
+import com.arjuna.wst.Durable2PCParticipant;
+
+public class Durable2PC11Stub extends Participant11Stub implements Durable2PCParticipant
+{
+    public Durable2PC11Stub(final String id, final EndpointReferenceType twoPCParticipant)
+        throws Exception
+    {
+        super(id, true, twoPCParticipant) ;
+    }
+}


Property changes on: labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/wst/stub/Durable2PC11Stub.java
___________________________________________________________________
Name: svn:keywords
   + Rev Date
Name: svn:eol-style
   + native

Added: labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/wst/stub/Participant11Stub.java
===================================================================
--- labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/wst/stub/Participant11Stub.java	                        (rev 0)
+++ labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/wst/stub/Participant11Stub.java	2007-08-14 12:43:41 UTC (rev 14200)
@@ -0,0 +1,228 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag.  All rights reserved. 
+ * See the copyright.txt in the distribution for a full listing 
+ * of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU General Public License, v. 2.0.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A 
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+ * PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+ * You should have received a copy of the GNU General Public License,
+ * v. 2.0 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+ * MA  02110-1301, USA.
+ * 
+ * (C) 2005-2006,
+ * @author JBoss Inc.
+ */
+/*
+ * Copyright (c) 2003, 2004,
+ *
+ * Arjuna Technologies Limited.
+ *
+ * $Id: Participant11Stub.java,v 1.1.2.1 2005/11/22 10:35:28 kconner Exp $
+ */
+
+package com.arjuna.wst.stub;
+
+import java.io.StringReader;
+import java.io.StringWriter;
+
+import javax.xml.namespace.QName;
+import javax.xml.stream.XMLStreamReader;
+import javax.xml.stream.XMLStreamWriter;
+
+import com.arjuna.ats.arjuna.state.InputObjectState;
+import com.arjuna.ats.arjuna.state.OutputObjectState;
+import com.arjuna.webservices.logging.WSTLogger;
+import com.arjuna.webservices.soap.SoapUtils;
+import com.arjuna.webservices.util.StreamHelper;
+import com.arjuna.webservices.wsaddr2005.EndpointReferenceType;
+import com.arjuna.webservices.wsat11.State;
+import com.arjuna.wst.Aborted;
+import com.arjuna.wst.Participant;
+import com.arjuna.wst.PersistableParticipant;
+import com.arjuna.wst.Prepared;
+import com.arjuna.wst.ReadOnly;
+import com.arjuna.wst.SystemException;
+import com.arjuna.wst.Vote;
+import com.arjuna.wst.WrongStateException;
+import com.arjuna.wst.messaging.engines.Coordinator11Engine;
+
+public class Participant11Stub implements Participant, PersistableParticipant
+{
+    private static final QName QNAME_TWO_PC_PARTICIPANT = new QName("twoPCParticipant") ;
+    private Coordinator11Engine coordinator ;
+    
+    public Participant11Stub(final String id, final boolean durable, final EndpointReferenceType twoPCParticipant)
+        throws Exception
+    {
+        coordinator = new Coordinator11Engine(id, durable, twoPCParticipant) ;
+    }
+
+    public Vote prepare()
+        throws WrongStateException, SystemException
+    {
+        /*
+         * null - aborted or read only
+         * Active - illegal state
+         * Preparing - no answer
+         * Prepared - illegal state
+         * PreparedSuccess - prepared
+         * Committing - illegal state
+         * Aborting - aborting
+         */
+        final State state = coordinator.prepare() ;
+        if (state == State.STATE_PREPARED_SUCCESS)
+        {
+            return new Prepared() ;
+        }
+        else if (state == State.STATE_ABORTING)
+        {
+            return new Aborted() ;
+        }
+        else if (state == null)
+        {
+            if (coordinator.isReadOnly())
+            {
+                return new ReadOnly() ;
+            }
+            else
+            {
+                return new Aborted() ;
+            }
+        }
+        else if (state == State.STATE_PREPARING)
+        {
+            throw new SystemException() ;
+        }
+        else
+        {
+            throw new WrongStateException() ;
+        }
+    }
+
+    public void commit()
+        throws WrongStateException, SystemException
+    {
+        /*
+         * null - committed
+         * Active - illegal state
+         * Preparing - illegal state
+         * Prepared - illegal state
+         * PreparedSuccess - illegal state
+         * Committing - no response
+         * Aborting - illegal state
+         */
+        final State state = coordinator.commit() ;
+        if (state != null)
+        {
+            if (state == State.STATE_COMMITTING)
+            {
+                throw new SystemException() ;
+            }
+            else
+            {
+                throw new WrongStateException() ;
+            }
+        }
+    }
+
+    public void rollback()
+        throws WrongStateException, SystemException
+    {
+        /*
+         * null - aborted
+         * Active - illegal state
+         * Preparing - illegal state
+         * Prepared - illegal state
+         * PreparedSuccess - illegal state
+         * Committing - illegal state
+         * Aborting - no response
+         */
+        final State state = coordinator.rollback() ;
+        if (state != null)
+        {
+            if (state == State.STATE_ABORTING)
+            {
+                throw new SystemException() ;
+            }
+            else
+            {
+                throw new WrongStateException() ;
+            }
+        }
+    }
+
+    public void unknown()
+        throws SystemException
+    {
+        error() ;
+    }
+
+    public void error()
+        throws SystemException
+    {
+        try
+        {
+            rollback() ;
+        }
+        catch (final WrongStateException wse) {} // ignore
+    }
+    
+    /**
+     * @message com.arjuna.wst.stub.Participant11Stub_1 [com.arjuna.wst.stub.Participant11Stub_1] - Error persisting participant state
+     */
+    public boolean saveState(final OutputObjectState oos)
+    {
+        try
+        {
+            oos.packString(coordinator.getId()) ;
+            oos.packBoolean(coordinator.isDurable()) ;
+            
+            final StringWriter sw = new StringWriter() ;
+            final XMLStreamWriter writer = SoapUtils.getXMLStreamWriter(sw) ;
+            StreamHelper.writeStartElement(writer, QNAME_TWO_PC_PARTICIPANT) ;
+            coordinator.getParticipant().writeContent(writer) ;
+            StreamHelper.writeEndElement(writer, null, null) ;
+            writer.close() ;
+            
+            oos.packString(writer.toString()) ;
+            
+            return true ;
+        }
+        catch (final Throwable th)
+        {
+            WSTLogger.arjLoggerI18N.error("com.arjuna.wst.stub.Participant11Stub_1", th) ;
+            return false ;
+        }
+    }
+    
+    /**
+     * @message com.arjuna.wst.stub.Participant11Stub_2 [com.arjuna.wst.stub.Participant11Stub_2] - Error restoring participant state
+     */
+    public boolean restoreState(final InputObjectState ios)
+    {
+        try
+        {
+            final String id = ios.unpackString() ;
+            final boolean durable = ios.unpackBoolean() ;
+            final String eprValue = ios.unpackString() ;
+            
+            final XMLStreamReader reader = SoapUtils.getXMLStreamReader(new StringReader(eprValue)) ;
+            StreamHelper.checkNextStartTag(reader, QNAME_TWO_PC_PARTICIPANT) ;
+            final EndpointReferenceType endpointReferenceType = new EndpointReferenceType(reader) ;
+            
+            coordinator = new Coordinator11Engine(id, durable, endpointReferenceType, State.STATE_PREPARED_SUCCESS) ;
+            return true ;
+        }
+        catch (final Throwable th)
+        {
+            WSTLogger.arjLoggerI18N.error("com.arjuna.wst.stub.Participant11Stub_2", th) ;
+            return false ;
+        }
+    }
+}


Property changes on: labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/wst/stub/Participant11Stub.java
___________________________________________________________________
Name: svn:keywords
   + Rev Date
Name: svn:eol-style
   + native

Added: labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/wst/stub/Volatile2PC11Stub.java
===================================================================
--- labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/wst/stub/Volatile2PC11Stub.java	                        (rev 0)
+++ labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/wst/stub/Volatile2PC11Stub.java	2007-08-14 12:43:41 UTC (rev 14200)
@@ -0,0 +1,41 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag.  All rights reserved. 
+ * See the copyright.txt in the distribution for a full listing 
+ * of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU General Public License, v. 2.0.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A 
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+ * PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+ * You should have received a copy of the GNU General Public License,
+ * v. 2.0 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+ * MA  02110-1301, USA.
+ * 
+ * (C) 2005-2006,
+ * @author JBoss Inc.
+ */
+/*
+ * Copyright (c) 2003, 2004,
+ *
+ * Arjuna Technologies Limited.
+ *
+ * $Id: Volatile2PC11Stub.java,v 1.1.2.2 2004/06/18 15:06:09 nmcl Exp $
+ */
+
+package com.arjuna.wst.stub;
+
+import com.arjuna.webservices.wsaddr2005.EndpointReferenceType;
+import com.arjuna.wst.Volatile2PCParticipant;
+
+public class Volatile2PC11Stub extends Participant11Stub implements Volatile2PCParticipant
+{
+    public Volatile2PC11Stub(final String id, final EndpointReferenceType twoPCParticipant)
+        throws Exception
+    {
+        super(id, false, twoPCParticipant) ;
+    }
+}


Property changes on: labs/jbosstm/workspace/XTS_TX11/WS-T/dev/src/com/arjuna/wst/stub/Volatile2PC11Stub.java
___________________________________________________________________
Name: svn:keywords
   + Rev Date
Name: svn:eol-style
   + native

Added: labs/jbosstm/workspace/XTS_TX11/WSCF/classes/com/arjuna/mw/wsc/context/Context11.java
===================================================================
--- labs/jbosstm/workspace/XTS_TX11/WSCF/classes/com/arjuna/mw/wsc/context/Context11.java	                        (rev 0)
+++ labs/jbosstm/workspace/XTS_TX11/WSCF/classes/com/arjuna/mw/wsc/context/Context11.java	2007-08-14 12:43:41 UTC (rev 14200)
@@ -0,0 +1,51 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag.  All rights reserved. 
+ * See the copyright.txt in the distribution for a full listing 
+ * of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU General Public License, v. 2.0.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A 
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+ * PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+ * You should have received a copy of the GNU General Public License,
+ * v. 2.0 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+ * MA  02110-1301, USA.
+ * 
+ * (C) 2005-2006,
+ * @author JBoss Inc.
+ */
+/*
+ * Copyright (C) 2003,
+ *
+ * Arjuna Technologies Limited,
+ * Newcastle upon Tyne,
+ * Tyne and Wear,
+ * UK.
+ *
+ * $Id: Context.java,v 1.1.24.1 2005/11/22 10:34:14 kconner Exp $
+ */
+
+package com.arjuna.mw.wsc.context;
+
+import com.arjuna.webservices.wscoor11.CoordinationContextType;
+
+/**
+ * @author Mark Little (mark.little at arjuna.com)
+ * @version $Id: Context.java,v 1.1.24.1 2005/11/22 10:34:14 kconner Exp $
+ * @since 1.0.
+ */
+
+public interface Context11
+{
+
+    public CoordinationContextType getCoordinationContext ();
+    
+    public void setCoordinationContext (CoordinationContextType cc);
+
+    public boolean equals (Object obj);
+    
+}


Property changes on: labs/jbosstm/workspace/XTS_TX11/WSCF/classes/com/arjuna/mw/wsc/context/Context11.java
___________________________________________________________________
Name: svn:keywords
   + Rev Date
Name: svn:eol-style
   + native

Added: labs/jbosstm/workspace/XTS_TX11/WSCF/classes/com/arjuna/mwlabs/wsc/ContextFactoryMapper11Imple.java
===================================================================
--- labs/jbosstm/workspace/XTS_TX11/WSCF/classes/com/arjuna/mwlabs/wsc/ContextFactoryMapper11Imple.java	                        (rev 0)
+++ labs/jbosstm/workspace/XTS_TX11/WSCF/classes/com/arjuna/mwlabs/wsc/ContextFactoryMapper11Imple.java	2007-08-14 12:43:41 UTC (rev 14200)
@@ -0,0 +1,177 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag.  All rights reserved. 
+ * See the copyright.txt in the distribution for a full listing 
+ * of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU General Public License, v. 2.0.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A 
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+ * PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+ * You should have received a copy of the GNU General Public License,
+ * v. 2.0 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+ * MA  02110-1301, USA.
+ * 
+ * (C) 2005-2006,
+ * @author JBoss Inc.
+ */
+/*
+ * Copyright (C) 2002,
+ *
+ * Arjuna Technologies Limited,
+ * Newcastle upon Tyne,
+ * Tyne and Wear,
+ * UK.
+ *
+ * $Id: ContextFactoryMapperImple.java,v 1.12.4.1 2005/11/22 10:34:09 kconner Exp $
+ */
+
+package com.arjuna.mwlabs.wsc;
+
+import javax.xml.parsers.DocumentBuilder;
+import javax.xml.parsers.DocumentBuilderFactory;
+
+import com.arjuna.mw.wscf.common.CoordinatorXSD;
+import com.arjuna.mw.wscf.protocols.ProtocolManager;
+import com.arjuna.mw.wscf.protocols.ProtocolRegistry;
+import com.arjuna.wsc.ContextFactory11;
+import com.arjuna.wsc.ContextFactoryMapper11;;
+
+/**
+ * @author Mark Little (mark.little at arjuna.com)
+ * @version $Id: ContextFactoryMapperImple.java,v 1.11 2004/08/10 15:10:27
+ *          kconner Exp $
+ * @since 1.0.
+ */
+
+public class ContextFactoryMapper11Imple extends ContextFactoryMapper11
+{
+
+	public ContextFactoryMapper11Imple()
+	{
+		_protocols = ProtocolRegistry.createManager();
+	}
+
+	public void addContextFactory (String coordinationTypeURI, ContextFactory11 contextFactory)
+	{
+		try
+		{
+			_protocols.addProtocol(convert(coordinationTypeURI), contextFactory);
+
+			contextFactory.install(coordinationTypeURI);
+		}
+		catch (Exception ex)
+		{
+			ex.printStackTrace();
+		}
+	}
+
+	public void removeContextFactory (String coordinationTypeURI)
+	{
+		try
+		{
+            ContextFactory11 contextFactory = (ContextFactory11) _protocols.removeProtocol(convert(coordinationTypeURI));
+
+			contextFactory.uninstall(coordinationTypeURI);
+		}
+		catch (Exception ex)
+		{
+			ex.printStackTrace();
+		}
+	}
+
+	/*
+	 * The factory implementation must initialise the activity service with the
+	 * correct HLS.
+	 */
+
+	public ContextFactory11 getContextFactory (String coordinationTypeURI)
+	{
+		try
+		{
+			org.w3c.dom.Document doc = convert(coordinationTypeURI);
+			Object type = _protocols.getProtocolImplementation(convert(coordinationTypeURI));
+
+			if (type instanceof String)
+			{
+				Class c = Class.forName((String) type);
+
+                ContextFactory11 factory = (ContextFactory11) c.newInstance();
+
+				_protocols.replaceProtocol(doc, factory);
+
+				return factory;
+			}
+			else
+			{
+				return (ContextFactory11) type;
+			}
+		}
+		catch (Exception ex)
+		{
+			ex.printStackTrace();
+		}
+
+		return null;
+	}
+
+	public void setSubordinateContextFactoryMapper (ContextFactoryMapper11 subordinateContextFactoryMapper)
+	{
+	}
+
+	public ContextFactoryMapper11 getSubordinateContextFactoryMapper ()
+	{
+		return null;
+	}
+
+	public void setDefaultContextFactory (ContextFactory11 defaultContextFactory)
+	{
+	}
+
+	public ContextFactory11 getDefaultContextFactory ()
+	{
+		return null;
+	}
+
+	private org.w3c.dom.Document convert (String coordinationTypeURI)
+			throws Exception
+	{
+		DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
+		DocumentBuilder builder = factory.newDocumentBuilder();
+		org.w3c.dom.Document doc = builder.newDocument();
+		org.w3c.dom.Element rootElement = doc.createElement(_wscRootElement);
+		org.w3c.dom.Element elem = doc.createElement(CoordinatorXSD.coordinatorType);
+
+		elem.appendChild(doc.createTextNode(coordinationTypeURI));
+
+		rootElement.appendChild(elem);
+
+		doc.appendChild(rootElement);
+
+		return doc;
+	}
+
+	private void writeObject (java.io.ObjectOutputStream objectOutputStream)
+			throws java.io.IOException
+	{
+	}
+
+	private void readObject (java.io.ObjectInputStream objectInputStream)
+			throws java.io.IOException, ClassNotFoundException
+	{
+	}
+
+	public static final String localName ()
+	{
+		// return "com/arjuna/mwlabs/wsc/contextfactorymapper";
+		return "comarjunamwlabswsccontextfactorymapper";
+	}
+
+	private ProtocolManager _protocols;
+
+	private static final String _wscRootElement = "WS-C";
+
+}


Property changes on: labs/jbosstm/workspace/XTS_TX11/WSCF/classes/com/arjuna/mwlabs/wsc/ContextFactoryMapper11Imple.java
___________________________________________________________________
Name: svn:keywords
   + Rev Date
Name: svn:eol-style
   + native

Added: labs/jbosstm/workspace/XTS_TX11/WSTX/classes/com/arjuna/mw/wst/BusinessActivity11Manager.java
===================================================================
--- labs/jbosstm/workspace/XTS_TX11/WSTX/classes/com/arjuna/mw/wst/BusinessActivity11Manager.java	                        (rev 0)
+++ labs/jbosstm/workspace/XTS_TX11/WSTX/classes/com/arjuna/mw/wst/BusinessActivity11Manager.java	2007-08-14 12:43:41 UTC (rev 14200)
@@ -0,0 +1,133 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag.  All rights reserved. 
+ * See the copyright.txt in the distribution for a full listing 
+ * of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU General Public License, v. 2.0.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A 
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+ * PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+ * You should have received a copy of the GNU General Public License,
+ * v. 2.0 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+ * MA  02110-1301, USA.
+ * 
+ * (C) 2005-2006,
+ * @author JBoss Inc.
+ */
+/*
+ * Copyright (C) 2003,
+ *
+ * Arjuna Technologies Limited,
+ * Newcastle upon Tyne,
+ * Tyne and Wear,
+ * UK.
+ *
+ * $Id: BusinessActivityManager.java,v 1.4.8.1 2005/11/22 10:36:05 kconner Exp $
+ */
+
+package com.arjuna.mw.wst;
+
+import com.arjuna.wsc.AlreadyRegisteredException;
+import com.arjuna.wst.BA11ParticipantManager;
+import com.arjuna.wst.BusinessAgreementWithCoordinatorCompletionParticipant;
+import com.arjuna.wst.BusinessAgreementWithParticipantCompletionParticipant;
+import com.arjuna.wst.SystemException;
+import com.arjuna.wst.UnknownTransactionException;
+import com.arjuna.wst.WrongStateException;
+
+/**
+ * This is the interface that the core exposes in order to allow different
+ * types of participants to be enrolled. The messaging layer continues to
+ * work in terms of the registrar, but internally we map to one of these
+ * methods.
+ *
+ * As with UserTransaction a TransactionManager does not represent a specific
+ * transaction, but rather is responsible for providing access to an implicit
+ * per-thread transaction context.
+ *
+ * @author Mark Little (mark.little at arjuna.com)
+ * @version $Id: BusinessActivityManager.java,v 1.4.8.1 2005/11/22 10:36:05 kconner Exp $
+ * @since XTS 1.0.
+ */
+
+public abstract class BusinessActivity11Manager
+{
+    /**
+     * The manager.
+     */
+    private static BusinessActivity11Manager MANAGER ;
+    
+    /**
+     * Get the business activity manager.
+     * @return The business activity manager.
+     */
+    public static synchronized BusinessActivity11Manager getBusinessActivityManager()
+    {
+        return MANAGER ;
+    }
+    
+    /**
+     * Set the business activity manager.
+     * @param manager The business activity manager.
+     */
+    public static synchronized void setBusinessActivityManager(final BusinessActivity11Manager manager)
+    {
+        MANAGER = manager ;
+    }
+
+    /**
+     * Enlist a participant for the BusinessAgreement protocol.
+     *
+     * @return the BAParticipantManager for this transaction.
+     */
+    public abstract BA11ParticipantManager enlistForBusinessAgreementWithParticipantCompletion(
+        final BusinessAgreementWithParticipantCompletionParticipant bap, final String id)
+        throws WrongStateException, UnknownTransactionException, AlreadyRegisteredException, SystemException;
+
+    /**
+     * Enlist a participant for the BusinessAgreementWithCoordinatorCompletion protocol.
+     *
+     * @return the BAParticipantManager for this transaction.
+     */
+    public abstract BA11ParticipantManager enlistForBusinessAgreementWithCoordinatorCompletion(
+        final BusinessAgreementWithCoordinatorCompletionParticipant bawcp, final String id)
+        throws WrongStateException, UnknownTransactionException, AlreadyRegisteredException, SystemException;
+
+    /**
+     * The resume method can be used to (re-)associate a thread with a 
+     * transaction(s) via its TxContext. Prior to association, the thread is
+     * disassociated with any transaction(s) with which it may be currently
+     * associated. If the TxContext is null, then the thread is associated with
+     * no transaction. The UnknownTransactionException exception is thrown if
+     * the transaction that the TxContext refers to is invalid in the scope of
+     * the invoking thread.
+     */
+    public abstract void resume(final TxContext txContext)
+        throws UnknownTransactionException, SystemException;
+
+    /**
+     * A thread of control may require periods of non-transactionality so that
+     * it may perform work that is not associated with a specific transaction.
+     * In order to do this it is necessary to disassociate the thread from any
+     * transactions. The suspend method accomplishes this, returning a
+     * TxContext instance, which is a handle on the transaction. The thread is
+     * then no longer associated with any transaction.
+     */
+    public abstract TxContext suspend()
+        throws SystemException;
+    
+    /**
+     * The currentTransaction method returns the TxContext for the current
+     * transaction, or null if there is none. Unlike suspend, this method does
+     * not disassociate the current thread from the transaction(s). This can
+     * be used to enable multiple threads to execute within the scope of the
+     * same transaction.
+     */
+    public abstract TxContext currentTransaction()
+        throws SystemException;
+    
+}


Property changes on: labs/jbosstm/workspace/XTS_TX11/WSTX/classes/com/arjuna/mw/wst/BusinessActivity11Manager.java
___________________________________________________________________
Name: svn:keywords
   + Rev Date
Name: svn:eol-style
   + native

Added: labs/jbosstm/workspace/XTS_TX11/WSTX/classes/com/arjuna/mw/wst/BusinessActivity11ManagerFactory.java
===================================================================
--- labs/jbosstm/workspace/XTS_TX11/WSTX/classes/com/arjuna/mw/wst/BusinessActivity11ManagerFactory.java	                        (rev 0)
+++ labs/jbosstm/workspace/XTS_TX11/WSTX/classes/com/arjuna/mw/wst/BusinessActivity11ManagerFactory.java	2007-08-14 12:43:41 UTC (rev 14200)
@@ -0,0 +1,41 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag.  All rights reserved. 
+ * See the copyright.txt in the distribution for a full listing 
+ * of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU General Public License, v. 2.0.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A 
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+ * PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+ * You should have received a copy of the GNU General Public License,
+ * v. 2.0 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+ * MA  02110-1301, USA.
+ * 
+ * (C) 2005-2006,
+ * @author JBoss Inc.
+ */
+/*
+ * Copyright (C) 2003,
+ *
+ * Arjuna Technologies Limited,
+ * Newcastle upon Tyne,
+ * Tyne and Wear,
+ * UK.
+ *
+ * $Id: BusinessActivityManagerFactory.java,v 1.4.8.1 2005/11/22 10:36:06 kconner Exp $
+ */
+
+package com.arjuna.mw.wst;
+
+
+public class BusinessActivity11ManagerFactory
+{
+    public static BusinessActivity11Manager businessActivityManager ()
+    {
+        return BusinessActivity11Manager.getBusinessActivityManager() ;
+    }
+}


Property changes on: labs/jbosstm/workspace/XTS_TX11/WSTX/classes/com/arjuna/mw/wst/BusinessActivity11ManagerFactory.java
___________________________________________________________________
Name: svn:keywords
   + Rev Date
Name: svn:eol-style
   + native

Added: labs/jbosstm/workspace/XTS_TX11/WSTX/classes/com/arjuna/mwlabs/wst/at/recovery/Implementations.java
===================================================================
--- labs/jbosstm/workspace/XTS_TX11/WSTX/classes/com/arjuna/mwlabs/wst/at/recovery/Implementations.java	                        (rev 0)
+++ labs/jbosstm/workspace/XTS_TX11/WSTX/classes/com/arjuna/mwlabs/wst/at/recovery/Implementations.java	2007-08-14 12:43:41 UTC (rev 14200)
@@ -0,0 +1,73 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag.  All rights reserved. 
+ * See the copyright.txt in the distribution for a full listing 
+ * of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU General Public License, v. 2.0.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A 
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+ * PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+ * You should have received a copy of the GNU General Public License,
+ * v. 2.0 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+ * MA  02110-1301, USA.
+ * 
+ * (C) 2005-2006,
+ * @author JBoss Inc.
+ */
+/*
+ * Copyright (C) 2001, 2002,
+ *
+ * Hewlett-Packard Arjuna Labs,
+ * Newcastle upon Tyne,
+ * Tyne and Wear,
+ * UK.  
+ *
+ * $Id: Implementations.java 2342 2006-03-30 13:06:17Z  $
+ */
+
+package com.arjuna.mwlabs.wst.at.recovery;
+
+import com.arjuna.ats.arjuna.gandiva.inventory.Inventory;
+
+/*
+ * Slightly different for historical reasons.
+ */
+
+public class Implementations
+{
+
+	public static synchronized boolean added ()
+	{
+		return _added;
+	}
+
+	public static synchronized void initialise ()
+	{
+		if (!_added)
+		{
+			/*
+			 * Now add various abstract records which crash recovery needs.
+			 */
+
+			Inventory.inventory().addToList(new ParticipantRecordSetup());
+
+			_added = true;
+		}
+	}
+
+	private Implementations ()
+	{
+	}
+
+	private static boolean _added = false;
+
+	static
+	{
+		initialise();
+	}
+
+}


Property changes on: labs/jbosstm/workspace/XTS_TX11/WSTX/classes/com/arjuna/mwlabs/wst/at/recovery/Implementations.java
___________________________________________________________________
Name: svn:keywords
   + Rev Date
Name: svn:eol-style
   + native

Added: labs/jbosstm/workspace/XTS_TX11/WSTX/classes/com/arjuna/mwlabs/wst/at/recovery/ParticipantRecordSetup.java
===================================================================
--- labs/jbosstm/workspace/XTS_TX11/WSTX/classes/com/arjuna/mwlabs/wst/at/recovery/ParticipantRecordSetup.java	                        (rev 0)
+++ labs/jbosstm/workspace/XTS_TX11/WSTX/classes/com/arjuna/mwlabs/wst/at/recovery/ParticipantRecordSetup.java	2007-08-14 12:43:41 UTC (rev 14200)
@@ -0,0 +1,83 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag.  All rights reserved. 
+ * See the copyright.txt in the distribution for a full listing 
+ * of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU General Public License, v. 2.0.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A 
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+ * PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+ * You should have received a copy of the GNU General Public License,
+ * v. 2.0 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+ * MA  02110-1301, USA.
+ * 
+ * (C) 2005-2006,
+ * @author JBoss Inc.
+ */
+/*
+ * Copyright (C) 2000,
+ *
+ * Arjuna Solutions Limited,
+ * Newcastle upon Tyne,
+ * Tyne and Wear,
+ * UK.  
+ *
+ * $Id: ResourceRecordSetup.java 2342 2006-03-30 13:06:17Z  $
+ */
+
+package com.arjuna.mwlabs.wst.at.recovery;
+
+import com.arjuna.ats.arjuna.gandiva.ClassName;
+import com.arjuna.ats.arjuna.gandiva.ObjectName;
+import com.arjuna.ats.arjuna.gandiva.inventory.InventoryElement;
+import com.arjuna.mwlabs.wscf.model.twophase.arjunacore.ParticipantRecord;
+
+public class ParticipantRecordSetup implements InventoryElement
+{
+
+	public ParticipantRecordSetup ()
+	{
+	}
+
+	public synchronized Object createVoid ()
+	{
+		return ParticipantRecord.create();
+	}
+
+	public synchronized Object createClassName (ClassName className)
+	{
+		return null;
+	}
+
+	public synchronized Object createObjectName (ObjectName objectName)
+	{
+		return null;
+	}
+
+	public synchronized Object createResources (Object[] resources)
+	{
+		return null;
+	}
+
+	public synchronized Object createClassNameResources (ClassName className,
+			Object[] resources)
+	{
+		return null;
+	}
+
+	public synchronized Object createObjectNameResources (ObjectName objectName, Object[] resources)
+	{
+		return null;
+	}
+
+	public ClassName className ()
+	{
+		return _className;
+	}
+
+	private static ClassName _className = new ClassName("WSATParticipantRecord");
+}


Property changes on: labs/jbosstm/workspace/XTS_TX11/WSTX/classes/com/arjuna/mwlabs/wst/at/recovery/ParticipantRecordSetup.java
___________________________________________________________________
Name: svn:keywords
   + Rev Date
Name: svn:eol-style
   + native

Added: labs/jbosstm/workspace/XTS_TX11/WSTX/classes/com/arjuna/mwlabs/wst/at/recovery/WSATRecoveryModule.java
===================================================================
--- labs/jbosstm/workspace/XTS_TX11/WSTX/classes/com/arjuna/mwlabs/wst/at/recovery/WSATRecoveryModule.java	                        (rev 0)
+++ labs/jbosstm/workspace/XTS_TX11/WSTX/classes/com/arjuna/mwlabs/wst/at/recovery/WSATRecoveryModule.java	2007-08-14 12:43:41 UTC (rev 14200)
@@ -0,0 +1,52 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and others contributors as indicated 
+ * by the @authors tag. All rights reserved. 
+ * See the copyright.txt in the distribution for a
+ * full listing of individual contributors. 
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License, v. 2.1.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A 
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+ * PARTICULAR PURPOSE.  See the GNU Lesser General Public License for more details.
+ * You should have received a copy of the GNU Lesser General Public License,
+ * v.2.1 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+ * MA  02110-1301, USA.
+ * 
+ * (C) 2005-2006,
+ * @author JBoss Inc.
+ */
+/*
+ * Copyright (C) 1999-2001 by HP Bluestone Software, Inc. All rights Reserved.
+ *
+ * HP Arjuna Labs,
+ * Newcastle upon Tyne,
+ * Tyne and Wear,
+ * UK.
+ *
+ * $Id: AtomicActionRecoveryModule.java 2342 2006-03-30 13:06:17Z  $
+ */
+
+package com.arjuna.mwlabs.wst.at.recovery;
+
+import com.arjuna.ats.internal.arjuna.recovery.AtomicActionRecoveryModule;
+
+import com.arjuna.mwlabs.wscf.model.twophase.arjunacore.ACCoordinator;
+
+/**
+ * This class is a plug-in module for the recovery manager.
+ * It is responsible for recovering failed WS-AT transactions.
+ */
+
+public class WSATRecoveryModule extends AtomicActionRecoveryModule
+{
+    public WSATRecoveryModule (String type)
+    {
+    		super(new ACCoordinator().type());
+    		
+    		Implementations.initialise();
+    }
+}
+


Property changes on: labs/jbosstm/workspace/XTS_TX11/WSTX/classes/com/arjuna/mwlabs/wst/at/recovery/WSATRecoveryModule.java
___________________________________________________________________
Name: svn:keywords
   + Rev Date
Name: svn:eol-style
   + native

Added: labs/jbosstm/workspace/XTS_TX11/WSTX/classes/com/arjuna/mwlabs/wst/at11/ContextFactoryImple.java
===================================================================
--- labs/jbosstm/workspace/XTS_TX11/WSTX/classes/com/arjuna/mwlabs/wst/at11/ContextFactoryImple.java	                        (rev 0)
+++ labs/jbosstm/workspace/XTS_TX11/WSTX/classes/com/arjuna/mwlabs/wst/at11/ContextFactoryImple.java	2007-08-14 12:43:41 UTC (rev 14200)
@@ -0,0 +1,264 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag.  All rights reserved. 
+ * See the copyright.txt in the distribution for a full listing 
+ * of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU General Public License, v. 2.0.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A 
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+ * PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+ * You should have received a copy of the GNU General Public License,
+ * v. 2.0 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+ * MA  02110-1301, USA.
+ * 
+ * (C) 2005-2006,
+ * @author JBoss Inc.
+ */
+/*
+ * Copyright (C) 2002,
+ *
+ * Arjuna Technologies Limited,
+ * Newcastle upon Tyne,
+ * Tyne and Wear,
+ * UK.
+ *
+ * $Id: ContextFactoryImple.java,v 1.16.4.1 2005/11/22 10:36:21 kconner Exp $
+ */
+
+package com.arjuna.mwlabs.wst.at11;
+
+import com.arjuna.mw.wsas.exceptions.NoActivityException;
+import com.arjuna.mw.wsas.exceptions.SystemException;
+import com.arjuna.mw.wscf.model.twophase.CoordinatorManagerFactory;
+import com.arjuna.mw.wscf.model.twophase.api.CoordinatorManager;
+import com.arjuna.mw.wstx.logging.wstxLogger;
+import com.arjuna.mwlabs.wscf.coordinator.LocalFactory;
+import com.arjuna.mwlabs.wscf.model.twophase.arjunacore.ACCoordinator;
+import com.arjuna.mwlabs.wscf.model.twophase.arjunacore.CoordinatorControl;
+import com.arjuna.mwlabs.wscf.model.twophase.arjunacore.CoordinatorServiceImple;
+import com.arjuna.mwlabs.wst.at11.context.JBossContextImple;
+import com.arjuna.mwlabs.wst.at11.participants.CleanupSynchronization;
+import com.arjuna.webservices.SoapRegistry;
+import com.arjuna.webservices.stax.URI;
+import com.arjuna.webservices.wsaddr2005.AttributedURIType;
+import com.arjuna.webservices.wsaddr2005.EndpointReferenceType;
+import com.arjuna.webservices.wsjboss.InstanceIdentifier;
+import com.arjuna.webservices.wsat11.AtomicTransactionConstants;
+import com.arjuna.webservices.wscoor11.AttributedUnsignedIntType;
+import com.arjuna.webservices.wscoor11.CoordinationConstants;
+import com.arjuna.webservices.wscoor11.CoordinationContextType;
+import com.arjuna.wsc.ContextFactory11;
+import com.arjuna.wsc.InvalidCreateParametersException;
+import com.arjuna.wsc.InvalidProtocolException;
+
+public class ContextFactoryImple implements ContextFactory11, LocalFactory
+{
+	public ContextFactoryImple ()
+	{
+		try
+		{
+			_coordManager = CoordinatorManagerFactory.coordinatorManager();
+
+            _theRegistrar = new RegistrarImple();
+		}
+		catch (Exception ex)
+		{
+			ex.printStackTrace();
+		}
+	}
+
+	/**
+	 * Called when a context factory is added to a context factory mapper. This
+	 * method will be called multiple times if the context factory is added to
+	 * multiple context factory mappers or to the same context mapper with
+	 * different protocol identifiers.
+	 * 
+	 * @param coordinationTypeURI
+	 *            the coordination type uri
+	 */
+	public void install(final String coordinationTypeURI)
+	{
+	}
+
+	// TODO interposition
+
+	/*
+	 * If there is a context passed through to create then this newly created
+	 * coordinator should be interposed.
+	 */
+
+	/**
+	 * Creates a coordination context.
+	 * 
+	 * @param coordinationTypeURI
+	 *            the coordination type uri
+	 * @param expires
+	 *            the expire date/time for the returned context, can be null
+	 * @param currentContext
+	 *            the current context, can be null
+	 * 
+	 * @return the created coordination context
+	 * 
+	 * @throws InvalidCreateParametersException
+	 *             if a parameter passed is invalid this activity identifier.
+	 * 
+	 * @message com.arjuna.mwlabs.wst.at11.ContextFactoryImple_1
+	 *          [com.arjuna.mwlabs.wst.at11.ContextFactoryImple_1] - Invalid type
+	 *          URI: < {0} , {1} >
+	 * @message com.arjuna.mwlabs.wst.at11.ContextFactoryImple_3
+	 *          [com.arjuna.mwlabs.wst.at11.ContextFactoryImple_3] - Invalid type
+	 *          URI:
+	 */
+
+	public CoordinationContextType create (final String coordinationTypeURI, final Long expires,
+            final CoordinationContextType currentContext)
+			throws InvalidCreateParametersException
+	{
+		if (coordinationTypeURI.equals(AtomicTransactionConstants.WSAT_PROTOCOL))
+		{
+			try
+			{
+				// make sure no transaction is currently associated
+
+				_coordManager.suspend();
+
+				final int timeout ;
+                if (expires == null)
+                {
+                    timeout = 0 ;
+                }
+                else
+                {
+                    final long timeoutVal = expires.longValue() ;
+                    timeout = (timeoutVal > Integer.MAX_VALUE ? Integer.MAX_VALUE : (int)timeoutVal) ;
+                }
+
+				_coordManager.begin(timeout);
+				
+                final JBossContextImple arjunaContext = JBossContextImple.getContext() ;
+                final SoapRegistry soapRegistry = SoapRegistry.getRegistry() ;
+                final String registrationCoordinatorURI = soapRegistry.getServiceURI(CoordinationConstants.SERVICE_REGISTRATION_COORDINATOR) ;
+                
+                final CoordinationContextType coordinationContext = new CoordinationContextType() ;
+                coordinationContext.setCoordinationType(new URI(coordinationTypeURI)) ;
+                coordinationContext.setIdentifier(new AttributedURIType("urn:"+arjunaContext.getTransactionIdentifier())) ;
+                final int transactionExpires = arjunaContext.getTransactionExpires() ;
+                if (transactionExpires > 0)
+                {
+                    coordinationContext.setExpires(new AttributedUnsignedIntType(transactionExpires)) ;
+                }
+                final EndpointReferenceType registrationCoordinator = new EndpointReferenceType(new AttributedURIType(registrationCoordinatorURI)) ;
+                InstanceIdentifier.setEndpointInstanceIdentifier(registrationCoordinator, arjunaContext.getTransactionIdentifier()) ;
+                coordinationContext.setRegistrationService(registrationCoordinator) ;
+
+				/*
+				 * Now add the registrar for this specific coordinator to the
+				 * mapper.
+				 */
+
+				_coordManager.enlistSynchronization(new CleanupSynchronization(_coordManager.identifier().toString(), _theRegistrar));
+
+				/*
+				 * TODO Uughh! This does a suspend for us! Left over from original
+				 * WS-AS stuff.
+				 * 
+				 * TODO
+				 * REFACTOR, REFACTOR, REFACTOR.
+				 */
+				
+				_theRegistrar.associate();
+
+				return coordinationContext;
+			}
+			catch (com.arjuna.mw.wsas.exceptions.NoActivityException ex)
+			{
+				ex.printStackTrace();
+				
+				throw new InvalidCreateParametersException();
+			}
+			catch (com.arjuna.mw.wsas.exceptions.SystemException ex)
+			{
+				ex.printStackTrace();
+			}
+			catch (com.arjuna.mw.wsas.exceptions.WrongStateException ex)
+			{
+				ex.printStackTrace();
+				
+				throw new InvalidCreateParametersException();
+			}
+			catch (Exception ex)
+			{
+				// TODO handle properly
+
+				ex.printStackTrace();
+			}
+		}
+		else
+		{
+			wstxLogger.arjLoggerI18N.warn("com.arjuna.mwlabs.wst.at11.ContextFactoryImple_1", new Object[]
+			{ AtomicTransactionConstants.WSAT_PROTOCOL, coordinationTypeURI });
+
+			throw new InvalidCreateParametersException(
+					wstxLogger.log_mesg.getString("com.arjuna.mwlabs.wst.at11.ContextFactoryImple_3")
+							+ " < "
+							+ AtomicTransactionConstants.WSAT_PROTOCOL
+							+ ", "
+							+ coordinationTypeURI + " >");
+		}
+
+		return null;
+	}
+
+	/**
+	 * Called when a context factory is removed from a context factory mapper.
+	 * This method will be called multiple times if the context factory is
+	 * removed from multiple context factory mappers or from the same context
+	 * factory mapper with different coordination type uris.
+	 * 
+	 * @param coordinationTypeURI
+	 *            the coordination type uri
+	 */
+
+	public void uninstall (final String coordinationTypeURI)
+	{
+		// we don't use this as one implementation is registered per type
+	}
+
+	public final Object createSubordinate () throws NoActivityException, InvalidProtocolException, SystemException
+	{
+		try
+		{
+			CoordinatorServiceImple coordManager = (CoordinatorServiceImple) _coordManager;
+			CoordinatorControl theControl = coordManager.coordinatorControl();
+			ACCoordinator subordinateTransaction = theControl.createSubordinate();
+			
+			/*
+			 * Now add the registrar for this specific coordinator to the
+			 * mapper.
+			 */
+
+			subordinateTransaction.enlistSynchronization(new CleanupSynchronization(subordinateTransaction.get_uid().stringForm(), _theRegistrar));
+
+			_theRegistrar.associate(subordinateTransaction);
+			
+			return subordinateTransaction;
+		}
+		catch (Exception ex)
+		{
+			throw new SystemException(ex.toString());
+		}
+	}
+	
+	public final RegistrarImple registrar ()
+	{
+		return _theRegistrar;
+	}
+
+	private CoordinatorManager _coordManager;
+	private RegistrarImple _theRegistrar;
+
+}


Property changes on: labs/jbosstm/workspace/XTS_TX11/WSTX/classes/com/arjuna/mwlabs/wst/at11/ContextFactoryImple.java
___________________________________________________________________
Name: svn:keywords
   + Rev Date
Name: svn:eol-style
   + native

Added: labs/jbosstm/workspace/XTS_TX11/WSTX/classes/com/arjuna/mwlabs/wst/at11/ContextImple.java
===================================================================
--- labs/jbosstm/workspace/XTS_TX11/WSTX/classes/com/arjuna/mwlabs/wst/at11/ContextImple.java	                        (rev 0)
+++ labs/jbosstm/workspace/XTS_TX11/WSTX/classes/com/arjuna/mwlabs/wst/at11/ContextImple.java	2007-08-14 12:43:41 UTC (rev 14200)
@@ -0,0 +1,75 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag.  All rights reserved. 
+ * See the copyright.txt in the distribution for a full listing 
+ * of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU General Public License, v. 2.0.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A 
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+ * PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+ * You should have received a copy of the GNU General Public License,
+ * v. 2.0 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+ * MA  02110-1301, USA.
+ * 
+ * (C) 2005-2006,
+ * @author JBoss Inc.
+ */
+/*
+ * Copyright (C) 2002,
+ *
+ * Arjuna Technologies Limited,
+ * Newcastle upon Tyne,
+ * Tyne and Wear,
+ * UK.
+ *
+ * $Id: ContextImple.java,v 1.13.4.1 2005/11/22 10:36:21 kconner Exp $
+ */
+
+package com.arjuna.mwlabs.wst.at11;
+
+import com.arjuna.mw.wsc.context.Context11;
+import com.arjuna.webservices.wscoor11.CoordinationContextType;
+
+public class ContextImple implements Context11
+{
+
+	public ContextImple (final CoordinationContextType ctx)
+	{
+		_coordContext = ctx;
+	}
+
+	public boolean equals (Object obj)
+	{
+		if (obj instanceof ContextImple)
+		{
+			ContextImple ci = (ContextImple) obj;
+
+			return ci.getCoordinationContext().getIdentifier().getValue().equals(_coordContext.getIdentifier().getValue());
+		}
+		else
+			return false;
+	}
+
+	public CoordinationContextType getCoordinationContext ()
+	{
+		return _coordContext;
+	}
+
+	public void setCoordinationContext (CoordinationContextType cc)
+	{
+		_coordContext = cc;
+	}
+
+	public String toString ()
+	{
+		// return DomUtil.nodeAsString(toXML());
+
+		return "AtomicTransactionIdentifier: " + _coordContext.getIdentifier().getValue();
+	}
+
+	private CoordinationContextType _coordContext;
+}


Property changes on: labs/jbosstm/workspace/XTS_TX11/WSTX/classes/com/arjuna/mwlabs/wst/at11/ContextImple.java
___________________________________________________________________
Name: svn:keywords
   + Rev Date
Name: svn:eol-style
   + native

Added: labs/jbosstm/workspace/XTS_TX11/WSTX/classes/com/arjuna/mwlabs/wst/at11/RegistrarImple.java
===================================================================
--- labs/jbosstm/workspace/XTS_TX11/WSTX/classes/com/arjuna/mwlabs/wst/at11/RegistrarImple.java	                        (rev 0)
+++ labs/jbosstm/workspace/XTS_TX11/WSTX/classes/com/arjuna/mwlabs/wst/at11/RegistrarImple.java	2007-08-14 12:43:41 UTC (rev 14200)
@@ -0,0 +1,350 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag.  All rights reserved. 
+ * See the copyright.txt in the distribution for a full listing 
+ * of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU General Public License, v. 2.0.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A 
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+ * PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+ * You should have received a copy of the GNU General Public License,
+ * v. 2.0 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+ * MA  02110-1301, USA.
+ * 
+ * (C) 2005-2006,
+ * @author JBoss Inc.
+ */
+/*
+ * Copyright (C) 2002,
+ *
+ * Arjuna Technologies Limited,
+ * Newcastle upon Tyne,
+ * Tyne and Wear,
+ * UK.
+ *
+ * $Id: RegistrarImple.java,v 1.20.4.1 2005/11/22 10:36:21 kconner Exp $
+ */
+
+package com.arjuna.mwlabs.wst.at11;
+
+import java.util.HashMap;
+
+import com.arjuna.ats.arjuna.common.Uid;
+import com.arjuna.mw.wsas.activity.ActivityHierarchy;
+import com.arjuna.mw.wsas.exceptions.SystemException;
+import com.arjuna.mw.wscf.exceptions.ProtocolNotRegisteredException;
+import com.arjuna.mw.wscf.model.twophase.CoordinatorManagerFactory;
+import com.arjuna.mw.wscf.model.twophase.api.CoordinatorManager;
+import com.arjuna.mw.wstx.logging.wstxLogger;
+import com.arjuna.mwlabs.wscf.model.twophase.arjunacore.ACCoordinator;
+import com.arjuna.mwlabs.wscf.model.twophase.arjunacore.subordinate.SubordinateCoordinator;
+import com.arjuna.mwlabs.wst.at11.participants.CompletionCoordinatorImple;
+import com.arjuna.mwlabs.wst.at11.participants.DurableTwoPhaseCommitParticipant;
+import com.arjuna.mwlabs.wst.at11.participants.VolatileTwoPhaseCommitParticipant;
+import com.arjuna.webservices.SoapRegistry;
+import com.arjuna.webservices.wsaddr2005.AttributedURIType;
+import com.arjuna.webservices.wsaddr2005.EndpointReferenceType;
+import com.arjuna.webservices.wsjboss.InstanceIdentifier;
+import com.arjuna.webservices.wsat11.AtomicTransactionConstants;
+import com.arjuna.webservices.wsat11.processors.CompletionCoordinatorProcessor;
+import com.arjuna.wsc.AlreadyRegisteredException;
+import com.arjuna.wsc.CannotRegisterParticipantException;
+import com.arjuna.wsc.InvalidProtocolException;
+import com.arjuna.wsc.InvalidStateException;
+import com.arjuna.wsc.NoActivityException;
+import com.arjuna.wsc.Registrar11;
+import com.arjuna.wsc.RegistrarMapper11;
+import com.arjuna.wst.CompletionCoordinatorParticipant;
+import com.arjuna.wst.stub.Durable2PC11Stub;
+import com.arjuna.wst.stub.Volatile2PC11Stub;
+
+/*
+ * TODO
+ * 
+ * This entire architecture needs reworking. The WSAS and WSCF modules are based
+ * on the original pre-WS-CAF work and now out-of-date. They are more generic
+ * than required and pass through so many different levels of indirection that
+ * it confuses the code path and makes it difficult to see what is going on.
+ * 
+ * The notion of an activity is fine in the general context of WS-CAF and
+ * WS-C/Tx, but within the implementation, it causes us to do too much
+ * thread-to-activity related work. It would be like having to go through the JTA
+ * UT and TM interfaces in order to do anywork on the transaction!
+ */
+
+public class RegistrarImple implements Registrar11
+{
+	public RegistrarImple ()
+        throws ProtocolNotRegisteredException, SystemException
+	{
+		_coordManager = CoordinatorManagerFactory.coordinatorManager();
+
+		// register with mapper using tx id as protocol identifier.
+        final RegistrarMapper11 mapper = RegistrarMapper11.getFactory() ;
+
+		mapper.addRegistrar(AtomicTransactionConstants.WSAT_SUB_PROTOCOL_DURABLE_2PC, this);
+		mapper.addRegistrar(AtomicTransactionConstants.WSAT_SUB_PROTOCOL_VOLATILE_2PC, this);
+		mapper.addRegistrar(AtomicTransactionConstants.WSAT_SUB_PROTOCOL_COMPLETION, this);
+	}
+
+	/**
+	 * Called when a registrar is added to a register mapper. This method will
+	 * be called multiple times if the registrar is added to multiple register
+	 * mappers or to the same register mapper with different protocol
+	 * identifiers.
+	 * 
+	 * @param serviceAddress
+	 *            the address of the service
+	 * @param protocolIdentifier
+	 *            the protocol identifier
+	 */
+
+	public void install (final String protocolIdentifier)
+	{
+	}
+
+	/**
+	 * Registers the interest of participant in a particular protocol.
+	 * 
+	 * @param participantProtocolServiceAddress
+	 *            the address of the participant protocol service
+	 * @param protocolIdentifier
+	 *            the protocol identifier
+	 * 
+	 * @return the PortReference of the coordinator protocol service
+	 * 
+	 * @throws AlreadyRegisteredException
+	 *             if the participant is already registered for this
+	 *             coordination protocol under this activity identifier
+	 * @throws InvalidProtocolException
+	 *             if the coordination protocol is not supported
+	 * @throws InvalidStateException
+	 *             if the state of the coordinator no longer allows registration
+	 *             for this coordination protocol
+	 * @throws NoActivityException
+	 *             if the activity does not exist.
+	 * 
+	 * @message com.arjuna.mwlabs.wst.at11.RegistrarImple_1
+	 *          [com.arjuna.mwlabs.wst.at11.Registrar_1] - Invalid type URI: < {0} ,
+	 *          {1} >
+	 */
+
+	/*
+	 * TODO
+	 * 
+	 * See comment at head of class definition. We shouldn't have to rely on
+	 * thread-to-activity association to register a participant. We currently do
+	 * because the code is based on old WS-CAF models that are no longer
+	 * applicable. This needs updating!
+	 */
+	public EndpointReferenceType register(final EndpointReferenceType participantProtocolService,
+        final String protocolIdentifier, final InstanceIdentifier instanceIdentifier)
+			throws CannotRegisterParticipantException, InvalidProtocolException,
+			InvalidStateException, NoActivityException
+	{
+		Object tx = _hierarchies.get(instanceIdentifier.getInstanceIdentifier());
+		
+		if (tx instanceof SubordinateCoordinator)
+			return registerWithSubordinate((SubordinateCoordinator)tx, participantProtocolService, protocolIdentifier);
+
+		ActivityHierarchy hier = (ActivityHierarchy) tx;
+
+		if (hier == null)
+			throw new NoActivityException();
+
+		try
+		{
+			_coordManager.resume(hier);
+		}
+		catch (com.arjuna.mw.wsas.exceptions.InvalidActivityException ex)
+		{
+			throw new NoActivityException();
+		}
+		catch (com.arjuna.mw.wsas.exceptions.SystemException ex)
+		{
+			throw new InvalidProtocolException();
+		}
+
+		// TODO check for AlreadyRegisteredException
+
+		if (AtomicTransactionConstants.WSAT_SUB_PROTOCOL_DURABLE_2PC.equals(protocolIdentifier))
+		{
+			// enlist participant that wraps the requester URI.
+			final String participantId = "D" + new Uid().stringForm();
+
+			try
+			{
+                final Durable2PC11Stub participantStub = new Durable2PC11Stub(participantId, participantProtocolService) ;
+				_coordManager.enlistParticipant(new DurableTwoPhaseCommitParticipant(participantStub, participantId));
+
+				_coordManager.suspend();
+
+				return getCoordinator(participantId) ;
+			}
+			catch (Exception ex)
+			{
+				throw new InvalidStateException();
+			}
+		}
+		else if (AtomicTransactionConstants.WSAT_SUB_PROTOCOL_VOLATILE_2PC.equals(protocolIdentifier))
+		{
+			// enlist participant that wraps the requester URI.
+			final String participantId = "V" + new Uid().stringForm();
+
+			try
+			{
+                final Volatile2PC11Stub participantStub = new Volatile2PC11Stub(participantId, participantProtocolService) ;
+				_coordManager.enlistSynchronization(new VolatileTwoPhaseCommitParticipant(participantStub)) ;
+
+				_coordManager.suspend();
+
+				return getCoordinator(participantId) ;
+			}
+			catch (Exception ex)
+			{
+				throw new InvalidStateException();
+			}
+		}
+		else if (AtomicTransactionConstants.WSAT_SUB_PROTOCOL_COMPLETION.equals(protocolIdentifier))
+		{
+			try
+			{
+                final CompletionCoordinatorParticipant participant = new CompletionCoordinatorImple(_coordManager, hier, true) ;
+                CompletionCoordinatorProcessor.getProcessor().activateParticipant(participant, instanceIdentifier.getInstanceIdentifier()) ;
+
+				_coordManager.suspend();
+
+				return getCompletionCoordinator(instanceIdentifier) ;
+			}
+			catch (Exception ex)
+			{
+				ex.printStackTrace();
+
+				throw new InvalidStateException(ex.toString());
+			}
+		}
+		else
+		{
+			wstxLogger.arjLoggerI18N.warn("com.arjuna.mwlabs.wst.at11.RegistrarImple_1", new Object[]
+			{ AtomicTransactionConstants.WSAT_PROTOCOL, protocolIdentifier });
+
+			throw new InvalidProtocolException();
+		}
+	}
+
+    /**
+	 * Called when a registrar is removed from a register mapper. This method
+	 * will be called multiple times if the registrar is removed from multiple
+	 * register mappers or from the same register mapper with different protocol
+	 * identifiers.
+	 * 
+	 * @param serviceAddress
+	 *            the address of the service
+	 * @param protocolIdentifier
+	 *            the protocol identifier
+	 */
+	public void uninstall(final String protocolIdentifier)
+	{
+	}
+
+	public final void associate () throws Exception
+	{
+		// TODO colocation won't do suspend
+
+		String txIdentifier = _coordManager.identifier().toString();
+		ActivityHierarchy hier = _coordManager.suspend();
+
+		_hierarchies.put(txIdentifier, hier);
+	}
+
+	public final void associate (ACCoordinator transaction) throws Exception
+	{
+		String txIdentifier = transaction.get_uid().stringForm();
+		
+		_hierarchies.put(txIdentifier, transaction);
+	}
+
+	public final void disassociate (String txIdentifier) throws Exception
+	{
+		_hierarchies.remove(txIdentifier);
+	}
+
+	private final EndpointReferenceType registerWithSubordinate(final SubordinateCoordinator theTx,
+        final EndpointReferenceType participantProtocolService, final String protocolIdentifier)
+			throws CannotRegisterParticipantException, InvalidProtocolException,
+			InvalidStateException, NoActivityException
+    {
+		if (AtomicTransactionConstants.WSAT_SUB_PROTOCOL_DURABLE_2PC.equals(protocolIdentifier))
+		{
+			// enlist participant that wraps the requester URI.
+            final String participantId = "D" + new Uid().stringForm();
+
+            try
+            {
+                final Durable2PC11Stub participantStub = new Durable2PC11Stub(participantId, participantProtocolService) ;
+                theTx.enlistParticipant(new DurableTwoPhaseCommitParticipant(participantStub, participantId));
+
+                return getCoordinator(participantId) ;
+            }
+            catch (Exception ex)
+            {
+                throw new InvalidStateException();
+            }
+		}
+		else if (AtomicTransactionConstants.WSAT_SUB_PROTOCOL_VOLATILE_2PC.equals(protocolIdentifier))
+		{
+			// enlist participant that wraps the requester URI.
+            final String participantId = "V" + new Uid().stringForm();
+
+            try
+            {
+                final Volatile2PC11Stub participantStub = new Volatile2PC11Stub(participantId, participantProtocolService) ;
+                theTx.enlistSynchronization(new VolatileTwoPhaseCommitParticipant(participantStub)) ;
+
+                return getCoordinator(participantId) ;
+            }
+            catch (Exception ex)
+            {
+                throw new InvalidStateException();
+            }
+		}
+		else if (AtomicTransactionConstants.WSAT_SUB_PROTOCOL_COMPLETION.equals(protocolIdentifier))
+		{
+			// not allowed for subordinate transactions!
+			
+			throw new InvalidStateException();
+		}
+		else
+		{
+			wstxLogger.arjLoggerI18N.warn("com.arjuna.mwlabs.wst.at11.RegistrarImple_1", new Object[]
+			{ AtomicTransactionConstants.WSAT_PROTOCOL, protocolIdentifier });
+
+			throw new InvalidProtocolException();
+		}
+	}
+
+    private EndpointReferenceType getCompletionCoordinator(final InstanceIdentifier instanceIdentifier)
+    {
+        final SoapRegistry soapRegistry = SoapRegistry.getRegistry() ;
+        final String completionCoordinatorURI = soapRegistry.getServiceURI(AtomicTransactionConstants.SERVICE_COMPLETION_COORDINATOR) ;
+        final EndpointReferenceType completionCoordinator = new EndpointReferenceType(new AttributedURIType(completionCoordinatorURI)) ;
+        InstanceIdentifier.setEndpointInstanceIdentifier(completionCoordinator, instanceIdentifier) ;
+        return completionCoordinator ;
+    }
+
+    private EndpointReferenceType getCoordinator(final String participantId)
+    {
+        final SoapRegistry soapRegistry = SoapRegistry.getRegistry() ;
+        final String coordinatorURI = soapRegistry.getServiceURI(AtomicTransactionConstants.SERVICE_COORDINATOR) ;
+        final EndpointReferenceType coordinator = new EndpointReferenceType(new AttributedURIType(coordinatorURI)) ;
+        InstanceIdentifier.setEndpointInstanceIdentifier(coordinator, participantId) ;
+        return coordinator ;
+    }
+
+	private CoordinatorManager _coordManager = null;
+	private HashMap _hierarchies = new HashMap();
+}


Property changes on: labs/jbosstm/workspace/XTS_TX11/WSTX/classes/com/arjuna/mwlabs/wst/at11/RegistrarImple.java
___________________________________________________________________
Name: svn:keywords
   + Rev Date
Name: svn:eol-style
   + native

Added: labs/jbosstm/workspace/XTS_TX11/WSTX/classes/com/arjuna/mwlabs/wst/at11/context/DeploymentContextImple.java
===================================================================
--- labs/jbosstm/workspace/XTS_TX11/WSTX/classes/com/arjuna/mwlabs/wst/at11/context/DeploymentContextImple.java	                        (rev 0)
+++ labs/jbosstm/workspace/XTS_TX11/WSTX/classes/com/arjuna/mwlabs/wst/at11/context/DeploymentContextImple.java	2007-08-14 12:43:41 UTC (rev 14200)
@@ -0,0 +1,54 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag.  All rights reserved. 
+ * See the copyright.txt in the distribution for a full listing 
+ * of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU General Public License, v. 2.0.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A 
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+ * PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+ * You should have received a copy of the GNU General Public License,
+ * v. 2.0 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+ * MA  02110-1301, USA.
+ * 
+ * (C) 2005-2006,
+ * @author JBoss Inc.
+ */
+/*
+ * Copyright (C) 2002,
+ *
+ * Arjuna Technologies Limited,
+ * Newcastle upon Tyne,
+ * Tyne and Wear,
+ * UK.
+ *
+ * $Id: DeploymentContextImple.java,v 1.1.24.1 2005/11/22 10:36:15 kconner Exp $
+ */
+
+package com.arjuna.mwlabs.wst.at11.context;
+
+import com.arjuna.mw.wsas.context.*;
+
+/**
+ * @author Mark Little (mark at arjuna.com)
+ * @version $Id: DeploymentContextImple.java,v 1.1.24.1 2005/11/22 10:36:15 kconner Exp $
+ * @since 1.0.
+ */
+
+public class DeploymentContextImple implements DeploymentContext
+{
+
+    public DeploymentContextImple ()
+    {
+    }
+    
+    public Context context ()
+    {
+        return JBossContextImple.getContext() ;
+    }
+
+}


Property changes on: labs/jbosstm/workspace/XTS_TX11/WSTX/classes/com/arjuna/mwlabs/wst/at11/context/DeploymentContextImple.java
___________________________________________________________________
Name: svn:keywords
   + Rev Date
Name: svn:eol-style
   + native

Added: labs/jbosstm/workspace/XTS_TX11/WSTX/classes/com/arjuna/mwlabs/wst/at11/context/JBossContextImple.java
===================================================================
--- labs/jbosstm/workspace/XTS_TX11/WSTX/classes/com/arjuna/mwlabs/wst/at11/context/JBossContextImple.java	                        (rev 0)
+++ labs/jbosstm/workspace/XTS_TX11/WSTX/classes/com/arjuna/mwlabs/wst/at11/context/JBossContextImple.java	2007-08-14 12:43:41 UTC (rev 14200)
@@ -0,0 +1,258 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag.  All rights reserved. 
+ * See the copyright.txt in the distribution for a full listing 
+ * of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU General Public License, v. 2.0.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A 
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+ * PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+ * You should have received a copy of the GNU General Public License,
+ * v. 2.0 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+ * MA  02110-1301, USA.
+ * 
+ * (C) 2005-2006,
+ * @author JBoss Inc.
+ */
+/*
+ * Copyright (C) 2002,
+ *
+ * Arjuna Technologies Limited,
+ * Newcastle upon Tyne,
+ * Tyne and Wear,
+ * UK.
+ *
+ * $Id: JBossContextImple.java,v 1.11.4.1 2005/11/22 10:36:15 kconner Exp $
+ */
+
+package com.arjuna.mwlabs.wst.at11.context;
+
+import javax.xml.parsers.DocumentBuilder;
+
+import org.w3c.dom.Element;
+
+import com.arjuna.ats.arjuna.coordinator.ActionHierarchy;
+import com.arjuna.mw.wsas.UserActivityFactory;
+import com.arjuna.mw.wsas.activity.ActivityHierarchy;
+import com.arjuna.mw.wsas.context.Context;
+import com.arjuna.mw.wsas.context.ContextManager;
+import com.arjuna.mw.wsas.context.soap.SOAPContext;
+import com.arjuna.mw.wsas.exceptions.SystemException;
+import com.arjuna.mw.wscf.utils.DomUtil;
+import com.arjuna.mw.wstx.logging.wstxLogger;
+import com.arjuna.mwlabs.wscf.model.twophase.arjunacore.ACCoordinator;
+import com.arjuna.webservices.wsat11.AtomicTransactionConstants;
+import com.arjuna.webservices.wscoor11.CoordinationConstants;
+
+/**
+ * On demand this class creates the SOAP context information necessary to
+ * propagate the hierarchy of coordinators associated with the current thread.
+ * 
+ * @author Mark Little (mark.little at arjuna.com)
+ * @version $Id: ArjunaContextImple.java,v 1.11.4.1 2005/11/22 10:36:15 kconner Exp $
+ */
+
+public class JBossContextImple implements SOAPContext
+{
+
+	public JBossContextImple ()
+	{
+		_context = null;
+	}
+
+	public JBossContextImple (ACCoordinator currentCoordinator)
+	{
+		_context = null;
+
+		initialiseContext(currentCoordinator);
+	}
+    
+    /**
+     * Serialise the SOAP context into a DOM node.
+     * @param element The element to contain the serialisation.
+     * @return the element added.
+     */
+    public Element serialiseToElement(final Element element)
+    {
+        final Element context = context() ;
+        element.appendChild(context) ;
+        return context ;
+    }
+
+	public void initialiseContext(Object param)
+			throws java.security.InvalidParameterException
+	{
+		try
+		{
+			ACCoordinator currentCoordinator = (ACCoordinator) param;
+            
+			ActivityHierarchy hier = null;
+
+			try
+			{
+				hier = UserActivityFactory.userActivity().currentActivity();
+			}
+			catch (SystemException ex)
+			{
+				ex.printStackTrace();
+			}
+
+			if ((currentCoordinator != null) && (hier != null))
+			{
+				/*
+				 * Do the manditory stuff first.
+				 */
+
+				ActionHierarchy txHier = currentCoordinator.getHierarchy();
+                final int depth = txHier.depth() ;
+                _identifierValues = new String[depth] ;
+                _expiresValues = new int[depth] ;
+                
+                _identifierValues[0] = txHier.getDeepestActionUid().stringForm() ;
+                _expiresValues[0] = hier.activity(hier.size()-1).getTimeout() ;
+                
+				/*
+				 * Now let's do the optional stuff.
+				 */
+                for(int count = 1, index = 0 ; count < depth ; count++, index++)
+                {
+                    _identifierValues[count] = txHier.getActionUid(index).stringForm() ;
+                    _expiresValues[count] = hier.activity(index).getTimeout() ;
+                }
+			}
+		}
+		catch (ClassCastException ex)
+		{
+			throw new java.security.InvalidParameterException();
+		}
+	}
+    
+    /**
+     * @return the context document object.
+     */
+    private synchronized Element context()
+    {
+        if (_context == null)
+        {
+            DocumentBuilder builder = com.arjuna.mw.wscf.utils.DomUtil.getDocumentBuilder();
+            org.w3c.dom.Document doc = builder.newDocument();
+
+            _context = doc.createElement("wscoor:" + _contextName);
+
+            _context.setAttribute("xmlns:wsu", _wsuNamespace);
+            _context.setAttribute("xmlns:wscoor", _wscoorNamespace);
+            _context.setAttribute("xmlns:arjuna", _arjunaNamespace);
+            
+            if (_identifierValues != null)
+            {
+                /*
+                 * Do the manditory stuff first.
+                 */
+
+                org.w3c.dom.Element identifier = doc.createElement("wsu:"+_identifier);
+                identifier.appendChild(doc.createTextNode(_identifierValues[0]));
+                
+                _context.appendChild(identifier);
+
+                org.w3c.dom.Element expires = doc.createElement("wsu:"+_expires);
+                expires.appendChild(doc.createTextNode(Integer.toString(_expiresValues[0])));
+
+                _context.appendChild(expires);
+
+                org.w3c.dom.Element coordinationType = doc.createElement("wscoor:CoordinationType");
+                coordinationType.appendChild(doc.createTextNode(AtomicTransactionConstants.WSAT_PROTOCOL));
+    
+                _context.appendChild(coordinationType);
+                
+                /*
+                 * Now let's do the optional stuff.
+                 */
+                final int depth = _identifierValues.length ;
+                if (depth > 1)
+                {
+                    org.w3c.dom.Element extensionRoot = doc.createElement("arjuna:"+_contextName);
+    
+                    for(int count = 1 ; count < depth ; count++)
+                    {
+                        identifier = doc.createElement("arjuna:"+_identifier);
+                        identifier.appendChild(doc.createTextNode(_identifierValues[count]));
+        
+                        extensionRoot.appendChild(identifier);
+                        
+                        expires = doc.createElement("arjuna:"+_expires);
+                        expires.appendChild(doc.createTextNode(Integer.toString(_expiresValues[count])));
+        
+                        extensionRoot.appendChild(expires);
+                    }
+
+                    _context.appendChild(extensionRoot);
+                }
+            }
+        }
+        
+        return _context ;
+    }
+
+	public String identifier ()
+	{
+		return JBossContextImple.class.getName();
+	}
+    
+    public String getTransactionIdentifier()
+    {
+        return _identifierValues[0] ;
+    }
+    
+    public int getTransactionExpires()
+    {
+        return _expiresValues[0] ;
+    }
+
+	public String toString ()
+	{
+		return DomUtil.nodeAsString(_context);
+	}
+
+    /**
+     * @message com.arjuna.mwlabs.wst.at11.context.JBossContextImple_1 [com.arjuna.mwlabs.wst.at11.context.JBossContextImple_1] - ignoring context: 
+     */
+    public static JBossContextImple getContext()
+    {
+        ContextManager cxman = new ContextManager();
+        Context[] contexts = cxman.contexts();
+
+        for (int i = 0; i < contexts.length; i++)
+        {
+            if (contexts[i].identifier().equals(JBossContextImple.class.getName()))
+            {
+                if (contexts[i] instanceof JBossContextImple)
+                {
+                    return (JBossContextImple)contexts[i] ;
+                }
+                else
+                {
+                    wstxLogger.arjLoggerI18N.warn("com.arjuna.mwlabs.wst.at11.context.JBossContextImple_1",
+                            new Object[]{contexts[i]});
+                }
+                break;
+            }
+        }
+        return null ;
+    }
+    
+	private org.w3c.dom.Element _context;
+    private String[] _identifierValues ;
+    private int[] _expiresValues ;
+
+	private static final String _wscoorNamespace = CoordinationConstants.WSCOOR_NAMESPACE;
+	private static final String _wsuNamespace = "http://schemas.xmlsoap.org/ws/2002/07/utility";
+	private static final String _arjunaNamespace = "http://arjuna.com/schemas/wsc/2003/01/extension";
+	private static final String _contextName = CoordinationConstants.WSCOOR_ELEMENT_COORDINATION_CONTEXT;
+	private static final String _identifier = CoordinationConstants.WSCOOR_ELEMENT_IDENTIFIER;
+	private static final String _expires = CoordinationConstants.WSCOOR_ELEMENT_EXPIRES;
+
+}


Property changes on: labs/jbosstm/workspace/XTS_TX11/WSTX/classes/com/arjuna/mwlabs/wst/at11/context/JBossContextImple.java
___________________________________________________________________
Name: svn:keywords
   + Rev Date
Name: svn:eol-style
   + native

Added: labs/jbosstm/workspace/XTS_TX11/WSTX/classes/com/arjuna/mwlabs/wst/at11/context/TxContextImple.java
===================================================================
--- labs/jbosstm/workspace/XTS_TX11/WSTX/classes/com/arjuna/mwlabs/wst/at11/context/TxContextImple.java	                        (rev 0)
+++ labs/jbosstm/workspace/XTS_TX11/WSTX/classes/com/arjuna/mwlabs/wst/at11/context/TxContextImple.java	2007-08-14 12:43:41 UTC (rev 14200)
@@ -0,0 +1,96 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag.  All rights reserved. 
+ * See the copyright.txt in the distribution for a full listing 
+ * of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU General Public License, v. 2.0.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A 
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+ * PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+ * You should have received a copy of the GNU General Public License,
+ * v. 2.0 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+ * MA  02110-1301, USA.
+ * 
+ * (C) 2005-2006,
+ * @author JBoss Inc.
+ */
+/*
+ * Copyright (C) 2002,
+ *
+ * Arjuna Technologies Limited,
+ * Newcastle upon Tyne,
+ * Tyne and Wear,
+ * UK.
+ *
+ * $Id: TxContextImple.java,v 1.8.4.1 2005/11/22 10:36:15 kconner Exp $
+ */
+
+package com.arjuna.mwlabs.wst.at11.context;
+
+import com.arjuna.mw.wsc.context.Context11;
+import com.arjuna.mw.wst.TxContext;
+import com.arjuna.mwlabs.wst.at11.ContextImple;
+import com.arjuna.webservices.wscoor11.CoordinationContextType;
+
+/**
+ * @author Mark Little (mark.little at arjuna.com)
+ * @version $Id: TxContextImple.java,v 1.8.4.1 2005/11/22 10:36:15 kconner Exp $
+ */
+
+public class TxContextImple implements TxContext
+{
+
+	public TxContextImple (CoordinationContextType ctx)
+	{
+		_context = new ContextImple(ctx);
+	}
+
+	public TxContextImple (Context11 context)
+	{
+		_context = context;
+	}
+
+	public boolean valid ()
+	{
+		return (_context != null) ;
+	}
+
+	public boolean equals (Object obj)
+	{
+		if (obj instanceof TxContextImple)
+		{
+			TxContextImple compare = (TxContextImple) obj;
+
+			return compare.context().equals(_context);
+		}
+		else
+			return false;
+	}
+
+	public final String identifier ()
+	{
+            final String value = _context.getCoordinationContext().getIdentifier().getValue() ;
+            if ((value != null) && value.startsWith("urn:"))
+            {
+                return value.substring(4) ;
+            }
+            return value ;
+	}
+
+	public final Context11 context ()
+	{
+		return _context;
+	}
+
+	public String toString ()
+	{
+		return _context.toString();
+	}
+
+	private Context11 _context;
+
+}


Property changes on: labs/jbosstm/workspace/XTS_TX11/WSTX/classes/com/arjuna/mwlabs/wst/at11/context/TxContextImple.java
___________________________________________________________________
Name: svn:keywords
   + Rev Date
Name: svn:eol-style
   + native

Added: labs/jbosstm/workspace/XTS_TX11/WSTX/classes/com/arjuna/mwlabs/wst/at11/coordinator/TxState.java
===================================================================
--- labs/jbosstm/workspace/XTS_TX11/WSTX/classes/com/arjuna/mwlabs/wst/at11/coordinator/TxState.java	                        (rev 0)
+++ labs/jbosstm/workspace/XTS_TX11/WSTX/classes/com/arjuna/mwlabs/wst/at11/coordinator/TxState.java	2007-08-14 12:43:41 UTC (rev 14200)
@@ -0,0 +1,68 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag.  All rights reserved. 
+ * See the copyright.txt in the distribution for a full listing 
+ * of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU General Public License, v. 2.0.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A 
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+ * PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+ * You should have received a copy of the GNU General Public License,
+ * v. 2.0 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+ * MA  02110-1301, USA.
+ * 
+ * (C) 2005-2006,
+ * @author JBoss Inc.
+ */
+/*
+ * Copyright (C) 2002,
+ *
+ * Arjuna Technologies Limited,
+ * Newcastle upon Tyne,
+ * Tyne and Wear,
+ * UK.
+ *
+ * $Id: TxState.java,v 1.1 2003/04/04 15:00:56 nmcl Exp $
+ */
+
+package com.arjuna.mwlabs.wst.at11.coordinator;
+
+import com.arjuna.mw.wsas.activity.*;
+
+import java.util.Hashtable;
+
+public class TxState
+{
+
+    public static final int COMMITTED = 0;
+    public static final int ABORTED = 1;
+    public static final int UNKNOWN = 2;
+    public static final int HEURISTIC = 3;
+    
+    public static final void setState (ActivityHierarchy hier, int state)
+    {
+	_states.put(hier, new Integer(state));
+    }
+    
+    public static final int getState (ActivityHierarchy hier)
+    {
+	Integer i = (Integer) _states.get(hier);
+	
+	if (i != null)
+	    return i.intValue();
+	else
+	    return TxState.UNKNOWN;
+    }
+    
+    public static final void removeState (ActivityHierarchy hier)
+    {
+	_states.remove(hier);
+    }
+
+    private static Hashtable _states = new Hashtable();
+    
+}


Property changes on: labs/jbosstm/workspace/XTS_TX11/WSTX/classes/com/arjuna/mwlabs/wst/at11/coordinator/TxState.java
___________________________________________________________________
Name: svn:keywords
   + Rev Date
Name: svn:eol-style
   + native

Added: labs/jbosstm/workspace/XTS_TX11/WSTX/classes/com/arjuna/mwlabs/wst/at11/local/ContextManager.java
===================================================================
--- labs/jbosstm/workspace/XTS_TX11/WSTX/classes/com/arjuna/mwlabs/wst/at11/local/ContextManager.java	                        (rev 0)
+++ labs/jbosstm/workspace/XTS_TX11/WSTX/classes/com/arjuna/mwlabs/wst/at11/local/ContextManager.java	2007-08-14 12:43:41 UTC (rev 14200)
@@ -0,0 +1,155 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag.  All rights reserved. 
+ * See the copyright.txt in the distribution for a full listing 
+ * of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU General Public License, v. 2.0.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A 
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+ * PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+ * You should have received a copy of the GNU General Public License,
+ * v. 2.0 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+ * MA  02110-1301, USA.
+ * 
+ * (C) 2005-2006,
+ * @author JBoss Inc.
+ */
+/*
+ * Copyright (C) 2003,
+ *
+ * Arjuna Technologies Limited,
+ * Newcastle upon Tyne,
+ * Tyne and Wear,
+ * UK.
+ *
+ * $Id: ContextManager.java,v 1.4 2005/03/10 15:37:14 nmcl Exp $
+ */
+
+package com.arjuna.mwlabs.wst.at11.local;
+
+import com.arjuna.mw.wstx.logging.wstxLogger;
+
+import com.arjuna.mw.wsas.activity.*;
+
+import com.arjuna.wst.*;
+
+import com.arjuna.mw.wst.TxContext;
+
+import java.util.*;
+
+/**
+ * @message com.arjuna.mwlabs.wst.at11.local.ContextManager_1 [com.arjuna.mwlabs.wst.at11.local.ContextManager_1] - One context was null!
+ */
+
+public class ContextManager
+{
+    
+    public static final ContextManager contextManager ()
+    {
+	return _instance;
+    }
+    
+    public final void initialise (LocalContextFactoryImple factory)
+    {
+	_factory = factory;
+    }
+    
+    public final TxContext suspend () throws SystemException
+    {
+	ActivityHierarchy wstxHier = null;
+
+	try
+	{
+	    wstxHier = _factory.coordinatorManager().suspend();
+	}
+	catch (com.arjuna.mw.wsas.exceptions.SystemException ex)
+	{
+	    throw new SystemException(ex.toString());
+	}
+
+	TxContext txCtx = (TxContext) _threadTxData.get();
+	if (txCtx != null)
+        {
+	    _threadTxData.set(null) ;
+        }
+	
+	if ((txCtx != null) && (wstxHier != null)) // should be equal!
+	{
+	    _contextMapper.put(txCtx, wstxHier);
+	    
+	    return txCtx;
+	}
+	else
+	{
+	    if ((txCtx == null) && (wstxHier == null))
+		return null;
+	    else
+	    {
+		throw new SystemException(wstxLogger.log_mesg.getString("com.arjuna.mwlabs.wst.at11.local.ContextManager_1"));
+	    }
+	}
+    }
+
+    public final TxContext currentTransaction () throws SystemException
+    {
+	return (TxContext) _threadTxData.get();
+    }
+
+    // resume overwrites. Should we check first a la JTA?
+
+    public final void resume (TxContext tx) throws UnknownTransactionException, SystemException
+    {
+	ActivityHierarchy wstxHier = null;
+	boolean imported = true;
+	
+	if (tx != null)
+	{
+	    wstxHier = (ActivityHierarchy) _contextMapper.remove(tx);
+	
+	    if (wstxHier == null)
+		imported = false;
+	}
+        _threadTxData.set(tx);
+	
+	try
+	{
+	    if (imported)
+		_factory.coordinatorManager().resume(wstxHier);
+	}
+	catch (com.arjuna.mw.wsas.exceptions.InvalidActivityException ex)
+	{
+	    throw new UnknownTransactionException(ex.toString());
+	}
+	catch (com.arjuna.mw.wsas.exceptions.SystemException ex)
+	{
+	    throw new SystemException(ex.toString());
+	}
+    }
+
+    public final void tidyup ()
+    {
+	TxContext txCtx = (TxContext) _threadTxData.get();
+	
+	if (txCtx != null)
+	{
+	    _threadTxData.set(null) ;
+	    _contextMapper.remove(txCtx);
+	}
+    }
+
+    protected ContextManager ()
+    {
+    }
+
+    private static ThreadLocal _threadTxData = new ThreadLocal();
+    private static HashMap     _contextMapper = new HashMap();
+
+    private static LocalContextFactoryImple _factory = null;
+
+    private static ContextManager _instance = new ContextManager();
+    
+}


Property changes on: labs/jbosstm/workspace/XTS_TX11/WSTX/classes/com/arjuna/mwlabs/wst/at11/local/ContextManager.java
___________________________________________________________________
Name: svn:keywords
   + Rev Date
Name: svn:eol-style
   + native

Added: labs/jbosstm/workspace/XTS_TX11/WSTX/classes/com/arjuna/mwlabs/wst/at11/local/LocalContextFactoryImple.java
===================================================================
--- labs/jbosstm/workspace/XTS_TX11/WSTX/classes/com/arjuna/mwlabs/wst/at11/local/LocalContextFactoryImple.java	                        (rev 0)
+++ labs/jbosstm/workspace/XTS_TX11/WSTX/classes/com/arjuna/mwlabs/wst/at11/local/LocalContextFactoryImple.java	2007-08-14 12:43:41 UTC (rev 14200)
@@ -0,0 +1,192 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag.  All rights reserved. 
+ * See the copyright.txt in the distribution for a full listing 
+ * of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU General Public License, v. 2.0.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A 
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+ * PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+ * You should have received a copy of the GNU General Public License,
+ * v. 2.0 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+ * MA  02110-1301, USA.
+ * 
+ * (C) 2005-2006,
+ * @author JBoss Inc.
+ */
+/*
+ * Copyright (C) 2002,
+ *
+ * Arjuna Technologies Limited,
+ * Newcastle upon Tyne,
+ * Tyne and Wear,
+ * UK.
+ *
+ * $Id: LocalContextFactoryImple.java,v 1.5.4.1 2005/11/22 10:36:10 kconner Exp $
+ */
+
+package com.arjuna.mwlabs.wst.at11.local;
+
+import com.arjuna.mw.wsas.context.DeploymentContext;
+import com.arjuna.mw.wsas.context.DeploymentContextFactory;
+import com.arjuna.mw.wscf.model.twophase.CoordinatorManagerFactory;
+import com.arjuna.mw.wscf.model.twophase.api.CoordinatorManager;
+import com.arjuna.mw.wstx.logging.wstxLogger;
+import com.arjuna.mwlabs.wst.at11.context.JBossContextImple;
+import com.arjuna.webservices.SoapRegistry;
+import com.arjuna.webservices.stax.URI;
+import com.arjuna.webservices.wsaddr2005.AttributedURIType;
+import com.arjuna.webservices.wsaddr2005.EndpointReferenceType;
+import com.arjuna.webservices.wsjboss.InstanceIdentifier;
+import com.arjuna.webservices.wsat11.AtomicTransactionConstants;
+import com.arjuna.webservices.wscoor11.AttributedUnsignedIntType;
+import com.arjuna.webservices.wscoor11.CoordinationConstants;
+import com.arjuna.webservices.wscoor11.CoordinationContextType;
+import com.arjuna.wsc.ContextFactory11;
+import com.arjuna.wsc.InvalidCreateParametersException;
+
+public class LocalContextFactoryImple implements ContextFactory11
+{
+
+	public LocalContextFactoryImple ()
+	{
+		try
+		{
+			_coordManager = CoordinatorManagerFactory.coordinatorManager();
+		}
+		catch (Exception ex)
+		{
+			ex.printStackTrace();
+		}
+	}
+
+	/**
+	 * Called when a context factory is added to a context factory mapper. This
+	 * method will be called multiple times if the context factory is added to
+	 * multiple context factory mappers or to the same context mapper with
+	 * different protocol identifiers.
+	 * 
+	 * @param coordinationTypeURI
+	 *            the coordination type uri
+	 */
+
+	public void install (final String coordinationTypeURI)
+	{
+	}
+
+	/**
+	 * Creates a coordination context.
+	 * 
+	 * @param coordinationTypeURI
+	 *            the coordination type uri
+	 * @param expires
+	 *            the expire date/time for the returned context, can be null
+	 * @param currentContext
+	 *            the current context, can be null
+	 * 
+	 * @return the created coordination context
+	 * 
+	 * @throws InvalidCreateParametersException
+	 *             if a parameter passed is invalid this activity identifier.
+	 * 
+	 * @message com.arjuna.mwlabs.wst.at11.local.LocalContextFactoryImple_1
+	 *          [com.arjuna.mwlabs.wst.at11.local.LocalContextFactoryImple_1] -
+	 *          Invalid type URI: < {0} , {1} >
+	 * @message com.arjuna.mwlabs.wst.at11.local.LocalContextFactoryImple_11
+	 *          [com.arjuna.mwlabs.wst.at11.local.LocalContextFactoryImple_11] -
+	 *          Invalid type URI:
+	 */
+
+	public CoordinationContextType create (final String coordinationTypeURI,
+            final Long expires, final CoordinationContextType currentContext)
+			throws InvalidCreateParametersException
+	{
+		if (coordinationTypeURI.equals(AtomicTransactionConstants.WSAT_PROTOCOL))
+		{
+			try
+			{
+				_coordManager.suspend();
+
+				_coordManager.begin();
+
+				DeploymentContext manager = DeploymentContextFactory.deploymentContext();
+				JBossContextImple arjunaContext = (JBossContextImple)manager.context();
+
+                final SoapRegistry soapRegistry = SoapRegistry.getRegistry() ;
+                final String registrationCoordinatorURI = soapRegistry.getServiceURI(CoordinationConstants.SERVICE_REGISTRATION_COORDINATOR) ;
+                
+                final CoordinationContextType coordinationContext = new CoordinationContextType() ;
+                coordinationContext.setCoordinationType(new URI(coordinationTypeURI)) ;
+                coordinationContext.setIdentifier(new AttributedURIType("urn:"+arjunaContext.getTransactionIdentifier())) ;
+                final int transactionExpires = arjunaContext.getTransactionExpires() ;
+                if (transactionExpires > 0)
+                {
+                    coordinationContext.setExpires(new AttributedUnsignedIntType(transactionExpires)) ;
+                }
+                final EndpointReferenceType registrationCoordinator = new EndpointReferenceType(new AttributedURIType(registrationCoordinatorURI)) ;
+                InstanceIdentifier.setEndpointInstanceIdentifier(registrationCoordinator, arjunaContext.getTransactionIdentifier()) ;
+                coordinationContext.setRegistrationService(registrationCoordinator) ;
+
+				return coordinationContext;
+			}
+			catch (com.arjuna.mw.wsas.exceptions.SystemException ex)
+			{
+				// TODO handle properly
+
+				ex.printStackTrace();
+			}
+			catch (com.arjuna.mw.wsas.exceptions.WrongStateException ex)
+			{
+				// TODO handle properly
+
+				ex.printStackTrace();
+			}
+			catch (Exception ex)
+			{
+				// TODO handle properly
+
+				ex.printStackTrace();
+			}
+		}
+		else
+		{
+			wstxLogger.arjLoggerI18N.warn("com.arjuna.mwlabs.wst.at11.local.LocalContextFactoryImple_1", new Object[]
+			{ AtomicTransactionConstants.WSAT_PROTOCOL, coordinationTypeURI });
+
+			throw new InvalidCreateParametersException(
+					wstxLogger.log_mesg.getString("com.arjuna.mwlabs.wst.at11.local.LocalContextFactoryImple_11"
+							+ " <"
+							+ AtomicTransactionConstants.WSAT_PROTOCOL
+							+ ", "
+							+ coordinationTypeURI + " >"));
+		}
+
+		return null;
+	}
+
+	/**
+	 * Called when a context factory is removed from a context factory mapper.
+	 * This method will be called multiple times if the context factory is
+	 * removed from multiple context factory mappers or from the same context
+	 * factory mapper with different coordination type uris.
+	 * 
+	 * @param coordinationTypeURI
+	 *            the coordination type uri
+	 */
+
+	public void uninstall (final String coordinationTypeURI)
+	{
+	}
+
+	public CoordinatorManager coordinatorManager ()
+	{
+		return _coordManager;
+	}
+
+	private CoordinatorManager _coordManager;
+
+}


Property changes on: labs/jbosstm/workspace/XTS_TX11/WSTX/classes/com/arjuna/mwlabs/wst/at11/local/LocalContextFactoryImple.java
___________________________________________________________________
Name: svn:keywords
   + Rev Date
Name: svn:eol-style
   + native

Added: labs/jbosstm/workspace/XTS_TX11/WSTX/classes/com/arjuna/mwlabs/wst/at11/local/LocalRegistrarImple.java
===================================================================
--- labs/jbosstm/workspace/XTS_TX11/WSTX/classes/com/arjuna/mwlabs/wst/at11/local/LocalRegistrarImple.java	                        (rev 0)
+++ labs/jbosstm/workspace/XTS_TX11/WSTX/classes/com/arjuna/mwlabs/wst/at11/local/LocalRegistrarImple.java	2007-08-14 12:43:41 UTC (rev 14200)
@@ -0,0 +1,144 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag.  All rights reserved. 
+ * See the copyright.txt in the distribution for a full listing 
+ * of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU General Public License, v. 2.0.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A 
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+ * PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+ * You should have received a copy of the GNU General Public License,
+ * v. 2.0 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+ * MA  02110-1301, USA.
+ * 
+ * (C) 2005-2006,
+ * @author JBoss Inc.
+ */
+/*
+ * Copyright (C) 2002,
+ *
+ * Arjuna Technologies Limited,
+ * Newcastle upon Tyne,
+ * Tyne and Wear,
+ * UK.
+ *
+ * $Id: LocalRegistrarImple.java,v 1.8 2005/05/19 12:13:42 nmcl Exp $
+ */
+
+package com.arjuna.mwlabs.wst.at11.local;
+
+import com.arjuna.mw.wstx.logging.wstxLogger;
+
+import com.arjuna.ats.arjuna.common.Uid;
+
+import com.arjuna.mw.wscf.model.twophase.api.CoordinatorManager;
+
+import com.arjuna.mwlabs.wst.at11.participants.*;
+
+import com.arjuna.webservices.wsat11.AtomicTransactionConstants;
+import com.arjuna.wst.*;
+
+import com.arjuna.wsc.AlreadyRegisteredException;
+import com.arjuna.wsc.InvalidProtocolException;
+import com.arjuna.wsc.InvalidStateException;
+import com.arjuna.wsc.NoActivityException;
+
+import com.arjuna.mw.wscf.model.twophase.CoordinatorManagerFactory;
+
+/**
+ * This class simulates the use of the real RegistrarImple, which we can't use
+ * in a local environment simply because we do not have URIs to register: we
+ * have real participants!
+ */
+
+public class LocalRegistrarImple
+{
+
+	public LocalRegistrarImple ()
+	{
+		try
+		{
+			_coordManager = CoordinatorManagerFactory.coordinatorManager();
+		}
+		catch (Exception ex)
+		{
+			ex.printStackTrace();
+		}
+	}
+
+	/**
+	 * Registers the interest of participant in a particular protocol.
+	 * 
+	 * @param participantProtocolServiceAddress
+	 *            the address of the participant protocol service
+	 * @param protocolIdentifier
+	 *            the protocol identifier
+	 * 
+	 * @throws AlreadyRegisteredException
+	 *             if the participant is already registered for this
+	 *             coordination protocol under this activity identifier
+	 * @throws InvalidProtocolException
+	 *             if the coordination protocol is not supported
+	 * @throws InvalidStateException
+	 *             if the state of the coordinator no longer allows registration
+	 *             for this coordination protocol
+	 * @throws NoActivityException
+	 *             if the activity does not exist.
+	 * 
+	 * @message com.arjuna.mwlabs.wst.at11.local.LocalRegistrarImple_1
+	 *          [com.arjuna.mwlabs.wst.at11.local.LocalRegistrarImple_1] - Invalid
+	 *          type URI: < {0} , {1} >
+	 */
+
+	public void register (Object participant, String protocolIdentifier)
+			throws AlreadyRegisteredException, InvalidProtocolException,
+			InvalidStateException, NoActivityException
+	{
+		// TODO check for AlreadyRegisteredException
+
+		if (protocolIdentifier.equals(AtomicTransactionConstants.WSAT_SUB_PROTOCOL_DURABLE_2PC))
+		{
+			// enlist participant that wraps the requester URI.
+
+			try
+			{
+				_coordManager.enlistParticipant(new DurableTwoPhaseCommitParticipant(
+						(Durable2PCParticipant) participant,
+						new Uid().toString()));
+			}
+			catch (Exception ex)
+			{
+				throw new InvalidStateException();
+			}
+		}
+		else
+		{
+			if (protocolIdentifier.equals(AtomicTransactionConstants.WSAT_SUB_PROTOCOL_VOLATILE_2PC))
+			{
+				try
+				{
+					_coordManager.enlistSynchronization(new VolatileTwoPhaseCommitParticipant(
+							(Volatile2PCParticipant) participant));
+				}
+				catch (Exception ex)
+				{
+					throw new InvalidStateException();
+				}
+			}
+			else
+			{
+				wstxLogger.arjLoggerI18N.warn("com.arjuna.mwlabs.wst.at11.local.LocalRegistrarImple_1", new Object[]
+				{ AtomicTransactionConstants.WSAT_PROTOCOL, protocolIdentifier });
+
+				throw new InvalidProtocolException();
+			}
+		}
+	}
+
+	private CoordinatorManager _coordManager;
+
+}


Property changes on: labs/jbosstm/workspace/XTS_TX11/WSTX/classes/com/arjuna/mwlabs/wst/at11/local/LocalRegistrarImple.java
___________________________________________________________________
Name: svn:keywords
   + Rev Date
Name: svn:eol-style
   + native

Added: labs/jbosstm/workspace/XTS_TX11/WSTX/classes/com/arjuna/mwlabs/wst/at11/local/TransactionManagerImple.java
===================================================================
--- labs/jbosstm/workspace/XTS_TX11/WSTX/classes/com/arjuna/mwlabs/wst/at11/local/TransactionManagerImple.java	                        (rev 0)
+++ labs/jbosstm/workspace/XTS_TX11/WSTX/classes/com/arjuna/mwlabs/wst/at11/local/TransactionManagerImple.java	2007-08-14 12:43:41 UTC (rev 14200)
@@ -0,0 +1,143 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag.  All rights reserved. 
+ * See the copyright.txt in the distribution for a full listing 
+ * of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU General Public License, v. 2.0.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A 
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+ * PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+ * You should have received a copy of the GNU General Public License,
+ * v. 2.0 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+ * MA  02110-1301, USA.
+ * 
+ * (C) 2005-2006,
+ * @author JBoss Inc.
+ */
+/*
+ * Copyright (C) 2003,
+ *
+ * Arjuna Technologies Limited,
+ * Newcastle upon Tyne,
+ * Tyne and Wear,
+ * UK.
+ *
+ * $Id: TransactionManagerImple.java,v 1.13.4.1 2005/11/22 10:36:10 kconner Exp $
+ */
+
+package com.arjuna.mwlabs.wst.at11.local;
+
+import com.arjuna.mw.wstx.logging.wstxLogger;
+
+import com.arjuna.webservices.wsat11.AtomicTransactionConstants;
+import com.arjuna.wst.*;
+
+import com.arjuna.wsc.AlreadyRegisteredException;
+
+import com.arjuna.mw.wst.TransactionManager;
+import com.arjuna.mw.wst.TxContext;
+
+/**
+ * This is the interface that the core exposes in order to allow different types
+ * of participants to be enrolled. The messaging layer continues to work in
+ * terms of the registrar, but internally we map to one of these methods.
+ * 
+ * This could also be the interface that high-level users see (e.g., at the
+ * application Web Service).
+ */
+
+public class TransactionManagerImple extends TransactionManager
+{
+
+	public TransactionManagerImple ()
+	{
+		_contextManager = ContextManager.contextManager();
+		_contextManager.initialise(UserTransactionImple._factory);
+	}
+
+	public void enlistForDurableTwoPhase (Durable2PCParticipant tpp, String id)
+			throws WrongStateException, UnknownTransactionException,
+			AlreadyRegisteredException, SystemException
+	{
+		try
+		{
+			_registrar.register(tpp, AtomicTransactionConstants.WSAT_SUB_PROTOCOL_DURABLE_2PC);
+		}
+		catch (com.arjuna.wsc.InvalidProtocolException ex)
+		{
+			throw new SystemException(ex.toString());
+		}
+		catch (com.arjuna.wsc.InvalidStateException ex)
+		{
+			throw new WrongStateException();
+		}
+		catch (com.arjuna.wsc.NoActivityException ex)
+		{
+			throw new UnknownTransactionException();
+		}
+	}
+
+	public void enlistForVolatileTwoPhase (Volatile2PCParticipant tpp, String id)
+			throws WrongStateException, UnknownTransactionException,
+			AlreadyRegisteredException, SystemException
+	{
+		try
+		{
+			_registrar.register(tpp, AtomicTransactionConstants.WSAT_SUB_PROTOCOL_VOLATILE_2PC);
+		}
+		catch (com.arjuna.wsc.InvalidProtocolException ex)
+		{
+			throw new SystemException(ex.toString());
+		}
+		catch (com.arjuna.wsc.InvalidStateException ex)
+		{
+			throw new WrongStateException();
+		}
+		catch (com.arjuna.wsc.NoActivityException ex)
+		{
+			throw new UnknownTransactionException();
+		}
+	}
+
+	/**
+	 * @message com.arjuna.mwlabs.wst.at11.local.TransactionManagerImple_1
+	 *          [com.arjuna.mwlabs.wst.at11.local.TransactionManagerImple_1] - Not
+	 *          implemented!
+	 */
+
+	public int replay () throws SystemException
+	{
+		throw new SystemException(
+				wstxLogger.log_mesg.getString("com.arjuna.mwlabs.wst.at11.local.TransactionManagerImple_1"));
+	}
+
+	public void resume (TxContext tx) throws UnknownTransactionException,
+			SystemException
+	{
+		_contextManager.resume(tx);
+	}
+
+	public TxContext suspend () throws SystemException
+	{
+		return _contextManager.suspend();
+	}
+
+	public TxContext currentTransaction () throws SystemException
+	{
+		return _contextManager.currentTransaction();
+	}
+
+	final LocalRegistrarImple getRegistrar ()
+	{
+		return _registrar;
+	}
+
+	private final ContextManager _contextManager ;
+
+	private static LocalRegistrarImple _registrar = new LocalRegistrarImple();
+
+}


Property changes on: labs/jbosstm/workspace/XTS_TX11/WSTX/classes/com/arjuna/mwlabs/wst/at11/local/TransactionManagerImple.java
___________________________________________________________________
Name: svn:keywords
   + Rev Date
Name: svn:eol-style
   + native

Added: labs/jbosstm/workspace/XTS_TX11/WSTX/classes/com/arjuna/mwlabs/wst/at11/local/UserTransactionImple.java
===================================================================
--- labs/jbosstm/workspace/XTS_TX11/WSTX/classes/com/arjuna/mwlabs/wst/at11/local/UserTransactionImple.java	                        (rev 0)
+++ labs/jbosstm/workspace/XTS_TX11/WSTX/classes/com/arjuna/mwlabs/wst/at11/local/UserTransactionImple.java	2007-08-14 12:43:41 UTC (rev 14200)
@@ -0,0 +1,173 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag.  All rights reserved. 
+ * See the copyright.txt in the distribution for a full listing 
+ * of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU General Public License, v. 2.0.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A 
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+ * PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+ * You should have received a copy of the GNU General Public License,
+ * v. 2.0 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+ * MA  02110-1301, USA.
+ * 
+ * (C) 2005-2006,
+ * @author JBoss Inc.
+ */
+/*
+ * Copyright (C) 2003,
+ *
+ * Arjuna Technologies Limited,
+ * Newcastle upon Tyne,
+ * Tyne and Wear,
+ * UK.
+ *
+ * $Id: UserTransactionImple.java,v 1.16.4.1 2005/11/22 10:36:10 kconner Exp $
+ */
+
+package com.arjuna.mwlabs.wst.at11.local;
+
+import com.arjuna.mw.wst.UserTransaction;
+import com.arjuna.mwlabs.wst.at11.context.TxContextImple;
+import com.arjuna.mwlabs.wst.at11.participants.CompletionCoordinatorImple;
+import com.arjuna.webservices.wsat11.AtomicTransactionConstants;
+import com.arjuna.webservices.wscoor11.CoordinationContextType;
+import com.arjuna.wst.SystemException;
+import com.arjuna.wst.TransactionRolledBackException;
+import com.arjuna.wst.UnknownTransactionException;
+import com.arjuna.wst.WrongStateException;
+
+/**
+ * This is the interface that allows transactions to be started and terminated.
+ * The messaging layer converts the Commit, Rollback and Notify messages into
+ * calls on this.
+ */
+
+public class UserTransactionImple extends UserTransaction
+{
+
+	public UserTransactionImple ()
+	{
+		_completionCoordinator = new CompletionCoordinatorImple(
+				_factory.coordinatorManager(), null, false);
+
+		_contextManager = ContextManager.contextManager();
+		_contextManager.initialise(_factory);
+	}
+
+	public void begin () throws WrongStateException, SystemException
+	{
+		begin(0);
+	}
+
+	public void begin (int timeout) throws WrongStateException, SystemException
+	{
+		try
+		{
+			if (_contextManager.currentTransaction() != null)
+				throw new WrongStateException();
+
+			final CoordinationContextType ctx = _factory.create(AtomicTransactionConstants.WSAT_PROTOCOL, null, null);
+
+			TxContextImple theContext = new TxContextImple(ctx);
+
+			_contextManager.resume(theContext);
+		}
+		catch (com.arjuna.wst.UnknownTransactionException ex)
+		{
+			ex.printStackTrace();
+
+			throw new SystemException(ex.toString());
+		}
+		catch (com.arjuna.wsc.InvalidCreateParametersException ex)
+		{
+			throw new SystemException(ex.toString());
+		}
+
+		/*
+		 * At this point we would normally register a completion participant.
+		 * 
+		 * Registrar reg =
+		 * _registrarMapper.getRegistrar(_factory.coordinatorManager().identifier().toString());
+		 * 
+		 * reg.register(Protocols.Completion, null);
+		 */
+	}
+
+	public void commit () throws TransactionRolledBackException,
+			UnknownTransactionException, SystemException
+	{
+		try
+		{
+			_completionCoordinator.commit();
+		}
+		catch (TransactionRolledBackException ex)
+		{
+			throw ex;
+		}
+		catch (UnknownTransactionException ex)
+		{
+			throw ex;
+		}
+		catch (SystemException ex)
+		{
+			throw ex;
+		}
+		finally
+		{
+			_contextManager.tidyup();
+		}
+	}
+
+	public void rollback () throws UnknownTransactionException, SystemException
+	{
+		try
+		{
+			_completionCoordinator.rollback();
+		}
+		catch (UnknownTransactionException ex)
+		{
+			throw ex;
+		}
+		catch (SystemException ex)
+		{
+			throw ex;
+		}
+		finally
+		{
+			_contextManager.tidyup();
+		}
+	}
+
+	public String transactionIdentifier ()
+	{
+		try
+		{
+			return _factory.coordinatorManager().identifier().toString();
+		}
+		catch (com.arjuna.mw.wsas.exceptions.NoActivityException ex)
+		{
+			return "NoTransaction";
+		}
+		catch (com.arjuna.mw.wsas.exceptions.SystemException ex)
+		{
+			return "Unknown";
+		}
+	}
+
+	public String toString ()
+	{
+		return transactionIdentifier();
+	}
+
+	static LocalContextFactoryImple _factory = new LocalContextFactoryImple();
+
+	private final CompletionCoordinatorImple _completionCoordinator ;
+
+	private ContextManager _contextManager = null;
+
+}


Property changes on: labs/jbosstm/workspace/XTS_TX11/WSTX/classes/com/arjuna/mwlabs/wst/at11/local/UserTransactionImple.java
___________________________________________________________________
Name: svn:keywords
   + Rev Date
Name: svn:eol-style
   + native

Added: labs/jbosstm/workspace/XTS_TX11/WSTX/classes/com/arjuna/mwlabs/wst/at11/participants/CleanupSynchronization.java
===================================================================
--- labs/jbosstm/workspace/XTS_TX11/WSTX/classes/com/arjuna/mwlabs/wst/at11/participants/CleanupSynchronization.java	                        (rev 0)
+++ labs/jbosstm/workspace/XTS_TX11/WSTX/classes/com/arjuna/mwlabs/wst/at11/participants/CleanupSynchronization.java	2007-08-14 12:43:41 UTC (rev 14200)
@@ -0,0 +1,78 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag.  All rights reserved. 
+ * See the copyright.txt in the distribution for a full listing 
+ * of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU General Public License, v. 2.0.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A 
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+ * PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+ * You should have received a copy of the GNU General Public License,
+ * v. 2.0 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+ * MA  02110-1301, USA.
+ * 
+ * (C) 2005-2006,
+ * @author JBoss Inc.
+ */
+/*
+ * Copyright (C) 2002,
+ *
+ * Arjuna Technologies Limited,
+ * Newcastle upon Tyne,
+ * Tyne and Wear,
+ * UK.
+ *
+ * $Id: CleanupSynchronization.java,v 1.3 2005/05/19 12:13:42 nmcl Exp $
+ */
+
+package com.arjuna.mwlabs.wst.at11.participants;
+
+import com.arjuna.mwlabs.wst.at11.RegistrarImple;
+
+import com.arjuna.mw.wscf.model.twophase.participants.*;
+
+import com.arjuna.mw.wsas.exceptions.SystemException;
+
+/**
+ * @author Mark Little (mark.little at arjuna.com)
+ * @version $Id: CleanupSynchronization.java,v 1.3 2005/05/19 12:13:42 nmcl Exp $
+ * @since 1.0.
+ */
+
+public class CleanupSynchronization implements Synchronization
+{
+
+	public CleanupSynchronization (String cleanupId, RegistrarImple theRegistrar)
+	{
+		_cleanupId = cleanupId;
+		_theRegistrar = theRegistrar;
+	}
+
+	public void beforeCompletion () throws SystemException
+	{
+		// do nothing
+	}
+
+	public void afterCompletion (int status) throws SystemException
+	{
+		try
+		{
+			_theRegistrar.disassociate(_cleanupId);
+		}
+		catch (Exception ex)
+		{
+			ex.printStackTrace();
+
+			throw new SystemException(ex.toString());
+		}
+	}
+
+	private String _cleanupId;
+
+	private RegistrarImple _theRegistrar;
+
+}


Property changes on: labs/jbosstm/workspace/XTS_TX11/WSTX/classes/com/arjuna/mwlabs/wst/at11/participants/CleanupSynchronization.java
___________________________________________________________________
Name: svn:keywords
   + Rev Date
Name: svn:eol-style
   + native

Added: labs/jbosstm/workspace/XTS_TX11/WSTX/classes/com/arjuna/mwlabs/wst/at11/participants/CompletionCoordinatorImple.java
===================================================================
--- labs/jbosstm/workspace/XTS_TX11/WSTX/classes/com/arjuna/mwlabs/wst/at11/participants/CompletionCoordinatorImple.java	                        (rev 0)
+++ labs/jbosstm/workspace/XTS_TX11/WSTX/classes/com/arjuna/mwlabs/wst/at11/participants/CompletionCoordinatorImple.java	2007-08-14 12:43:41 UTC (rev 14200)
@@ -0,0 +1,171 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag.  All rights reserved. 
+ * See the copyright.txt in the distribution for a full listing 
+ * of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU General Public License, v. 2.0.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A 
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+ * PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+ * You should have received a copy of the GNU General Public License,
+ * v. 2.0 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+ * MA  02110-1301, USA.
+ * 
+ * (C) 2005-2006,
+ * @author JBoss Inc.
+ */
+/*
+ * Copyright (C) 2002,
+ *
+ * Arjuna Technologies Limited,
+ * Newcastle upon Tyne,
+ * Tyne and Wear,
+ * UK.
+ *
+ * $Id: CompletionCoordinatorImple.java,v 1.6.24.1 2005/11/22 10:36:22 kconner Exp $
+ */
+
+package com.arjuna.mwlabs.wst.at11.participants;
+
+import com.arjuna.mw.wsas.activity.ActivityHierarchy;
+import com.arjuna.mw.wscf.model.twophase.api.CoordinatorManager;
+import com.arjuna.webservices.wsat11.processors.CompletionCoordinatorProcessor;
+import com.arjuna.wst.SystemException;
+import com.arjuna.wst.TransactionRolledBackException;
+import com.arjuna.wst.UnknownTransactionException;
+
+/**
+ * @author Mark Little (mark.little at arjuna.com)
+ * @version $Id: CompletionCoordinatorImple.java,v 1.6.24.1 2005/11/22 10:36:22 kconner Exp $
+ * @since 1.0.
+ */
+
+public class CompletionCoordinatorImple implements com.arjuna.wst.CompletionCoordinatorParticipant
+{
+
+    public CompletionCoordinatorImple (CoordinatorManager cm, ActivityHierarchy hier, final boolean deactivate)
+    {
+	_cm = cm;
+	_hier = hier;
+    this.deactivate = deactivate ;
+    }
+    
+    public void commit () throws TransactionRolledBackException, UnknownTransactionException, SystemException
+    {
+	try
+	{
+	    if (_hier != null)
+		_cm.resume(_hier);
+
+	    _cm.confirm();
+	}
+	catch (com.arjuna.mw.wsas.exceptions.InvalidActivityException ex)
+	{
+	    throw new UnknownTransactionException();
+	}
+	catch (com.arjuna.mw.wsas.exceptions.WrongStateException ex)
+	{
+	    throw new SystemException(ex.toString());
+	}
+	catch (com.arjuna.mw.wsas.exceptions.ProtocolViolationException ex)
+	{
+	    //	    throw new HeuristicHazardException();
+	    
+	    throw new SystemException(ex.toString());
+	}
+	catch (com.arjuna.mw.wscf.exceptions.NoCoordinatorException ex)
+	{
+	    throw new UnknownTransactionException();
+	}
+	catch (com.arjuna.mw.wscf.model.twophase.exceptions.CoordinatorCancelledException ex)
+	{
+	    throw new TransactionRolledBackException();
+	}
+	catch (com.arjuna.mw.wscf.model.twophase.exceptions.HeuristicMixedException ex)
+	{
+	    //	    throw new HeuristicMixedException();
+
+	    throw new SystemException(ex.toString());
+	}
+	catch (com.arjuna.mw.wscf.model.twophase.exceptions.HeuristicHazardException ex)
+	{
+	    //	    throw new HeuristicHazardException();
+
+	    throw new SystemException(ex.toString());
+
+	}
+	catch (com.arjuna.mw.wsas.exceptions.NoPermissionException ex)
+	{
+	    throw new SystemException(ex.toString());
+	}
+	catch (com.arjuna.mw.wsas.exceptions.SystemException ex)
+	{
+	    throw new SystemException(ex.toString());
+	}
+	finally
+	{
+	    if (deactivate)
+	        CompletionCoordinatorProcessor.getProcessor().deactivateParticipant(this);
+	}
+    }
+    
+    public void rollback () throws UnknownTransactionException, SystemException
+    {
+	try
+	{
+	    if (_hier != null)
+		_cm.resume(_hier);
+	    
+	    _cm.cancel();
+	}
+	catch (com.arjuna.mw.wsas.exceptions.InvalidActivityException ex)
+	{
+	    throw new UnknownTransactionException();
+	}
+	catch (com.arjuna.mw.wsas.exceptions.WrongStateException ex)
+	{
+	    throw new SystemException(ex.toString());
+	}
+	catch (com.arjuna.mw.wsas.exceptions.ProtocolViolationException ex)
+	{
+	    throw new SystemException();
+	}
+	catch (com.arjuna.mw.wscf.exceptions.NoCoordinatorException ex)
+	{
+	    throw new UnknownTransactionException();
+	}
+	catch (com.arjuna.mw.wscf.model.twophase.exceptions.CoordinatorConfirmedException ex)
+	{
+	    throw new SystemException();
+	}
+	catch (com.arjuna.mw.wscf.model.twophase.exceptions.HeuristicMixedException ex)
+	{
+	    throw new SystemException(ex.toString());
+	}
+	catch (com.arjuna.mw.wscf.model.twophase.exceptions.HeuristicHazardException ex)
+	{
+	    throw new SystemException(ex.toString());
+	}
+	catch (com.arjuna.mw.wsas.exceptions.NoPermissionException ex)
+	{
+	    throw new SystemException(ex.toString());
+	}
+	catch (com.arjuna.mw.wsas.exceptions.SystemException ex)
+	{
+	    throw new SystemException(ex.toString());
+	}
+	finally
+	{
+        if (deactivate)
+            CompletionCoordinatorProcessor.getProcessor().deactivateParticipant(this);
+	}
+    }
+
+    private CoordinatorManager   _cm;
+    private ActivityHierarchy    _hier;
+    private final boolean deactivate ;
+}


Property changes on: labs/jbosstm/workspace/XTS_TX11/WSTX/classes/com/arjuna/mwlabs/wst/at11/participants/CompletionCoordinatorImple.java
___________________________________________________________________
Name: svn:keywords
   + Rev Date
Name: svn:eol-style
   + native

Added: labs/jbosstm/workspace/XTS_TX11/WSTX/classes/com/arjuna/mwlabs/wst/at11/participants/DurableTwoPhaseCommitParticipant.java
===================================================================
--- labs/jbosstm/workspace/XTS_TX11/WSTX/classes/com/arjuna/mwlabs/wst/at11/participants/DurableTwoPhaseCommitParticipant.java	                        (rev 0)
+++ labs/jbosstm/workspace/XTS_TX11/WSTX/classes/com/arjuna/mwlabs/wst/at11/participants/DurableTwoPhaseCommitParticipant.java	2007-08-14 12:43:41 UTC (rev 14200)
@@ -0,0 +1,293 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag.  All rights reserved. 
+ * See the copyright.txt in the distribution for a full listing 
+ * of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU General Public License, v. 2.0.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A 
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+ * PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+ * You should have received a copy of the GNU General Public License,
+ * v. 2.0 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+ * MA  02110-1301, USA.
+ * 
+ * (C) 2005-2006,
+ * @author JBoss Inc.
+ */
+/*
+ * Copyright (C) 2002, 2003, 2004,
+ *
+ * Arjuna Technologies Limited,
+ * Newcastle upon Tyne,
+ * Tyne and Wear,
+ * UK.
+ *
+ * $Id: DurableTwoPhaseCommitParticipant.java,v 1.1.2.2 2004/08/09 12:34:24 nmcl Exp $
+ */
+
+package com.arjuna.mwlabs.wst.at11.participants;
+
+import com.arjuna.wst.Durable2PCParticipant;
+
+import com.arjuna.ats.arjuna.state.InputObjectState;
+import com.arjuna.ats.arjuna.state.OutputObjectState;
+import com.arjuna.mw.wscf.model.twophase.participants.*;
+import com.arjuna.mw.wscf.model.twophase.exceptions.*;
+import com.arjuna.mw.wscf.model.twophase.vote.*;
+
+import com.arjuna.mw.wscf.exceptions.*;
+
+import com.arjuna.mw.wsas.exceptions.SystemException;
+import com.arjuna.mw.wsas.exceptions.WrongStateException;
+import com.arjuna.mwlabs.wst.util.PersistableParticipantHelper;
+
+/**
+ * @author Mark Little (mark.little at arjuna.com)
+ * @version $Id: DurableTwoPhaseCommitParticipant.java,v 1.1.2.2 2004/08/09
+ *          12:34:24 nmcl Exp $
+ * @since 1.0.
+ */
+
+public class DurableTwoPhaseCommitParticipant implements Participant
+{
+
+	public DurableTwoPhaseCommitParticipant (Durable2PCParticipant resource, String identifier)
+	{
+		_resource = resource;
+		_id = identifier;
+	}
+
+	public Vote prepare () throws InvalidParticipantException,
+			WrongStateException, HeuristicHazardException,
+			HeuristicMixedException, SystemException
+	{		
+		try
+		{
+			if (_resource != null)
+			{
+				com.arjuna.wst.Vote vt = _resource.prepare();
+			
+				if (vt instanceof com.arjuna.wst.ReadOnly)
+				{
+					_readonly = true;
+
+					return new VoteReadOnly();
+				}
+				else
+				{
+					if (vt instanceof com.arjuna.wst.Prepared)
+						return new VoteConfirm();
+					else
+					{
+						_rolledback = true;
+
+						return new VoteCancel();
+					}
+				}
+			}
+			else
+				return new VoteCancel();
+		}
+		//	catch (com.arjuna.mw.wst.exceptions.WrongStateException ex)
+		catch (com.arjuna.wst.WrongStateException ex)
+		{
+			throw new WrongStateException(ex.toString());
+		}
+		/*
+		 * catch (com.arjuna.mw.wst.exceptions.HeuristicHazardException ex {
+		 * throw new HeuristicHazardException(ex.toString()); } catch
+		 * (com.arjuna.mw.wst.exceptions.HeuristicMixedException ex) { throw new
+		 * HeuristicMixedException(ex.toString()); }
+		 */
+		//	catch (com.arjuna.mw.wst.exceptions.SystemException ex)
+		catch (com.arjuna.wst.SystemException ex)
+		{
+			throw new SystemException(ex.toString());
+		}
+	}
+
+	public void confirm () throws InvalidParticipantException,
+			WrongStateException, HeuristicHazardException,
+			HeuristicMixedException, HeuristicCancelException, SystemException
+	{	
+		if (_resource != null)
+		{
+			try
+			{				
+				if (!_readonly)
+				{			
+					_resource.commit();
+				}
+			}
+			//	    catch (com.arjuna.mw.wst.exceptions.WrongStateException ex)
+			catch (com.arjuna.wst.WrongStateException ex)
+			{
+				throw new WrongStateException(ex.toString());
+			}
+			/*
+			 * catch (com.arjuna.mw.wst.exceptions.HeuristicHazardException ex) {
+			 * throw new HeuristicHazardException(ex.toString()); } catch
+			 * (com.arjuna.mw.wst.exceptions.HeuristicMixedException ex) { throw
+			 * new HeuristicMixedException(ex.toString()); } catch
+			 * (com.arjuna.mw.wst.exceptions.HeuristicRollbackException ex) {
+			 * throw new HeuristicCancelException(ex.toString()); }
+			 */
+			//	    catch (com.arjuna.mw.wst.exceptions.SystemException ex)
+			catch (com.arjuna.wst.SystemException ex)
+			{
+				throw new SystemException(ex.toString());
+			}
+		}
+		else
+			throw new InvalidParticipantException();
+	}
+
+	public void cancel () throws InvalidParticipantException,
+			WrongStateException, HeuristicHazardException,
+			HeuristicMixedException, HeuristicConfirmException, SystemException
+	{
+		if (_resource != null)
+		{
+			try
+			{
+				if (!_rolledback)
+					_resource.rollback();
+			}
+			//	    catch (com.arjuna.mw.wst.exceptions.WrongStateException ex)
+			catch (com.arjuna.wst.WrongStateException ex)
+			{
+				throw new WrongStateException(ex.toString());
+			}
+			/*
+			 * catch (com.arjuna.mw.wst.exceptions.HeuristicHazardException ex) {
+			 * throw new HeuristicHazardException(ex.toString()); } catch
+			 * (com.arjuna.mw.wst.exceptions.HeuristicMixedException ex) { throw
+			 * new HeuristicMixedException(ex.toString()); } catch
+			 * (com.arjuna.mw.wst.exceptions.HeuristicCommitException ex) {
+			 * throw new HeuristicConfirmException(ex.toString()); }
+			 */
+			//	    catch (com.arjuna.mw.wst.exceptions.SystemException ex)
+			catch (com.arjuna.wst.SystemException ex)
+			{
+				throw new SystemException(ex.toString());
+			}
+		}
+		else
+			throw new InvalidParticipantException();
+	}
+
+	// TODO mark ParticipantCancelledException explicitly?
+	
+	public void confirmOnePhase () throws InvalidParticipantException,
+			WrongStateException, HeuristicHazardException,
+			HeuristicMixedException, HeuristicCancelException, SystemException
+	{
+		if (_resource != null)
+		{
+			Vote v = null;
+
+			try
+			{
+				v = prepare();
+			}
+			catch (Exception ex)
+			{
+				ex.printStackTrace();
+				
+				v = new VoteCancel();
+			}
+				
+			if (v instanceof VoteCancel)
+			{
+				_rolledback = false;
+
+				// TODO only do this if we didn't return VoteCancel
+				
+				cancel();
+
+				throw new ParticipantCancelledException();
+			}
+			else
+			{			
+				if (v instanceof VoteConfirm)
+				{
+					try
+					{
+						confirm();
+					}
+					catch (HeuristicHazardException ex)
+					{
+						throw ex;
+					}
+					catch (HeuristicMixedException ex)
+					{
+						throw ex;
+					}
+					catch (HeuristicCancelException ex)
+					{
+						throw ex;
+					}
+					catch (Exception ex)
+					{						
+						throw new HeuristicHazardException();
+					}
+				}
+				else
+				{
+					cancel(); // TODO error
+					
+					throw new HeuristicHazardException();
+				}
+			}
+		}
+		else
+			throw new InvalidParticipantException();
+	}
+
+	public void forget () throws InvalidParticipantException,
+			WrongStateException, SystemException
+	{
+	}
+
+	public void unknown () throws SystemException
+	{
+		/*
+		 * If the transaction is unknown, then we assume it rolled back.
+		 */
+
+		try
+		{
+			cancel();
+		}
+		catch (Exception ex)
+		{
+			// TODO
+		}
+	}
+
+	public String id () throws SystemException
+	{
+		return _id;
+	}
+
+	public boolean save_state (OutputObjectState os)
+	{
+        return PersistableParticipantHelper.save_state(os, _resource) ;
+	}
+	
+	public boolean restore_state (InputObjectState os)
+	{
+        _resource = (Durable2PCParticipant)PersistableParticipantHelper.restore_state(os) ;
+        return true ;
+	}
+	
+	private Durable2PCParticipant _resource;
+	private String _id;
+	private boolean _readonly;
+	private boolean _rolledback;
+
+}


Property changes on: labs/jbosstm/workspace/XTS_TX11/WSTX/classes/com/arjuna/mwlabs/wst/at11/participants/DurableTwoPhaseCommitParticipant.java
___________________________________________________________________
Name: svn:keywords
   + Rev Date
Name: svn:eol-style
   + native

Added: labs/jbosstm/workspace/XTS_TX11/WSTX/classes/com/arjuna/mwlabs/wst/at11/participants/VolatileTwoPhaseCommitParticipant.java
===================================================================
--- labs/jbosstm/workspace/XTS_TX11/WSTX/classes/com/arjuna/mwlabs/wst/at11/participants/VolatileTwoPhaseCommitParticipant.java	                        (rev 0)
+++ labs/jbosstm/workspace/XTS_TX11/WSTX/classes/com/arjuna/mwlabs/wst/at11/participants/VolatileTwoPhaseCommitParticipant.java	2007-08-14 12:43:41 UTC (rev 14200)
@@ -0,0 +1,211 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag.  All rights reserved. 
+ * See the copyright.txt in the distribution for a full listing 
+ * of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU General Public License, v. 2.0.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A 
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+ * PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+ * You should have received a copy of the GNU General Public License,
+ * v. 2.0 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+ * MA  02110-1301, USA.
+ * 
+ * (C) 2005-2006,
+ * @author JBoss Inc.
+ */
+/*
+ * Copyright (C) 2002, 2003, 2004,
+ *
+ * Arjuna Technologies Limited,
+ * Newcastle upon Tyne,
+ * Tyne and Wear,
+ * UK.
+ *
+ * $Id: VolatileTwoPhaseCommitParticipant.java,v 1.1.2.2 2004/08/09 12:34:24 nmcl Exp $
+ */
+
+package com.arjuna.mwlabs.wst.at11.participants;
+
+import com.arjuna.wst.Volatile2PCParticipant;
+
+import com.arjuna.mw.wscf.model.twophase.common.*;
+import com.arjuna.mw.wscf.model.twophase.participants.*;
+import com.arjuna.mw.wscf.model.twophase.exceptions.*;
+
+import com.arjuna.mw.wscf.exceptions.*;
+
+import com.arjuna.mw.wsas.exceptions.SystemException;
+import com.arjuna.mw.wsas.exceptions.WrongStateException;
+
+/**
+ * @author Mark Little (mark.little at arjuna.com)
+ * @version $Id: VolatileTwoPhaseCommitParticipant.java,v 1.1.2.2 2004/08/09
+ *          12:34:24 nmcl Exp $
+ * @since 1.0.
+ */
+
+public class VolatileTwoPhaseCommitParticipant implements Synchronization
+{
+
+	public VolatileTwoPhaseCommitParticipant (Volatile2PCParticipant resource)
+	{
+		_resource = resource;
+	}
+
+	/**
+	 * The transaction that the instance is enrolled with is about to commit.
+	 * 
+	 * @exception SystemException
+	 *                Thrown if any error occurs. This will cause the
+	 *                transaction to roll back.
+	 */
+
+	public void beforeCompletion () throws SystemException
+	{
+		try
+		{
+			if (_resource != null)
+			{
+				// com.arjuna.mw.wst.vote.Vote vt = _resource.prepare();
+				com.arjuna.wst.Vote vt = _resource.prepare();
+
+				if (vt instanceof com.arjuna.wst.ReadOnly)
+					_readonly = true;
+				else
+				{
+					if (vt instanceof com.arjuna.wst.Prepared)
+					{
+						// do nothing
+					}
+					else
+						throw new SystemException();
+				}
+			}
+			else
+				throw new SystemException();
+		}
+		catch (SystemException ex)
+		{
+			throw ex;
+		}
+		catch (Exception ex)
+		{
+			throw new SystemException(ex.toString());
+		}
+	}
+
+	/**
+	 * The transaction that the instance is enrolled with has completed and the
+	 * state in which is completed is passed as a parameter.
+	 * 
+	 * @param CompletionStatus
+	 *            cs The state in which the transaction completed.
+	 * 
+	 * @exception SystemException
+	 *                Thrown if any error occurs. This has no affect on the
+	 *                outcome of the transaction.
+	 */
+
+	public void afterCompletion (int status) throws SystemException
+	{
+		if (!_readonly)
+		{
+			try
+			{
+				switch (status)
+				{
+				case CoordinationResult.CONFIRMED:
+					confirm();
+					break;
+				default:
+					cancel();
+					break;
+				}
+			}
+			catch (SystemException ex)
+			{
+				throw ex;
+			}
+			catch (Exception ex)
+			{
+				throw new SystemException(ex.toString());
+			}
+		}
+	}
+
+	private final void confirm () throws InvalidParticipantException,
+			WrongStateException, HeuristicHazardException,
+			HeuristicMixedException, HeuristicCancelException, SystemException
+	{
+		if (_resource != null)
+		{
+			try
+			{
+				_resource.commit();
+			}
+			// catch (com.arjuna.mw.wst.exceptions.WrongStateException ex)
+			catch (com.arjuna.wst.WrongStateException ex)
+			{
+				throw new WrongStateException(ex.toString());
+			}
+			/*
+			 * catch (com.arjuna.mw.wst.exceptions.HeuristicHazardException ex) {
+			 * throw new HeuristicHazardException(ex.toString()); } catch
+			 * (com.arjuna.mw.wst.exceptions.HeuristicMixedException ex) { throw
+			 * new HeuristicMixedException(ex.toString()); } catch
+			 * (com.arjuna.mw.wst.exceptions.HeuristicRollbackException ex) {
+			 * throw new HeuristicCancelException(ex.toString()); }
+			 */
+			// catch (com.arjuna.mw.wst.exceptions.SystemException ex)
+			catch (com.arjuna.wst.SystemException ex)
+			{
+				throw new SystemException(ex.toString());
+			}
+		}
+		else
+			throw new InvalidParticipantException();
+	}
+
+	private final void cancel () throws InvalidParticipantException,
+			WrongStateException, HeuristicHazardException,
+			HeuristicMixedException, HeuristicConfirmException, SystemException
+	{
+		if (_resource != null)
+		{
+			try
+			{
+				_resource.rollback();
+			}
+			// catch (com.arjuna.mw.wst.exceptions.WrongStateException ex)
+			catch (com.arjuna.wst.WrongStateException ex)
+			{
+				throw new WrongStateException(ex.toString());
+			}
+			/*
+			 * catch (com.arjuna.mw.wst.exceptions.HeuristicHazardException ex) {
+			 * throw new HeuristicHazardException(ex.toString()); } catch
+			 * (com.arjuna.mw.wst.exceptions.HeuristicMixedException ex) { throw
+			 * new HeuristicMixedException(ex.toString()); } catch
+			 * (com.arjuna.mw.wst.exceptions.HeuristicCommitException ex) {
+			 * throw new HeuristicConfirmException(ex.toString()); }
+			 */
+			// catch (com.arjuna.mw.wst.exceptions.SystemException ex)
+			catch (com.arjuna.wst.SystemException ex)
+			{
+				throw new SystemException(ex.toString());
+			}
+		}
+		else
+			throw new InvalidParticipantException();
+	}
+
+	private Volatile2PCParticipant _resource = null;
+
+	private boolean _readonly = false;
+
+}


Property changes on: labs/jbosstm/workspace/XTS_TX11/WSTX/classes/com/arjuna/mwlabs/wst/at11/participants/VolatileTwoPhaseCommitParticipant.java
___________________________________________________________________
Name: svn:keywords
   + Rev Date
Name: svn:eol-style
   + native

Added: labs/jbosstm/workspace/XTS_TX11/WSTX/classes/com/arjuna/mwlabs/wst/at11/remote/ContextManager.java
===================================================================
--- labs/jbosstm/workspace/XTS_TX11/WSTX/classes/com/arjuna/mwlabs/wst/at11/remote/ContextManager.java	                        (rev 0)
+++ labs/jbosstm/workspace/XTS_TX11/WSTX/classes/com/arjuna/mwlabs/wst/at11/remote/ContextManager.java	2007-08-14 12:43:41 UTC (rev 14200)
@@ -0,0 +1,76 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag.  All rights reserved. 
+ * See the copyright.txt in the distribution for a full listing 
+ * of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU General Public License, v. 2.0.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A 
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+ * PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+ * You should have received a copy of the GNU General Public License,
+ * v. 2.0 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+ * MA  02110-1301, USA.
+ * 
+ * (C) 2005-2006,
+ * @author JBoss Inc.
+ */
+/*
+ * Copyright (C) 2003,
+ *
+ * Arjuna Technologies Limited,
+ * Newcastle upon Tyne,
+ * Tyne and Wear,
+ * UK.
+ *
+ * $Id: ContextManager.java,v 1.3 2005/05/19 12:13:43 nmcl Exp $
+ */
+
+package com.arjuna.mwlabs.wst.at11.remote;
+
+import com.arjuna.wst.*;
+
+import com.arjuna.mw.wst.TxContext;
+
+/**
+ */
+
+// publish via JNDI for each address space?
+public class ContextManager
+{
+
+	public ContextManager ()
+	{
+	}
+
+	// resume overwrites. Should we check first a la JTA?
+
+	public void resume (TxContext tx) throws UnknownTransactionException,
+			SystemException
+	{
+		_threadTxData.set(tx);
+	}
+
+	public TxContext suspend () throws SystemException
+	{
+		final TxContext ctx = currentTransaction();
+		
+		if (ctx != null)
+		{
+			_threadTxData.set(null);
+		}
+		
+		return ctx;
+	}
+
+	public TxContext currentTransaction () throws SystemException
+	{
+		return (TxContext) _threadTxData.get();
+	}
+
+	private static ThreadLocal _threadTxData = new ThreadLocal();
+
+}


Property changes on: labs/jbosstm/workspace/XTS_TX11/WSTX/classes/com/arjuna/mwlabs/wst/at11/remote/ContextManager.java
___________________________________________________________________
Name: svn:keywords
   + Rev Date
Name: svn:eol-style
   + native

Added: labs/jbosstm/workspace/XTS_TX11/WSTX/classes/com/arjuna/mwlabs/wst/at11/remote/TransactionManagerImple.java
===================================================================
--- labs/jbosstm/workspace/XTS_TX11/WSTX/classes/com/arjuna/mwlabs/wst/at11/remote/TransactionManagerImple.java	                        (rev 0)
+++ labs/jbosstm/workspace/XTS_TX11/WSTX/classes/com/arjuna/mwlabs/wst/at11/remote/TransactionManagerImple.java	2007-08-14 12:43:41 UTC (rev 14200)
@@ -0,0 +1,249 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag.  All rights reserved. 
+ * See the copyright.txt in the distribution for a full listing 
+ * of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU General Public License, v. 2.0.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A 
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+ * PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+ * You should have received a copy of the GNU General Public License,
+ * v. 2.0 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+ * MA  02110-1301, USA.
+ * 
+ * (C) 2005-2006,
+ * @author JBoss Inc.
+ */
+/*
+ * Copyright (C) 2003,
+ *
+ * Arjuna Technologies Limited,
+ * Newcastle upon Tyne,
+ * Tyne and Wear,
+ * UK.
+ *
+ * $Id: TransactionManagerImple.java,v 1.19.4.1 2005/11/22 10:36:09 kconner Exp $
+ */
+
+package com.arjuna.mwlabs.wst.at11.remote;
+
+import com.arjuna.ats.arjuna.common.Uid;
+import com.arjuna.mw.wst.TransactionManager;
+import com.arjuna.mw.wst.TxContext;
+import com.arjuna.mw.wstx.logging.wstxLogger;
+import com.arjuna.mwlabs.wst.at11.context.TxContextImple;
+import com.arjuna.webservices.SoapFault;
+import com.arjuna.webservices.SoapRegistry;
+import com.arjuna.webservices.wsaddr2005.AttributedURIType;
+import com.arjuna.webservices.wsaddr2005.EndpointReferenceType;
+import com.arjuna.webservices.wsjboss.InstanceIdentifier;
+import com.arjuna.webservices.wsat11.AtomicTransactionConstants;
+import com.arjuna.webservices.wsat11.processors.ParticipantProcessor;
+import com.arjuna.webservices.wscoor11.CoordinationContextType;
+import com.arjuna.wsc.AlreadyRegisteredException;
+import com.arjuna.wsc.InvalidProtocolException;
+import com.arjuna.wsc.InvalidStateException;
+import com.arjuna.wsc.NoActivityException;
+import com.arjuna.wsc.RegistrationCoordinator11;
+import com.arjuna.wst.Durable2PCParticipant;
+import com.arjuna.wst.SystemException;
+import com.arjuna.wst.UnknownTransactionException;
+import com.arjuna.wst.Volatile2PCParticipant;
+import com.arjuna.wst.WrongStateException;
+import com.arjuna.wst.messaging.engines.Participant11Engine;
+
+/**
+ * This is the interface that the core exposes in order to allow different types
+ * of participants to be enrolled. The messaging layer continues to work in
+ * terms of the registrar, but internally we map to one of these methods.
+ */
+
+public class TransactionManagerImple extends TransactionManager
+{
+	public TransactionManagerImple ()
+	{
+	}
+
+	public void enlistForDurableTwoPhase (Durable2PCParticipant tpp, String id)
+			throws WrongStateException, UnknownTransactionException,
+			AlreadyRegisteredException, SystemException
+	{
+		try
+		{
+			final EndpointReferenceType coordinator = registerParticipant(getParticipant(id) , AtomicTransactionConstants.WSAT_SUB_PROTOCOL_DURABLE_2PC);
+
+			ParticipantProcessor.getProcessor().activateParticipant(new Participant11Engine(tpp, id, coordinator), id) ;
+		}
+		catch (com.arjuna.wsc.InvalidProtocolException ex)
+		{
+			throw new SystemException(ex.toString());
+		}
+		catch (com.arjuna.wsc.InvalidStateException ex)
+		{
+			throw new WrongStateException();
+		}
+		catch (com.arjuna.wsc.NoActivityException ex)
+		{
+			throw new UnknownTransactionException();
+		}
+	}
+
+	public void enlistForVolatileTwoPhase (Volatile2PCParticipant tpp, String id)
+			throws WrongStateException, UnknownTransactionException,
+			AlreadyRegisteredException, SystemException
+	{
+		try
+		{
+			final EndpointReferenceType coordinator = registerParticipant(getParticipant(id), AtomicTransactionConstants.WSAT_SUB_PROTOCOL_VOLATILE_2PC);
+
+            ParticipantProcessor.getProcessor().activateParticipant(new Participant11Engine(tpp, id, coordinator), id) ;
+		}
+		catch (com.arjuna.wsc.InvalidProtocolException ex)
+		{
+			throw new SystemException(ex.toString());
+		}
+		catch (com.arjuna.wsc.InvalidStateException ex)
+		{
+			throw new WrongStateException();
+		}
+		catch (com.arjuna.wsc.NoActivityException ex)
+		{
+			ex.printStackTrace();
+
+			throw new UnknownTransactionException();
+		}
+	}
+
+	/*
+	 * TODO
+	 * 
+	 * Have participant interfaces in WSTX have url method and services use
+	 * those. The ones in WS-T are message oriented and we translate to/from.
+	 *  
+	 */
+
+	/**
+	 * @message com.arjuna.mwlabs.wst.at11.remote.TransactionManagerImple_1
+	 *          [com.arjuna.mwlabs.wst.at11.remote.TransactionManagerImple_1] -
+	 *          Not implemented!
+	 */
+
+	public int replay () throws SystemException
+	{
+		throw new SystemException(
+				wstxLogger.log_mesg.getString("com.arjuna.mwlabs.wst.at11.remote.TransactionManagerImple_1"));
+	}
+
+	public TxContext suspend () throws SystemException
+	{
+		return _ctxManager.suspend();
+	}
+
+	// resume overwrites. Should we check first a la JTA?
+
+	public void resume (TxContext tx) throws UnknownTransactionException,
+			SystemException
+	{
+		_ctxManager.resume(tx);
+	}
+
+	public TxContext currentTransaction () throws SystemException
+	{
+		return _ctxManager.currentTransaction();
+	}
+
+	protected EndpointReferenceType enlistForCompletion (final EndpointReferenceType participantEndpoint)
+			throws WrongStateException, UnknownTransactionException,
+			AlreadyRegisteredException, SystemException
+	{
+		try
+		{
+			TxContextImple currentTx = (TxContextImple) _ctxManager.currentTransaction();
+
+			if (currentTx == null)
+				throw new com.arjuna.wsc.NoActivityException();
+
+			return registerParticipant(participantEndpoint, AtomicTransactionConstants.WSAT_SUB_PROTOCOL_COMPLETION);
+		}
+		catch (com.arjuna.wsc.InvalidProtocolException ex)
+		{
+			ex.printStackTrace();
+
+			throw new SystemException(ex.toString());
+		}
+		catch (com.arjuna.wsc.InvalidStateException ex)
+		{
+			throw new WrongStateException();
+		}
+		catch (com.arjuna.wsc.NoActivityException ex)
+		{
+			throw new UnknownTransactionException();
+		}
+	}
+    
+    private EndpointReferenceType getParticipant(final String id)
+    {
+        final SoapRegistry soapRegistry = SoapRegistry.getRegistry() ;
+        final String serviceURI = soapRegistry.getServiceURI(AtomicTransactionConstants.SERVICE_PARTICIPANT) ;
+        final EndpointReferenceType participant = new EndpointReferenceType(new AttributedURIType(serviceURI)) ;
+        InstanceIdentifier.setEndpointInstanceIdentifier(participant, id) ;
+        return participant ;
+    }
+
+	private final EndpointReferenceType registerParticipant (final EndpointReferenceType participant, final String protocol)
+			throws InvalidProtocolException, InvalidStateException, NoActivityException, SystemException
+	{
+		TxContextImple currentTx = null;
+
+		try
+		{
+			currentTx = (TxContextImple) _ctxManager.suspend();
+
+			if (currentTx == null)
+				throw new com.arjuna.wsc.NoActivityException();
+
+            final CoordinationContextType coordinationContext = currentTx.context().getCoordinationContext() ;
+            final String messageId = new Uid().stringForm() ;
+            return RegistrationCoordinator11.register(coordinationContext, messageId, participant, protocol) ;
+		}
+		catch (final SoapFault sf)
+		{
+			throw new SystemException(sf.getMessage());
+		}
+		catch (final NoActivityException nae)
+		{
+			throw nae ;
+		}
+        catch (final InvalidStateException ise)
+        {
+            throw ise ;
+        }
+        catch (final InvalidProtocolException ipe)
+        {
+            throw ipe ;
+        }
+		catch (final Exception ex)
+		{
+			throw new SystemException(ex.toString());
+		}
+		finally
+		{
+			try
+			{
+				if (currentTx != null)
+					_ctxManager.resume(currentTx);
+			}
+			catch (Exception ex)
+			{
+				ex.printStackTrace();
+			}
+		}
+	}
+
+	private ContextManager _ctxManager = new ContextManager();
+
+}


Property changes on: labs/jbosstm/workspace/XTS_TX11/WSTX/classes/com/arjuna/mwlabs/wst/at11/remote/TransactionManagerImple.java
___________________________________________________________________
Name: svn:keywords
   + Rev Date
Name: svn:eol-style
   + native

Added: labs/jbosstm/workspace/XTS_TX11/WSTX/classes/com/arjuna/mwlabs/wst/at11/remote/UserTransactionImple.java
===================================================================
--- labs/jbosstm/workspace/XTS_TX11/WSTX/classes/com/arjuna/mwlabs/wst/at11/remote/UserTransactionImple.java	                        (rev 0)
+++ labs/jbosstm/workspace/XTS_TX11/WSTX/classes/com/arjuna/mwlabs/wst/at11/remote/UserTransactionImple.java	2007-08-14 12:43:41 UTC (rev 14200)
@@ -0,0 +1,396 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag.  All rights reserved. 
+ * See the copyright.txt in the distribution for a full listing 
+ * of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU General Public License, v. 2.0.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A 
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+ * PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+ * You should have received a copy of the GNU General Public License,
+ * v. 2.0 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+ * MA  02110-1301, USA.
+ * 
+ * (C) 2005-2006,
+ * @author JBoss Inc.
+ */
+/*
+ * Copyright (C) 2003,
+ *
+ * Arjuna Technologies Limited,
+ * Newcastle upon Tyne,
+ * Tyne and Wear,
+ * UK.
+ *
+ * $Id: UserTransactionImple.java,v 1.21.4.1 2005/11/22 10:36:09 kconner Exp $
+ */
+
+package com.arjuna.mwlabs.wst.at11.remote;
+
+import java.util.Hashtable;
+
+import com.arjuna.ats.arjuna.common.Uid;
+import com.arjuna.mw.wsc.context.Context11;
+import com.arjuna.mw.wst.TransactionManager;
+import com.arjuna.mw.wst.UserTransaction;
+import com.arjuna.mw.wst.common.Environment;
+import com.arjuna.mw.wstx.logging.wstxLogger;
+import com.arjuna.mwlabs.wst.at11.ContextImple;
+import com.arjuna.mwlabs.wst.at11.context.TxContextImple;
+import com.arjuna.webservices.SoapFault;
+import com.arjuna.webservices.SoapRegistry;
+import com.arjuna.webservices.wsaddr2005.AttributedURIType;
+import com.arjuna.webservices.wsaddr2005.EndpointReferenceType;
+import com.arjuna.webservices.wsjboss.InstanceIdentifier;
+import com.arjuna.webservices.wsat11.AtomicTransactionConstants;
+import com.arjuna.webservices.wscoor11.CoordinationConstants;
+import com.arjuna.webservices.wscoor11.CoordinationContextType;
+import com.arjuna.wsc.ActivationCoordinator11;
+import com.arjuna.wsc.InvalidCreateParametersException;
+import com.arjuna.wst.SystemException;
+import com.arjuna.wst.TransactionRolledBackException;
+import com.arjuna.wst.UnknownTransactionException;
+import com.arjuna.wst.WrongStateException;
+import com.arjuna.wst.stub.Completion11Stub;
+
+/**
+ * @message com.arjuna.mwlabs.wst.at11.remote.UserTransactionImple_2
+ *          [com.arjuna.mwlabs.wst.at11.remote.UserTransactionImple_2] - Received
+ *          context is null!
+ */
+public class UserTransactionImple extends UserTransaction
+{
+
+	public UserTransactionImple ()
+	{
+		try
+		{
+            _activationCoordinatorService = System.getProperty(Environment.COORDINATOR_URL);
+
+			/*
+			 * If the coordinator URL hasn't been specified via the
+			 * configuration file then assume we are using a locally registered
+			 * implementation.
+			 */
+
+			if (_activationCoordinatorService == null)
+			{
+                final SoapRegistry soapRegistry = SoapRegistry.getRegistry() ;
+                _activationCoordinatorService = soapRegistry.getServiceURI(CoordinationConstants.SERVICE_ACTIVATION_COORDINATOR) ;
+			}
+		}
+		catch (Exception ex)
+		{
+			// TODO
+
+			ex.printStackTrace();
+		}
+	}
+
+	public void begin () throws WrongStateException, SystemException
+	{
+		begin(0);
+	}
+
+	public void begin (int timeout) throws WrongStateException, SystemException
+	{
+		try
+		{
+			if (_ctxManager.currentTransaction() != null)
+				throw new WrongStateException();
+
+			Context11 ctx = startTransaction(timeout);
+
+			_ctxManager.resume(new TxContextImple(ctx));
+			
+			enlistCompletionParticipants();
+		}
+		catch (com.arjuna.wsc.InvalidCreateParametersException ex)
+		{
+			tidyup();
+
+			throw new SystemException(ex.toString());
+		}
+		catch (com.arjuna.wst.UnknownTransactionException ex)
+		{
+			tidyup();
+
+			throw new SystemException(ex.toString());
+		}
+		catch (SystemException ex)
+		{
+			tidyup();
+
+			throw ex;
+		}
+	}
+
+	public void commit () throws TransactionRolledBackException,
+			UnknownTransactionException, SecurityException, SystemException
+	{
+		try
+		{
+			commitWithoutAck();
+		}
+		catch (SystemException ex)
+		{
+			throw ex;
+		}
+		finally
+		{
+			tidyup();
+		}
+	}
+
+	public void rollback () throws UnknownTransactionException, SecurityException, SystemException
+	{
+		try
+		{
+			abortWithoutAck();
+		}
+		catch (SystemException ex)
+		{
+			throw ex;
+		}
+		finally
+		{
+			tidyup();
+		}
+	}
+
+	public String transactionIdentifier ()
+	{
+		try
+		{
+			return _ctxManager.currentTransaction().toString();
+		}
+		catch (com.arjuna.wst.SystemException ex)
+		{
+			return "Unknown";
+		}
+		catch (NullPointerException ex)
+		{
+			return "Unknown";
+		}
+	}
+
+	public String toString ()
+	{
+		return transactionIdentifier();
+	}
+
+	/*
+	 * Not sure if this is right as it doesn't map to registering a participant
+	 * with the coordinator.
+	 */
+
+	private final void enlistCompletionParticipants ()
+			throws WrongStateException, UnknownTransactionException,
+			SystemException
+	{
+		try
+		{		
+			TransactionManagerImple tm = (TransactionManagerImple) TransactionManager.getTransactionManager();
+
+			final String id = ((TxContextImple) tm.currentTransaction()).identifier();
+			final EndpointReferenceType completionCoordinator = tm.enlistForCompletion(getCompletionParticipant(id));
+			
+			_completionCoordinators.put(id, completionCoordinator);
+		}
+		catch (com.arjuna.wsc.AlreadyRegisteredException ex)
+		{
+			throw new SystemException(ex.toString());
+		}
+	}
+
+    private final Context11 startTransaction(int timeout)
+			throws com.arjuna.wsc.InvalidCreateParametersException,
+			SystemException
+	{
+		try
+		{
+            final Long expires = (timeout > 0 ? new Long(timeout) : null) ;
+            final String messageId = new Uid().stringForm() ;
+            final CoordinationContextType coordinationContext = ActivationCoordinator11.createCoordinationContext(
+                    _activationCoordinatorService, messageId, AtomicTransactionConstants.WSAT_PROTOCOL, expires, null) ;
+            if (coordinationContext == null)
+            {
+                throw new SystemException(
+                    wstxLogger.log_mesg.getString("com.arjuna.mwlabs.wst.at11.remote.UserTransactionImple_2"));
+            }
+            return new ContextImple(coordinationContext) ;
+		}
+        catch (final InvalidCreateParametersException icpe)
+        {
+            throw icpe ;
+        }
+		catch (final SoapFault sf)
+		{
+			throw new SystemException(sf.getMessage()) ;
+		}
+		catch (final Exception ex)
+		{
+			throw new SystemException(ex.toString());
+		}
+	}
+
+	private final void commitWithoutAck ()
+			throws TransactionRolledBackException, UnknownTransactionException,
+			SecurityException, SystemException
+	{
+		TxContextImple ctx = null;
+		String id = null;
+		
+		try
+		{			
+			ctx = (TxContextImple) _ctxManager.suspend();			
+			id = ctx.identifier();
+			
+			/*
+			 * By default the completionParticipantURL won't be set for an interposed (imported)
+			 * bridged transaction. This is fine, because you shouldn't be able to commit that
+			 * transaction from a node in the tree, only from the root. So, we can prevent commit
+			 * or rollback at this stage. The alternative would be to setup the completionParticipantURL
+			 * and throw the exception from the remote coordinator side (see enlistCompletionParticipants
+			 * for how to do this).
+			 */
+			
+			final EndpointReferenceType completionCoordinator = (EndpointReferenceType) _completionCoordinators.get(id);
+			
+			if (completionCoordinator == null)
+				throw new SecurityException();
+
+			Completion11Stub completionStub = new Completion11Stub(id, completionCoordinator);
+
+			completionStub.commit();
+		}
+		catch (SystemException ex)
+		{
+			throw ex;
+		}
+		catch (TransactionRolledBackException ex)
+		{
+			throw ex;
+		}
+		catch (UnknownTransactionException ex)
+		{
+			throw ex;
+		}
+		catch (SecurityException ex)
+		{
+			throw ex;
+		}
+		catch (Exception ex)
+		{
+			ex.printStackTrace();
+			
+			throw new SystemException(ex.toString());
+		}
+		finally
+		{
+			try
+			{
+				if (ctx != null)
+					_ctxManager.resume(ctx);
+			}
+			catch (Exception ex)
+			{
+				ex.printStackTrace();
+			}
+			
+			if (id != null)
+				_completionCoordinators.remove(id);
+		}
+	}
+
+	private final void abortWithoutAck () throws UnknownTransactionException, SecurityException,
+			SystemException
+	{
+		TxContextImple ctx = null;
+		String id = null;
+		
+		try
+		{
+			ctx = (TxContextImple) _ctxManager.suspend();
+			id = ctx.identifier();
+			
+			/*
+			 * By default the completionParticipantURL won't be set for an interposed (imported)
+			 * bridged transaction. This is fine, because you shouldn't be able to commit that
+			 * transaction from a node in the tree, only from the root. So, we can prevent commit
+			 * or rollback at this stage. The alternative would be to setup the completionParticipantURL
+			 * and throw the exception from the remote coordinator side (see enlistCompletionParticipants
+			 * for how to do this).
+			 */
+			
+			EndpointReferenceType completionCoordinator = (EndpointReferenceType) _completionCoordinators.get(id);
+			
+			if (completionCoordinator == null)
+				throw new SecurityException();
+
+			Completion11Stub completionStub = new Completion11Stub(id, completionCoordinator);
+
+			completionStub.rollback();
+		}
+		catch (SystemException ex)
+		{
+			throw ex;
+		}
+		catch (UnknownTransactionException ex)
+		{
+			throw ex;
+		}
+		catch (SecurityException ex)
+		{
+			throw ex;
+		}
+		catch (Exception ex)
+		{
+			throw new SystemException(ex.toString());
+		}
+		finally
+		{
+			try
+			{
+				if (ctx != null)
+					_ctxManager.resume(ctx);
+			}
+			catch (Exception ex)
+			{
+				ex.printStackTrace();
+			}
+			
+			if (id != null)
+				_completionCoordinators.remove(id);
+		}
+	}
+
+    private EndpointReferenceType getCompletionParticipant(final String id)
+    {
+        final SoapRegistry soapRegistry = SoapRegistry.getRegistry() ;
+        final String serviceURI = soapRegistry.getServiceURI(AtomicTransactionConstants.SERVICE_COMPLETION_INITIATOR) ;
+        final EndpointReferenceType participant = new EndpointReferenceType(new AttributedURIType(serviceURI)) ;
+        InstanceIdentifier.setEndpointInstanceIdentifier(participant, id) ;
+        return participant ;
+    }
+
+	private final void tidyup ()
+	{
+		try
+		{
+			_ctxManager.suspend();
+		}
+		catch (Exception ex)
+		{
+			ex.printStackTrace();
+		}
+	}
+
+	private ContextManager _ctxManager = new ContextManager();
+	private String _activationCoordinatorService;
+	private Hashtable _completionCoordinators = new Hashtable();
+}


Property changes on: labs/jbosstm/workspace/XTS_TX11/WSTX/classes/com/arjuna/mwlabs/wst/at11/remote/UserTransactionImple.java
___________________________________________________________________
Name: svn:keywords
   + Rev Date
Name: svn:eol-style
   + native

Added: labs/jbosstm/workspace/XTS_TX11/WSTX/classes/com/arjuna/mwlabs/wst/ba/recovery/Implementations.java
===================================================================
--- labs/jbosstm/workspace/XTS_TX11/WSTX/classes/com/arjuna/mwlabs/wst/ba/recovery/Implementations.java	                        (rev 0)
+++ labs/jbosstm/workspace/XTS_TX11/WSTX/classes/com/arjuna/mwlabs/wst/ba/recovery/Implementations.java	2007-08-14 12:43:41 UTC (rev 14200)
@@ -0,0 +1,73 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag.  All rights reserved. 
+ * See the copyright.txt in the distribution for a full listing 
+ * of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU General Public License, v. 2.0.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A 
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+ * PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+ * You should have received a copy of the GNU General Public License,
+ * v. 2.0 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+ * MA  02110-1301, USA.
+ * 
+ * (C) 2005-2006,
+ * @author JBoss Inc.
+ */
+/*
+ * Copyright (C) 2001, 2002,
+ *
+ * Hewlett-Packard Arjuna Labs,
+ * Newcastle upon Tyne,
+ * Tyne and Wear,
+ * UK.  
+ *
+ * $Id: Implementations.java 2342 2006-03-30 13:06:17Z  $
+ */
+
+package com.arjuna.mwlabs.wst.ba.recovery;
+
+import com.arjuna.ats.arjuna.gandiva.inventory.Inventory;
+
+/*
+ * Slightly different for historical reasons.
+ */
+
+public class Implementations
+{
+
+	public static synchronized boolean added ()
+	{
+		return _added;
+	}
+
+	public static synchronized void initialise ()
+	{
+		if (!_added)
+		{
+			/*
+			 * Now add various abstract records which crash recovery needs.
+			 */
+
+			Inventory.inventory().addToList(new ParticipantRecordSetup());
+
+			_added = true;
+		}
+	}
+
+	private Implementations ()
+	{
+	}
+
+	private static boolean _added = false;
+
+	static
+	{
+		initialise();
+	}
+
+}


Property changes on: labs/jbosstm/workspace/XTS_TX11/WSTX/classes/com/arjuna/mwlabs/wst/ba/recovery/Implementations.java
___________________________________________________________________
Name: svn:keywords
   + Rev Date
Name: svn:eol-style
   + native

Added: labs/jbosstm/workspace/XTS_TX11/WSTX/classes/com/arjuna/mwlabs/wst/ba/recovery/ParticipantRecordSetup.java
===================================================================
--- labs/jbosstm/workspace/XTS_TX11/WSTX/classes/com/arjuna/mwlabs/wst/ba/recovery/ParticipantRecordSetup.java	                        (rev 0)
+++ labs/jbosstm/workspace/XTS_TX11/WSTX/classes/com/arjuna/mwlabs/wst/ba/recovery/ParticipantRecordSetup.java	2007-08-14 12:43:41 UTC (rev 14200)
@@ -0,0 +1,83 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag.  All rights reserved. 
+ * See the copyright.txt in the distribution for a full listing 
+ * of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU General Public License, v. 2.0.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A 
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+ * PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+ * You should have received a copy of the GNU General Public License,
+ * v. 2.0 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+ * MA  02110-1301, USA.
+ * 
+ * (C) 2005-2006,
+ * @author JBoss Inc.
+ */
+/*
+ * Copyright (C) 2000,
+ *
+ * Arjuna Solutions Limited,
+ * Newcastle upon Tyne,
+ * Tyne and Wear,
+ * UK.  
+ *
+ * $Id: ResourceRecordSetup.java 2342 2006-03-30 13:06:17Z  $
+ */
+
+package com.arjuna.mwlabs.wst.ba.recovery;
+
+import com.arjuna.ats.arjuna.gandiva.ClassName;
+import com.arjuna.ats.arjuna.gandiva.ObjectName;
+import com.arjuna.ats.arjuna.gandiva.inventory.InventoryElement;
+import com.arjuna.mwlabs.wscf.model.twophase.arjunacore.ParticipantRecord;
+
+public class ParticipantRecordSetup implements InventoryElement
+{
+
+	public ParticipantRecordSetup ()
+	{
+	}
+
+	public synchronized Object createVoid ()
+	{
+		return ParticipantRecord.create();
+	}
+
+	public synchronized Object createClassName (ClassName className)
+	{
+		return null;
+	}
+
+	public synchronized Object createObjectName (ObjectName objectName)
+	{
+		return null;
+	}
+
+	public synchronized Object createResources (Object[] resources)
+	{
+		return null;
+	}
+
+	public synchronized Object createClassNameResources (ClassName className,
+			Object[] resources)
+	{
+		return null;
+	}
+
+	public synchronized Object createObjectNameResources (ObjectName objectName, Object[] resources)
+	{
+		return null;
+	}
+
+	public ClassName className ()
+	{
+		return _className;
+	}
+
+	private static ClassName _className = new ClassName("WSBAParticipantRecord");
+}


Property changes on: labs/jbosstm/workspace/XTS_TX11/WSTX/classes/com/arjuna/mwlabs/wst/ba/recovery/ParticipantRecordSetup.java
___________________________________________________________________
Name: svn:keywords
   + Rev Date
Name: svn:eol-style
   + native

Added: labs/jbosstm/workspace/XTS_TX11/WSTX/classes/com/arjuna/mwlabs/wst/ba/recovery/WSBARecoveryModule.java
===================================================================
--- labs/jbosstm/workspace/XTS_TX11/WSTX/classes/com/arjuna/mwlabs/wst/ba/recovery/WSBARecoveryModule.java	                        (rev 0)
+++ labs/jbosstm/workspace/XTS_TX11/WSTX/classes/com/arjuna/mwlabs/wst/ba/recovery/WSBARecoveryModule.java	2007-08-14 12:43:41 UTC (rev 14200)
@@ -0,0 +1,51 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and others contributors as indicated 
+ * by the @authors tag. All rights reserved. 
+ * See the copyright.txt in the distribution for a
+ * full listing of individual contributors. 
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License, v. 2.1.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A 
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+ * PARTICULAR PURPOSE.  See the GNU Lesser General Public License for more details.
+ * You should have received a copy of the GNU Lesser General Public License,
+ * v.2.1 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+ * MA  02110-1301, USA.
+ * 
+ * (C) 2005-2006,
+ * @author JBoss Inc.
+ */
+/*
+ * Copyright (C) 1999-2001 by HP Bluestone Software, Inc. All rights Reserved.
+ *
+ * HP Arjuna Labs,
+ * Newcastle upon Tyne,
+ * Tyne and Wear,
+ * UK.
+ *
+ * $Id: AtomicActionRecoveryModule.java 2342 2006-03-30 13:06:17Z  $
+ */
+
+package com.arjuna.mwlabs.wst.ba.recovery;
+
+import com.arjuna.ats.internal.arjuna.recovery.AtomicActionRecoveryModule;
+import com.arjuna.mwlabs.wscf.model.sagas.arjunacore.ACCoordinator;
+
+/**
+ * This class is a plug-in module for the recovery manager.
+ * It is responsible for recovering failed WS-AT transactions.
+ */
+
+public class WSBARecoveryModule extends AtomicActionRecoveryModule
+{
+    public WSBARecoveryModule (String type)
+    {
+    		super(new ACCoordinator().type());
+    		
+    		Implementations.initialise();
+    }
+}
+


Property changes on: labs/jbosstm/workspace/XTS_TX11/WSTX/classes/com/arjuna/mwlabs/wst/ba/recovery/WSBARecoveryModule.java
___________________________________________________________________
Name: svn:keywords
   + Rev Date
Name: svn:eol-style
   + native

Added: labs/jbosstm/workspace/XTS_TX11/WSTX/classes/com/arjuna/mwlabs/wst/ba11/BusinessActivityTerminatorImple.java
===================================================================
--- labs/jbosstm/workspace/XTS_TX11/WSTX/classes/com/arjuna/mwlabs/wst/ba11/BusinessActivityTerminatorImple.java	                        (rev 0)
+++ labs/jbosstm/workspace/XTS_TX11/WSTX/classes/com/arjuna/mwlabs/wst/ba11/BusinessActivityTerminatorImple.java	2007-08-14 12:43:41 UTC (rev 14200)
@@ -0,0 +1,211 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag.  All rights reserved. 
+ * See the copyright.txt in the distribution for a full listing 
+ * of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU General Public License, v. 2.0.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A 
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+ * PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+ * You should have received a copy of the GNU General Public License,
+ * v. 2.0 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+ * MA  02110-1301, USA.
+ * 
+ * (C) 2005-2006,
+ * @author JBoss Inc.
+ */
+/*
+ * Copyright (C) 2003,
+ *
+ * Arjuna Technologies Limited,
+ * Newcastle upon Tyne,
+ * Tyne and Wear,
+ * UK.
+ *
+ * $Id: BusinessActivityTerminatorImple.java,v 1.3.18.1 2005/11/22 10:36:14 kconner Exp $
+ */
+
+package com.arjuna.mwlabs.wst.ba11;
+
+import com.arjuna.mw.wsas.activity.ActivityHierarchy;
+import com.arjuna.mw.wscf.exceptions.ProtocolNotRegisteredException;
+import com.arjuna.mw.wscf.model.sagas.CoordinatorManagerFactory;
+import com.arjuna.mw.wscf.model.sagas.api.CoordinatorManager;
+import com.arjuna.webservices.wsjbosstx.processors.TerminationCoordinatorProcessor;
+import com.arjuna.wst.BusinessActivityTerminator;
+import com.arjuna.wst.SystemException;
+import com.arjuna.wst.TransactionRolledBackException;
+import com.arjuna.wst.UnknownTransactionException;
+
+public class BusinessActivityTerminatorImple implements BusinessActivityTerminator
+{
+    public BusinessActivityTerminatorImple ()
+        throws SystemException
+    {
+        try
+        {
+            _coordManager = CoordinatorManagerFactory.coordinatorManager();
+            _hier = _coordManager.currentActivity();
+        }
+        catch (ProtocolNotRegisteredException pnre)
+        {
+            throw new SystemException(pnre.toString());
+        }
+        catch (com.arjuna.mw.wsas.exceptions.SystemException ex)
+        {
+            throw new SystemException(ex.toString());
+        }
+    }
+    
+    public void close () throws TransactionRolledBackException, UnknownTransactionException, SystemException
+    {
+        try
+        {
+            if (_hier == null)
+            throw new UnknownTransactionException();
+
+            _coordManager.resume(_hier);
+        
+            _coordManager.close();
+        }
+        catch (com.arjuna.mw.wsas.exceptions.InvalidActivityException ex)
+        {
+            throw new UnknownTransactionException();
+        }
+        catch (com.arjuna.mw.wsas.exceptions.ProtocolViolationException ex)
+        {
+            throw new SystemException(ex.toString());
+        }
+        catch (com.arjuna.mw.wscf.model.sagas.exceptions.CoordinatorCancelledException ex)
+        {
+            throw new TransactionRolledBackException();
+        }
+        catch (com.arjuna.mw.wscf.exceptions.NoCoordinatorException ex)
+        {
+            throw new UnknownTransactionException();
+        }
+        catch (com.arjuna.mw.wsas.exceptions.WrongStateException ex)
+        {
+            throw new SystemException(ex.toString());
+        }
+        catch (com.arjuna.mw.wsas.exceptions.NoPermissionException ex)
+        {
+            throw new SystemException(ex.toString());
+        }
+        catch (com.arjuna.mw.wsas.exceptions.SystemException ex)
+        {
+            throw new SystemException(ex.toString());
+        }
+        catch (UnknownTransactionException ex)
+        {
+            throw ex;
+        }
+        finally
+        {
+            TerminationCoordinatorProcessor.getProcessor().deactivateParticipant(this) ;
+        }
+    }
+
+    public void cancel () throws UnknownTransactionException, SystemException
+    {
+	try
+	{
+	    if (_hier == null)
+		throw new UnknownTransactionException();
+
+	    _coordManager.resume(_hier);
+	
+	    _coordManager.cancel();
+	}
+	catch (com.arjuna.mw.wsas.exceptions.InvalidActivityException ex)
+	{
+	    throw new UnknownTransactionException();
+	}
+	catch (com.arjuna.mw.wsas.exceptions.WrongStateException ex)
+	{
+	    throw new SystemException(ex.toString());
+	}
+	catch (com.arjuna.mw.wsas.exceptions.NoPermissionException ex)
+	{
+	    throw new SystemException(ex.toString());
+	}
+	catch (com.arjuna.mw.wsas.exceptions.ProtocolViolationException ex)
+	{
+	    throw new SystemException(ex.toString());
+	}
+	catch (com.arjuna.mw.wscf.model.sagas.exceptions.CoordinatorConfirmedException ex)
+	{
+	    throw new SystemException(ex.toString());
+	}
+	catch (com.arjuna.mw.wscf.exceptions.NoCoordinatorException ex)
+	{
+	    throw new UnknownTransactionException();
+	}
+	catch (com.arjuna.mw.wsas.exceptions.SystemException ex)
+	{
+	    throw new SystemException();
+	}
+	catch (UnknownTransactionException ex)
+	{
+	    throw ex;
+	}
+	finally
+	{
+        TerminationCoordinatorProcessor.getProcessor().deactivateParticipant(this) ;
+	}
+    }
+
+    /**
+     * Complete doesn't mean go away, it just means that all work you need to
+     * accomplish the commit/rollback has been received.
+     */
+
+    public void complete () throws UnknownTransactionException, SystemException
+    {
+	try
+	{
+	    if (_hier == null)
+		throw new UnknownTransactionException();
+
+	    _coordManager.resume(_hier);
+	
+	    _coordManager.complete();
+	}
+	catch (com.arjuna.mw.wsas.exceptions.InvalidActivityException ex)
+	{
+	    throw new UnknownTransactionException();
+	}
+	catch (com.arjuna.mw.wsas.exceptions.WrongStateException ex)
+	{
+	    throw new SystemException(ex.toString());
+	}
+	catch (com.arjuna.mw.wsas.exceptions.NoPermissionException ex)
+	{
+	    throw new SystemException(ex.toString());
+	}
+	catch (com.arjuna.mw.wsas.exceptions.ProtocolViolationException ex)
+	{
+	    throw new SystemException(ex.toString());
+	}
+	catch (com.arjuna.mw.wscf.exceptions.NoCoordinatorException ex)
+	{
+	    throw new UnknownTransactionException();
+	}
+	catch (com.arjuna.mw.wsas.exceptions.SystemException ex)
+	{
+	    throw new SystemException();
+	}
+	catch (UnknownTransactionException ex)
+	{
+	    throw ex;
+	}
+    }
+
+    private CoordinatorManager                   _coordManager = null;
+    private ActivityHierarchy                    _hier = null;
+    
+}


Property changes on: labs/jbosstm/workspace/XTS_TX11/WSTX/classes/com/arjuna/mwlabs/wst/ba11/BusinessActivityTerminatorImple.java
___________________________________________________________________
Name: svn:keywords
   + Rev Date
Name: svn:eol-style
   + native

Added: labs/jbosstm/workspace/XTS_TX11/WSTX/classes/com/arjuna/mwlabs/wst/ba11/ContextFactoryImple.java
===================================================================
--- labs/jbosstm/workspace/XTS_TX11/WSTX/classes/com/arjuna/mwlabs/wst/ba11/ContextFactoryImple.java	                        (rev 0)
+++ labs/jbosstm/workspace/XTS_TX11/WSTX/classes/com/arjuna/mwlabs/wst/ba11/ContextFactoryImple.java	2007-08-14 12:43:41 UTC (rev 14200)
@@ -0,0 +1,208 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag.  All rights reserved. 
+ * See the copyright.txt in the distribution for a full listing 
+ * of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU General Public License, v. 2.0.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A 
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+ * PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+ * You should have received a copy of the GNU General Public License,
+ * v. 2.0 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+ * MA  02110-1301, USA.
+ * 
+ * (C) 2005-2006,
+ * @author JBoss Inc.
+ */
+/*
+ * Copyright (C) 2002,
+ *
+ * Arjuna Technologies Limited,
+ * Newcastle upon Tyne,
+ * Tyne and Wear,
+ * UK.
+ *
+ * $Id: ContextFactoryImple.java,v 1.4.4.1 2005/11/22 10:36:14 kconner Exp $
+ */
+
+package com.arjuna.mwlabs.wst.ba11;
+
+import com.arjuna.mw.wscf.model.sagas.CoordinatorManagerFactory;
+import com.arjuna.mw.wscf.model.sagas.api.CoordinatorManager;
+import com.arjuna.mw.wstx.logging.wstxLogger;
+import com.arjuna.mwlabs.wst.ba11.context.JBossContextImple;
+import com.arjuna.webservices.SoapRegistry;
+import com.arjuna.webservices.stax.URI;
+import com.arjuna.webservices.wsaddr2005.AttributedURIType;
+import com.arjuna.webservices.wsaddr2005.EndpointReferenceType;
+import com.arjuna.webservices.wsjboss.InstanceIdentifier;
+import com.arjuna.webservices.wsjbosstx.processors.TerminationCoordinatorProcessor;
+import com.arjuna.webservices.wsba11.BusinessActivityConstants;
+import com.arjuna.webservices.wscoor11.AttributedUnsignedIntType;
+import com.arjuna.webservices.wscoor11.CoordinationConstants;
+import com.arjuna.webservices.wscoor11.CoordinationContextType;
+import com.arjuna.wsc.ContextFactory11;
+import com.arjuna.wsc.InvalidCreateParametersException;
+
+public class ContextFactoryImple implements ContextFactory11
+{
+
+    public ContextFactoryImple ()
+    {
+        try
+        {
+            _coordManager = CoordinatorManagerFactory.coordinatorManager();
+
+            _theRegistrar = new RegistrarImple();
+        }
+        catch (Exception ex)
+        {
+            ex.printStackTrace();
+        }
+    }
+
+    /**
+     * Called when a context factory is added to a context factory mapper. This method will be called multiple times
+     * if the context factory is added to multiple context factory mappers or to the same context mapper with different
+     * protocol identifiers.
+     *
+     * @param coordinationTypeURI the coordination type uri
+     */
+
+    public void install (final String coordinationTypeURI)
+    {
+    }
+
+    // TODO interposition
+
+    /*
+     * If there is a context passed through to create then this newly created
+     * coordinator should be interposed.
+     */
+
+    /**
+     * Creates a coordination context.
+     *
+     * @param coordinationTypeURI the coordination type uri
+     * @param expires the expire date/time for the returned context, can be null
+     * @param currentContext the current context, can be null
+     *
+     * @return the created coordination context
+     *
+     * @throws InvalidCreateParametersException if a parameter passed is invalid
+     *         this activity identifier.
+     *
+     * @message com.arjuna.mwlabs.wst.ba11.ContextFactoryImple_1 [com.arjuna.mwlabs.wst.ba11.ContextFactoryImple_1] - Invalid type URI: < {0} , {1} >
+     * @message com.arjuna.mwlabs.wst.ba11.ContextFactoryImple_3 [com.arjuna.mwlabs.wst.ba11.ContextFactoryImple_3] - Invalid type URI: 
+     */
+
+    public CoordinationContextType create (final String coordinationTypeURI,
+            final Long expires, final CoordinationContextType currentContext)
+        throws InvalidCreateParametersException
+    {
+        if (BusinessActivityConstants.WSBA_PROTOCOL_ATOMIC_OUTCOME.equals(coordinationTypeURI))
+    	{
+    	    try
+    	    {
+    		// make sure no transaction is currently associated
+    
+    		_coordManager.suspend();
+    		
+    		final int timeout ;
+            if (expires == null)
+            {
+                timeout = 0 ;
+            }
+            else
+            {
+                final long longTimeout = expires.longValue() ;
+                timeout = (longTimeout > Integer.MAX_VALUE ? Integer.MAX_VALUE : (int)longTimeout) ;
+            }
+    		
+    		_coordManager.begin(timeout);
+    
+            final JBossContextImple arjunaContext = JBossContextImple.getContext() ;
+            final SoapRegistry soapRegistry = SoapRegistry.getRegistry() ;
+            final String registrationCoordinatorURI = soapRegistry.getServiceURI(CoordinationConstants.SERVICE_REGISTRATION_COORDINATOR) ;
+            
+            final CoordinationContextType coordinationContext = new CoordinationContextType() ;
+            coordinationContext.setCoordinationType(new URI(coordinationTypeURI)) ;
+            coordinationContext.setIdentifier(new AttributedURIType("urn:"+arjunaContext.getTransactionIdentifier())) ;
+            final int transactionExpires = arjunaContext.getTransactionExpires() ;
+            if (transactionExpires > 0)
+            {
+                coordinationContext.setExpires(new AttributedUnsignedIntType(transactionExpires)) ;
+            }
+            final EndpointReferenceType registrationCoordinator = new EndpointReferenceType(new AttributedURIType(registrationCoordinatorURI)) ;
+            InstanceIdentifier.setEndpointInstanceIdentifier(registrationCoordinator, arjunaContext.getTransactionIdentifier()) ;
+            coordinationContext.setRegistrationService(registrationCoordinator) ;
+            
+            TerminationCoordinatorProcessor.getProcessor().activateParticipant(new BusinessActivityTerminatorImple(), arjunaContext.getTransactionIdentifier()) ;
+    
+    		_theRegistrar.associate();
+    
+    		return coordinationContext;
+	    }
+	    catch (com.arjuna.mw.wsas.exceptions.NoActivityException ex)
+	    {
+		// TODO handle properly
+
+		ex.printStackTrace();
+	    }
+	    catch (com.arjuna.mw.wsas.exceptions.SystemException ex)
+	    {
+		// TODO handle properly
+
+		ex.printStackTrace();
+	    }
+	    catch (com.arjuna.mw.wsas.exceptions.WrongStateException ex)
+	    {
+		// TODO handle properly
+
+		ex.printStackTrace();
+	    }
+	    catch (Exception ex)
+	    {
+		// TODO handle properly
+
+		ex.printStackTrace();
+	    }
+	}
+	else
+	{
+	    wstxLogger.arjLoggerI18N.warn("com.arjuna.mwlabs.wst.ba11.ContextFactoryImple_1",
+					  new Object[]{BusinessActivityConstants.WSBA_PROTOCOL_ATOMIC_OUTCOME, coordinationTypeURI});
+
+	    throw new InvalidCreateParametersException(wstxLogger.log_mesg.getString("com.arjuna.mwlabs.wst.ba11.ContextFactoryImple_3")+" < "+BusinessActivityConstants.WSBA_PROTOCOL_ATOMIC_OUTCOME+", "+coordinationTypeURI+" >");
+	}
+
+	return null;
+    }
+
+    /**
+     * Called when a context factory is removed from a context factory mapper. This method will be called multiple
+     * times if the context factory is removed from multiple context factory mappers or from the same context factory
+     * mapper with different coordination type uris.
+     *
+     * @param serviceAddress the address of the service
+     * @param coordinationTypeURI the coordination type uri
+     */
+
+    public void uninstall (String coordinationTypeURI)
+    {
+	// we don't use this as one implementation is registered per type
+    }
+
+    public final RegistrarImple registrar ()
+    {
+	return _theRegistrar;
+    }
+
+    private CoordinatorManager                   _coordManager;
+    private RegistrarImple                       _theRegistrar;
+    
+}


Property changes on: labs/jbosstm/workspace/XTS_TX11/WSTX/classes/com/arjuna/mwlabs/wst/ba11/ContextFactoryImple.java
___________________________________________________________________
Name: svn:keywords
   + Rev Date
Name: svn:eol-style
   + native

Added: labs/jbosstm/workspace/XTS_TX11/WSTX/classes/com/arjuna/mwlabs/wst/ba11/ContextImple.java
===================================================================
--- labs/jbosstm/workspace/XTS_TX11/WSTX/classes/com/arjuna/mwlabs/wst/ba11/ContextImple.java	                        (rev 0)
+++ labs/jbosstm/workspace/XTS_TX11/WSTX/classes/com/arjuna/mwlabs/wst/ba11/ContextImple.java	2007-08-14 12:43:41 UTC (rev 14200)
@@ -0,0 +1,72 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag.  All rights reserved. 
+ * See the copyright.txt in the distribution for a full listing 
+ * of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU General Public License, v. 2.0.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A 
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+ * PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+ * You should have received a copy of the GNU General Public License,
+ * v. 2.0 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+ * MA  02110-1301, USA.
+ * 
+ * (C) 2005-2006,
+ * @author JBoss Inc.
+ */
+/*
+ * Copyright (C) 2002,
+ *
+ * Arjuna Technologies Limited,
+ * Newcastle upon Tyne,
+ * Tyne and Wear,
+ * UK.
+ *
+ * $Id: ContextImple.java,v 1.3.6.1 2005/11/22 10:36:14 kconner Exp $
+ */
+
+package com.arjuna.mwlabs.wst.ba11;
+
+import com.arjuna.mw.wsc.context.Context11;
+import com.arjuna.webservices.wscoor11.CoordinationContextType;
+
+public class ContextImple implements Context11
+{
+    public ContextImple (CoordinationContextType ctx)
+    {
+        _coordContext = ctx;
+    }
+
+    public boolean equals (Object obj)
+    {
+        if (obj instanceof ContextImple)
+        {
+    	    ContextImple ci = (ContextImple) obj;
+    	    
+            return ci.getCoordinationContext().getIdentifier().getValue().equals(_coordContext.getIdentifier().getValue());
+        }
+        else
+            return false;
+    }
+
+    public CoordinationContextType getCoordinationContext ()
+    {
+    	return _coordContext;
+    }
+    
+    public void setCoordinationContext (CoordinationContextType cc)
+    {
+    	_coordContext = cc;
+    }
+
+    public String toString ()
+    {
+    	return "BusinessActivityIdentifier: "+_coordContext.getIdentifier().getValue();
+    }
+
+    private CoordinationContextType _coordContext;
+}


Property changes on: labs/jbosstm/workspace/XTS_TX11/WSTX/classes/com/arjuna/mwlabs/wst/ba11/ContextImple.java
___________________________________________________________________
Name: svn:keywords
   + Rev Date
Name: svn:eol-style
   + native

Added: labs/jbosstm/workspace/XTS_TX11/WSTX/classes/com/arjuna/mwlabs/wst/ba11/RegistrarImple.java
===================================================================
--- labs/jbosstm/workspace/XTS_TX11/WSTX/classes/com/arjuna/mwlabs/wst/ba11/RegistrarImple.java	                        (rev 0)
+++ labs/jbosstm/workspace/XTS_TX11/WSTX/classes/com/arjuna/mwlabs/wst/ba11/RegistrarImple.java	2007-08-14 12:43:41 UTC (rev 14200)
@@ -0,0 +1,268 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag.  All rights reserved. 
+ * See the copyright.txt in the distribution for a full listing 
+ * of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU General Public License, v. 2.0.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A 
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+ * PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+ * You should have received a copy of the GNU General Public License,
+ * v. 2.0 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+ * MA  02110-1301, USA.
+ * 
+ * (C) 2005-2006,
+ * @author JBoss Inc.
+ */
+/*
+ * Copyright (C) 2002, 2003, 2004,
+ *
+ * Arjuna Technologies Limited,
+ * Newcastle upon Tyne,
+ * Tyne and Wear,
+ * UK.
+ *
+ * $Id: RegistrarImple.java,v 1.7.4.1 2005/11/22 10:36:14 kconner Exp $
+ */
+
+package com.arjuna.mwlabs.wst.ba11;
+
+import java.util.HashMap;
+
+import com.arjuna.ats.arjuna.common.Uid;
+import com.arjuna.mw.wsas.activity.ActivityHierarchy;
+import com.arjuna.mw.wsas.exceptions.SystemException;
+import com.arjuna.mw.wscf.exceptions.ProtocolNotRegisteredException;
+import com.arjuna.mw.wscf.model.sagas.CoordinatorManagerFactory;
+import com.arjuna.mw.wscf.model.sagas.api.CoordinatorManager;
+import com.arjuna.mw.wstx.logging.wstxLogger;
+import com.arjuna.mwlabs.wst.ba11.participants.BusinessAgreementWithCoordinatorCompletionImple;
+import com.arjuna.mwlabs.wst.ba11.participants.BusinessAgreementWithParticipantCompletionImple;
+import com.arjuna.webservices.SoapRegistry;
+import com.arjuna.webservices.wsaddr2005.AttributedURIType;
+import com.arjuna.webservices.wsaddr2005.EndpointReferenceType;
+import com.arjuna.webservices.wsjboss.InstanceIdentifier;
+import com.arjuna.webservices.wsjbosstx.JBossTXConstants;
+import com.arjuna.webservices.wsba11.BusinessActivityConstants;
+import com.arjuna.wsc.CannotRegisterParticipantException;
+import com.arjuna.wsc.InvalidProtocolException;
+import com.arjuna.wsc.InvalidStateException;
+import com.arjuna.wsc.NoActivityException;
+import com.arjuna.wsc.Registrar11;
+import com.arjuna.wsc.RegistrarMapper11;
+import com.arjuna.wst.messaging.engines.CoordinatorCompletionCoordinator11Engine;
+import com.arjuna.wst.messaging.engines.ParticipantCompletionCoordinator11Engine;
+import com.arjuna.wst.stub.BusinessAgreementWithCoordinatorCompletion11Stub;
+import com.arjuna.wst.stub.BusinessAgreementWithParticipantCompletion11Stub;
+
+public class RegistrarImple implements Registrar11
+{
+
+	public RegistrarImple () throws ProtocolNotRegisteredException,
+			SystemException
+	{
+		_coordManager = CoordinatorManagerFactory.coordinatorManager();
+
+		// register with mapper using tx id as protocol identifier.
+		final RegistrarMapper11 mapper = RegistrarMapper11.getFactory();
+
+		mapper.addRegistrar(BusinessActivityConstants.WSBA_SUB_PROTOCOL_PARTICIPANT_COMPLETION, this);
+		mapper.addRegistrar(BusinessActivityConstants.WSBA_SUB_PROTOCOL_COORDINATOR_COMPLETION, this);
+		mapper.addRegistrar(JBossTXConstants.WSJBOSSTX_PROTOCOL_TERMINATION, this);
+	}
+
+	/**
+	 * Called when a registrar is added to a register mapper. This method will
+	 * be called multiple times if the registrar is added to multiple register
+	 * mappers or to the same register mapper with different protocol
+	 * identifiers.
+	 * 
+	 * @param serviceAddress
+	 *            the address of the service
+	 * @param protocolIdentifier
+	 *            the protocol identifier
+	 */
+
+	public void install (String protocolIdentifier)
+	{
+	}
+
+	/**
+	 * Registers the interest of participant in a particular protocol.
+	 * 
+	 * @param participantProtocolServiceAddress
+	 *            the address of the participant protocol service
+	 * @param protocolIdentifier
+	 *            the protocol identifier
+	 * 
+	 * @return the PortReference of the coordinator protocol service
+	 * 
+	 * @throws CannotRegisterParticipantException
+	 *             if the participant cannot be registered for this
+	 *             coordination protocol under this activity identifier
+	 * @throws InvalidProtocolException
+	 *             if the coordination protocol is not supported
+	 * @throws InvalidStateException
+	 *             if the state of the coordinator no longer allows registration
+	 *             for this coordination protocol
+	 * @throws NoActivityException
+	 *             if the activity does not exist.
+	 * 
+	 * @message com.arjuna.mwlabs.wst.ba11.RegistrarImple_1
+	 *          [com.arjuna.mwlabs.wst.ba11.RegistrarImple_1] - Invalid type URI: <
+	 *          {0} , {1} >
+	 */
+
+	public EndpointReferenceType register (
+			final EndpointReferenceType participantProtocolService,
+			final String protocolIdentifier,
+			final InstanceIdentifier instanceIdentifier)
+			throws CannotRegisterParticipantException, InvalidProtocolException,
+			InvalidStateException, NoActivityException
+	{
+		ActivityHierarchy hier = (ActivityHierarchy) _hierarchies
+				.get(instanceIdentifier.getInstanceIdentifier());
+
+		if (hier == null) throw new NoActivityException();
+
+		try
+		{
+			_coordManager.resume(hier);
+		}
+		catch (com.arjuna.mw.wsas.exceptions.InvalidActivityException ex)
+		{
+			throw new NoActivityException();
+		}
+		catch (com.arjuna.mw.wsas.exceptions.SystemException ex)
+		{
+			throw new InvalidProtocolException();
+		}
+
+		// TODO check for AlreadyRegisteredException
+
+		if (BusinessActivityConstants.WSBA_SUB_PROTOCOL_PARTICIPANT_COMPLETION.equals(protocolIdentifier))
+		{
+			// enlist participant that wraps the requester URI.
+			final String id = new Uid().stringForm();
+
+			try
+			{
+                final ParticipantCompletionCoordinator11Engine engine = new ParticipantCompletionCoordinator11Engine(id, participantProtocolService) ;
+				BusinessAgreementWithParticipantCompletionImple participant = new BusinessAgreementWithParticipantCompletionImple(
+						new BusinessAgreementWithParticipantCompletion11Stub(engine), id);
+                engine.setCoordinator(participant.participantManager()) ;
+
+				_coordManager.enlistParticipant(participant);
+
+				_coordManager.suspend();
+
+				return getParticipantManager(
+						BusinessActivityConstants.SERVICE_PARTICIPANT_COMPLETION_COORDINATOR,
+						id);
+			}
+			catch (Exception ex)
+			{
+				throw new InvalidStateException();
+			}
+		}
+		else
+			if (BusinessActivityConstants.WSBA_SUB_PROTOCOL_COORDINATOR_COMPLETION.equals(protocolIdentifier))
+			{
+				final String id = new Uid().stringForm();
+				try
+				{
+                    final CoordinatorCompletionCoordinator11Engine engine = new CoordinatorCompletionCoordinator11Engine(id, participantProtocolService) ;
+					BusinessAgreementWithCoordinatorCompletionImple participant = new BusinessAgreementWithCoordinatorCompletionImple(
+							new BusinessAgreementWithCoordinatorCompletion11Stub(engine), id);
+                    engine.setCoordinator(participant.participantManager()) ;
+
+					_coordManager.enlistParticipant(participant);
+
+					_coordManager.suspend();
+
+					return getParticipantManager(
+							BusinessActivityConstants.SERVICE_COORDINATOR_COMPLETION_COORDINATOR,
+							id);
+				}
+				catch (Exception ex)
+				{
+					throw new InvalidStateException();
+				}
+			}
+			else
+				if (JBossTXConstants.WSJBOSSTX_PROTOCOL_TERMINATION.equals(protocolIdentifier))
+				{
+					try
+					{
+						return getParticipantManager(
+							JBossTXConstants.SERVICE_TERMINATION_COORDINATOR,
+								instanceIdentifier.getInstanceIdentifier());
+					}
+					catch (Exception ex)
+					{
+						throw new InvalidStateException();
+					}
+				}
+				else
+				{
+					wstxLogger.arjLoggerI18N
+							.warn(
+									"com.arjuna.mwlabs.wst.ba11.RegistrarImple_1",
+									new Object[] { BusinessActivityConstants.WSBA_PROTOCOL_ATOMIC_OUTCOME, protocolIdentifier });
+
+					throw new InvalidProtocolException();
+				}
+	}
+
+	/**
+	 * Called when a registrar is removed from a register mapper. This method
+	 * will be called multiple times if the registrar is removed from multiple
+	 * register mappers or from the same register mapper with different protocol
+	 * identifiers.
+	 * 
+	 * @param serviceAddress
+	 *            the address of the service
+	 * @param protocolIdentifier
+	 *            the protocol identifier
+	 */
+
+	public void uninstall (String protocolIdentifier)
+	{
+	}
+
+	public final void associate () throws Exception
+	{
+		// TODO colocation won't do suspend
+
+		String txIdentifier = _coordManager.identifier().toString();
+		ActivityHierarchy hier = _coordManager.suspend();
+
+		_hierarchies.put(txIdentifier, hier);
+	}
+
+	public final void disassociate (String txIdentifier) throws Exception
+	{
+		_hierarchies.remove(txIdentifier);
+	}
+
+	private EndpointReferenceType getParticipantManager (final String service,
+			final String id)
+	{
+		final SoapRegistry soapRegistry = SoapRegistry.getRegistry();
+		final String participantManagerParticipantURI = soapRegistry
+				.getServiceURI(service);
+		final EndpointReferenceType participantManagerParticipant = new EndpointReferenceType(
+				new AttributedURIType(participantManagerParticipantURI));
+		InstanceIdentifier.setEndpointInstanceIdentifier(
+				participantManagerParticipant, id);
+		return participantManagerParticipant;
+	}
+
+	private CoordinatorManager _coordManager = null;
+
+	private HashMap _hierarchies = new HashMap();
+}


Property changes on: labs/jbosstm/workspace/XTS_TX11/WSTX/classes/com/arjuna/mwlabs/wst/ba11/RegistrarImple.java
___________________________________________________________________
Name: svn:keywords
   + Rev Date
Name: svn:eol-style
   + native

Added: labs/jbosstm/workspace/XTS_TX11/WSTX/classes/com/arjuna/mwlabs/wst/ba11/context/DeploymentContextImple.java
===================================================================
--- labs/jbosstm/workspace/XTS_TX11/WSTX/classes/com/arjuna/mwlabs/wst/ba11/context/DeploymentContextImple.java	                        (rev 0)
+++ labs/jbosstm/workspace/XTS_TX11/WSTX/classes/com/arjuna/mwlabs/wst/ba11/context/DeploymentContextImple.java	2007-08-14 12:43:41 UTC (rev 14200)
@@ -0,0 +1,55 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag.  All rights reserved. 
+ * See the copyright.txt in the distribution for a full listing 
+ * of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU General Public License, v. 2.0.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A 
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+ * PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+ * You should have received a copy of the GNU General Public License,
+ * v. 2.0 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+ * MA  02110-1301, USA.
+ * 
+ * (C) 2005-2006,
+ * @author JBoss Inc.
+ */
+/*
+ * Copyright (C) 2002,
+ *
+ * Arjuna Technologies Limited,
+ * Newcastle upon Tyne,
+ * Tyne and Wear,
+ * UK.
+ *
+ * $Id: DeploymentContextImple.java,v 1.2.20.1 2005/11/22 10:36:15 kconner Exp $
+ */
+
+package com.arjuna.mwlabs.wst.ba11.context;
+
+import com.arjuna.mw.wsas.context.Context;
+import com.arjuna.mw.wsas.context.DeploymentContext;
+
+/**
+ * @author Mark Little (mark at arjuna.com)
+ * @version $Id: DeploymentContextImple.java,v 1.2.20.1 2005/11/22 10:36:15 kconner Exp $
+ * @since 1.0.
+ */
+
+public class DeploymentContextImple implements DeploymentContext
+{
+
+    public DeploymentContextImple ()
+    {
+    }
+    
+    public Context context ()
+    {
+        return JBossContextImple.getContext();
+    }
+
+}


Property changes on: labs/jbosstm/workspace/XTS_TX11/WSTX/classes/com/arjuna/mwlabs/wst/ba11/context/DeploymentContextImple.java
___________________________________________________________________
Name: svn:keywords
   + Rev Date
Name: svn:eol-style
   + native

Added: labs/jbosstm/workspace/XTS_TX11/WSTX/classes/com/arjuna/mwlabs/wst/ba11/context/JBossContextImple.java
===================================================================
--- labs/jbosstm/workspace/XTS_TX11/WSTX/classes/com/arjuna/mwlabs/wst/ba11/context/JBossContextImple.java	                        (rev 0)
+++ labs/jbosstm/workspace/XTS_TX11/WSTX/classes/com/arjuna/mwlabs/wst/ba11/context/JBossContextImple.java	2007-08-14 12:43:41 UTC (rev 14200)
@@ -0,0 +1,258 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag.  All rights reserved. 
+ * See the copyright.txt in the distribution for a full listing 
+ * of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU General Public License, v. 2.0.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A 
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+ * PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+ * You should have received a copy of the GNU General Public License,
+ * v. 2.0 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+ * MA  02110-1301, USA.
+ * 
+ * (C) 2005-2006,
+ * @author JBoss Inc.
+ */
+/*
+ * Copyright (C) 2002,
+ *
+ * Arjuna Technologies Limited,
+ * Newcastle upon Tyne,
+ * Tyne and Wear,
+ * UK.
+ *
+ * $Id: JBossContextImple.java,v 1.6.6.1 2005/11/22 10:36:16 kconner Exp $
+ */
+
+package com.arjuna.mwlabs.wst.ba11.context;
+
+import javax.xml.parsers.DocumentBuilder;
+
+import org.w3c.dom.Element;
+
+import com.arjuna.ats.arjuna.coordinator.ActionHierarchy;
+import com.arjuna.mw.wsas.UserActivityFactory;
+import com.arjuna.mw.wsas.activity.ActivityHierarchy;
+import com.arjuna.mw.wsas.context.Context;
+import com.arjuna.mw.wsas.context.ContextManager;
+import com.arjuna.mw.wsas.context.soap.SOAPContext;
+import com.arjuna.mw.wsas.exceptions.SystemException;
+import com.arjuna.mw.wscf.utils.DomUtil;
+import com.arjuna.mw.wstx.logging.wstxLogger;
+import com.arjuna.mwlabs.wscf.model.sagas.arjunacore.ACCoordinator;
+import com.arjuna.webservices.wsba11.BusinessActivityConstants;
+import com.arjuna.webservices.wscoor11.CoordinationConstants;
+
+/**
+ * On demand this class creates the SOAP context information necessary to
+ * propagate the hierarchy of coordinators associated with the current
+ * thread.
+ *
+ * @author Mark Little (mark.little at arjuna.com)
+ * @version $Id: JBossContextImple.java,v 1.6.6.1 2005/11/22 10:36:16 kconner Exp $
+ */
+
+public class JBossContextImple implements SOAPContext
+{
+
+    public JBossContextImple ()
+    {
+        _context = null;
+    }
+    
+    public JBossContextImple (ACCoordinator currentCoordinator)
+    {
+    	_context = null;
+    	
+    	initialiseContext(currentCoordinator);
+    }
+    
+    /**
+     * Serialise the SOAP context into a DOM node.
+     * @param element The element to contain the serialisation.
+     * @return the element added.
+     */
+    public Element serialiseToElement(final Element element)
+    {
+        final Element context = context() ;
+        element.appendChild(context) ;
+        return context ;
+    }
+    
+    public void initialiseContext(Object param) throws java.security.InvalidParameterException
+    {
+    	try
+    	{
+    	    ACCoordinator currentCoordinator = (ACCoordinator) param;
+    
+    	    ActivityHierarchy hier = null;
+    	
+    	    try
+    	    {
+    	        hier = UserActivityFactory.userActivity().currentActivity();
+    	    }
+    	    catch (SystemException ex)
+    	    {
+    	        ex.printStackTrace();
+    	    }
+
+    	    if ((currentCoordinator != null) && (hier != null))
+    	    {
+        		/*
+        		 * Do the manditory stuff first.
+        		 */
+        
+        		ActionHierarchy txHier = currentCoordinator.getHierarchy();
+                final int depth = txHier.depth() ;
+                _identifierValues = new String[depth] ;
+                _expiresValues = new int[depth] ;
+                
+                _identifierValues[0] = txHier.getDeepestActionUid().stringForm() ;
+                _expiresValues[0] = hier.activity(hier.size()-1).getTimeout() ;
+        	    
+        		/*
+        		 * Now let's do the optional stuff.
+        		 */
+                for(int count = 1, index = 0 ; count < depth ; count++, index++)
+                {
+                    _identifierValues[count] = txHier.getActionUid(index).stringForm() ;
+                    _expiresValues[count] = hier.activity(index).getTimeout() ;
+                }
+            }
+    	}
+    	catch (ClassCastException ex)
+    	{
+    	    throw new java.security.InvalidParameterException();
+    	}
+    }
+    
+    /**
+     * @return the context document object.
+     */
+    private synchronized Element context()
+    {
+        if (_context == null)
+        {
+            DocumentBuilder builder = com.arjuna.mw.wscf.utils.DomUtil.getDocumentBuilder();
+            org.w3c.dom.Document doc = builder.newDocument();
+    
+            _context = doc.createElement("wscoor:"+_contextName);
+        
+            _context.setAttribute("xmlns:wsu", _wsuNamespace);
+            _context.setAttribute("xmlns:wscoor", _wscoorNamespace);
+            _context.setAttribute("xmlns:arjuna", _arjunaNamespace);
+            
+            if (_identifierValues != null)
+            {
+                /*
+                 * Do the manditory stuff first.
+                 */
+
+                org.w3c.dom.Element identifier = doc.createElement("wsu:"+_identifier);
+                identifier.appendChild(doc.createTextNode(_identifierValues[0]));
+        
+                _context.appendChild(identifier);
+        
+                org.w3c.dom.Element expires = doc.createElement("wsu:"+_expires);
+                expires.appendChild(doc.createTextNode(Integer.toString(_expiresValues[0])));
+        
+                _context.appendChild(expires);
+                
+                org.w3c.dom.Element coordinationType = doc.createElement("wscoor:CoordinationType");
+                coordinationType.appendChild(doc.createTextNode(BusinessActivityConstants.WSBA_PROTOCOL_ATOMIC_OUTCOME));
+        
+                _context.appendChild(coordinationType);
+                
+                /*
+                 * Now let's do the optional stuff.
+                 */
+                final int depth = _identifierValues.length ;
+                if (depth > 1)
+                {
+                    org.w3c.dom.Element extensionRoot = doc.createElement("arjuna:"+_contextName);
+    
+                    for(int count = 1; count < depth ; count++)
+                    {
+                        identifier = doc.createElement("arjuna:"+_identifier);
+                        identifier.appendChild(doc.createTextNode(_identifierValues[count]));
+            
+                        extensionRoot.appendChild(identifier);
+                        
+                        expires = doc.createElement("arjuna:"+_expires);
+                        expires.appendChild(doc.createTextNode(Integer.toString(_expiresValues[count])));
+            
+                        extensionRoot.appendChild(expires);
+                    }
+                    
+                    _context.appendChild(extensionRoot);
+                }
+            }
+        }
+        return _context ;
+    }
+
+    public String identifier ()
+    {
+        return JBossContextImple.class.getName();
+    }
+    
+    public String getTransactionIdentifier()
+    {
+        return _identifierValues[0] ;
+    }
+    
+    public int getTransactionExpires()
+    {
+        return _expiresValues[0] ;
+    }
+
+    public String toString ()
+    {
+        return DomUtil.nodeAsString(_context);
+    }
+    
+    /**
+     * @message com.arjuna.mwlabs.wst.ba11.context.JBossContextImple_1 [com.arjuna.mwlabs.wst.ba11.context.JBossContextImple_1] - ignoring context: 
+     */
+    public static JBossContextImple getContext()
+    {
+        ContextManager cxman = new ContextManager();
+        Context[] contexts = cxman.contexts();
+
+        for (int i = 0; i < contexts.length; i++)
+        {
+            if (contexts[i].identifier().equals(JBossContextImple.class.getName()))
+            {
+                if (contexts[i] instanceof JBossContextImple)
+                {
+                    return (JBossContextImple)contexts[i] ;
+                }
+                else
+                {
+                    wstxLogger.arjLoggerI18N.warn("com.arjuna.mwlabs.wst.ba11.context.JBossContextImple_1",
+                            new Object[]{contexts[i]});
+                }
+                break;
+            }
+        }
+        return null ;
+    }
+
+    private org.w3c.dom.Element _context;
+    private String[] _identifierValues ;
+    private int[] _expiresValues ;
+
+    private static final String _wscoorNamespace = CoordinationConstants.WSCOOR_NAMESPACE;
+    private static final String _wsuNamespace = "http://schemas.xmlsoap.org/ws/2002/07/utility";
+    private static final String _arjunaNamespace = "http://arjuna.com/schemas/wsc/2003/01/extension";
+    
+    private static final String _contextName = CoordinationConstants.WSCOOR_ELEMENT_COORDINATION_CONTEXT;
+    private static final String _identifier = CoordinationConstants.WSCOOR_ELEMENT_IDENTIFIER;
+    private static final String _expires = CoordinationConstants.WSCOOR_ELEMENT_EXPIRES;
+
+}


Property changes on: labs/jbosstm/workspace/XTS_TX11/WSTX/classes/com/arjuna/mwlabs/wst/ba11/context/JBossContextImple.java
___________________________________________________________________
Name: svn:keywords
   + Rev Date
Name: svn:eol-style
   + native

Added: labs/jbosstm/workspace/XTS_TX11/WSTX/classes/com/arjuna/mwlabs/wst/ba11/context/TxContextImple.java
===================================================================
--- labs/jbosstm/workspace/XTS_TX11/WSTX/classes/com/arjuna/mwlabs/wst/ba11/context/TxContextImple.java	                        (rev 0)
+++ labs/jbosstm/workspace/XTS_TX11/WSTX/classes/com/arjuna/mwlabs/wst/ba11/context/TxContextImple.java	2007-08-14 12:43:41 UTC (rev 14200)
@@ -0,0 +1,96 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag.  All rights reserved. 
+ * See the copyright.txt in the distribution for a full listing 
+ * of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU General Public License, v. 2.0.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A 
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+ * PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+ * You should have received a copy of the GNU General Public License,
+ * v. 2.0 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+ * MA  02110-1301, USA.
+ * 
+ * (C) 2005-2006,
+ * @author JBoss Inc.
+ */
+/*
+ * Copyright (C) 2002,
+ *
+ * Arjuna Technologies Limited,
+ * Newcastle upon Tyne,
+ * Tyne and Wear,
+ * UK.
+ *
+ * $Id: TxContextImple.java,v 1.2.20.1 2005/11/22 10:36:16 kconner Exp $
+ */
+
+package com.arjuna.mwlabs.wst.ba11.context;
+
+import com.arjuna.mw.wsc.context.Context11;
+import com.arjuna.mw.wst.TxContext;
+import com.arjuna.mwlabs.wst.ba11.ContextImple;
+import com.arjuna.webservices.wscoor11.CoordinationContextType;
+
+/**
+ * @author Mark Little (mark.little at arjuna.com)
+ * @version $Id: TxContextImple.java,v 1.2.20.1 2005/11/22 10:36:16 kconner Exp $
+ */
+
+public class TxContextImple implements TxContext
+{
+
+    public TxContextImple (CoordinationContextType ctx)
+    {
+        _context = new ContextImple(ctx);
+    }
+
+    public TxContextImple (Context11 context)
+    {
+        _context = context;
+    }
+    
+    public boolean valid ()
+    {
+    	return (_context != null) ;
+    }
+    
+    public boolean equals (Object obj)
+    {
+    	if (obj instanceof TxContextImple)
+    	{
+    	    TxContextImple compare = (TxContextImple) obj;
+    	    
+    	    return compare.context().equals(_context);
+    	}
+    	else
+    	    return false;
+    }
+
+    public final String identifier ()
+    {
+        final String value = _context.getCoordinationContext().getIdentifier().getValue() ;
+        if ((value != null) && value.startsWith("urn:"))
+        {
+            return value.substring(4) ;
+        }
+        return value ;
+    }
+    
+    public final Context11 context ()
+    {
+        return _context;
+    }
+
+    public String toString ()
+    {
+        return _context.toString();
+    }
+
+    private Context11 _context;
+    
+}


Property changes on: labs/jbosstm/workspace/XTS_TX11/WSTX/classes/com/arjuna/mwlabs/wst/ba11/context/TxContextImple.java
___________________________________________________________________
Name: svn:keywords
   + Rev Date
Name: svn:eol-style
   + native

Added: labs/jbosstm/workspace/XTS_TX11/WSTX/classes/com/arjuna/mwlabs/wst/ba11/local/BAParticipantManagerImple.java
===================================================================
--- labs/jbosstm/workspace/XTS_TX11/WSTX/classes/com/arjuna/mwlabs/wst/ba11/local/BAParticipantManagerImple.java	                        (rev 0)
+++ labs/jbosstm/workspace/XTS_TX11/WSTX/classes/com/arjuna/mwlabs/wst/ba11/local/BAParticipantManagerImple.java	2007-08-14 12:43:41 UTC (rev 14200)
@@ -0,0 +1,192 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag.  All rights reserved. 
+ * See the copyright.txt in the distribution for a full listing 
+ * of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU General Public License, v. 2.0.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A 
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+ * PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+ * You should have received a copy of the GNU General Public License,
+ * v. 2.0 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+ * MA  02110-1301, USA.
+ * 
+ * (C) 2005-2006,
+ * @author JBoss Inc.
+ */
+/*
+ * Copyright (C) 2003,
+ *
+ * Arjuna Technologies Limited,
+ * Newcastle upon Tyne,
+ * Tyne and Wear,
+ * UK.
+ *
+ * $Id: BAParticipantManagerImple.java,v 1.4.8.1 2005/11/22 10:36:17 kconner Exp $
+ */
+
+package com.arjuna.mwlabs.wst.ba11.local;
+
+import javax.xml.namespace.QName;
+
+import com.arjuna.mw.wscf.model.sagas.CoordinatorManagerFactory;
+import com.arjuna.mw.wscf.model.sagas.api.CoordinatorManager;
+import com.arjuna.wst.BA11ParticipantManager;
+import com.arjuna.wst.SystemException;
+import com.arjuna.wst.UnknownTransactionException;
+import com.arjuna.wst.WrongStateException;
+
+/**
+ * This is the interface that the core exposes in order to allow different
+ * types of participants to be enrolled. The messaging layer continues to
+ * work in terms of the registrar, but internally we map to one of these
+ * methods.
+ *
+ * This could also be the interface that high-level users see (e.g., at the
+ * application Web Service).
+ */
+
+public class BAParticipantManagerImple implements BA11ParticipantManager
+{
+
+    public BAParticipantManagerImple (String participantId)
+    {
+	try
+	{
+	    _coordManager = CoordinatorManagerFactory.coordinatorManager();
+	    _participantId = participantId;
+	}
+	catch (Exception ex)
+	{
+	    ex.printStackTrace();
+	}
+    }
+	
+    public void exit () throws WrongStateException, UnknownTransactionException, SystemException
+    {
+	try
+	{
+	    _coordManager.delistParticipant(_participantId);
+	}
+	catch (com.arjuna.mw.wsas.exceptions.NoActivityException ex)
+	{
+	    throw new UnknownTransactionException();
+	}
+	catch (com.arjuna.mw.wscf.exceptions.InvalidParticipantException ex)
+	{
+	    throw new SystemException("UnknownParticipantException");
+	}
+	catch (com.arjuna.mw.wsas.exceptions.WrongStateException ex)
+	{
+	    throw new WrongStateException();
+	}
+	catch (com.arjuna.mw.wsas.exceptions.SystemException ex)
+	{
+	    throw new SystemException(ex.toString());
+	}
+    }
+
+    public void completed () throws WrongStateException, UnknownTransactionException, SystemException
+    {
+	try
+	{
+	    _coordManager.participantCompleted(_participantId);
+	}
+    	catch (com.arjuna.mw.wsas.exceptions.NoActivityException ex)
+	{
+	    throw new UnknownTransactionException();
+	}
+	catch (com.arjuna.mw.wscf.exceptions.InvalidParticipantException ex)
+	{
+	    throw new SystemException("UnknownParticipantException");
+	}
+	catch (com.arjuna.mw.wsas.exceptions.WrongStateException ex)
+	{
+	    throw new WrongStateException();
+	}
+	catch (com.arjuna.mw.wsas.exceptions.SystemException ex)
+	{
+	    throw new SystemException(ex.toString());
+	}
+    }
+
+    public void fail (final QName exceptionIdentifier) throws SystemException
+    {
+	try
+	{
+	    _coordManager.participantFaulted(_participantId);
+	}
+	catch (com.arjuna.mw.wscf.exceptions.InvalidParticipantException ex)
+	{
+	    throw new SystemException("UnknownParticipantException");
+	}
+    	catch (com.arjuna.mw.wsas.exceptions.NoActivityException ex)
+	{
+	    throw new SystemException("UnknownTransactionException");
+	}
+	catch (com.arjuna.mw.wsas.exceptions.SystemException ex)
+	{
+	    throw new SystemException(ex.toString());
+	}
+    }
+	
+    public void cannotComplete () throws WrongStateException, UnknownTransactionException, SystemException
+    {
+	try
+	{
+	    _coordManager.delistParticipant(_participantId);
+	}
+	catch (com.arjuna.mw.wsas.exceptions.NoActivityException ex)
+	{
+	    throw new UnknownTransactionException();
+	}
+	catch (com.arjuna.mw.wscf.exceptions.InvalidParticipantException ex)
+	{
+	    throw new SystemException("UnknownParticipantException");
+	}
+	catch (com.arjuna.mw.wsas.exceptions.WrongStateException ex)
+	{
+	    throw new WrongStateException();
+	}
+	catch (com.arjuna.mw.wsas.exceptions.SystemException ex)
+	{
+	    throw new SystemException(ex.toString());
+	}
+    }
+
+    /**
+     * Fault.
+     */
+
+    public void fault () throws SystemException
+    {
+    }
+
+    public void unknown () throws SystemException
+    {
+    }
+    
+    public void error () throws SystemException
+    {
+	try
+	{
+	    _coordManager.setCancelOnly();
+	}
+	catch (com.arjuna.mw.wsas.exceptions.WrongStateException ex)
+	{
+	    throw new SystemException(ex.toString());
+	}
+	catch (com.arjuna.mw.wsas.exceptions.SystemException ex)
+	{
+	    throw new SystemException(ex.toString());
+	}
+    }
+
+    private CoordinatorManager _coordManager = null;
+    private String             _participantId = null;
+
+}


Property changes on: labs/jbosstm/workspace/XTS_TX11/WSTX/classes/com/arjuna/mwlabs/wst/ba11/local/BAParticipantManagerImple.java
___________________________________________________________________
Name: svn:keywords
   + Rev Date
Name: svn:eol-style
   + native

Added: labs/jbosstm/workspace/XTS_TX11/WSTX/classes/com/arjuna/mwlabs/wst/ba11/local/BusinessActivityManagerImple.java
===================================================================
--- labs/jbosstm/workspace/XTS_TX11/WSTX/classes/com/arjuna/mwlabs/wst/ba11/local/BusinessActivityManagerImple.java	                        (rev 0)
+++ labs/jbosstm/workspace/XTS_TX11/WSTX/classes/com/arjuna/mwlabs/wst/ba11/local/BusinessActivityManagerImple.java	2007-08-14 12:43:41 UTC (rev 14200)
@@ -0,0 +1,134 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag.  All rights reserved. 
+ * See the copyright.txt in the distribution for a full listing 
+ * of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU General Public License, v. 2.0.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A 
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+ * PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+ * You should have received a copy of the GNU General Public License,
+ * v. 2.0 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+ * MA  02110-1301, USA.
+ * 
+ * (C) 2005-2006,
+ * @author JBoss Inc.
+ */
+/*
+ * Copyright (C) 2003,
+ *
+ * Arjuna Technologies Limited,
+ * Newcastle upon Tyne,
+ * Tyne and Wear,
+ * UK.
+ *
+ * $Id: BusinessActivityManagerImple.java,v 1.3.8.1 2005/11/22 10:36:16 kconner Exp $
+ */
+
+package com.arjuna.mwlabs.wst.ba11.local;
+
+import com.arjuna.mw.wst.BusinessActivity11Manager;
+import com.arjuna.mw.wst.TxContext;
+import com.arjuna.webservices.wsba11.BusinessActivityConstants;
+import com.arjuna.wsc.AlreadyRegisteredException;
+import com.arjuna.wst.BA11ParticipantManager;
+import com.arjuna.wst.BusinessAgreementWithCoordinatorCompletionParticipant;
+import com.arjuna.wst.BusinessAgreementWithParticipantCompletionParticipant;
+import com.arjuna.wst.SystemException;
+import com.arjuna.wst.UnknownTransactionException;
+import com.arjuna.wst.WrongStateException;
+
+/**
+ * This is the interface that the core exposes in order to allow different
+ * types of participants to be enrolled. The messaging layer continues to
+ * work in terms of the registrar, but internally we map to one of these
+ * methods.
+ *
+ * This could also be the interface that high-level users see (e.g., at the
+ * application Web Service).
+ */
+
+public class BusinessActivityManagerImple extends BusinessActivity11Manager
+{
+
+    public BusinessActivityManagerImple ()
+    {
+	_contextManager = ContextManager.contextManager();
+	_contextManager.initialise(UserBusinessActivityImple._factory);
+    }
+	
+    public BA11ParticipantManager enlistForBusinessAgreementWithParticipantCompletion (BusinessAgreementWithParticipantCompletionParticipant pzp, String id) throws WrongStateException, UnknownTransactionException, AlreadyRegisteredException, SystemException
+    {
+	try
+	{
+	    _registrar.register(pzp, BusinessActivityConstants.WSBA_SUB_PROTOCOL_PARTICIPANT_COMPLETION, id);
+
+	    return new BAParticipantManagerImple(id);
+	}
+	catch (com.arjuna.wsc.InvalidProtocolException ex)
+	{
+	    throw new SystemException(ex.toString());
+	}
+	catch (com.arjuna.wsc.InvalidStateException ex)
+	{
+	    throw new WrongStateException();
+	}
+	catch (com.arjuna.wsc.NoActivityException ex)
+	{
+	    throw new UnknownTransactionException();
+	}
+    }
+
+    public BA11ParticipantManager enlistForBusinessAgreementWithCoordinatorCompletion (BusinessAgreementWithCoordinatorCompletionParticipant tpp, String id) throws WrongStateException, UnknownTransactionException, AlreadyRegisteredException, SystemException
+    {
+	try
+	{
+	    _registrar.register(tpp, BusinessActivityConstants.WSBA_SUB_PROTOCOL_COORDINATOR_COMPLETION, id);
+
+	    return new BAParticipantManagerImple(id);
+	}
+	catch (com.arjuna.wsc.InvalidProtocolException ex)
+	{
+	    ex.printStackTrace();
+	    
+	    throw new SystemException(ex.toString());
+	}
+	catch (com.arjuna.wsc.InvalidStateException ex)
+	{
+	    throw new WrongStateException();
+	}
+	catch (com.arjuna.wsc.NoActivityException ex)
+	{
+	    throw new UnknownTransactionException();
+	}
+    }
+
+    public void resume (TxContext tx) throws UnknownTransactionException, SystemException
+    {
+	_contextManager.resume(tx);
+    }
+    
+    public TxContext suspend () throws SystemException
+    {
+	return _contextManager.suspend();
+    }
+
+    public TxContext currentTransaction () throws SystemException
+    {
+	return _contextManager.currentTransaction();
+    }
+
+    final LocalRegistrarImple getRegistrar ()
+    {
+	return _registrar;
+    }
+
+    private ContextManager _contextManager = null;
+    
+    private static LocalRegistrarImple _registrar = new LocalRegistrarImple();
+    
+}


Property changes on: labs/jbosstm/workspace/XTS_TX11/WSTX/classes/com/arjuna/mwlabs/wst/ba11/local/BusinessActivityManagerImple.java
___________________________________________________________________
Name: svn:keywords
   + Rev Date
Name: svn:eol-style
   + native

Added: labs/jbosstm/workspace/XTS_TX11/WSTX/classes/com/arjuna/mwlabs/wst/ba11/local/ContextManager.java
===================================================================
--- labs/jbosstm/workspace/XTS_TX11/WSTX/classes/com/arjuna/mwlabs/wst/ba11/local/ContextManager.java	                        (rev 0)
+++ labs/jbosstm/workspace/XTS_TX11/WSTX/classes/com/arjuna/mwlabs/wst/ba11/local/ContextManager.java	2007-08-14 12:43:41 UTC (rev 14200)
@@ -0,0 +1,153 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag.  All rights reserved. 
+ * See the copyright.txt in the distribution for a full listing 
+ * of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU General Public License, v. 2.0.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A 
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+ * PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+ * You should have received a copy of the GNU General Public License,
+ * v. 2.0 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+ * MA  02110-1301, USA.
+ * 
+ * (C) 2005-2006,
+ * @author JBoss Inc.
+ */
+/*
+ * Copyright (C) 2003,
+ *
+ * Arjuna Technologies Limited,
+ * Newcastle upon Tyne,
+ * Tyne and Wear,
+ * UK.
+ *
+ * $Id: ContextManager.java,v 1.4 2005/03/10 15:37:16 nmcl Exp $
+ */
+
+package com.arjuna.mwlabs.wst.ba11.local;
+
+import java.util.HashMap;
+
+import com.arjuna.mw.wsas.activity.ActivityHierarchy;
+import com.arjuna.mw.wst.TxContext;
+import com.arjuna.mw.wstx.logging.wstxLogger;
+import com.arjuna.wst.SystemException;
+import com.arjuna.wst.UnknownTransactionException;
+
+/**
+ * @message com.arjuna.mwlabs.wst.ba11.local.ContextManager_1 [com.arjuna.mwlabs.wst.ba11.local.ContextManager_1] - One context was null!
+ */
+
+public class ContextManager
+{
+    
+    public static final ContextManager contextManager ()
+    {
+	return _instance;
+    }
+    
+    public final void initialise (LocalContextFactoryImple factory)
+    {
+	_factory = factory;
+    }
+    
+    public final TxContext suspend () throws SystemException
+    {
+	ActivityHierarchy wstxHier = null;
+
+	try
+	{
+	    wstxHier = _factory.coordinatorManager().suspend();
+	}
+	catch (com.arjuna.mw.wsas.exceptions.SystemException ex)
+	{
+	    throw new SystemException(ex.toString());
+	}
+
+	TxContext txCtx = (TxContext) _threadTxData.get();
+	if (txCtx != null)
+	{
+	    _threadTxData.set(null) ;
+	}
+	
+	if ((txCtx != null) && (wstxHier != null)) // should be equal!
+	{
+	    _contextMapper.put(txCtx, wstxHier);
+	    
+	    return txCtx;
+	}
+	else
+	{
+	    if ((txCtx == null) && (wstxHier == null))
+		return null;
+	    else
+	    {
+		throw new SystemException(wstxLogger.log_mesg.getString("com.arjuna.mwlabs.wst.ba11.local.ContextManager_1"));
+	    }
+	}
+    }
+
+    public final TxContext currentTransaction () throws SystemException
+    {
+	return (TxContext) _threadTxData.get();
+    }
+
+    // resume overwrites. Should we check first a la JTA?
+
+    public final void resume (TxContext tx) throws UnknownTransactionException, SystemException
+    {
+	ActivityHierarchy wstxHier = null;
+	boolean imported = true;
+	
+	if (tx != null)
+	{
+	    wstxHier = (ActivityHierarchy) _contextMapper.remove(tx);
+	
+	    if (wstxHier == null)
+		imported = false;
+	}
+        _threadTxData.set(tx);
+	
+	try
+	{
+	    if (imported)
+		_factory.coordinatorManager().resume(wstxHier);
+	}
+	catch (com.arjuna.mw.wsas.exceptions.InvalidActivityException ex)
+	{
+	    throw new UnknownTransactionException(ex.toString());
+	}
+	catch (com.arjuna.mw.wsas.exceptions.SystemException ex)
+	{
+	    throw new SystemException(ex.toString());
+	}
+    }
+
+    public final void tidyup ()
+    {
+	TxContext txCtx = (TxContext) _threadTxData.get();
+	
+	if (txCtx != null)
+	{
+	    _threadTxData.set(null) ;
+	    _contextMapper.remove(txCtx);
+	}
+    }
+
+    protected ContextManager ()
+    {
+    }
+
+    private static ThreadLocal _threadTxData = new ThreadLocal();
+    private static HashMap     _contextMapper = new HashMap();
+
+    private static LocalContextFactoryImple _factory = null;
+
+    private static ContextManager _instance = new ContextManager();
+    
+}


Property changes on: labs/jbosstm/workspace/XTS_TX11/WSTX/classes/com/arjuna/mwlabs/wst/ba11/local/ContextManager.java
___________________________________________________________________
Name: svn:keywords
   + Rev Date
Name: svn:eol-style
   + native

Added: labs/jbosstm/workspace/XTS_TX11/WSTX/classes/com/arjuna/mwlabs/wst/ba11/local/LocalContextFactoryImple.java
===================================================================
--- labs/jbosstm/workspace/XTS_TX11/WSTX/classes/com/arjuna/mwlabs/wst/ba11/local/LocalContextFactoryImple.java	                        (rev 0)
+++ labs/jbosstm/workspace/XTS_TX11/WSTX/classes/com/arjuna/mwlabs/wst/ba11/local/LocalContextFactoryImple.java	2007-08-14 12:43:41 UTC (rev 14200)
@@ -0,0 +1,176 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag.  All rights reserved. 
+ * See the copyright.txt in the distribution for a full listing 
+ * of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU General Public License, v. 2.0.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A 
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+ * PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+ * You should have received a copy of the GNU General Public License,
+ * v. 2.0 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+ * MA  02110-1301, USA.
+ * 
+ * (C) 2005-2006,
+ * @author JBoss Inc.
+ */
+/*
+ * Copyright (C) 2002,
+ *
+ * Arjuna Technologies Limited,
+ * Newcastle upon Tyne,
+ * Tyne and Wear,
+ * UK.
+ *
+ * $Id: LocalContextFactoryImple.java,v 1.4.4.1 2005/11/22 10:36:16 kconner Exp $
+ */
+
+package com.arjuna.mwlabs.wst.ba11.local;
+
+import com.arjuna.mw.wsas.context.DeploymentContext;
+import com.arjuna.mw.wsas.context.DeploymentContextFactory;
+import com.arjuna.mw.wscf.model.sagas.CoordinatorManagerFactory;
+import com.arjuna.mw.wscf.model.sagas.api.CoordinatorManager;
+import com.arjuna.mw.wstx.logging.wstxLogger;
+import com.arjuna.mwlabs.wst.at11.context.JBossContextImple;
+import com.arjuna.webservices.SoapRegistry;
+import com.arjuna.webservices.stax.URI;
+import com.arjuna.webservices.wsaddr2005.AttributedURIType;
+import com.arjuna.webservices.wsaddr2005.EndpointReferenceType;
+import com.arjuna.webservices.wsba11.BusinessActivityConstants;
+import com.arjuna.webservices.wscoor11.AttributedUnsignedIntType;
+import com.arjuna.webservices.wscoor11.CoordinationConstants;
+import com.arjuna.webservices.wscoor11.CoordinationContextType;
+import com.arjuna.webservices.wsjboss.InstanceIdentifier;
+import com.arjuna.wsc.ContextFactory11;
+import com.arjuna.wsc.InvalidCreateParametersException;
+
+public class LocalContextFactoryImple implements ContextFactory11
+{
+
+    public LocalContextFactoryImple ()
+    {
+	try
+	{
+	    _coordManager = CoordinatorManagerFactory.coordinatorManager();
+	}
+	catch (Exception ex)
+	{
+	    ex.printStackTrace();
+	}
+    }
+
+    /**
+     * Called when a context factory is added to a context factory mapper. This method will be called multiple times
+     * if the context factory is added to multiple context factory mappers or to the same context mapper with different
+     * protocol identifiers.
+     *
+     * @param coordinationTypeURI the coordination type uri
+     */
+
+    public void install (final String coordinationTypeURI)
+    {
+    }
+
+    /**
+     * Creates a coordination context.
+     *
+     * @param coordinationTypeURI the coordination type uri
+     * @param expires the expire date/time for the returned context, can be null
+     * @param currentContext the current context, can be null
+     *
+     * @return the created coordination context
+     *
+     * @throws InvalidCreateParametersException if a parameter passed is invalid
+     *         this activity identifier.
+     *
+     * @message com.arjuna.mwlabs.wst.ba11.LocalContextFactoryImple_1 [com.arjuna.mwlabs.wst.ba11.local.LocalContextFactoryImple_1] - Invalid type URI: < {0} , {1} >
+     * @message com.arjuna.mwlabs.wst.ba11.local.LocalContextFactoryImple_11 [com.arjuna.mwlabs.wst.ba11.local.LocalContextFactoryImple_11] - Invalid type URI:
+     */
+
+    public CoordinationContextType create (final String coordinationTypeURI, final Long expires,
+        final CoordinationContextType currentContext)
+        throws InvalidCreateParametersException
+    {
+    	if (BusinessActivityConstants.WSBA_PROTOCOL_ATOMIC_OUTCOME.equals(coordinationTypeURI))
+    	{
+    	    try
+    	    {
+        		_coordManager.suspend();
+        
+        		_coordManager.begin();
+        
+        		DeploymentContext manager = DeploymentContextFactory.deploymentContext();
+        		JBossContextImple arjunaContext = (JBossContextImple)manager.context();
+
+                final SoapRegistry soapRegistry = SoapRegistry.getRegistry() ;
+                final String registrationCoordinatorURI = soapRegistry.getServiceURI(CoordinationConstants.SERVICE_REGISTRATION_COORDINATOR) ;
+                
+                final CoordinationContextType coordinationContext = new CoordinationContextType() ;
+                coordinationContext.setCoordinationType(new URI(coordinationTypeURI)) ;
+                coordinationContext.setIdentifier(new AttributedURIType(arjunaContext.getTransactionIdentifier())) ;
+                final int transactionExpires = arjunaContext.getTransactionExpires() ;
+                if (transactionExpires > 0)
+                {
+                    coordinationContext.setExpires(new AttributedUnsignedIntType(transactionExpires)) ;
+                }
+                final EndpointReferenceType registrationCoordinator = new EndpointReferenceType(new AttributedURIType(registrationCoordinatorURI)) ;
+                InstanceIdentifier.setEndpointInstanceIdentifier(registrationCoordinator, arjunaContext.getTransactionIdentifier()) ;
+                coordinationContext.setRegistrationService(registrationCoordinator) ;
+
+                return coordinationContext;
+    	    }
+    	    catch (com.arjuna.mw.wsas.exceptions.SystemException ex)
+    	    {
+        		// TODO handle properly
+        
+        		ex.printStackTrace();
+    	    }
+    	    catch (com.arjuna.mw.wsas.exceptions.WrongStateException ex)
+    	    {
+        		// TODO handle properly
+        
+        		ex.printStackTrace();
+    	    }
+    	    catch (Exception ex)
+    	    {
+        		// TODO handle properly
+        
+        		ex.printStackTrace();
+    	    }
+    	}
+    	else
+    	{
+    	    wstxLogger.arjLoggerI18N.warn("com.arjuna.mwlabs.wst.ba11.local.LocalContextFactoryImple_1",
+    					  new Object[]{BusinessActivityConstants.WSBA_PROTOCOL_ATOMIC_OUTCOME, coordinationTypeURI});
+    
+    	    throw new InvalidCreateParametersException(wstxLogger.log_mesg.getString("com.arjuna.mwlabs.wst.ba11.local.LocalContextFactoryImple_11"+" <"+BusinessActivityConstants.WSBA_PROTOCOL_ATOMIC_OUTCOME+", "+coordinationTypeURI+" >"));
+    	}
+    
+    	return null;
+    }
+
+    /**
+     * Called when a context factory is removed from a context factory mapper. This method will be called multiple
+     * times if the context factory is removed from multiple context factory mappers or from the same context factory
+     * mapper with different coordination type uris.
+     *
+     * @param coordinationTypeURI the coordination type uri
+     */
+
+    public void uninstall (final String coordinationTypeURI)
+    {
+    }
+
+    public CoordinatorManager coordinatorManager ()
+    {
+	return _coordManager;
+    }
+
+    private CoordinatorManager _coordManager;
+    
+}


Property changes on: labs/jbosstm/workspace/XTS_TX11/WSTX/classes/com/arjuna/mwlabs/wst/ba11/local/LocalContextFactoryImple.java
___________________________________________________________________
Name: svn:keywords
   + Rev Date
Name: svn:eol-style
   + native

Added: labs/jbosstm/workspace/XTS_TX11/WSTX/classes/com/arjuna/mwlabs/wst/ba11/local/LocalRegistrarImple.java
===================================================================
--- labs/jbosstm/workspace/XTS_TX11/WSTX/classes/com/arjuna/mwlabs/wst/ba11/local/LocalRegistrarImple.java	                        (rev 0)
+++ labs/jbosstm/workspace/XTS_TX11/WSTX/classes/com/arjuna/mwlabs/wst/ba11/local/LocalRegistrarImple.java	2007-08-14 12:43:41 UTC (rev 14200)
@@ -0,0 +1,131 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag.  All rights reserved. 
+ * See the copyright.txt in the distribution for a full listing 
+ * of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU General Public License, v. 2.0.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A 
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+ * PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+ * You should have received a copy of the GNU General Public License,
+ * v. 2.0 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+ * MA  02110-1301, USA.
+ * 
+ * (C) 2005-2006,
+ * @author JBoss Inc.
+ */
+/*
+ * Copyright (C) 2002,
+ *
+ * Arjuna Technologies Limited,
+ * Newcastle upon Tyne,
+ * Tyne and Wear,
+ * UK.
+ *
+ * $Id: LocalRegistrarImple.java,v 1.5 2005/03/10 15:37:16 nmcl Exp $
+ */
+
+package com.arjuna.mwlabs.wst.ba11.local;
+
+import com.arjuna.mw.wscf.model.sagas.CoordinatorManagerFactory;
+import com.arjuna.mw.wscf.model.sagas.api.CoordinatorManager;
+import com.arjuna.mw.wstx.logging.wstxLogger;
+import com.arjuna.mwlabs.wst.ba11.participants.BusinessAgreementWithCoordinatorCompletionImple;
+import com.arjuna.mwlabs.wst.ba11.participants.BusinessAgreementWithParticipantCompletionImple;
+import com.arjuna.webservices.wsba11.BusinessActivityConstants;
+import com.arjuna.wsc.AlreadyRegisteredException;
+import com.arjuna.wsc.InvalidProtocolException;
+import com.arjuna.wsc.InvalidStateException;
+import com.arjuna.wsc.NoActivityException;
+import com.arjuna.wst.BusinessAgreementWithCoordinatorCompletionParticipant;
+import com.arjuna.wst.BusinessAgreementWithParticipantCompletionParticipant;
+
+/**
+ * This class simulates the use of the real RegistrarImple, which we can't
+ * use in a local environment simply because we do not have URIs to register:
+ * we have real participants!
+ */
+
+public class LocalRegistrarImple
+{
+
+    public LocalRegistrarImple ()
+    {
+	try
+	{
+	    _coordManager = CoordinatorManagerFactory.coordinatorManager();
+	}
+	catch (Exception ex)
+	{
+	    ex.printStackTrace();
+	}
+    }
+
+    /**
+     * Registers the interest of participant in a particular protocol.
+     *
+     * @param participantProtocolServiceAddress the address of the participant protocol service
+     * @param protocolIdentifier the protocol identifier
+     *
+     * @throws AlreadyRegisteredException if the participant is already registered for this coordination protocol under
+     *         this activity identifier
+     * @throws InvalidProtocolException if the coordination protocol is not supported
+     * @throws InvalidStateException if the state of the coordinator no longer allows registration for this
+     *         coordination protocol
+     * @throws NoActivityException if the activity does not exist.
+     *
+     * @message com.arjuna.mwlabs.wst.ba11.local.LocalRegistrarImple_1 [com.arjuna.mwlabs.wst.ba11.local.LocalRegistrarImple_1] - Invalid type URI: < {0} , {1} >
+     */
+
+    /*
+     * Should send back BAParticipantManager reference in the context?
+     * Or is it just another call on the usual coordinator reference?
+     */
+
+    public void register (Object participant, String protocolIdentifier, String participantId) throws AlreadyRegisteredException, InvalidProtocolException, InvalidStateException, NoActivityException
+    {
+	// TODO check for AlreadyRegisteredException
+	
+	if (protocolIdentifier.equals(BusinessActivityConstants.WSBA_SUB_PROTOCOL_PARTICIPANT_COMPLETION))
+	{
+	    // enlist participant that wraps the requester URI.
+
+	    try
+	    {
+		_coordManager.enlistParticipant(new BusinessAgreementWithParticipantCompletionImple((BusinessAgreementWithParticipantCompletionParticipant) participant, participantId));
+	    }
+	    catch (Exception ex)
+	    {
+		throw new InvalidStateException();
+	    }
+	}
+	else
+	{
+	    if (protocolIdentifier.equals(BusinessActivityConstants.WSBA_SUB_PROTOCOL_COORDINATOR_COMPLETION))
+	    {
+		try
+		{
+		    _coordManager.enlistParticipant(new BusinessAgreementWithCoordinatorCompletionImple((BusinessAgreementWithCoordinatorCompletionParticipant) participant, participantId));
+		}
+		catch (Exception ex)
+		{
+		    throw new InvalidStateException();
+		}
+	    }
+	    else
+	    {
+		wstxLogger.arjLoggerI18N.warn("com.arjuna.mwlabs.wst.ba11.local.LocalRegistrarImple_1",
+					      new Object[]{BusinessActivityConstants.WSBA_PROTOCOL_ATOMIC_OUTCOME, protocolIdentifier});
+
+		throw new InvalidProtocolException();
+	    }
+	}
+    }
+    
+    private CoordinatorManager _coordManager;
+
+}


Property changes on: labs/jbosstm/workspace/XTS_TX11/WSTX/classes/com/arjuna/mwlabs/wst/ba11/local/LocalRegistrarImple.java
___________________________________________________________________
Name: svn:keywords
   + Rev Date
Name: svn:eol-style
   + native

Added: labs/jbosstm/workspace/XTS_TX11/WSTX/classes/com/arjuna/mwlabs/wst/ba11/local/UserBusinessActivityImple.java
===================================================================
--- labs/jbosstm/workspace/XTS_TX11/WSTX/classes/com/arjuna/mwlabs/wst/ba11/local/UserBusinessActivityImple.java	                        (rev 0)
+++ labs/jbosstm/workspace/XTS_TX11/WSTX/classes/com/arjuna/mwlabs/wst/ba11/local/UserBusinessActivityImple.java	2007-08-14 12:43:41 UTC (rev 14200)
@@ -0,0 +1,188 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag.  All rights reserved. 
+ * See the copyright.txt in the distribution for a full listing 
+ * of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU General Public License, v. 2.0.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A 
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+ * PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+ * You should have received a copy of the GNU General Public License,
+ * v. 2.0 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+ * MA  02110-1301, USA.
+ * 
+ * (C) 2005-2006,
+ * @author JBoss Inc.
+ */
+/*
+ * Copyright (C) 2003,
+ *
+ * Arjuna Technologies Limited,
+ * Newcastle upon Tyne,
+ * Tyne and Wear,
+ * UK.
+ *
+ * $Id: UserBusinessActivityImple.java,v 1.3.6.1 2005/11/22 10:36:17 kconner Exp $
+ */
+
+package com.arjuna.mwlabs.wst.ba11.local;
+
+import com.arjuna.mw.wst.UserBusinessActivity;
+import com.arjuna.mwlabs.wst.ba11.context.TxContextImple;
+import com.arjuna.mwlabs.wst.ba11.participants.TerminationCoordinatorImple;
+import com.arjuna.webservices.wsba11.BusinessActivityConstants;
+import com.arjuna.webservices.wscoor11.CoordinationContextType;
+import com.arjuna.wst.SystemException;
+import com.arjuna.wst.TransactionRolledBackException;
+import com.arjuna.wst.UnknownTransactionException;
+import com.arjuna.wst.WrongStateException;
+
+/**
+ * This is the interface that allows transactions to be started and terminated.
+ * The messaging layer converts the Commit, Rollback and Notify messages into
+ * calls on this.
+ */
+
+public class UserBusinessActivityImple extends UserBusinessActivity
+{
+    public UserBusinessActivityImple ()
+    {
+    	_terminationCoordinator = new TerminationCoordinatorImple(_factory.coordinatorManager(), null);
+    
+    	_contextManager = ContextManager.contextManager();
+    	_contextManager.initialise(_factory);
+    }
+    
+    public void begin () throws WrongStateException, SystemException
+    {
+    	begin(0);
+    }
+    
+    public void begin (int timeout) throws WrongStateException, SystemException
+    {
+    	try
+    	{
+    	    if (_contextManager.currentTransaction() != null)
+    		throw new WrongStateException();
+    	    
+    	    CoordinationContextType ctx = _factory.create(BusinessActivityConstants.WSBA_PROTOCOL_ATOMIC_OUTCOME, null, null);
+    
+    	    TxContextImple theContext = new TxContextImple(ctx);
+    
+    	    _contextManager.resume(theContext);
+    	}
+    	catch (com.arjuna.wst.UnknownTransactionException ex)
+    	{
+    	    ex.printStackTrace();
+    	    
+    	    throw new SystemException(ex.toString());
+    	}
+    	catch (com.arjuna.wsc.InvalidCreateParametersException ex)
+    	{
+    	    throw new SystemException(ex.toString());
+    	}
+    
+    	/*
+    	 * At this point we would normally register a completion participant.
+    	 *
+    	 * Registrar reg = _registrarMapper.getRegistrar(_factory.coordinatorManager().identifier().toString());
+    	 *
+    	 * reg.register(Protocols.Completion, null);
+    	 */
+    }
+
+    public void close () throws TransactionRolledBackException, UnknownTransactionException, SystemException
+    {
+    	try
+    	{
+    	    _terminationCoordinator.close();
+    	}
+    	catch (TransactionRolledBackException ex)
+    	{
+    	    throw ex;
+    	}
+    	catch (UnknownTransactionException ex)
+    	{
+    	    throw ex;
+    	}
+    	catch (SystemException ex)
+    	{
+    	    throw ex;
+    	}
+    	finally
+    	{
+    	    _contextManager.tidyup();
+    	}
+    }
+    
+    public void cancel () throws UnknownTransactionException, SystemException
+    {
+    	try
+    	{
+    	    _terminationCoordinator.cancel();
+    	}
+    	catch (UnknownTransactionException ex)
+    	{
+    	    throw ex;
+    	}
+    	catch (SystemException ex)
+    	{
+    	    throw ex;
+    	}
+    	finally
+    	{
+    	    _contextManager.tidyup();
+    	}
+    }
+
+    public void complete () throws UnknownTransactionException, SystemException
+    {
+    	try
+    	{
+    	    _terminationCoordinator.complete();
+    	}
+    	catch (UnknownTransactionException ex)
+    	{
+    	    throw ex;
+    	}
+    	catch (SystemException ex)
+    	{
+    	    throw ex;
+    	}
+    	finally
+    	{
+    	    _contextManager.tidyup();
+    	}
+    }
+
+    public String transactionIdentifier ()
+    {
+    	try
+    	{
+    	    return _factory.coordinatorManager().identifier().toString();
+    	}
+    	catch (com.arjuna.mw.wsas.exceptions.NoActivityException ex)
+    	{
+    	    return "NoBusinessActivity";
+    	}
+    	catch (com.arjuna.mw.wsas.exceptions.SystemException ex)
+    	{
+    	    return "Unknown";
+    	}
+    }
+
+    public String toString ()
+    {
+        return transactionIdentifier();
+    }
+
+    static LocalContextFactoryImple _factory = new LocalContextFactoryImple();
+
+    private TerminationCoordinatorImple _terminationCoordinator = null;
+    private ContextManager              _contextManager = null;
+
+}


Property changes on: labs/jbosstm/workspace/XTS_TX11/WSTX/classes/com/arjuna/mwlabs/wst/ba11/local/UserBusinessActivityImple.java
___________________________________________________________________
Name: svn:keywords
   + Rev Date
Name: svn:eol-style
   + native

Added: labs/jbosstm/workspace/XTS_TX11/WSTX/classes/com/arjuna/mwlabs/wst/ba11/participants/BusinessAgreementWithCoordinatorCompletionImple.java
===================================================================
--- labs/jbosstm/workspace/XTS_TX11/WSTX/classes/com/arjuna/mwlabs/wst/ba11/participants/BusinessAgreementWithCoordinatorCompletionImple.java	                        (rev 0)
+++ labs/jbosstm/workspace/XTS_TX11/WSTX/classes/com/arjuna/mwlabs/wst/ba11/participants/BusinessAgreementWithCoordinatorCompletionImple.java	2007-08-14 12:43:41 UTC (rev 14200)
@@ -0,0 +1,80 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag.  All rights reserved. 
+ * See the copyright.txt in the distribution for a full listing 
+ * of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU General Public License, v. 2.0.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A 
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+ * PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+ * You should have received a copy of the GNU General Public License,
+ * v. 2.0 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+ * MA  02110-1301, USA.
+ * 
+ * (C) 2005-2006,
+ * @author JBoss Inc.
+ */
+/*
+ * Copyright (C) 2002,
+ *
+ * Arjuna Technologies Limited,
+ * Newcastle upon Tyne,
+ * Tyne and Wear,
+ * UK.
+ *
+ * $Id: BusinessAgreementWithCoordinatorCompletionImple.java,v 1.1.2.2 2004/08/09 12:34:26 nmcl Exp $
+ */
+
+package com.arjuna.mwlabs.wst.ba11.participants;
+
+import com.arjuna.mw.wsas.exceptions.SystemException;
+import com.arjuna.mw.wsas.exceptions.WrongStateException;
+import com.arjuna.mw.wscf.exceptions.InvalidParticipantException;
+import com.arjuna.wst.BusinessAgreementWithCoordinatorCompletionParticipant;
+
+/**
+ * @author Mark Little (mark.little at arjuna.com)
+ * @version $Id: BusinessAgreementWithCoordinatorCompletionImple.java,v 1.1.2.2
+ *          2004/08/09 12:34:26 nmcl Exp $
+ * @since 1.0.
+ */
+
+public class BusinessAgreementWithCoordinatorCompletionImple extends
+		BusinessAgreementWithParticipantCompletionImple implements
+		com.arjuna.mw.wscf.model.sagas.participants.ParticipantWithComplete
+{
+
+	public BusinessAgreementWithCoordinatorCompletionImple (
+			BusinessAgreementWithCoordinatorCompletionParticipant participant,
+			String identifier)
+	{
+		super(participant, identifier);
+	}
+
+	public void complete () throws InvalidParticipantException,
+			WrongStateException, SystemException
+	{
+		if (_resource != null)
+		{
+			try
+			{
+				((BusinessAgreementWithCoordinatorCompletionParticipant) _resource)
+						.complete();
+			}
+			catch (com.arjuna.wst.WrongStateException ex)
+			{
+				throw new WrongStateException(ex.toString());
+			}
+			catch (com.arjuna.wst.SystemException ex)
+			{
+				throw new SystemException(ex.toString());
+			}
+		}
+		else
+			throw new InvalidParticipantException();
+	}
+}


Property changes on: labs/jbosstm/workspace/XTS_TX11/WSTX/classes/com/arjuna/mwlabs/wst/ba11/participants/BusinessAgreementWithCoordinatorCompletionImple.java
___________________________________________________________________
Name: svn:keywords
   + Rev Date
Name: svn:eol-style
   + native

Added: labs/jbosstm/workspace/XTS_TX11/WSTX/classes/com/arjuna/mwlabs/wst/ba11/participants/BusinessAgreementWithParticipantCompletionImple.java
===================================================================
--- labs/jbosstm/workspace/XTS_TX11/WSTX/classes/com/arjuna/mwlabs/wst/ba11/participants/BusinessAgreementWithParticipantCompletionImple.java	                        (rev 0)
+++ labs/jbosstm/workspace/XTS_TX11/WSTX/classes/com/arjuna/mwlabs/wst/ba11/participants/BusinessAgreementWithParticipantCompletionImple.java	2007-08-14 12:43:41 UTC (rev 14200)
@@ -0,0 +1,230 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag.  All rights reserved. 
+ * See the copyright.txt in the distribution for a full listing 
+ * of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU General Public License, v. 2.0.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A 
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+ * PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+ * You should have received a copy of the GNU General Public License,
+ * v. 2.0 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+ * MA  02110-1301, USA.
+ * 
+ * (C) 2005-2006,
+ * @author JBoss Inc.
+ */
+/*
+ * Copyright (C) 2002,
+ *
+ * Arjuna Technologies Limited,
+ * Newcastle upon Tyne,
+ * Tyne and Wear,
+ * UK.
+ *
+ * $Id: BusinessAgreementWithParticipantCompletionImple.java,v 1.1.2.2 2004/08/09 12:34:26 nmcl Exp $
+ */
+
+package com.arjuna.mwlabs.wst.ba11.participants;
+
+// import com.arjuna.mw.wst.resources.BusinessAgreement;
+
+import com.arjuna.ats.arjuna.state.InputObjectState;
+import com.arjuna.ats.arjuna.state.OutputObjectState;
+import com.arjuna.mw.wsas.exceptions.SystemException;
+import com.arjuna.mw.wsas.exceptions.WrongStateException;
+import com.arjuna.mw.wscf.exceptions.InvalidParticipantException;
+import com.arjuna.mw.wscf.model.sagas.exceptions.CompensateFailedException;
+import com.arjuna.mwlabs.wst.ba11.remote.BAParticipantManagerImple;
+import com.arjuna.mwlabs.wst.util.PersistableParticipantHelper;
+import com.arjuna.wst.BA11ParticipantManager;
+import com.arjuna.wst.BusinessAgreementWithParticipantCompletionParticipant;
+
+// TODO crash recovery (for EVERYTHING!!)
+
+// TODO re-architect!!
+
+/**
+ * @author Mark Little (mark.little at arjuna.com)
+ * @version $Id: BusinessAgreementWithParticipantCompletionImple.java,v 1.1.2.2
+ *          2004/08/09 12:34:26 nmcl Exp $
+ * @since 1.0.
+ */
+
+public class BusinessAgreementWithParticipantCompletionImple implements
+		com.arjuna.mw.wscf.model.sagas.participants.Participant
+{
+//
+	public BusinessAgreementWithParticipantCompletionImple (
+			BusinessAgreementWithParticipantCompletionParticipant resource,
+			String id)
+	{
+		_resource = resource;
+		_identifier = id;
+		_baParticipantManager = new BAParticipantManagerImple(id);
+	}
+
+	public void close () throws InvalidParticipantException,
+			WrongStateException, SystemException
+	{
+		try
+		{
+			if (_resource != null)
+			{
+				_resource.close();
+			}
+			else
+				throw new InvalidParticipantException();
+		}
+		catch (com.arjuna.wst.WrongStateException ex)
+		{
+			throw new WrongStateException(ex.toString());
+		}
+		catch (com.arjuna.wst.SystemException ex)
+		{
+			throw new SystemException(ex.toString());
+		}
+	}
+
+	public void cancel () throws InvalidParticipantException,
+			WrongStateException, SystemException
+	{
+		try
+		{
+			if (_resource != null)
+			{
+				_resource.cancel();
+			}
+			else
+				throw new InvalidParticipantException();
+		}
+		catch (com.arjuna.wst.WrongStateException ex)
+		{
+			throw new WrongStateException(ex.toString());
+		}
+		catch (com.arjuna.wst.SystemException ex)
+		{
+			throw new SystemException(ex.toString());
+		}
+	}
+
+	public void compensate () throws CompensateFailedException,
+			InvalidParticipantException, WrongStateException, SystemException
+	{
+		try
+		{
+			if (_resource != null)
+			{
+				_resource.compensate();
+			}
+			else
+				throw new InvalidParticipantException();
+		}
+		catch (com.arjuna.wst.FaultedException ex)
+		{
+			throw new CompensateFailedException();
+		}
+		catch (com.arjuna.wst.WrongStateException ex)
+		{
+			throw new WrongStateException(ex.toString());
+		}
+		catch (com.arjuna.wst.SystemException ex)
+		{
+			throw new SystemException(ex.toString());
+		}
+	}
+
+	/**
+	 * @return the status value.
+	 */
+
+	public String status () throws SystemException
+	{
+		try
+		{
+			if (_resource != null)
+			{
+				return _resource.status();
+			}
+			else
+				throw new SystemException("InvalidParticipant");
+		}
+		catch (com.arjuna.wst.SystemException ex)
+		{
+			throw new SystemException(ex.toString());
+		}
+	}
+
+	/**
+	 * Inform the participant that is can forget the heuristic result.
+	 * 
+	 * @exception InvalidParticipantException
+	 *                Thrown if the participant identity is invalid.
+	 * @exception WrongStateException
+	 *                Thrown if the participant is in an invalid state.
+	 * @exception SystemException
+	 *                Thrown in the event of a general fault.
+	 */
+
+	public void forget () throws InvalidParticipantException,
+			WrongStateException, SystemException
+	{
+		// not supported by the IBM protocol.
+	}
+
+	public void unknown () throws SystemException
+	{
+		/*
+		 * If the transaction is unknown, then we assume it cancelled.
+		 */
+
+		try
+		{
+			cancel();
+		}
+		catch (Exception ex)
+		{
+			// TODO
+		}
+	}
+
+	public String id () throws SystemException
+	{
+		return _identifier;
+	}
+
+	public final BA11ParticipantManager participantManager ()
+	{
+		return _baParticipantManager;
+	}
+
+	public boolean save_state (OutputObjectState os)
+	{
+        return PersistableParticipantHelper.save_state(os, _resource) ;
+	}
+	
+	public boolean restore_state (InputObjectState is)
+	{
+        final Object resource = PersistableParticipantHelper.restore_state(is) ;
+        if (resource != null)
+        {
+            _resource = (BusinessAgreementWithParticipantCompletionParticipant)resource ;
+            return true ;
+        }
+        else
+        {
+            return false ;
+        }
+	}
+
+	protected BusinessAgreementWithParticipantCompletionParticipant _resource;
+
+	private String _identifier = null;
+
+	private BA11ParticipantManager _baParticipantManager = null;
+
+}


Property changes on: labs/jbosstm/workspace/XTS_TX11/WSTX/classes/com/arjuna/mwlabs/wst/ba11/participants/BusinessAgreementWithParticipantCompletionImple.java
___________________________________________________________________
Name: svn:keywords
   + Rev Date
Name: svn:eol-style
   + native

Added: labs/jbosstm/workspace/XTS_TX11/WSTX/classes/com/arjuna/mwlabs/wst/ba11/participants/TerminationCoordinatorImple.java
===================================================================
--- labs/jbosstm/workspace/XTS_TX11/WSTX/classes/com/arjuna/mwlabs/wst/ba11/participants/TerminationCoordinatorImple.java	                        (rev 0)
+++ labs/jbosstm/workspace/XTS_TX11/WSTX/classes/com/arjuna/mwlabs/wst/ba11/participants/TerminationCoordinatorImple.java	2007-08-14 12:43:41 UTC (rev 14200)
@@ -0,0 +1,192 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag.  All rights reserved. 
+ * See the copyright.txt in the distribution for a full listing 
+ * of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU General Public License, v. 2.0.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A 
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+ * PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+ * You should have received a copy of the GNU General Public License,
+ * v. 2.0 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+ * MA  02110-1301, USA.
+ * 
+ * (C) 2005-2006,
+ * @author JBoss Inc.
+ */
+/*
+ * Copyright (C) 2002,
+ *
+ * Arjuna Technologies Limited,
+ * Newcastle upon Tyne,
+ * Tyne and Wear,
+ * UK.
+ *
+ * $Id: TerminationCoordinatorImple.java,v 1.2.20.1 2005/11/22 10:36:19 kconner Exp $
+ */
+
+package com.arjuna.mwlabs.wst.ba11.participants;
+
+import com.arjuna.mw.wsas.activity.ActivityHierarchy;
+import com.arjuna.mw.wscf.model.sagas.api.CoordinatorManager;
+import com.arjuna.wst.SystemException;
+import com.arjuna.wst.TransactionRolledBackException;
+import com.arjuna.wst.UnknownTransactionException;
+
+/**
+ * @author Mark Little (mark.little at arjuna.com)
+ * @version $Id: TerminationCoordinatorImple.java,v 1.2.20.1 2005/11/22 10:36:19 kconner Exp $
+ * @since 1.0.
+ */
+
+// Why is this here in participants package?
+
+public class TerminationCoordinatorImple// implements com.arjuna.wst.TerminationCoordinator
+{
+
+    public TerminationCoordinatorImple (CoordinatorManager cm, ActivityHierarchy hier)
+    {
+	_cm = cm;
+	_hier = hier;
+    }
+    
+    public void close () throws TransactionRolledBackException, UnknownTransactionException, SystemException
+    {
+	try
+	{
+	    if (_hier != null)
+		_cm.resume(_hier);
+
+	    _cm.close();
+	}
+	catch (com.arjuna.mw.wsas.exceptions.InvalidActivityException ex)
+	{
+	    throw new UnknownTransactionException();
+	}
+	catch (com.arjuna.mw.wsas.exceptions.WrongStateException ex)
+	{
+	    throw new SystemException(ex.toString());
+	}
+	catch (com.arjuna.mw.wsas.exceptions.ProtocolViolationException ex)
+	{
+	    throw new SystemException(ex.toString());
+	}
+	catch (com.arjuna.mw.wscf.exceptions.NoCoordinatorException ex)
+	{
+	    throw new UnknownTransactionException();
+	}
+	catch (com.arjuna.mw.wscf.model.sagas.exceptions.CoordinatorCancelledException ex)
+	{
+	    throw new TransactionRolledBackException();
+	}
+	catch (com.arjuna.mw.wsas.exceptions.NoPermissionException ex)
+	{
+	    throw new SystemException(ex.toString());
+	}
+	catch (com.arjuna.mw.wsas.exceptions.SystemException ex)
+	{
+	    throw new SystemException(ex.toString());
+	}
+	finally
+	{
+	    //	    if (_ccd != null)
+	    // _ccd.deactivateObject(this);
+	}
+    }
+    
+    public void cancel () throws UnknownTransactionException, SystemException
+    {
+	try
+	{
+	    if (_hier != null)
+		_cm.resume(_hier);
+	    
+	    _cm.cancel();
+	}
+	catch (com.arjuna.mw.wsas.exceptions.InvalidActivityException ex)
+	{
+	    throw new UnknownTransactionException();
+	}
+	catch (com.arjuna.mw.wsas.exceptions.WrongStateException ex)
+	{
+	    throw new SystemException(ex.toString());
+	}
+	catch (com.arjuna.mw.wsas.exceptions.ProtocolViolationException ex)
+	{
+	    throw new SystemException();
+	}
+	catch (com.arjuna.mw.wscf.exceptions.NoCoordinatorException ex)
+	{
+	    throw new UnknownTransactionException();
+	}
+	catch (com.arjuna.mw.wscf.model.sagas.exceptions.CoordinatorConfirmedException ex)
+	{
+	    throw new SystemException();
+	}
+	catch (com.arjuna.mw.wsas.exceptions.NoPermissionException ex)
+	{
+	    throw new SystemException(ex.toString());
+	}
+	catch (com.arjuna.mw.wsas.exceptions.SystemException ex)
+	{
+	    throw new SystemException(ex.toString());
+	}
+	finally
+	{
+	    //	    if (_ccd != null)
+	    //		_ccd.deactivateObject(this);
+	}
+    }
+
+    public void complete () throws UnknownTransactionException, SystemException
+    {
+	try
+	{
+	    if (_hier != null)
+		_cm.resume(_hier);
+	    
+	    _cm.complete();
+	}
+	catch (com.arjuna.mw.wsas.exceptions.InvalidActivityException ex)
+	{
+	    throw new UnknownTransactionException();
+	}
+	catch (com.arjuna.mw.wsas.exceptions.WrongStateException ex)
+	{
+	    throw new SystemException(ex.toString());
+	}
+	catch (com.arjuna.mw.wsas.exceptions.ProtocolViolationException ex)
+	{
+	    throw new SystemException();
+	}
+	catch (com.arjuna.mw.wscf.exceptions.NoCoordinatorException ex)
+	{
+	    throw new UnknownTransactionException();
+	}
+	catch (com.arjuna.mw.wscf.model.sagas.exceptions.CoordinatorConfirmedException ex)
+	{
+	    throw new SystemException();
+	}
+	catch (com.arjuna.mw.wsas.exceptions.NoPermissionException ex)
+	{
+	    throw new SystemException(ex.toString());
+	}
+	catch (com.arjuna.mw.wsas.exceptions.SystemException ex)
+	{
+	    throw new SystemException(ex.toString());
+	}
+	finally
+	{
+	    //	    if (_ccd != null)
+	    //		_ccd.deactivateObject(this);
+	}
+    }
+    
+    private CoordinatorManager   _cm;
+    private ActivityHierarchy    _hier;
+    
+}


Property changes on: labs/jbosstm/workspace/XTS_TX11/WSTX/classes/com/arjuna/mwlabs/wst/ba11/participants/TerminationCoordinatorImple.java
___________________________________________________________________
Name: svn:keywords
   + Rev Date
Name: svn:eol-style
   + native

Added: labs/jbosstm/workspace/XTS_TX11/WSTX/classes/com/arjuna/mwlabs/wst/ba11/remote/BAParticipantManagerImple.java
===================================================================
--- labs/jbosstm/workspace/XTS_TX11/WSTX/classes/com/arjuna/mwlabs/wst/ba11/remote/BAParticipantManagerImple.java	                        (rev 0)
+++ labs/jbosstm/workspace/XTS_TX11/WSTX/classes/com/arjuna/mwlabs/wst/ba11/remote/BAParticipantManagerImple.java	2007-08-14 12:43:41 UTC (rev 14200)
@@ -0,0 +1,207 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag.  All rights reserved. 
+ * See the copyright.txt in the distribution for a full listing 
+ * of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU General Public License, v. 2.0.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A 
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+ * PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+ * You should have received a copy of the GNU General Public License,
+ * v. 2.0 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+ * MA  02110-1301, USA.
+ * 
+ * (C) 2005-2006,
+ * @author JBoss Inc.
+ */
+/*
+ * Copyright (C) 2003,
+ *
+ * Arjuna Technologies Limited,
+ * Newcastle upon Tyne,
+ * Tyne and Wear,
+ * UK.
+ *
+ * $Id: BAParticipantManagerImple.java,v 1.5.6.1 2005/11/22 10:36:08 kconner Exp $
+ */
+
+package com.arjuna.mwlabs.wst.ba11.remote;
+
+import javax.xml.namespace.QName;
+
+import com.arjuna.mw.wsas.activity.ActivityHierarchy;
+import com.arjuna.mw.wsas.exceptions.InvalidActivityException;
+import com.arjuna.mw.wscf.model.sagas.CoordinatorManagerFactory;
+import com.arjuna.mw.wscf.model.sagas.api.CoordinatorManager;
+import com.arjuna.wst.BA11ParticipantManager;
+import com.arjuna.wst.SystemException;
+import com.arjuna.wst.UnknownTransactionException;
+import com.arjuna.wst.WrongStateException;
+
+/**
+ * This is the interface that the core exposes in order to allow different
+ * types of participants to be enrolled. The messaging layer continues to
+ * work in terms of the registrar, but internally we map to one of these
+ * methods.
+ *
+ * This could also be the interface that high-level users see (e.g., at the
+ * application Web Service).
+ */
+
+public class BAParticipantManagerImple implements BA11ParticipantManager
+{
+
+    public BAParticipantManagerImple (String participantId)
+    {
+	try
+	{
+	    _coordManager = CoordinatorManagerFactory.coordinatorManager();
+	    _hier = _coordManager.currentActivity();
+	    _participantId = participantId;
+	}
+	catch (Exception ex)
+	{
+	    ex.printStackTrace();
+	}	
+    }
+	
+    public void exit () throws WrongStateException, UnknownTransactionException, SystemException
+    {
+	try
+	{
+	    if (_hier == null)
+		throw new UnknownTransactionException();
+	    
+	    _coordManager.resume(_hier);
+	    
+	    _coordManager.delistParticipant(_participantId);
+
+	    _coordManager.suspend();
+	}
+	catch (com.arjuna.mw.wsas.exceptions.NoActivityException ex)
+	{
+	    throw new UnknownTransactionException();
+	}
+	catch (com.arjuna.mw.wscf.exceptions.InvalidParticipantException ex)
+	{
+	    throw new SystemException("UnknownParticipantException");
+	}
+	catch (com.arjuna.mw.wsas.exceptions.WrongStateException ex)
+	{
+	    throw new WrongStateException();
+	}
+	catch (com.arjuna.mw.wsas.exceptions.InvalidActivityException ex)
+	{
+	    throw new UnknownTransactionException();
+	}
+	catch (com.arjuna.mw.wsas.exceptions.SystemException ex)
+	{
+	    throw new SystemException(ex.toString());
+	}
+    }
+
+    public void completed () throws WrongStateException, UnknownTransactionException, SystemException
+    {
+	try
+	{
+	    if (_hier == null)
+		throw new UnknownTransactionException();
+	    
+	    _coordManager.resume(_hier);
+
+	    _coordManager.participantCompleted(_participantId);
+
+	    _coordManager.suspend();
+	}
+    	catch (com.arjuna.mw.wsas.exceptions.NoActivityException ex)
+	{
+	    throw new UnknownTransactionException();
+	}
+	catch (com.arjuna.mw.wscf.exceptions.InvalidParticipantException ex)
+	{
+	    throw new SystemException("UnknownParticipantException");
+	}
+	catch (com.arjuna.mw.wsas.exceptions.WrongStateException ex)
+	{
+	    throw new WrongStateException();
+	}
+	catch (com.arjuna.mw.wsas.exceptions.InvalidActivityException ex)
+	{
+	    throw new UnknownTransactionException();
+	}
+	catch (com.arjuna.mw.wsas.exceptions.SystemException ex)
+	{
+	    throw new SystemException(ex.toString());
+	}
+    }
+
+    public void fail(final QName exceptionIdentifier) throws SystemException
+    {
+	try
+	{
+        if (_hier == null)
+            throw new UnknownTransactionException();
+            
+            _coordManager.resume(_hier);
+
+            _coordManager.participantFaulted(_participantId);
+
+            _coordManager.suspend();
+	}
+    catch (final InvalidActivityException iae)
+    {
+        throw new SystemException("UnknownTransactionException");
+    }
+    catch (final UnknownTransactionException ute)
+    {
+        throw new SystemException("UnknownTransactionException");
+    }
+	catch (com.arjuna.mw.wscf.exceptions.InvalidParticipantException ex)
+	{
+	    throw new SystemException("UnknownParticipantException");
+	}
+    	catch (com.arjuna.mw.wsas.exceptions.NoActivityException ex)
+	{
+	    throw new SystemException("UnknownTransactionException");
+	}
+	catch (com.arjuna.mw.wsas.exceptions.SystemException ex)
+	{
+	    throw new SystemException(ex.toString());
+	}
+    }
+    
+    public void cannotComplete() throws WrongStateException, UnknownTransactionException, SystemException
+    {
+	exit() ;
+    }
+
+    public void unknown () throws SystemException
+    {
+	// ??
+    }
+    
+    public void error () throws SystemException
+    {
+	try
+	{
+	    _coordManager.setCancelOnly();
+	}
+	catch (com.arjuna.mw.wsas.exceptions.WrongStateException ex)
+	{
+	    throw new SystemException(ex.toString());
+	}
+	catch (com.arjuna.mw.wsas.exceptions.SystemException ex)
+	{
+	    throw new SystemException(ex.toString());
+	}
+    }
+
+    private CoordinatorManager _coordManager = null;
+    private ActivityHierarchy  _hier = null;
+    private String             _participantId = null;
+
+}


Property changes on: labs/jbosstm/workspace/XTS_TX11/WSTX/classes/com/arjuna/mwlabs/wst/ba11/remote/BAParticipantManagerImple.java
___________________________________________________________________
Name: svn:keywords
   + Rev Date
Name: svn:eol-style
   + native

Added: labs/jbosstm/workspace/XTS_TX11/WSTX/classes/com/arjuna/mwlabs/wst/ba11/remote/BusinessActivityManagerImple.java
===================================================================
--- labs/jbosstm/workspace/XTS_TX11/WSTX/classes/com/arjuna/mwlabs/wst/ba11/remote/BusinessActivityManagerImple.java	                        (rev 0)
+++ labs/jbosstm/workspace/XTS_TX11/WSTX/classes/com/arjuna/mwlabs/wst/ba11/remote/BusinessActivityManagerImple.java	2007-08-14 12:43:41 UTC (rev 14200)
@@ -0,0 +1,209 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag.  All rights reserved. 
+ * See the copyright.txt in the distribution for a full listing 
+ * of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU General Public License, v. 2.0.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A 
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+ * PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+ * You should have received a copy of the GNU General Public License,
+ * v. 2.0 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+ * MA  02110-1301, USA.
+ * 
+ * (C) 2005-2006,
+ * @author JBoss Inc.
+ */
+/*
+ * Copyright (C) 2003,
+ *
+ * Arjuna Technologies Limited,
+ * Newcastle upon Tyne,
+ * Tyne and Wear,
+ * UK.
+ *
+ * $Id: BusinessActivityManagerImple.java,v 1.7.4.1 2005/11/22 10:36:08 kconner Exp $
+ */
+
+package com.arjuna.mwlabs.wst.ba11.remote;
+
+import com.arjuna.ats.arjuna.common.Uid;
+import com.arjuna.mw.wst.BusinessActivity11Manager;
+import com.arjuna.mw.wst.TxContext;
+import com.arjuna.mwlabs.wst.ba11.context.TxContextImple;
+import com.arjuna.webservices.SoapFault;
+import com.arjuna.webservices.SoapRegistry;
+import com.arjuna.webservices.wsaddr2005.AttributedURIType;
+import com.arjuna.webservices.wsaddr2005.EndpointReferenceType;
+import com.arjuna.webservices.wsba11.BusinessActivityConstants;
+import com.arjuna.webservices.wsba11.processors.CoordinatorCompletionParticipantProcessor;
+import com.arjuna.webservices.wsba11.processors.ParticipantCompletionParticipantProcessor;
+import com.arjuna.webservices.wscoor11.CoordinationContextType;
+import com.arjuna.webservices.wsjboss.InstanceIdentifier;
+import com.arjuna.wsc.AlreadyRegisteredException;
+import com.arjuna.wsc.RegistrationCoordinator11;
+import com.arjuna.wst.BA11ParticipantManager;
+import com.arjuna.wst.BusinessAgreementWithCoordinatorCompletionParticipant;
+import com.arjuna.wst.BusinessAgreementWithParticipantCompletionParticipant;
+import com.arjuna.wst.SystemException;
+import com.arjuna.wst.UnknownTransactionException;
+import com.arjuna.wst.WrongStateException;
+import com.arjuna.wst.messaging.engines.CoordinatorCompletionParticipant11Engine;
+import com.arjuna.wst.messaging.engines.ParticipantCompletionParticipant11Engine;
+import com.arjuna.wst.stub.BACoordinatorCompletionParticipantManager11Stub;
+import com.arjuna.wst.stub.BAParticipantCompletionParticipantManager11Stub;
+
+/**
+ * This is the interface that the core exposes in order to allow different
+ * types of participants to be enrolled. The messaging layer continues to
+ * work in terms of the registrar, but internally we map to one of these
+ * methods.
+ */
+
+public class BusinessActivityManagerImple extends BusinessActivity11Manager
+{
+    public BusinessActivityManagerImple ()
+    {
+    }
+	
+    public BA11ParticipantManager enlistForBusinessAgreementWithParticipantCompletion (BusinessAgreementWithParticipantCompletionParticipant bap, String id)
+        throws WrongStateException, UnknownTransactionException, AlreadyRegisteredException, SystemException
+    {
+        final EndpointReferenceType participant = getParticipant(BusinessActivityConstants.SERVICE_PARTICIPANT_COMPLETION_PARTICIPANT, id) ;
+    	try
+    	{
+            EndpointReferenceType baPMEndpoint = registerParticipant(participant, BusinessActivityConstants.WSBA_SUB_PROTOCOL_PARTICIPANT_COMPLETION);
+            final ParticipantCompletionParticipant11Engine engine = new ParticipantCompletionParticipant11Engine(id, baPMEndpoint, bap) ;
+            ParticipantCompletionParticipantProcessor.getProcessor().activateParticipant(engine, id) ;
+    
+            return new BAParticipantCompletionParticipantManager11Stub(engine);
+    	}
+    	catch (com.arjuna.wsc.InvalidProtocolException ex)
+    	{
+    	    throw new SystemException(ex.toString());
+    	}
+    	catch (com.arjuna.wsc.InvalidStateException ex)
+    	{
+    	    throw new WrongStateException();
+    	}
+    	catch (com.arjuna.wsc.NoActivityException ex)
+    	{
+    	    throw new UnknownTransactionException();
+    	}
+    	catch (Throwable ex)
+    	{
+    	    ex.printStackTrace();
+    	    
+    	    throw new SystemException(ex.toString());
+    	}
+    }
+
+    public BA11ParticipantManager enlistForBusinessAgreementWithCoordinatorCompletion (BusinessAgreementWithCoordinatorCompletionParticipant bawcp, String id) throws WrongStateException, UnknownTransactionException, AlreadyRegisteredException, SystemException
+    {
+        final EndpointReferenceType participant = getParticipant(BusinessActivityConstants.SERVICE_COORDINATOR_COMPLETION_PARTICIPANT, id) ;
+    	try
+    	{
+    	    EndpointReferenceType baPMEndpoint = registerParticipant(participant, BusinessActivityConstants.WSBA_SUB_PROTOCOL_COORDINATOR_COMPLETION);
+            final CoordinatorCompletionParticipant11Engine engine = new CoordinatorCompletionParticipant11Engine(id, baPMEndpoint, bawcp) ;
+            CoordinatorCompletionParticipantProcessor.getProcessor().activateParticipant(engine, id) ;
+        
+            return new BACoordinatorCompletionParticipantManager11Stub(engine);
+    	}
+    	catch (com.arjuna.wsc.InvalidProtocolException ex)
+    	{
+    	    throw new SystemException(ex.toString());
+    	}
+    	catch (com.arjuna.wsc.InvalidStateException ex)
+    	{
+    	    throw new WrongStateException();
+    	}
+    	catch (com.arjuna.wsc.NoActivityException ex)
+    	{
+    	    ex.printStackTrace();
+    	    
+    	    throw new UnknownTransactionException();
+    	}
+    	catch (Throwable ex)
+    	{
+    	    ex.printStackTrace();
+    	    
+    	    throw new SystemException(ex.toString());
+    	}
+    }
+
+    public TxContext suspend () throws SystemException
+    {
+        return _ctxManager.suspend();
+    }
+
+    // resume overwrites. Should we check first a la JTA?
+
+    public void resume (TxContext tx) throws UnknownTransactionException, SystemException
+    {
+        _ctxManager.resume(tx);
+    }
+
+    public TxContext currentTransaction () throws SystemException
+    {
+        return _ctxManager.currentTransaction();
+    }
+	
+    private final EndpointReferenceType registerParticipant(final EndpointReferenceType participant, final String protocol)
+        throws com.arjuna.wsc.InvalidProtocolException, com.arjuna.wsc.InvalidStateException, com.arjuna.wsc.NoActivityException, SystemException
+    {
+    	TxContextImple currentTx = null;
+    
+    	try
+    	{
+    	    currentTx = (TxContextImple) _ctxManager.currentTransaction();
+    	    
+    	    if (currentTx == null)
+        		throw new com.arjuna.wsc.NoActivityException();
+
+            final CoordinationContextType coordinationContext = currentTx.context().getCoordinationContext() ;
+            final String messageId = new Uid().stringForm() ;
+            return RegistrationCoordinator11.register(coordinationContext, messageId, participant, protocol) ;
+    	}
+        catch (final SoapFault sf)
+        {
+            throw new SystemException(sf.getMessage());
+        }
+    	catch (com.arjuna.wsc.NoActivityException ex)
+    	{
+    	    throw ex;
+    	}
+    	catch (Exception ex)
+    	{
+    	    ex.printStackTrace();
+    	    
+    	    throw new SystemException(ex.toString());
+    	}
+    	finally
+    	{
+    	    try
+    	    {
+        		if (currentTx != null)
+        		    _ctxManager.resume(currentTx);
+    	    }
+    	    catch (Exception ex)
+    	    {
+        		ex.printStackTrace();
+    	    }
+    	}
+    }
+
+    private EndpointReferenceType getParticipant(final String participantService, final String id)
+    {
+        final SoapRegistry soapRegistry = SoapRegistry.getRegistry() ;
+        final String participantServiceURI = soapRegistry.getServiceURI(participantService) ;
+        final EndpointReferenceType endpoint = new EndpointReferenceType(new AttributedURIType(participantServiceURI)) ;
+        InstanceIdentifier.setEndpointInstanceIdentifier(endpoint, id) ;
+        return endpoint ;
+    }
+    
+    private ContextManager _ctxManager = new ContextManager();
+}


Property changes on: labs/jbosstm/workspace/XTS_TX11/WSTX/classes/com/arjuna/mwlabs/wst/ba11/remote/BusinessActivityManagerImple.java
___________________________________________________________________
Name: svn:keywords
   + Rev Date
Name: svn:eol-style
   + native

Added: labs/jbosstm/workspace/XTS_TX11/WSTX/classes/com/arjuna/mwlabs/wst/ba11/remote/ContextManager.java
===================================================================
--- labs/jbosstm/workspace/XTS_TX11/WSTX/classes/com/arjuna/mwlabs/wst/ba11/remote/ContextManager.java	                        (rev 0)
+++ labs/jbosstm/workspace/XTS_TX11/WSTX/classes/com/arjuna/mwlabs/wst/ba11/remote/ContextManager.java	2007-08-14 12:43:41 UTC (rev 14200)
@@ -0,0 +1,74 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag.  All rights reserved. 
+ * See the copyright.txt in the distribution for a full listing 
+ * of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU General Public License, v. 2.0.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A 
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+ * PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+ * You should have received a copy of the GNU General Public License,
+ * v. 2.0 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+ * MA  02110-1301, USA.
+ * 
+ * (C) 2005-2006,
+ * @author JBoss Inc.
+ */
+/*
+ * Copyright (C) 2003,
+ *
+ * Arjuna Technologies Limited,
+ * Newcastle upon Tyne,
+ * Tyne and Wear,
+ * UK.
+ *
+ * $Id: ContextManager.java,v 1.3.8.1 2005/11/22 10:36:08 kconner Exp $
+ */
+
+package com.arjuna.mwlabs.wst.ba11.remote;
+
+import com.arjuna.mw.wst.TxContext;
+import com.arjuna.wst.SystemException;
+import com.arjuna.wst.UnknownTransactionException;
+
+/**
+ */
+
+// publish via JNDI for each address space?
+
+public class ContextManager
+{
+
+    public ContextManager ()
+    {
+    }
+    
+    // resume overwrites. Should we check first a la JTA?
+
+    public void resume (TxContext tx) throws UnknownTransactionException, SystemException
+    {
+        _threadTxData.set(tx);
+    }
+    
+    public TxContext suspend () throws SystemException
+    {
+        final TxContext ctx = currentTransaction() ;
+        if (ctx != null)
+        {
+            _threadTxData.set(null) ;
+        }
+	return ctx;
+    }
+
+    public TxContext currentTransaction () throws SystemException
+    {
+	return (TxContext) _threadTxData.get();
+    }
+    
+    private static ThreadLocal _threadTxData = new ThreadLocal();
+    
+}


Property changes on: labs/jbosstm/workspace/XTS_TX11/WSTX/classes/com/arjuna/mwlabs/wst/ba11/remote/ContextManager.java
___________________________________________________________________
Name: svn:keywords
   + Rev Date
Name: svn:eol-style
   + native

Added: labs/jbosstm/workspace/XTS_TX11/WSTX/classes/com/arjuna/mwlabs/wst/ba11/remote/UserBusinessActivityImple.java
===================================================================
--- labs/jbosstm/workspace/XTS_TX11/WSTX/classes/com/arjuna/mwlabs/wst/ba11/remote/UserBusinessActivityImple.java	                        (rev 0)
+++ labs/jbosstm/workspace/XTS_TX11/WSTX/classes/com/arjuna/mwlabs/wst/ba11/remote/UserBusinessActivityImple.java	2007-08-14 12:43:41 UTC (rev 14200)
@@ -0,0 +1,322 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag.  All rights reserved. 
+ * See the copyright.txt in the distribution for a full listing 
+ * of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU General Public License, v. 2.0.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A 
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+ * PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+ * You should have received a copy of the GNU General Public License,
+ * v. 2.0 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+ * MA  02110-1301, USA.
+ * 
+ * (C) 2005-2006,
+ * @author JBoss Inc.
+ */
+/*
+ * Copyright (C) 2003,
+ *
+ * Arjuna Technologies Limited,
+ * Newcastle upon Tyne,
+ * Tyne and Wear,
+ * UK.
+ *
+ * $Id: UserBusinessActivityImple.java,v 1.10.4.1 2005/11/22 10:36:07 kconner Exp $
+ */
+
+package com.arjuna.mwlabs.wst.ba11.remote;
+
+import com.arjuna.ats.arjuna.common.Uid;
+import com.arjuna.mw.wsc.context.Context11;
+import com.arjuna.mw.wst.UserBusinessActivity;
+import com.arjuna.mw.wst.common.Environment;
+import com.arjuna.mw.wstx.logging.wstxLogger;
+import com.arjuna.mwlabs.wst.ba11.ContextImple;
+import com.arjuna.mwlabs.wst.ba11.context.TxContextImple;
+import com.arjuna.webservices.SoapFault;
+import com.arjuna.webservices.SoapRegistry;
+import com.arjuna.webservices.wsaddr2005.AttributedURIType;
+import com.arjuna.webservices.wsaddr2005.EndpointReferenceType;
+import com.arjuna.webservices.wsba11.BusinessActivityConstants;
+import com.arjuna.webservices.wscoor11.CoordinationConstants;
+import com.arjuna.webservices.wscoor11.CoordinationContextType;
+import com.arjuna.webservices.wsjboss.InstanceIdentifier;
+import com.arjuna.webservices.wsjbosstx.JBossTXConstants;
+import com.arjuna.wsc.ActivationCoordinator11;
+import com.arjuna.wsc.InvalidCreateParametersException;
+import com.arjuna.wsc.RegistrationCoordinator11;
+import com.arjuna.wst.SystemException;
+import com.arjuna.wst.TransactionRolledBackException;
+import com.arjuna.wst.UnknownTransactionException;
+import com.arjuna.wst.WrongStateException;
+import com.arjuna.wst.stub.BusinessActivityTerminator11Stub;
+
+/**
+ * This is the interface that allows transactions to be started and terminated.
+ * The messaging layer converts the Commit, Rollback and Notify messages into
+ * calls on this.
+ *
+ * @message com.arjuna.mwlabs.wst.ba11.remote.UserBusinessActivityImple_1 [com.arjuna.mwlabs.wst.ba11.remote.UserBusinessActivityImple_1] - Invalid address.
+ * @message com.arjuna.mwlabs.wst.ba11.remote.UserBusinessActivityImple_2 [com.arjuna.mwlabs.wst.ba11.remote.UserBusinessActivityImple_2] - Received context is null!
+ * @message com.arjuna.mwlabs.wst.ba11.remote.UserBusinessActivityImple_3 [com.arjuna.mwlabs.wst.ba11.remote.UserBusinessActivityImple_3] - No termination context!
+ */
+
+public class UserBusinessActivityImple extends UserBusinessActivity
+{
+    public UserBusinessActivityImple ()
+    {
+        try
+        {
+            _activationCoordinatorService = System.getProperty(Environment.COORDINATOR_URL);
+
+            /*
+             * If the coordinator URL hasn't been specified via the
+             * configuration file then assume we are using a locally registered
+             * implementation.
+             */
+
+            if (_activationCoordinatorService == null)
+            {
+                final SoapRegistry soapRegistry = SoapRegistry.getRegistry() ;
+                _activationCoordinatorService = soapRegistry.getServiceURI(CoordinationConstants.SERVICE_ACTIVATION_COORDINATOR) ;
+            }
+        }
+        catch (Exception ex)
+        {
+            // TODO
+
+            ex.printStackTrace();
+        }
+    }
+    
+    public void begin () throws WrongStateException, SystemException
+    {
+    	begin(0);
+    }
+    
+    public void begin (int timeout) throws WrongStateException, SystemException
+    {
+    	try
+    	{
+    	    if (_ctxManager.currentTransaction() != null)
+        		throw new WrongStateException();
+    
+    	    Context11 ctx = startTransaction(timeout);
+    
+    	    _ctxManager.resume(new TxContextImple(ctx));
+    	}
+    	catch (com.arjuna.wsc.InvalidCreateParametersException ex)
+    	{
+    	    tidyup();
+    
+    	    throw new SystemException(ex.toString());
+    	}
+    	catch (com.arjuna.wst.UnknownTransactionException ex)
+    	{
+    	    tidyup();
+    
+    	    throw new SystemException(ex.toString());
+    	}
+    	catch (SystemException ex)
+    	{
+    	    tidyup();
+    
+    	    throw ex;
+    	}
+    }
+
+    public void close () throws TransactionRolledBackException, UnknownTransactionException, SystemException
+    {
+    	TxContextImple ctx = null;
+    
+    	try
+    	{
+    	    ctx = (TxContextImple) _ctxManager.suspend();
+            
+            final String id = ctx.identifier() ;
+            final EndpointReferenceType terminatorCoordinator = getTerminationCoordinator(ctx) ;
+            
+    	    BusinessActivityTerminator11Stub terminatorStub = new BusinessActivityTerminator11Stub(id, terminatorCoordinator);
+    	    
+    	    terminatorStub.close();
+    	}
+    	catch (SystemException ex)
+    	{
+    	    throw ex;
+    	}
+    	catch (TransactionRolledBackException ex)
+    	{
+    	    throw ex;
+    	}
+    	catch (UnknownTransactionException ex)
+    	{
+    	    throw ex;
+    	}
+    	catch (Exception ex)
+    	{
+    	    ex.printStackTrace();
+    	    
+    	    throw new SystemException(ex.toString());
+    	}
+    	finally
+    	{
+    	    tidyup();
+    	}
+    }
+
+    public void cancel () throws UnknownTransactionException, SystemException
+    {
+    	TxContextImple ctx = null;
+    
+    	try
+    	{
+            ctx = (TxContextImple) _ctxManager.suspend();
+            
+            final String id = ctx.identifier() ;
+            final EndpointReferenceType terminatorCoordinator = getTerminationCoordinator(ctx) ;
+            
+            BusinessActivityTerminator11Stub terminatorStub = new BusinessActivityTerminator11Stub(id, terminatorCoordinator);
+    	    
+    	    terminatorStub.cancel();
+    	}
+    	catch (SystemException ex)
+    	{
+    	    throw ex;
+    	}
+    	catch (UnknownTransactionException ex)
+    	{
+    	    throw ex;
+    	}
+    	catch (Exception ex)
+    	{
+    	    ex.printStackTrace();
+    	    
+    	    throw new SystemException(ex.toString());
+    	}
+    	finally
+    	{
+    	    tidyup();
+    	}
+    }
+
+    public void complete () throws UnknownTransactionException, SystemException
+    {
+    	try
+    	{
+            final TxContextImple ctx = ((TxContextImple) _ctxManager.currentTransaction()) ;
+            final String id = ctx.identifier() ;
+            final EndpointReferenceType terminatorCoordinator = getTerminationCoordinator(ctx) ;
+            
+            BusinessActivityTerminator11Stub terminatorStub = new BusinessActivityTerminator11Stub(id, terminatorCoordinator);
+            
+    	    terminatorStub.complete();
+    	}
+    	catch (SystemException ex)
+    	{
+    	    throw ex;
+    	}
+    	catch (UnknownTransactionException ex)
+    	{
+    	    throw ex;
+    	}
+    	catch (Exception ex)
+    	{
+    	    throw new SystemException(ex.toString());
+    	}
+    }
+
+    public String transactionIdentifier ()
+    {
+    	try
+    	{
+    	    return _ctxManager.currentTransaction().toString();
+    	}
+    	catch (com.arjuna.wst.SystemException ex)
+    	{
+    	    return "Unknown";
+    	}
+    	catch (NullPointerException ex)
+    	{
+    	    return "Unknown";
+    	}
+    }
+
+    public String toString ()
+    {
+    	return transactionIdentifier();
+    }
+
+    private final Context11 startTransaction (int timeout) throws com.arjuna.wsc.InvalidCreateParametersException, SystemException
+    {
+        try
+        {
+            final Long expires = (timeout > 0 ? new Long(timeout) : null) ;
+            final String messageId = new Uid().stringForm() ;
+            final CoordinationContextType coordinationContext = ActivationCoordinator11.createCoordinationContext(
+                    _activationCoordinatorService, messageId, BusinessActivityConstants.WSBA_PROTOCOL_ATOMIC_OUTCOME, expires, null) ;
+            if (coordinationContext == null)
+            {
+                throw new SystemException(
+                    wstxLogger.log_mesg.getString("com.arjuna.mwlabs.wst.ba11.remote.UserBusinessActivityImple_2"));
+            }
+            return new ContextImple(coordinationContext) ;
+        }
+        catch (final InvalidCreateParametersException icpe)
+        {
+            throw icpe ;
+        }
+        catch (final SoapFault sf)
+        {
+            throw new SystemException(sf.getMessage()) ;
+        }
+        catch (final Exception ex)
+        {
+            throw new SystemException(ex.toString());
+        }
+	}
+    
+    private EndpointReferenceType getTerminationCoordinator(final TxContextImple ctx)
+        throws SystemException
+    {
+        final CoordinationContextType coordinationContext = ctx.context().getCoordinationContext() ;
+        final String messageId = new Uid().stringForm() ;
+        try
+        {
+            return RegistrationCoordinator11.register(coordinationContext, messageId,
+                getParticipantProtocolService(ctx.identifier()), JBossTXConstants.WSJBOSSTX_PROTOCOL_TERMINATION) ;
+        }
+        catch (final Throwable th)
+        {
+            throw new SystemException(wstxLogger.log_mesg.getString("com.arjuna.mwlabs.wst.ba11.remote.UserBusinessActivityImple_3"));
+        }
+    }
+    
+    private EndpointReferenceType getParticipantProtocolService(final String id)
+    {
+        final SoapRegistry soapRegistry = SoapRegistry.getRegistry() ;
+        final String serviceURI = soapRegistry.getServiceURI(JBossTXConstants.SERVICE_TERMINATION_PARTICIPANT) ;
+        final EndpointReferenceType participant = new EndpointReferenceType(new AttributedURIType(serviceURI)) ;
+        InstanceIdentifier.setEndpointInstanceIdentifier(participant, id) ;
+        return participant ;
+    }
+
+    private final void tidyup ()
+    {
+    	try
+    	{
+    	    _ctxManager.suspend();
+    	}
+    	catch (Exception ex)
+    	{
+    	    ex.printStackTrace();
+    	}
+    }
+    
+    private ContextManager _ctxManager = new ContextManager();
+    private String _activationCoordinatorService;
+}


Property changes on: labs/jbosstm/workspace/XTS_TX11/WSTX/classes/com/arjuna/mwlabs/wst/ba11/remote/UserBusinessActivityImple.java
___________________________________________________________________
Name: svn:keywords
   + Rev Date
Name: svn:eol-style
   + native

Added: labs/jbosstm/workspace/XTS_TX11/WSTX/xml/AtomicTransaction11.xml
===================================================================
--- labs/jbosstm/workspace/XTS_TX11/WSTX/xml/AtomicTransaction11.xml	                        (rev 0)
+++ labs/jbosstm/workspace/XTS_TX11/WSTX/xml/AtomicTransaction11.xml	2007-08-14 12:43:41 UTC (rev 14200)
@@ -0,0 +1,23 @@
+<!--
+  JBoss, Home of Professional Open Source
+  Copyright 2006, JBoss Inc., and individual contributors as indicated
+  by the @authors tag.  All rights reserved. 
+  See the copyright.txt in the distribution for a full listing 
+  of individual contributors.
+  This copyrighted material is made available to anyone wishing to use,
+  modify, copy, or redistribute it subject to the terms and conditions
+  of the GNU General Public License, v. 2.0.
+  This program is distributed in the hope that it will be useful, but WITHOUT A 
+  WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+  PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+  You should have received a copy of the GNU General Public License,
+  v. 2.0 along with this distribution; if not, write to the Free Software
+  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+  MA  02110-1301, USA.
+  
+  (C) 2005-2006,
+  @author JBoss Inc.
+-->
+<coordination-type xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="C:\Documents and Settings\mlittle\Desktop\standards work\WS architecture\WSCF\0.8.2\xml\WSCF.xsd">
+<coordinator-type>http://docs.oasis-open.org/ws-tx/wsat/2006/06</coordinator-type>
+</coordination-type>


Property changes on: labs/jbosstm/workspace/XTS_TX11/WSTX/xml/AtomicTransaction11.xml
___________________________________________________________________
Name: svn:mime-type
   + text/xml
Name: svn:keywords
   + Rev Date
Name: svn:eol-style
   + native

Added: labs/jbosstm/workspace/XTS_TX11/WSTX/xml/BusinessActivity11.xml
===================================================================
--- labs/jbosstm/workspace/XTS_TX11/WSTX/xml/BusinessActivity11.xml	                        (rev 0)
+++ labs/jbosstm/workspace/XTS_TX11/WSTX/xml/BusinessActivity11.xml	2007-08-14 12:43:41 UTC (rev 14200)
@@ -0,0 +1,24 @@
+<!--
+  JBoss, Home of Professional Open Source
+  Copyright 2006, JBoss Inc., and individual contributors as indicated
+  by the @authors tag.  All rights reserved. 
+  See the copyright.txt in the distribution for a full listing 
+  of individual contributors.
+  This copyrighted material is made available to anyone wishing to use,
+  modify, copy, or redistribute it subject to the terms and conditions
+  of the GNU General Public License, v. 2.0.
+  This program is distributed in the hope that it will be useful, but WITHOUT A 
+  WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+  PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+  You should have received a copy of the GNU General Public License,
+  v. 2.0 along with this distribution; if not, write to the Free Software
+  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+  MA  02110-1301, USA.
+  
+  (C) 2005-2006,
+  @author JBoss Inc.
+-->
+<coordination-type xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="C:\Documents and Settings\mlittle\Desktop\standards work\WS architecture\WSCF\0.8.2\xml\WSCF.xsd">
+<coordinator-type>http://docs.oasis-open.org/ws-tx/wsba/2006/06/AtomicOutcome</coordinator-type>
+<coordinator-type>http://docs.oasis-open.org/ws-tx/wsba/2006/06/MixedOutcome</coordinator-type>
+</coordination-type>


Property changes on: labs/jbosstm/workspace/XTS_TX11/WSTX/xml/BusinessActivity11.xml
___________________________________________________________________
Name: svn:mime-type
   + text/xml
Name: svn:keywords
   + Rev Date
Name: svn:eol-style
   + native




More information about the jboss-svn-commits mailing list