[jboss-svn-commits] JBL Code SVN: r18124 - in labs/jbosstm/workspace/adinn/XTSGF: WS-C/dev/dd and 127 other directories.

jboss-svn-commits at lists.jboss.org jboss-svn-commits at lists.jboss.org
Fri Jan 25 12:18:14 EST 2008


Author: adinn
Date: 2008-01-25 12:18:13 -0500 (Fri, 25 Jan 2008)
New Revision: 18124

Added:
   labs/jbosstm/workspace/adinn/XTSGF/WS-C/dev/src/com/arjuna/webservices11/
   labs/jbosstm/workspace/adinn/XTSGF/WS-C/dev/src/com/arjuna/webservices11/ServiceRegistry.java
   labs/jbosstm/workspace/adinn/XTSGF/WS-C/dev/src/com/arjuna/webservices11/wsarj/
   labs/jbosstm/workspace/adinn/XTSGF/WS-C/dev/src/com/arjuna/webservices11/wsarj/ArjunaContext.java
   labs/jbosstm/workspace/adinn/XTSGF/WS-C/dev/src/com/arjuna/webservices11/wsarj/InstanceIdentifier.java
   labs/jbosstm/workspace/adinn/XTSGF/WS-C/dev/src/com/arjuna/webservices11/wsarj/handler/
   labs/jbosstm/workspace/adinn/XTSGF/WS-C/dev/src/com/arjuna/webservices11/wsarj/handler/InstanceIdentifierHandler.java
   labs/jbosstm/workspace/adinn/XTSGF/WS-C/dev/src/com/arjuna/webservices11/wsarj/processor/
   labs/jbosstm/workspace/adinn/XTSGF/WS-C/dev/src/com/arjuna/webservices11/wsarj/processor/BaseNotificationProcessor.java
   labs/jbosstm/workspace/adinn/XTSGF/WS-C/dev/src/com/arjuna/webservices11/wscoor/
   labs/jbosstm/workspace/adinn/XTSGF/WS-C/dev/src/com/arjuna/webservices11/wscoor/CoordinationConstants.java
   labs/jbosstm/workspace/adinn/XTSGF/WS-C/dev/src/com/arjuna/webservices11/wscoor/client/
   labs/jbosstm/workspace/adinn/XTSGF/WS-C/dev/src/com/arjuna/webservices11/wscoor/client/ActivationCoordinatorClient.java
   labs/jbosstm/workspace/adinn/XTSGF/WS-C/dev/src/com/arjuna/webservices11/wscoor/client/WSCOORClient.java
   labs/jbosstm/workspace/adinn/XTSGF/WS-C/dev/src/com/arjuna/webservices11/wscoor/processors/
   labs/jbosstm/workspace/adinn/XTSGF/WS-C/dev/src/com/arjuna/webservices11/wscoor/processors/ActivationCoordinatorProcessor.java
   labs/jbosstm/workspace/adinn/XTSGF/WS-C/dev/src/com/arjuna/webservices11/wscoor/processors/RegistrationCoordinatorProcessor.java
   labs/jbosstm/workspace/adinn/XTSGF/WS-C/dev/src/com/arjuna/webservices11/wscoor/server/
   labs/jbosstm/workspace/adinn/XTSGF/WS-C/dev/src/com/arjuna/webservices11/wscoor/server/ActivationCoordinatorInitialisation.java
   labs/jbosstm/workspace/adinn/XTSGF/WS-C/dev/src/com/arjuna/webservices11/wscoor/server/RegistrationCoordinatorInitialisation.java
   labs/jbosstm/workspace/adinn/XTSGF/WS-C/dev/src/com/arjuna/wsc11/
   labs/jbosstm/workspace/adinn/XTSGF/WS-C/dev/src/com/arjuna/wsc11/ActivationCoordinator.java
   labs/jbosstm/workspace/adinn/XTSGF/WS-C/dev/src/com/arjuna/wsc11/ContextFactory.java
   labs/jbosstm/workspace/adinn/XTSGF/WS-C/dev/src/com/arjuna/wsc11/ContextFactoryMapper.java
   labs/jbosstm/workspace/adinn/XTSGF/WS-C/dev/src/com/arjuna/wsc11/Registrar.java
   labs/jbosstm/workspace/adinn/XTSGF/WS-C/dev/src/com/arjuna/wsc11/RegistrarMapper.java
   labs/jbosstm/workspace/adinn/XTSGF/WS-C/dev/src/com/arjuna/wsc11/RegistrationCoordinator.java
   labs/jbosstm/workspace/adinn/XTSGF/WS-C/dev/src/com/arjuna/wsc11/messaging/
   labs/jbosstm/workspace/adinn/XTSGF/WS-C/dev/src/com/arjuna/wsc11/messaging/ActivationCoordinatorProcessorImpl.java
   labs/jbosstm/workspace/adinn/XTSGF/WS-C/dev/src/com/arjuna/wsc11/messaging/MessageId.java
   labs/jbosstm/workspace/adinn/XTSGF/WS-C/dev/src/com/arjuna/wsc11/messaging/RegistrationCoordinatorProcessorImpl.java
   labs/jbosstm/workspace/adinn/XTSGF/WS-C/dev/src/com/arjuna/wsc11/messaging/deploy/
   labs/jbosstm/workspace/adinn/XTSGF/WS-C/dev/src/com/arjuna/wsc11/messaging/deploy/CoordinationInitialisation.java
   labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices11/
   labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices11/wsarjtx/
   labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices11/wsarjtx/ArjunaTXConstants.java
   labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices11/wsarjtx/client/
   labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices11/wsarjtx/client/TerminationCoordinatorClient.java
   labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices11/wsarjtx/client/TerminationParticipantClient.java
   labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices11/wsarjtx/client/WSARJTXClient.java
   labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices11/wsarjtx/processors/
   labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices11/wsarjtx/processors/TerminationCoordinatorProcessor.java
   labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices11/wsarjtx/processors/TerminationParticipantCallback.java
   labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices11/wsarjtx/processors/TerminationParticipantProcessor.java
   labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices11/wsat/
   labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices11/wsat/AtomicTransactionConstants.java
   labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices11/wsat/CoordinatorInboundEvents.java
   labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices11/wsat/ParticipantInboundEvents.java
   labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices11/wsat/State.java
   labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices11/wsat/client/
   labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices11/wsat/client/CompletionCoordinatorClient.java
   labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices11/wsat/client/CompletionInitiatorClient.java
   labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices11/wsat/client/CoordinatorClient.java
   labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices11/wsat/client/ParticipantClient.java
   labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices11/wsat/client/WSATClient.java
   labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices11/wsat/processors/
   labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices11/wsat/processors/CompletionCoordinatorProcessor.java
   labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices11/wsat/processors/CompletionInitiatorCallback.java
   labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices11/wsat/processors/CompletionInitiatorProcessor.java
   labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices11/wsat/processors/CoordinatorProcessor.java
   labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices11/wsat/processors/ParticipantProcessor.java
   labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices11/wsba/
   labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices11/wsba/BusinessActivityConstants.java
   labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices11/wsba/CoordinatorCompletionCoordinatorInboundEvents.java
   labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices11/wsba/CoordinatorCompletionParticipantInboundEvents.java
   labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices11/wsba/ParticipantCompletionCoordinatorInboundEvents.java
   labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices11/wsba/ParticipantCompletionParticipantInboundEvents.java
   labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices11/wsba/State.java
   labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices11/wsba/client/
   labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices11/wsba/client/CoordinatorCompletionCoordinatorClient.java
   labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices11/wsba/client/CoordinatorCompletionParticipantClient.java
   labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices11/wsba/client/ParticipantCompletionCoordinatorClient.java
   labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices11/wsba/client/ParticipantCompletionParticipantClient.java
   labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices11/wsba/client/WSBAClient.java
   labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices11/wsba/processors/
   labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices11/wsba/processors/CoordinatorCompletionCoordinatorProcessor.java
   labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices11/wsba/processors/CoordinatorCompletionParticipantProcessor.java
   labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices11/wsba/processors/ParticipantCompletionCoordinatorProcessor.java
   labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices11/wsba/processors/ParticipantCompletionParticipantProcessor.java
   labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/wst11/
   labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/wst11/BAParticipantManager.java
   labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/wst11/BusinessActivityTerminator.java
   labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/wst11/CompletionCoordinatorParticipant.java
   labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/wst11/messaging/
   labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/wst11/messaging/CompletionCoordinatorProcessorImpl.java
   labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/wst11/messaging/CoordinatorCompletionCoordinatorProcessorImpl.java
   labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/wst11/messaging/CoordinatorCompletionParticipantProcessorImpl.java
   labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/wst11/messaging/CoordinatorProcessorImpl.java
   labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/wst11/messaging/ParticipantCompletionCoordinatorProcessorImpl.java
   labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/wst11/messaging/ParticipantCompletionParticipantProcessorImpl.java
   labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/wst11/messaging/ParticipantProcessorImpl.java
   labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/wst11/messaging/TerminationCoordinatorProcessorImpl.java
   labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/wst11/messaging/deploy/
   labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/wst11/messaging/deploy/TransactionInitialisation.java
   labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/wst11/messaging/engines/
   labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/wst11/messaging/engines/CoordinatorCompletionCoordinatorEngine.java
   labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/wst11/messaging/engines/CoordinatorCompletionParticipantEngine.java
   labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/wst11/messaging/engines/CoordinatorEngine.java
   labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/wst11/messaging/engines/ParticipantCompletionCoordinatorEngine.java
   labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/wst11/messaging/engines/ParticipantCompletionParticipantEngine.java
   labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/wst11/messaging/engines/ParticipantEngine.java
   labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/wst11/stub/
   labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/wst11/stub/BACoordinatorCompletionParticipantManagerStub.java
   labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/wst11/stub/BAParticipantCompletionParticipantManagerStub.java
   labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/wst11/stub/BusinessActivityTerminatorStub.java
   labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/wst11/stub/BusinessAgreementWithCoordinatorCompletionStub.java
   labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/wst11/stub/BusinessAgreementWithParticipantCompletionStub.java
   labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/wst11/stub/CompletionStub.java
   labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/wst11/stub/Durable2PCStub.java
   labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/wst11/stub/ParticipantStub.java
   labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/wst11/stub/Volatile2PCStub.java
   labs/jbosstm/workspace/adinn/XTSGF/WSCF/classes/com/arjuna/mw/wsc11/
   labs/jbosstm/workspace/adinn/XTSGF/WSCF/classes/com/arjuna/mw/wsc11/context/
   labs/jbosstm/workspace/adinn/XTSGF/WSCF/classes/com/arjuna/mw/wsc11/context/Context.java
   labs/jbosstm/workspace/adinn/XTSGF/WSCF/classes/com/arjuna/mw/wsc11/deploy/
   labs/jbosstm/workspace/adinn/XTSGF/WSCF/classes/com/arjuna/mw/wsc11/deploy/WSCFInitialisation.java
   labs/jbosstm/workspace/adinn/XTSGF/WSCF/classes/com/arjuna/mw/wscf11/
   labs/jbosstm/workspace/adinn/XTSGF/WSCF/classes/com/arjuna/mw/wscf11/common/
   labs/jbosstm/workspace/adinn/XTSGF/WSCF/classes/com/arjuna/mw/wscf11/common/Environment.java
   labs/jbosstm/workspace/adinn/XTSGF/WSCF/classes/com/arjuna/mw/wscf11/model/
   labs/jbosstm/workspace/adinn/XTSGF/WSCF/classes/com/arjuna/mw/wscf11/model/sagas/
   labs/jbosstm/workspace/adinn/XTSGF/WSCF/classes/com/arjuna/mw/wscf11/model/sagas/CoordinatorManagerFactory.java
   labs/jbosstm/workspace/adinn/XTSGF/WSCF/classes/com/arjuna/mw/wscf11/model/sagas/UserCoordinatorFactory.java
   labs/jbosstm/workspace/adinn/XTSGF/WSCF/classes/com/arjuna/mw/wscf11/model/twophase/
   labs/jbosstm/workspace/adinn/XTSGF/WSCF/classes/com/arjuna/mw/wscf11/model/twophase/CoordinatorManagerFactory.java
   labs/jbosstm/workspace/adinn/XTSGF/WSCF/classes/com/arjuna/mw/wscf11/model/twophase/UserCoordinatorFactory.java
   labs/jbosstm/workspace/adinn/XTSGF/WSCF/classes/com/arjuna/mw/wscf11/protocols/
   labs/jbosstm/workspace/adinn/XTSGF/WSCF/classes/com/arjuna/mw/wscf11/protocols/ProtocolManager.java
   labs/jbosstm/workspace/adinn/XTSGF/WSCF/classes/com/arjuna/mw/wscf11/protocols/ProtocolRegistry.java
   labs/jbosstm/workspace/adinn/XTSGF/WSCF/classes/com/arjuna/mwlabs/wsc11/
   labs/jbosstm/workspace/adinn/XTSGF/WSCF/classes/com/arjuna/mwlabs/wsc11/ContextFactoryMapperImple.java
   labs/jbosstm/workspace/adinn/XTSGF/WSCF/classes/com/arjuna/mwlabs/wscf11/
   labs/jbosstm/workspace/adinn/XTSGF/WSCF/classes/com/arjuna/mwlabs/wscf11/model/
   labs/jbosstm/workspace/adinn/XTSGF/WSCF/classes/com/arjuna/mwlabs/wscf11/model/sagas/
   labs/jbosstm/workspace/adinn/XTSGF/WSCF/classes/com/arjuna/mwlabs/wscf11/model/sagas/arjunacore/
   labs/jbosstm/workspace/adinn/XTSGF/WSCF/classes/com/arjuna/mwlabs/wscf11/model/sagas/arjunacore/SagasHLSImple.java
   labs/jbosstm/workspace/adinn/XTSGF/WSCF/classes/com/arjuna/mwlabs/wscf11/model/twophase/
   labs/jbosstm/workspace/adinn/XTSGF/WSCF/classes/com/arjuna/mwlabs/wscf11/model/twophase/arjunacore/
   labs/jbosstm/workspace/adinn/XTSGF/WSCF/classes/com/arjuna/mwlabs/wscf11/model/twophase/arjunacore/TwoPhaseHLSImple.java
   labs/jbosstm/workspace/adinn/XTSGF/WSCF/classes/com/arjuna/mwlabs/wscf11/protocols/
   labs/jbosstm/workspace/adinn/XTSGF/WSCF/classes/com/arjuna/mwlabs/wscf11/protocols/Initializer.java
   labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mw/wst11/
   labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mw/wst11/BusinessActivityManager.java
   labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mw/wst11/BusinessActivityManagerFactory.java
   labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mw/wst11/TransactionManager.java
   labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mw/wst11/TransactionManagerFactory.java
   labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mw/wst11/UserBusinessActivity.java
   labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mw/wst11/UserBusinessActivityFactory.java
   labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mw/wst11/UserTransaction.java
   labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mw/wst11/UserTransactionFactory.java
   labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mw/wst11/client/
   labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mw/wst11/client/JaxBaseHeaderContextProcessor.java
   labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mw/wst11/client/JaxWSHeaderContextProcessor.java
   labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mw/wst11/common/
   labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mw/wst11/common/CoordinationContextHelper.java
   labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mw/wst11/common/Environment.java
   labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mw/wst11/deploy/
   labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mw/wst11/deploy/WSTXInitialisation.java
   labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mw/wst11/service/
   labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mw/wst11/service/JaxBaseHeaderContextProcessor.java
   labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mw/wst11/service/JaxWSHeaderContextProcessor.java
   labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mwlabs/wst11/
   labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mwlabs/wst11/at/
   labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mwlabs/wst11/at/ContextFactoryImple.java
   labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mwlabs/wst11/at/ContextImple.java
   labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mwlabs/wst11/at/RegistrarImple.java
   labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mwlabs/wst11/at/context/
   labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mwlabs/wst11/at/context/ArjunaContextImple.java
   labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mwlabs/wst11/at/context/TxContextImple.java
   labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mwlabs/wst11/at/participants/
   labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mwlabs/wst11/at/participants/CleanupSynchronization.java
   labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mwlabs/wst11/at/participants/CompletionCoordinatorImple.java
   labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mwlabs/wst11/at/remote/
   labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mwlabs/wst11/at/remote/TransactionManagerImple.java
   labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mwlabs/wst11/at/remote/UserTransactionImple.java
   labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mwlabs/wst11/ba/
   labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mwlabs/wst11/ba/BusinessActivityTerminatorImple.java
   labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mwlabs/wst11/ba/ContextFactoryImple.java
   labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mwlabs/wst11/ba/ContextImple.java
   labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mwlabs/wst11/ba/RegistrarImple.java
   labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mwlabs/wst11/ba/context/
   labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mwlabs/wst11/ba/context/ArjunaContextImple.java
   labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mwlabs/wst11/ba/context/TxContextImple.java
   labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mwlabs/wst11/ba/participants/
   labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mwlabs/wst11/ba/participants/BusinessAgreementWithCoordinatorCompletionImple.java
   labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mwlabs/wst11/ba/participants/BusinessAgreementWithParticipantCompletionImple.java
   labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mwlabs/wst11/ba/remote/
   labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mwlabs/wst11/ba/remote/BAParticipantManagerImple.java
   labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mwlabs/wst11/ba/remote/BusinessActivityManagerImple.java
   labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mwlabs/wst11/ba/remote/UserBusinessActivityImple.java
   labs/jbosstm/workspace/adinn/XTSGF/demo/dd/jboss/wst11.xml
Removed:
   labs/jbosstm/workspace/adinn/XTSGF/WS-C/dev/src/com/arjuna/webservices/ServiceRegistryWS.java
   labs/jbosstm/workspace/adinn/XTSGF/WS-C/dev/src/com/arjuna/webservices/wsaddrws/
   labs/jbosstm/workspace/adinn/XTSGF/WS-C/dev/src/com/arjuna/webservices/wsarj/ArjunaContextWS.java
   labs/jbosstm/workspace/adinn/XTSGF/WS-C/dev/src/com/arjuna/webservices/wsarj/InstanceIdentifierWS.java
   labs/jbosstm/workspace/adinn/XTSGF/WS-C/dev/src/com/arjuna/webservices/wsarj/handler/InstanceIdentifierHandlerWS.java
   labs/jbosstm/workspace/adinn/XTSGF/WS-C/dev/src/com/arjuna/webservices/wsarj/processor/BaseNotificationProcessorWS.java
   labs/jbosstm/workspace/adinn/XTSGF/WS-C/dev/src/com/arjuna/webservices/wscoor/CoordinationConstantsWS.java
   labs/jbosstm/workspace/adinn/XTSGF/WS-C/dev/src/com/arjuna/webservices/wscoor/client/ActivationCoordinatorClientWS.java
   labs/jbosstm/workspace/adinn/XTSGF/WS-C/dev/src/com/arjuna/webservices/wscoor/client/WSCOORClientWS.java
   labs/jbosstm/workspace/adinn/XTSGF/WS-C/dev/src/com/arjuna/webservices/wscoor/processors/ActivationCoordinatorProcessorWS.java
   labs/jbosstm/workspace/adinn/XTSGF/WS-C/dev/src/com/arjuna/webservices/wscoor/processors/RegistrationCoordinatorProcessorWS.java
   labs/jbosstm/workspace/adinn/XTSGF/WS-C/dev/src/com/arjuna/webservices/wscoor/sei/
   labs/jbosstm/workspace/adinn/XTSGF/WS-C/dev/src/com/arjuna/webservices/wscoor/server/ActivationCoordinatorWSInitialisation.java
   labs/jbosstm/workspace/adinn/XTSGF/WS-C/dev/src/com/arjuna/webservices/wscoor/server/RegistrationCoordinatorWSInitialisation.java
   labs/jbosstm/workspace/adinn/XTSGF/WS-C/dev/src/com/arjuna/wsc/ActivationCoordinatorWS.java
   labs/jbosstm/workspace/adinn/XTSGF/WS-C/dev/src/com/arjuna/wsc/ContextFactoryMapperWS.java
   labs/jbosstm/workspace/adinn/XTSGF/WS-C/dev/src/com/arjuna/wsc/ContextFactoryWS.java
   labs/jbosstm/workspace/adinn/XTSGF/WS-C/dev/src/com/arjuna/wsc/RegistrarMapperWS.java
   labs/jbosstm/workspace/adinn/XTSGF/WS-C/dev/src/com/arjuna/wsc/RegistrarWS.java
   labs/jbosstm/workspace/adinn/XTSGF/WS-C/dev/src/com/arjuna/wsc/RegistrationCoordinatorWS.java
   labs/jbosstm/workspace/adinn/XTSGF/WS-C/dev/src/com/arjuna/wsc/messaging/ActivationCoordinatorProcessorWSImpl.java
   labs/jbosstm/workspace/adinn/XTSGF/WS-C/dev/src/com/arjuna/wsc/messaging/MessageIdWS.java
   labs/jbosstm/workspace/adinn/XTSGF/WS-C/dev/src/com/arjuna/wsc/messaging/RegistrationCoordinatorProcessorWSImpl.java
   labs/jbosstm/workspace/adinn/XTSGF/WS-C/dev/src/com/arjuna/wsc/messaging/deploy/CoordinationWSInitialisation.java
   labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices/wsarjtx/ArjunaTXWSConstants.java
   labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices/wsarjtx/client/TerminationCoordinatorClientWS.java
   labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices/wsarjtx/client/TerminationParticipantClientWS.java
   labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices/wsarjtx/client/WSARJTXClientWS.java
   labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices/wsarjtx/processors/TerminationCoordinatorProcessorWS.java
   labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices/wsarjtx/processors/TerminationParticipantCallbackWS.java
   labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices/wsarjtx/processors/TerminationParticipantProcessorWS.java
   labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices/wsarjtx/sei/
   labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices/wsarjtx/server/TerminationCoordinatorWSInitialisation.java
   labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices/wsarjtx/server/TerminationParticipantWSInitialisation.java
   labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices/wsat/AtomicTransactionWSConstants.java
   labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices/wsat/CoordinatorInboundEventsWS.java
   labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices/wsat/ParticipantInboundEventsWS.java
   labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices/wsat/StateWS.java
   labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices/wsat/client/CompletionCoordinatorClientWS.java
   labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices/wsat/client/CompletionInitiatorClientWS.java
   labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices/wsat/client/CoordinatorClientWS.java
   labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices/wsat/client/ParticipantClientWS.java
   labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices/wsat/client/WSATClientWS.java
   labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices/wsat/processors/CompletionCoordinatorProcessorWS.java
   labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices/wsat/processors/CompletionInitiatorCallbackWS.java
   labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices/wsat/processors/CompletionInitiatorProcessorWS.java
   labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices/wsat/processors/CoordinatorProcessorWS.java
   labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices/wsat/processors/ParticipantProcessorWS.java
   labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices/wsat/sei/
   labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices/wsat/server/CompletionCoordinatorWSInitialisation.java
   labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices/wsat/server/CompletionInitiatorWSInitialisation.java
   labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices/wsat/server/CoordinatorWSInitialisation.java
   labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices/wsat/server/ParticipantWSInitialisation.java
   labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices/wsba/BusinessActivityWSConstants.java
   labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices/wsba/CoordinatorCompletionCoordinatorInboundEventsWS.java
   labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices/wsba/CoordinatorCompletionParticipantInboundEventsWS.java
   labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices/wsba/ParticipantCompletionCoordinatorInboundEventsWS.java
   labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices/wsba/ParticipantCompletionParticipantInboundEventsWS.java
   labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices/wsba/StateWS.java
   labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices/wsba/client/CoordinatorCompletionCoordinatorClientWS.java
   labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices/wsba/client/CoordinatorCompletionParticipantClientWS.java
   labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices/wsba/client/ParticipantCompletionCoordinatorClientWS.java
   labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices/wsba/client/ParticipantCompletionParticipantClientWS.java
   labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices/wsba/client/WSBAClientWS.java
   labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices/wsba/processors/CoordinatorCompletionCoordinatorProcessorWS.java
   labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices/wsba/processors/CoordinatorCompletionParticipantProcessorWS.java
   labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices/wsba/processors/ParticipantCompletionCoordinatorProcessorWS.java
   labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices/wsba/processors/ParticipantCompletionParticipantProcessorWS.java
   labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices/wsba/sei/
   labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices/wsba/server/CoordinatorCompletionCoordinatorWSInitialisation.java
   labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices/wsba/server/CoordinatorCompletionParticipantWSInitialisation.java
   labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices/wsba/server/ParticipantCompletionCoordinatorWSInitialisation.java
   labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices/wsba/server/ParticipantCompletionParticipantWSInitialisation.java
   labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/wst/BAParticipantManagerWS.java
   labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/wst/BusinessActivityTerminatorWS.java
   labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/wst/CompletionCoordinatorParticipantWS.java
   labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/wst/messaging/CompletionCoordinatorProcessorWSImpl.java
   labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/wst/messaging/CoordinatorCompletionCoordinatorProcessorWSImpl.java
   labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/wst/messaging/CoordinatorCompletionParticipantProcessorWSImpl.java
   labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/wst/messaging/CoordinatorProcessorWSImpl.java
   labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/wst/messaging/ParticipantCompletionCoordinatorProcessorWSImpl.java
   labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/wst/messaging/ParticipantCompletionParticipantProcessorWSImpl.java
   labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/wst/messaging/ParticipantProcessorWSImpl.java
   labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/wst/messaging/TerminationCoordinatorProcessorWSImpl.java
   labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/wst/messaging/deploy/TransactionWSInitialisation.java
   labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/wst/messaging/engines/CoordinatorCompletionCoordinatorEngineWS.java
   labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/wst/messaging/engines/CoordinatorCompletionParticipantEngineWS.java
   labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/wst/messaging/engines/CoordinatorEngineWS.java
   labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/wst/messaging/engines/ParticipantCompletionCoordinatorEngineWS.java
   labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/wst/messaging/engines/ParticipantCompletionParticipantEngineWS.java
   labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/wst/messaging/engines/ParticipantEngineWS.java
   labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/wst/stub/BACoordinatorCompletionParticipantManagerStubWS.java
   labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/wst/stub/BAParticipantCompletionParticipantManagerStubWS.java
   labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/wst/stub/BusinessActivityTerminatorStubWS.java
   labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/wst/stub/BusinessAgreementWithCoordinatorCompletionStubWS.java
   labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/wst/stub/BusinessAgreementWithParticipantCompletionStubWS.java
   labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/wst/stub/CompletionStubWS.java
   labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/wst/stub/Durable2PCStubWS.java
   labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/wst/stub/ParticipantStubWS.java
   labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/wst/stub/Volatile2PCStubWS.java
   labs/jbosstm/workspace/adinn/XTSGF/WSCF/classes/com/arjuna/mw/wsc/context/ContextWS.java
   labs/jbosstm/workspace/adinn/XTSGF/WSCF/classes/com/arjuna/mw/wsc/deploy/WSCFWSInitialisation.java
   labs/jbosstm/workspace/adinn/XTSGF/WSCF/classes/com/arjuna/mw/wscf/model/sagas/CoordinatorManager11Factory.java
   labs/jbosstm/workspace/adinn/XTSGF/WSCF/classes/com/arjuna/mw/wscf/model/sagas/UserCoordinator11Factory.java
   labs/jbosstm/workspace/adinn/XTSGF/WSCF/classes/com/arjuna/mw/wscf/model/twophase/CoordinatorManager11Factory.java
   labs/jbosstm/workspace/adinn/XTSGF/WSCF/classes/com/arjuna/mw/wscf/model/twophase/UserCoordinator11Factory.java
   labs/jbosstm/workspace/adinn/XTSGF/WSCF/classes/com/arjuna/mw/wscf/protocols/ProtocolManagerWS.java
   labs/jbosstm/workspace/adinn/XTSGF/WSCF/classes/com/arjuna/mw/wscf/protocols/ProtocolRegistryWS.java
   labs/jbosstm/workspace/adinn/XTSGF/WSCF/classes/com/arjuna/mwlabs/wsc/ContextFactoryMapperWSImple.java
   labs/jbosstm/workspace/adinn/XTSGF/WSCF/classes/com/arjuna/mwlabs/wscf/model/sagas/arjunacore/Sagas11HLSImple.java
   labs/jbosstm/workspace/adinn/XTSGF/WSCF/classes/com/arjuna/mwlabs/wscf/model/twophase/arjunacore/TwoPhase11HLSImple.java
   labs/jbosstm/workspace/adinn/XTSGF/WSCF/classes/com/arjuna/mwlabs/wscf/protocols/InitializerWS.java
   labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mw/wst/BusinessActivity11Manager.java
   labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mw/wst/BusinessActivityManager11Factory.java
   labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mw/wst/TransactionManager11.java
   labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mw/wst/TransactionManager11Factory.java
   labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mw/wst/UserBusinessActivity11.java
   labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mw/wst/UserBusinessActivity11Factory.java
   labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mw/wst/UserTransaction11.java
   labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mw/wst/UserTransaction11Factory.java
   labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mw/wst/client/JaxBaseHeaderContextProcessorWS.java
   labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mw/wst/client/JaxWSHeaderContextProcessorWS.java
   labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mw/wst/common/CoordinationContextHelperWS.java
   labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mw/wst/deploy/WSTXWSInitialisation.java
   labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mw/wst/service/JaxBaseHeaderContextProcessorWS.java
   labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mw/wst/service/JaxWSHeaderContextProcessorWS.java
   labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mwlabs/wst/at/ContextFactoryWSImple.java
   labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mwlabs/wst/at/ContextWSImple.java
   labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mwlabs/wst/at/RegistrarWSImple.java
   labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mwlabs/wst/at/context/ArjunaContextWSImple.java
   labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mwlabs/wst/at/context/TxContextWSImple.java
   labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mwlabs/wst/at/participants/CleanupSynchronizationWS.java
   labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mwlabs/wst/at/participants/CompletionCoordinatorWSImple.java
   labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mwlabs/wst/at/remote/TransactionManagerWSImple.java
   labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mwlabs/wst/at/remote/UserTransactionWSImple.java
   labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mwlabs/wst/ba/BusinessActivityTerminatorWSImple.java
   labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mwlabs/wst/ba/ContextFactoryWSImple.java
   labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mwlabs/wst/ba/ContextWSImple.java
   labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mwlabs/wst/ba/RegistrarWSImple.java
   labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mwlabs/wst/ba/context/ArjunaContextWSImple.java
   labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mwlabs/wst/ba/context/TxContextWSImple.java
   labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mwlabs/wst/ba/participants/BusinessAgreementWithCoordinatorCompletionWSImple.java
   labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mwlabs/wst/ba/participants/BusinessAgreementWithParticipantCompletionWSImple.java
   labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mwlabs/wst/ba/remote/BAParticipantManagerWSImple.java
   labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mwlabs/wst/ba/remote/BusinessActivity11ManagerImple.java
   labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mwlabs/wst/ba/remote/UserBusinessActivityWSImple.java
Modified:
   labs/jbosstm/workspace/adinn/XTSGF/WS-C/build.xml
   labs/jbosstm/workspace/adinn/XTSGF/WS-C/dev/dd/webservices.xml
   labs/jbosstm/workspace/adinn/XTSGF/WS-C/dev/dd/ws-c11_web-app.xml
   labs/jbosstm/workspace/adinn/XTSGF/WS-C/dev/dd/ws-c_handlers.xml
   labs/jbosstm/workspace/adinn/XTSGF/WS-T/build.xml
   labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/dd/ws-t11_web-app.xml
   labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/dd/ws-t_handlers.xml
   labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices/wsarjtx/server/TerminationParticipantInitialisation.java
   labs/jbosstm/workspace/adinn/XTSGF/WSCF/build.xml
   labs/jbosstm/workspace/adinn/XTSGF/WSCF/classes/com/arjuna/mw/wscf/common/Environment.java
   labs/jbosstm/workspace/adinn/XTSGF/WSCF/classes/com/arjuna/mwlabs/wscf/model/sagas/arjunacore/CoordinatorControl.java
   labs/jbosstm/workspace/adinn/XTSGF/WSCF/classes/com/arjuna/mwlabs/wscf/model/twophase/arjunacore/CoordinatorControl.java
   labs/jbosstm/workspace/adinn/XTSGF/WSCF/config/wscf11.xml
   labs/jbosstm/workspace/adinn/XTSGF/WSCF/xml/wscf11_web-app.xml
   labs/jbosstm/workspace/adinn/XTSGF/WSTX/build.xml
   labs/jbosstm/workspace/adinn/XTSGF/WSTX/config/wst11.xml
   labs/jbosstm/workspace/adinn/XTSGF/WSTX/config/wstx11.xml
   labs/jbosstm/workspace/adinn/XTSGF/WSTX/xml/wstx_web-app11.xml
   labs/jbosstm/workspace/adinn/XTSGF/demo/dd/jboss/context-handlers11.xml
   labs/jbosstm/workspace/adinn/XTSGF/demo/src/com/jboss/jbosstm/xts/demo/client/BasicClient.java
   labs/jbosstm/workspace/adinn/XTSGF/demo/src/com/jboss/jbosstm/xts/demo/services/restaurant/RestaurantServiceAT.java
   labs/jbosstm/workspace/adinn/XTSGF/demo/src/com/jboss/jbosstm/xts/demo/services/restaurant/RestaurantServiceBA.java
   labs/jbosstm/workspace/adinn/XTSGF/demo/src/com/jboss/jbosstm/xts/demo/services/taxi/TaxiServiceAT.java
   labs/jbosstm/workspace/adinn/XTSGF/demo/src/com/jboss/jbosstm/xts/demo/services/taxi/TaxiServiceBA.java
   labs/jbosstm/workspace/adinn/XTSGF/demo/src/com/jboss/jbosstm/xts/demo/services/theatre/TheatreServiceAT.java
   labs/jbosstm/workspace/adinn/XTSGF/demo/src/com/jboss/jbosstm/xts/demo/services/theatre/TheatreServiceBA.java
Log:
reorganised to locate all WSCOOR 1.1 specific code in packages with 11 suffix

Modified: labs/jbosstm/workspace/adinn/XTSGF/WS-C/build.xml
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WS-C/build.xml	2008-01-25 17:05:33 UTC (rev 18123)
+++ labs/jbosstm/workspace/adinn/XTSGF/WS-C/build.xml	2008-01-25 17:18:13 UTC (rev 18124)
@@ -169,7 +169,7 @@
 	<copy file="${dev.dd.dir}/wscoor1.1/wsdl/wscoor-activation-binding.wsdl" tofile="${build.dev.classes.dir}/org/oasis_open/docs/ws_tx/wscoor/_2006/_06/wsdl/wscoor-activation-binding.wsdl"/>
 	<copy file="${dev.dd.dir}/wscoor1.1/wsdl/wscoor-registration-binding.wsdl" tofile="${build.dev.classes.dir}/org/oasis_open/docs/ws_tx/wscoor/_2006/_06/wsdl/wscoor-registration-binding.wsdl"/>
         <jar jarfile="${build.dev.lib.dir}/ws-c.jar">
-            <fileset dir="${build.dev.classes.dir}" excludes="com/arjuna/webservices/wscoor/sei/** handlers.xml"/>
+            <fileset dir="${build.dev.classes.dir}" excludes="com/arjuna/webservices11/wscoor/sei/** handlers.xml"/>
 	    <!--
             <fileset dir="${build.dev.dd.dir}" includes="wsdl/**"/>
 	    -->
@@ -204,7 +204,7 @@
             </manifest>
 	</war>
         <war warfile="${build.dev.webapps.dir}/ws-c11.war" needxmlfile="false">
-	    <webinf dir="${build.dir}/dev" includes="classes/com/arjuna/webservices/wscoor/sei/* classes/handlers.xml"/>
+	    <webinf dir="${build.dir}/dev" includes="classes/com/arjuna/webservices11/wscoor/sei/* classes/handlers.xml"/>
 	    <webinf dir="${build.dev.dd.dir}" includes="wsdl/**"/>
             <manifest>
                 <attribute name="Class-Path" value="WEB-INF/classes ws-c.jar"/>

Modified: labs/jbosstm/workspace/adinn/XTSGF/WS-C/dev/dd/webservices.xml
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WS-C/dev/dd/webservices.xml	2008-01-25 17:05:33 UTC (rev 18123)
+++ labs/jbosstm/workspace/adinn/XTSGF/WS-C/dev/dd/webservices.xml	2008-01-25 17:18:13 UTC (rev 18124)
@@ -36,7 +36,7 @@
 			<wsdl-port >wscoor:ActivationPortType</wsdl-port>
 			<service-endpoint-interface>org.oasis_open.docs.ws_tx.wscoor._2006._06.ActivationPortType</service-endpoint-interface>
 			<service-impl-bean>
-				<ejb-link>com.arjuna.webservices.wscoor.sei.ActivationPortTypeImpl</ejb-link>
+				<ejb-link>com.arjuna.webservices11.wscoor.sei.ActivationPortTypeImpl</ejb-link>
 			</service-impl-bean>
             <!-- we don't actually need a handler for context flow on the activation service -->
 			<handler>
@@ -55,7 +55,7 @@
 			<wsdl-port>wscoor:RegistrationPortType</wsdl-port>
 			<service-endpoint-interface>org.oasis_open.docs.ws_tx.wscoor._2006._06.RegistrationPortType</service-endpoint-interface>
 			<service-impl-bean>
-                <ejb-link>com.arjuna.webservices.wscoor.sei.RegistrationPortTypeImpl</ejb-link>
+                <ejb-link>com.arjuna.webservices11.wscoor.sei.RegistrationPortTypeImpl</ejb-link>
 			</service-impl-bean>
             <!-- provide a handler fo rth eocntext flow -->
 	                <handler>

Modified: labs/jbosstm/workspace/adinn/XTSGF/WS-C/dev/dd/ws-c11_web-app.xml
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WS-C/dev/dd/ws-c11_web-app.xml	2008-01-25 17:05:33 UTC (rev 18123)
+++ labs/jbosstm/workspace/adinn/XTSGF/WS-C/dev/dd/ws-c11_web-app.xml	2008-01-25 17:18:13 UTC (rev 18124)
@@ -33,14 +33,14 @@
     </context-param>
     <!-- Initialise WS Coord 1.1 services -->
     <listener>
-        <listener-class>com.arjuna.webservices.wscoor.server.ActivationCoordinatorWSInitialisation</listener-class>
+        <listener-class>com.arjuna.webservices11.wscoor.server.ActivationCoordinatorInitialisation</listener-class>
     </listener>
     <listener>
-        <listener-class>com.arjuna.webservices.wscoor.server.RegistrationCoordinatorWSInitialisation</listener-class>
+        <listener-class>com.arjuna.webservices11.wscoor.server.RegistrationCoordinatorInitialisation</listener-class>
     </listener>
 
     <!-- Initialise WS-C 1.1  -->
     <listener>
-        <listener-class>com.arjuna.wsc.messaging.deploy.CoordinationWSInitialisation</listener-class>
+        <listener-class>com.arjuna.wsc11.messaging.deploy.CoordinationInitialisation</listener-class>
     </listener>
 </web-app>

Modified: labs/jbosstm/workspace/adinn/XTSGF/WS-C/dev/dd/ws-c_handlers.xml
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WS-C/dev/dd/ws-c_handlers.xml	2008-01-25 17:05:33 UTC (rev 18123)
+++ labs/jbosstm/workspace/adinn/XTSGF/WS-C/dev/dd/ws-c_handlers.xml	2008-01-25 17:18:13 UTC (rev 18124)
@@ -26,7 +26,7 @@
     <handler-chain>
 	<handler>
 		<handler-name>Instance Identifier Handler</handler-name>
-		<handler-class>com.arjuna.webservices.wsarj.handler.InstanceIdentifierHandlerWS</handler-class>
+		<handler-class>com.arjuna.webservices11.wsarj.handler.InstanceIdentifierHandler</handler-class>
 	</handler>
 	<handler>
 		<handler-name>WS Addressing Server Handler</handler-name>

Deleted: labs/jbosstm/workspace/adinn/XTSGF/WS-C/dev/src/com/arjuna/webservices/ServiceRegistryWS.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WS-C/dev/src/com/arjuna/webservices/ServiceRegistryWS.java	2008-01-25 17:05:33 UTC (rev 18123)
+++ labs/jbosstm/workspace/adinn/XTSGF/WS-C/dev/src/com/arjuna/webservices/ServiceRegistryWS.java	2008-01-25 17:18:13 UTC (rev 18124)
@@ -1,93 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. 
- * 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;
-
-import javax.imageio.spi.ServiceRegistry;
-import java.util.Map;
-import java.util.TreeMap;
-
-/**
- * The registry of WS service providers for the WS-C and WS-T services.
- * @author kevin
- */
-public class ServiceRegistryWS
-{
-    /**
-     * The registry singleton.
-     */
-    private static final ServiceRegistryWS REGISTRY = new ServiceRegistryWS() ;
-
-    /**
-     * The SOAP service provider registry.
-     */
-    private final Map<String, String> serviceProviderRegistry = new TreeMap<String, String>() ;
-
-    /**
-     * Get the service registry.
-     * @return The service registry.
-     */
-    public static ServiceRegistryWS getRegistry()
-    {
-        return REGISTRY ;
-    }
-
-    /**
-     * Register the specified service.
-     * @param serviceName The service name.
-     * @param url The service url.
-     */
-    public void registerServiceProvider(final String serviceName, final String url)
-    {
-        synchronized(serviceProviderRegistry)
-        {
-            serviceProviderRegistry.put(serviceName, url) ;
-        }
-    }
-
-    /**
-     * Remove the specified service.
-     * @param serviceName The service name.
-     */
-    public void removeServiceProvider(final String serviceName)
-    {
-        synchronized(serviceProviderRegistry)
-        {
-            serviceProviderRegistry.remove(serviceName) ;
-        }
-    }
-
-    /**
-     * Get the service URI.
-     * @param serviceName The service name.
-     * @return The service URI or null if not registered.
-     */
-    public String getServiceURI(final String serviceName)
-    {
-        String uri;
-
-        synchronized(serviceProviderRegistry)
-        {
-            uri = serviceProviderRegistry.get(serviceName) ;
-        }
-
-        return uri;
-    }
-}
\ No newline at end of file

Deleted: labs/jbosstm/workspace/adinn/XTSGF/WS-C/dev/src/com/arjuna/webservices/wsarj/ArjunaContextWS.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WS-C/dev/src/com/arjuna/webservices/wsarj/ArjunaContextWS.java	2008-01-25 17:05:33 UTC (rev 18123)
+++ labs/jbosstm/workspace/adinn/XTSGF/WS-C/dev/src/com/arjuna/webservices/wsarj/ArjunaContextWS.java	2008-01-25 17:18:13 UTC (rev 18124)
@@ -1,82 +0,0 @@
-package com.arjuna.webservices.wsarj;
-
-import javax.xml.ws.handler.MessageContext;
-
-/**
- * The arjuna context.
- * @author kevin
- */
-public class ArjunaContextWS
-{
-    /**
-     * The key used for the arjuna context within a message exchange.
-     */
-    private static final String ARJUNAWS_CONTEXT_PROPERTY = "org.jboss.xts.ws.context";
-
-    /**
-     * The InstanceIdentifier header.
-     */
-    private InstanceIdentifierWS instanceIdentifier ;
-
-    /**
-     * Default constructor.
-     */
-    private ArjunaContextWS()
-    {
-    }
-
-    /**
-     * Get the instance identifier.
-     * @return The instance identifier.
-     */
-    public InstanceIdentifierWS getInstanceIdentifier()
-    {
-        return instanceIdentifier ;
-    }
-
-    /**
-     * Set the instance identifier.
-     * @param instanceIdentifier The instance identifier.
-     */
-    public void setInstanceIdentifier(final InstanceIdentifierWS instanceIdentifier)
-    {
-        this.instanceIdentifier = instanceIdentifier ;
-    }
-
-    /**
-     * Is the configuration of this element valid?
-     * @return true if valid, false otherwise.
-     */
-    public boolean isValid()
-    {
-        return ((instanceIdentifier != null) && instanceIdentifier.isValid()) ;
-    }
-
-    /**
-     * Get the arjuna context from the message context if present.
-     * @param messageContext The message context.
-     * @return The arjuna context or null if not present.
-     */
-    public static ArjunaContextWS getCurrentContext(final MessageContext messageContext)
-    {
-        return (ArjunaContextWS)messageContext.get(ARJUNAWS_CONTEXT_PROPERTY) ;
-    }
-
-    /**
-     * Get the arjuna context from the message context.
-     * @param messageContext The message context.
-     * @return The arjuna context.
-     */
-    public static ArjunaContextWS getContext(final MessageContext messageContext)
-    {
-        final ArjunaContextWS current = (ArjunaContextWS)messageContext.get(ARJUNAWS_CONTEXT_PROPERTY) ;
-        if (current != null)
-        {
-            return current ;
-        }
-        final ArjunaContextWS newContext = new ArjunaContextWS() ;
-        messageContext.put(ARJUNAWS_CONTEXT_PROPERTY, newContext) ;
-        messageContext.setScope(ARJUNAWS_CONTEXT_PROPERTY, MessageContext.Scope.APPLICATION);
-        return newContext ;
-    }
-}

Deleted: labs/jbosstm/workspace/adinn/XTSGF/WS-C/dev/src/com/arjuna/webservices/wsarj/InstanceIdentifierWS.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WS-C/dev/src/com/arjuna/webservices/wsarj/InstanceIdentifierWS.java	2008-01-25 17:05:33 UTC (rev 18123)
+++ labs/jbosstm/workspace/adinn/XTSGF/WS-C/dev/src/com/arjuna/webservices/wsarj/InstanceIdentifierWS.java	2008-01-25 17:18:13 UTC (rev 18124)
@@ -1,150 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. 
- * 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.wsarj;
-
-import org.w3c.dom.Element;
-
-import javax.xml.soap.Name;
-import javax.xml.soap.SOAPElement;
-import javax.xml.soap.SOAPException;
-import javax.xml.soap.SOAPFactory;
-import javax.xml.ws.wsaddressing.W3CEndpointReferenceBuilder;
-
-/**
- * Representation of an InstanceIdentifier element.
- * @author kevin
- */
-public class InstanceIdentifierWS
-{
-    /**
-     * The instance identifier.
-     */
-    private String instanceIdentifier ;
-
-    /**
-      * Default constructor.
-      */
-     public InstanceIdentifierWS()
-     {
-     }
-
-    /**
-     * Construct an instance identifier with the specific identifier
-     * @param instanceIdentifier The instance identifier.
-     */
-
-    public InstanceIdentifierWS(final String instanceIdentifier)
-    {
-        this.instanceIdentifier = instanceIdentifier ;
-    }
-
-    /**
-     * 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 ;
-    }
-
-    /**
-     * Is the configuration of this element valid?
-     * @return true if valid, false otherwise.
-     */
-    public boolean isValid()
-    {
-        return (instanceIdentifier != null) && (instanceIdentifier.trim().length() > 0);
-    }
-
-    /**
-     * Get a string representation of this instance identifier.
-     * @return the string representation.
-     */
-    public String toString()
-    {
-        return (instanceIdentifier != null ? instanceIdentifier : "") ;
-    }
-
-     /**
-     * Set the identifier on an endpoint reference under construction.
-     * @param builder The endpoint reference builder.
-     * @param identifier The identifier.
-     */
-    public static void setEndpointInstanceIdentifier(final W3CEndpointReferenceBuilder builder, final String identifier)
-    {
-        builder.referenceParameter(createInstanceIdentifierElement(identifier));
-    }
-    
-    /**
-     * Set the identifier on an endpoint reference under construction.
-     * @param builder The endpoint reference builder.
-     * @param instanceIdentifier The identifier.
-     */
-    public static void setEndpointInstanceIdentifier(final W3CEndpointReferenceBuilder builder, final InstanceIdentifierWS instanceIdentifier)
-    {
-        builder.referenceParameter(createInstanceIdentifierElement(instanceIdentifier.getInstanceIdentifier())) ;
-    }
-
-    /**
-     * a soap factory used to construct SOAPElement instances representing InstanceIdentifier instances
-     */
-    private static SOAPFactory factory;
-
-    /**
-     * a name for the WSArj Instance element
-     */
-    private static Name WSARJ_ELEMENT_INSTANCE_NAME;
-
-    /**
-     * Create a SOAPElement representing an InstanceIdentifier
-     * @param instanceIdentifier the identifier string of the InstanceIdentifier being represented
-     * @return a SOAPElement with the InstancreIdentifier QName as its element tag and a text node containing the
-     * suppliedidentifier string as its value
-     */
-
-    private static Element createInstanceIdentifierElement(final String instanceIdentifier)
-    {
-        try {
-            if (factory == null) {
-                factory = SOAPFactory.newInstance();
-                Name name = factory.createName(ArjunaConstants.WSARJ_ELEMENT_INSTANCE_IDENTIFIER,
-                        ArjunaConstants.WSARJ_PREFIX,
-                        ArjunaConstants.WSARJ_NAMESPACE);
-                WSARJ_ELEMENT_INSTANCE_NAME = name;
-            }
-            SOAPElement element = factory.createElement(WSARJ_ELEMENT_INSTANCE_NAME);
-            element.addTextNode(instanceIdentifier);
-            return element;
-        } catch (SOAPException se) {
-            // TODO log error here (should never happen)
-            return null;
-        }
-    }
-}

Deleted: labs/jbosstm/workspace/adinn/XTSGF/WS-C/dev/src/com/arjuna/webservices/wsarj/handler/InstanceIdentifierHandlerWS.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WS-C/dev/src/com/arjuna/webservices/wsarj/handler/InstanceIdentifierHandlerWS.java	2008-01-25 17:05:33 UTC (rev 18123)
+++ labs/jbosstm/workspace/adinn/XTSGF/WS-C/dev/src/com/arjuna/webservices/wsarj/handler/InstanceIdentifierHandlerWS.java	2008-01-25 17:18:13 UTC (rev 18124)
@@ -1,172 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. 
- * 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.wsarj.handler;
-
-import com.arjuna.webservices.wsarj.ArjunaConstants;
-import com.arjuna.webservices.wsarj.ArjunaContextWS;
-import com.arjuna.webservices.wsarj.InstanceIdentifierWS;
-
-import javax.xml.namespace.QName;
-import javax.xml.soap.SOAPEnvelope;
-import javax.xml.soap.SOAPHeader;
-import javax.xml.soap.SOAPHeaderElement;
-import javax.xml.soap.SOAPMessage;
-import javax.xml.ws.ProtocolException;
-import javax.xml.ws.handler.MessageContext;
-import javax.xml.ws.handler.soap.SOAPHandler;
-import javax.xml.ws.handler.soap.SOAPMessageContext;
-import java.util.Collections;
-import java.util.Iterator;
-import java.util.Set;
-
-/**
- * Header handler for parsing the Arjuna WS instance identifier header.
- * @author adinn
- */
-public class InstanceIdentifierHandlerWS implements SOAPHandler<SOAPMessageContext>
-{
-    /**
-     * Gets the header blocks that can be processed by this Handler
-     * instance.
-     *
-     * @return Set of QNames of header blocks processed by this
-     *         handler instance. <code>QName</code> is the qualified
-     *         name of the outermost element of the Header block.
-     */
-    public Set<QName> getHeaders()
-    {
-        return headers;
-    }
-
-    /**
-     * Handle an outgoing message by inserting any current arjuna context attached to the context into the message
-     * headers and handle an incoming message by retrieving the context from the headers and attaching it to the
-     * context,
-     *
-     * @param context the message context.
-     * @return Always return true
-     * @throws RuntimeException               Causes the JAX-WS runtime to cease
-     *                                        handler processing and generate a fault.
-     * @throws javax.xml.ws.ProtocolException Causes the JAX-WS runtime to switch to
-     *                                        fault message processing.
-     */
-    public boolean handleMessage(SOAPMessageContext context) throws ProtocolException
-    {
-        final boolean outbound = (Boolean)context.get(MessageContext.MESSAGE_OUTBOUND_PROPERTY);
-        if (outbound) {
-            return handleMessageOutbound(context);
-        } else {
-            return handlemessageInbound(context);
-        }
-    }
-
-    /**
-     * check for an arjuna context attached to the message context and, if found, install its identifier as the value
-     * of a soap message header element
-     * @param context
-     * @return
-     * @throws ProtocolException
-     */
-    private boolean handleMessageOutbound(SOAPMessageContext context) throws ProtocolException
-    {
-        try {
-            ArjunaContextWS arjunaContext = ArjunaContextWS.getCurrentContext(context);
-            if (arjunaContext != null) {
-                InstanceIdentifierWS instanceIdentifier = arjunaContext.getInstanceIdentifier();
-                // insert a header into the current message containing the instance identifier as a text element
-                final SOAPMessage soapMessage = context.getMessage();
-                final SOAPEnvelope soapEnvelope = soapMessage.getSOAPPart().getEnvelope();
-                SOAPHeader soapHeader = soapEnvelope.getHeader() ;
-                if (soapHeader == null)
-                {
-                    soapHeader = soapEnvelope.addHeader() ;
-                }
-                final SOAPHeaderElement headerElement = soapHeader.addHeaderElement(ArjunaConstants.WSARJ_ELEMENT_INSTANCE_IDENTIFIER_QNAME);
-                headerElement.setValue(instanceIdentifier.getInstanceIdentifier());
-                headerElement.setMustUnderstand(true);
-            }
-        } catch (Exception se) {
-            throw new ProtocolException(se);
-        }
-
-        return true;
-    }
-
-    /**
-     * check for an arjuna instance identifier element embedded in the soap message headesr and, if found, use it to
-     * label an arjuna context attached to the message context
-     * @param context
-     * @return
-     * @throws ProtocolException
-     */
-    private boolean handlemessageInbound(SOAPMessageContext context)  throws ProtocolException
-    {
-        try {
-            final SOAPMessage soapMessage = context.getMessage();
-            final SOAPEnvelope soapEnvelope = soapMessage.getSOAPPart().getEnvelope();
-            Iterator<SOAPHeaderElement> iterator = soapEnvelope.getHeader().examineAllHeaderElements();
-            while (iterator.hasNext()) {
-                final SOAPHeaderElement headerElement = iterator.next();
-                if (ArjunaConstants.WSARJ_ELEMENT_INSTANCE_IDENTIFIER_QNAME.equals(headerElement.getElementQName())) {
-                    // found it - clear the must understand flag, retrieve the value and store an arjuna
-                    // context in the message context
-                    headerElement.setMustUnderstand(false);
-                    String identifierString = headerElement.getValue();
-                    if (identifierString != null) {
-                        ArjunaContextWS arjunaContext = ArjunaContextWS.getContext(context);
-                        arjunaContext.setInstanceIdentifier(new InstanceIdentifierWS(identifierString));
-                        break;
-                    }
-                }
-            }
-        } catch (Exception se) {
-            throw new ProtocolException(se);
-        }
-
-        return true;
-    }
-
-    /**
-     * this handler ignores faults but allows other handlers to deal with them
-     *
-     * @param context the message context
-     * @return true to allow fault handling to continue
-     */
-
-    public boolean handleFault(SOAPMessageContext context)
-    {
-        return true;
-    }
-
-    /**
-     * this hanlder ignores close messages
-     *
-     * @param context the message context
-     */
-    public void close(javax.xml.ws.handler.MessageContext context)
-    {
-    }
-
-    /**
-     * a singleton set containing the only header this handler is interested in
-     */
-    private static Set<QName> headers = Collections.singleton(ArjunaConstants.WSARJ_ELEMENT_INSTANCE_IDENTIFIER_QNAME);
-}
\ No newline at end of file

Deleted: labs/jbosstm/workspace/adinn/XTSGF/WS-C/dev/src/com/arjuna/webservices/wsarj/processor/BaseNotificationProcessorWS.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WS-C/dev/src/com/arjuna/webservices/wsarj/processor/BaseNotificationProcessorWS.java	2008-01-25 17:05:33 UTC (rev 18123)
+++ labs/jbosstm/workspace/adinn/XTSGF/WS-C/dev/src/com/arjuna/webservices/wsarj/processor/BaseNotificationProcessorWS.java	2008-01-25 17:18:13 UTC (rev 18124)
@@ -1,33 +0,0 @@
-package com.arjuna.webservices.wsarj.processor;
-
-import com.arjuna.webservices.base.processors.BaseProcessor;
-import com.arjuna.webservices.wsarj.ArjunaContextWS;
-import com.arjuna.webservices.wsarj.InstanceIdentifierWS;
-
-import javax.xml.ws.addressing.AddressingProperties;
-
-/**
- * Utility class handling common response functionality.
- * @author kevin
- */
-public abstract class BaseNotificationProcessorWS extends BaseProcessor
-{
-    /**
-     * Get the callback ids.
-     * @param addressingProperties The addressing context.
-     * @param arjunaContext The arjuna context.
-     * @return The callback ids.
-     */
-    protected String[] getIDs(final AddressingProperties addressingProperties, final ArjunaContextWS arjunaContext)
-    {
-        if (arjunaContext != null)
-        {
-            final InstanceIdentifierWS instanceIdentifier = arjunaContext.getInstanceIdentifier() ;
-            if (instanceIdentifier != null)
-            {
-                return new String[] {instanceIdentifier.getInstanceIdentifier()} ;
-            }
-        }
-        return null ;
-    }
-}

Deleted: labs/jbosstm/workspace/adinn/XTSGF/WS-C/dev/src/com/arjuna/webservices/wscoor/CoordinationConstantsWS.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WS-C/dev/src/com/arjuna/webservices/wscoor/CoordinationConstantsWS.java	2008-01-25 17:05:33 UTC (rev 18123)
+++ labs/jbosstm/workspace/adinn/XTSGF/WS-C/dev/src/com/arjuna/webservices/wscoor/CoordinationConstantsWS.java	2008-01-25 17:18:13 UTC (rev 18124)
@@ -1,247 +0,0 @@
-/*
- * 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.wscoor;
-
-import javax.xml.namespace.QName;
-
-/**
- * Interface containing WS-Coordination constants.
- */
-public interface CoordinationConstantsWS
-{
-    /**
-     * The Namespace.
-     */
-    public String WSCOOR_NAMESPACE = "http://docs.oasis-open.org/ws-tx/wscoor/2006/06" ;
-    /**
-     * The namespace prefix.
-     */
-    public String WSCOOR_PREFIX = "wscoor" ;
-
-    public String REGISTRATION_SERVICE_NAME = "RegistrationService";
-
-    public String ACTIVATION_SERVICE_NAME = "ActivationService";
-
-    public String ACTIVATION_ENDPOINT_NAME = "ActivationPortType";
-
-    public String REGISTRATION_ENDPOINT_NAME = "RegistrationPortType";
-
-    public QName REGISTRATION_SERVICE_QNAME = new QName(WSCOOR_NAMESPACE, REGISTRATION_SERVICE_NAME, WSCOOR_PREFIX) ;;
-
-    public QName ACTIVATION_SERVICE_QNAME = new QName(WSCOOR_NAMESPACE, ACTIVATION_SERVICE_NAME, WSCOOR_PREFIX) ;;
-
-    public QName ACTIVATION_ENDPOINT_QNAME = new QName(WSCOOR_NAMESPACE, ACTIVATION_ENDPOINT_NAME, WSCOOR_PREFIX) ;;
-
-    public QName REGISTRATION_ENDPOINT_QNAME = new QName(WSCOOR_NAMESPACE, REGISTRATION_ENDPOINT_NAME, WSCOOR_PREFIX) ;;
-    /**
-     * 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 AlreadyRegistered error code.
-     */
-    public String WSCOOR_ERROR_CODE_ALREADY_REGISTERED = "AlreadyRegistered" ;
-    /**
-     * The AlreadyRegistered error code QName.
-     */
-    public QName WSCOOR_ERROR_CODE_ALREADY_REGISTERED_QNAME = new QName(WSCOOR_NAMESPACE, WSCOOR_ERROR_CODE_ALREADY_REGISTERED, WSCOOR_PREFIX) ;
-    /**
-     * The ContextRefused error code.
-     */
-    public String WSCOOR_ERROR_CODE_CONTEXT_REFUSED = "ContextRefused" ;
-    /**
-     * The ContextRefused error code QName.
-     */
-    public QName WSCOOR_ERROR_CODE_CONTEXT_REFUSED_QNAME = new QName(WSCOOR_NAMESPACE, WSCOOR_ERROR_CODE_CONTEXT_REFUSED, WSCOOR_PREFIX) ;
-    /**
-     * 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 NoActivity error code.
-     */
-    public String WSCOOR_ERROR_CODE_NO_ACTIVITY = "NoActivity" ;
-    /**
-     * The NoActivity error code QName.
-     */
-    public QName WSCOOR_ERROR_CODE_NO_ACTIVITY_QNAME = new QName(WSCOOR_NAMESPACE, WSCOOR_ERROR_CODE_NO_ACTIVITY, WSCOOR_PREFIX) ;
-    /**
-     * The unexpected exception error code.
-     */
-    public String WSCOOR_ERROR_CODE_EXCEPTION = "Exception" ;
-    /**
-     * The NoActivity error code QName.
-     */
-    public QName WSCOOR_ERROR_CODE_EXCEPTION_QNAME = new QName(WSCOOR_NAMESPACE, WSCOOR_ERROR_CODE_EXCEPTION, WSCOOR_PREFIX) ;
-}

Deleted: labs/jbosstm/workspace/adinn/XTSGF/WS-C/dev/src/com/arjuna/webservices/wscoor/client/ActivationCoordinatorClientWS.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WS-C/dev/src/com/arjuna/webservices/wscoor/client/ActivationCoordinatorClientWS.java	2008-01-25 17:05:33 UTC (rev 18123)
+++ labs/jbosstm/workspace/adinn/XTSGF/WS-C/dev/src/com/arjuna/webservices/wscoor/client/ActivationCoordinatorClientWS.java	2008-01-25 17:18:13 UTC (rev 18124)
@@ -1,98 +0,0 @@
-/*
- * 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.wscoor.client;
-
-import com.arjuna.webservices.SoapFault;
-import com.arjuna.webservices.wscoor.CoordinationConstantsWS;
-import org.oasis_open.docs.ws_tx.wscoor._2006._06.*;
-
-import javax.xml.namespace.QName;
-import javax.xml.ws.addressing.AddressingProperties;
-import javax.xml.ws.addressing.AttributedURI;
-import java.io.IOException;
-
-/**
- * The Client side of the Activation Coordinator.
- * @author kevin
- */
-public class ActivationCoordinatorClientWS
-{
-    /**
-     * The client singleton.
-     */
-    private static final ActivationCoordinatorClientWS CLIENT = new ActivationCoordinatorClientWS() ;
-
-    /**
-     * Construct the activation coordinator client.
-     */
-    private ActivationCoordinatorClientWS()
-    {
-    }
-    
-    /**
-     * Send a create coordination request.
-     * @param addressingProperties addressing context initialised with to and message ID.
-     * @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 CreateCoordinationContextResponseType
-    sendCreateCoordination(final AddressingProperties addressingProperties,
-        final String coordinationType, final Expires expires, final CoordinationContext currentContext)
-        throws SoapFault, IOException
-    {
-        final CreateCoordinationContextType request = new CreateCoordinationContextType() ;
-        request.setCoordinationType(coordinationType) ;
-        request.setExpires(expires) ;
-        if (currentContext != null) {
-            // structurally a CreateCoordinationContextType.CurrentContext and a CoordinationContext are the same i.e.
-            // they are a CoordinationContextType extended with an Any list. but the schema does not use one to define
-            // the other so, until we can generate them as the same type we have to interconvert here (and elsewhere)
-
-            CreateCoordinationContextType.CurrentContext current = new CreateCoordinationContextType.CurrentContext();
-            current.setCoordinationType(currentContext.getCoordinationType());
-            current.setExpires(currentContext.getExpires());
-            current.setIdentifier(currentContext.getIdentifier());
-            current.setRegistrationService(currentContext.getRegistrationService());
-            current.getAny().addAll(currentContext.getAny());
-            request.setCurrentContext(current);
-        } else {
-            request.setCurrentContext(null) ;
-        }
-
-        // get proxy with required message id and end point address
-        ActivationPortType port = WSCOORClientWS.getActivationPort(addressingProperties, CoordinationConstantsWS.WSCOOR_ACTION_CREATE_COORDINATION_CONTEXT);
-
-        // invoke remote method
-        return port.createCoordinationContextOperation(request);
-    }
-
-    /**
-     * Get the Activation Coordinator client singleton.
-     * @return The Activation Coordinator client singleton.
-     */
-    public static ActivationCoordinatorClientWS getClient()
-    {
-        return CLIENT ;
-    }
-}

Deleted: labs/jbosstm/workspace/adinn/XTSGF/WS-C/dev/src/com/arjuna/webservices/wscoor/client/WSCOORClientWS.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WS-C/dev/src/com/arjuna/webservices/wscoor/client/WSCOORClientWS.java	2008-01-25 17:05:33 UTC (rev 18123)
+++ labs/jbosstm/workspace/adinn/XTSGF/WS-C/dev/src/com/arjuna/webservices/wscoor/client/WSCOORClientWS.java	2008-01-25 17:18:13 UTC (rev 18124)
@@ -1,137 +0,0 @@
-package com.arjuna.webservices.wscoor.client;
-
-import com.arjuna.webservices.wsarj.handler.InstanceIdentifierHandlerWS;
-import com.arjuna.webservices.wsaddrws.AddressingHelper;
-import org.jboss.ws.extensions.addressing.jaxws.WSAddressingClientHandler;
-import org.oasis_open.docs.ws_tx.wscoor._2006._06.ActivationPortType;
-import org.oasis_open.docs.ws_tx.wscoor._2006._06.ActivationService;
-import org.oasis_open.docs.ws_tx.wscoor._2006._06.RegistrationPortType;
-import org.oasis_open.docs.ws_tx.wscoor._2006._06.RegistrationService;
-
-import javax.xml.ws.BindingProvider;
-import javax.xml.ws.addressing.AddressingBuilder;
-import javax.xml.ws.addressing.AddressingProperties;
-import javax.xml.ws.addressing.AttributedURI;
-import javax.xml.ws.addressing.JAXWSAConstants;
-import javax.xml.ws.handler.Handler;
-import javax.xml.ws.soap.AddressingFeature;
-import javax.xml.ws.wsaddressing.W3CEndpointReference;
-import java.net.URISyntaxException;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Map;
-
-/**
- * Created by IntelliJ IDEA.
- * User: adinn
- * Date: Oct 7, 2007
- * Time: 3:14:28 PM
- * To change this template use File | Settings | File Templates.
- */
-public class WSCOORClientWS
-{
-    // TODO -- do we really need a thread local here or can we just use one service?
-    /**
-     *  thread local which maintains a per thread activation service instance
-     */
-    private static ThreadLocal<ActivationService> activationService = new ThreadLocal<ActivationService>();
-
-    /**
-     *  thread local which maintains a per thread activation service instance
-     */
-    private static ThreadLocal<RegistrationService> registrationService = new ThreadLocal<RegistrationService>();
-
-    /**
-     *  builder used to construct addressing info for calls
-     */
-    private static AddressingBuilder builder = AddressingBuilder.getAddressingBuilder();
-
-    /**
-     * fetch a coordinator activation service unique to the current thread
-     * @return
-     */
-    private static synchronized ActivationService getActivationService()
-    {
-        if (activationService.get() == null) {
-            activationService.set(new ActivationService());
-        }
-        return activationService.get();
-    }
-
-    /**
-     * fetch a coordinator registration service unique to the current thread
-     * @return
-     */
-    private static synchronized RegistrationService getRegistrationService()
-    {
-        if (registrationService.get() == null) {
-            registrationService.set(new RegistrationService());
-        }
-        return registrationService.get();
-    }
-
-    public static ActivationPortType getActivationPort(AddressingProperties addressingProperties,
-                                                       String action)
-    {
-        // TODO - we need the 2.1 verison of Service so we can specify that we want to use the WS Addressing feature
-        // JBossWs implements it on Service21, a subclass of Service, and our generated service inherots from Service.
-        ActivationService service = getActivationService();
-        // ActivationPortType port = service.getPort(ActivationPortType.class);
-        ActivationPortType port = service.getPort(ActivationPortType.class, new AddressingFeature(true, true));
-        BindingProvider bindingProvider = (BindingProvider)port;
-        AttributedURI toUri = addressingProperties.getTo();
-        /*
-         * we don't actually need to configure an instance identifier handler for this port -- it's the only one
-         * on which we do not need to pass implicit context data either outgoing or returning.
-         * But we do have to add the the WSAdressing client handler to ensure that the addressing properties
-         * are encoded into the SOAP message
-         */
-        List<Handler> customHandlerChain = new ArrayList<Handler>();
-		customHandlerChain.add(new WSAddressingClientHandler());
-		bindingProvider.getBinding().setHandlerChain(customHandlerChain);
-        Map<String, Object> requestContext = bindingProvider.getRequestContext();
-        requestContext.put(JAXWSAConstants.CLIENT_ADDRESSING_PROPERTIES, addressingProperties);
-	    // jbossws should do this for us . . .
-	    requestContext.put(JAXWSAConstants.CLIENT_ADDRESSING_PROPERTIES_OUTBOUND, addressingProperties);
-        requestContext.put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, toUri.getURI().toString());
-        try {
-            addressingProperties.setAction(builder.newURI(action));
-        } catch (URISyntaxException use) {
-            // TODO log this error
-        }
-
-        // TODO we should not need to do this?
-        requestContext.put(BindingProvider.SOAPACTION_USE_PROPERTY, new Boolean(true));
-        requestContext.put(BindingProvider.SOAPACTION_URI_PROPERTY, action);
-
-        return port;
-    }
-
-    // don't think we ever need this as we get a registration port from the endpoint ref returned by
-    // the activation port request
-    public static RegistrationPortType getRegistrationPort(W3CEndpointReference endpointReference, String action, String messageID)
-    {
-        RegistrationService service = getRegistrationService();
-        RegistrationPortType port = service.getPort(endpointReference, RegistrationPortType.class, new AddressingFeature(true, true));
-        BindingProvider bindingProvider = (BindingProvider)port;
-        /*
-         * we need to configure an instance identifier handler for this port to pass the tx context either
-         * outgoing or returning. We also have to add the the WSAdressing client handler to ensure that the
-         * addressing properties are encoded into the SOAP message
-         */
-        List<Handler> customHandlerChain = new ArrayList<Handler>();
-        customHandlerChain.add(new InstanceIdentifierHandlerWS());
-        customHandlerChain.add(new WSAddressingClientHandler());
-		bindingProvider.getBinding().setHandlerChain(customHandlerChain);
-        // the address will have been pulled out of the endpoint by getPort but we still have to set it in the
-        // addressing properties along with the action and message id
-        Map<String, Object> requestContext = bindingProvider.getRequestContext();
-        String address = (String)requestContext.get(BindingProvider.ENDPOINT_ADDRESS_PROPERTY);
-        AddressingProperties addressingProperties = AddressingHelper.createRequestContext(address, action, messageID);
-        requestContext.put(JAXWSAConstants.CLIENT_ADDRESSING_PROPERTIES, addressingProperties);
-	    // jbossws should do this for us . . .
-	    requestContext.put(JAXWSAConstants.CLIENT_ADDRESSING_PROPERTIES_OUTBOUND, addressingProperties);
-
-        return port;
-    }
-}

Deleted: labs/jbosstm/workspace/adinn/XTSGF/WS-C/dev/src/com/arjuna/webservices/wscoor/processors/ActivationCoordinatorProcessorWS.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WS-C/dev/src/com/arjuna/webservices/wscoor/processors/ActivationCoordinatorProcessorWS.java	2008-01-25 17:05:33 UTC (rev 18123)
+++ labs/jbosstm/workspace/adinn/XTSGF/WS-C/dev/src/com/arjuna/webservices/wscoor/processors/ActivationCoordinatorProcessorWS.java	2008-01-25 17:18:13 UTC (rev 18124)
@@ -1,69 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. 
- * 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.wscoor.processors;
-
-import javax.xml.ws.addressing.AddressingProperties;
-
-import org.oasis_open.docs.ws_tx.wscoor._2006._06.CreateCoordinationContextType;
-import org.oasis_open.docs.ws_tx.wscoor._2006._06.CreateCoordinationContextResponseType;
-
-/**
- * The Activation Coordinator processor.
- * @author kevin
- */
-public abstract class ActivationCoordinatorProcessorWS
-{
-    /**
-     * The coordinator.
-     */
-    private static ActivationCoordinatorProcessorWS COORDINATOR  ;
-    
-    /**
-     * Get the coordinator.
-     * @return The coordinator.
-     */
-    public static ActivationCoordinatorProcessorWS getCoordinator()
-    {
-        return COORDINATOR ;
-    }
-    
-    /**
-     * Set the coordinator.
-     * @param coordinator The coordinator.
-     * @return The previous coordinator.
-     */
-    public static ActivationCoordinatorProcessorWS setCoordinator(final ActivationCoordinatorProcessorWS coordinator)
-    {
-        final ActivationCoordinatorProcessorWS origCoordinator = COORDINATOR ;
-        COORDINATOR = coordinator ;
-        return origCoordinator ;
-    }
-    
-    /**
-     * Create the coordination context.
-     * @param createCoordinationContext The create coordination context request.
-     * @param addressingContext The addressing context.
-     * @return a response message containing the desired coordinaton context
-     */
-    public abstract CreateCoordinationContextResponseType
-        createCoordinationContext(final CreateCoordinationContextType createCoordinationContext,
-                                  final AddressingProperties addressingProperties) ;
-}

Deleted: labs/jbosstm/workspace/adinn/XTSGF/WS-C/dev/src/com/arjuna/webservices/wscoor/processors/RegistrationCoordinatorProcessorWS.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WS-C/dev/src/com/arjuna/webservices/wscoor/processors/RegistrationCoordinatorProcessorWS.java	2008-01-25 17:05:33 UTC (rev 18123)
+++ labs/jbosstm/workspace/adinn/XTSGF/WS-C/dev/src/com/arjuna/webservices/wscoor/processors/RegistrationCoordinatorProcessorWS.java	2008-01-25 17:18:13 UTC (rev 18124)
@@ -1,71 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. 
- * 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.wscoor.processors;
-
-import com.arjuna.webservices.wsarj.ArjunaContextWS;
-import com.arjuna.wsc.messaging.RegistrationCoordinatorProcessorWSImpl;
-import org.oasis_open.docs.ws_tx.wscoor._2006._06.RegisterResponseType;
-import org.oasis_open.docs.ws_tx.wscoor._2006._06.RegisterType;
-
-import javax.xml.ws.addressing.AddressingProperties;
-
-
-/**
- * The Registration Coordinator processor.
- * @author kevin
- */
-public abstract class RegistrationCoordinatorProcessorWS
-{
-    /**
-     * The coordinator.
-     */
-    private static RegistrationCoordinatorProcessorWS COORDINATOR ;
-    
-    /**
-     * Get the coordinator.
-     * @return The coordinator.
-     */
-    public static RegistrationCoordinatorProcessorWS getCoordinator()
-    {
-        return COORDINATOR ;
-    }
-    
-    /**
-     * Set the coordinator.
-     * @param coordinator The coordinator.
-     * @return The orig coordinator.
-     */
-    public static RegistrationCoordinatorProcessorWS setCoordinator(final RegistrationCoordinatorProcessorWSImpl coordinator)
-    {
-        final RegistrationCoordinatorProcessorWS origCoordinator = COORDINATOR ;
-        COORDINATOR = coordinator ;
-        return origCoordinator ;
-    }
-
-    /**
-     * Register the participant in the protocol.
-     * @param register The register request.
-     * @param addressingContext The addressing context.
-     * @param arjunaContext The arjuna context.
-     */
-    public abstract RegisterResponseType register(final RegisterType register, final AddressingProperties addressingContext,
-        final ArjunaContextWS arjunaContext) ;
-}

Deleted: labs/jbosstm/workspace/adinn/XTSGF/WS-C/dev/src/com/arjuna/webservices/wscoor/server/ActivationCoordinatorWSInitialisation.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WS-C/dev/src/com/arjuna/webservices/wscoor/server/ActivationCoordinatorWSInitialisation.java	2008-01-25 17:05:33 UTC (rev 18123)
+++ labs/jbosstm/workspace/adinn/XTSGF/WS-C/dev/src/com/arjuna/webservices/wscoor/server/ActivationCoordinatorWSInitialisation.java	2008-01-25 17:18:13 UTC (rev 18124)
@@ -1,65 +0,0 @@
-/*
- * 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.wscoor.server;
-
-import com.arjuna.services.framework.startup.Sequencer;
-import com.arjuna.webservices.ServiceRegistryWS;
-import com.arjuna.webservices.wscoor.CoordinationConstantsWS;
-
-import javax.servlet.ServletContext;
-import javax.servlet.ServletContextEvent;
-import javax.servlet.ServletContextListener;
-
-/**
- * Activate the Activation Coordinator service
- * @author kevin
- */
-public class ActivationCoordinatorWSInitialisation implements ServletContextListener
-{
-    /**
-     * The context has been initialized.
-     * @param servletContextEvent The servlet context event.
-     */
-    public void contextInitialized(final ServletContextEvent servletContextEvent)
-    {
-        ServletContext context = servletContextEvent.getServletContext();
-        String baseURI = context.getInitParameter("BaseURI");
-        final String uri = baseURI + "/ActivationService";
-
-        Sequencer.Callback callback = new Sequencer.Callback(Sequencer.SEQUENCE_WSCOOR11, Sequencer.WEBAPP_WSC11) {
-           public void run() {
-               // TODO if we rely upon JaxWS to automatically publish implementation classes it will only
-               // do so under a URL based on service name. which means we cannot define a service using
-               // multiple port bindings because thsi causes a namespace clash
-               final ServiceRegistryWS serviceRegistry = ServiceRegistryWS.getRegistry() ;
-               serviceRegistry.registerServiceProvider(CoordinationConstantsWS.ACTIVATION_SERVICE_NAME, uri) ;
-           }
-        };
-    }
-
-    /**
-     * The context is about to be destroyed.
-     * @param servletContextEvent The servlet context event.
-     */
-    public void contextDestroyed(final ServletContextEvent servletContextEvent)
-    {
-    }
-}

Deleted: labs/jbosstm/workspace/adinn/XTSGF/WS-C/dev/src/com/arjuna/webservices/wscoor/server/RegistrationCoordinatorWSInitialisation.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WS-C/dev/src/com/arjuna/webservices/wscoor/server/RegistrationCoordinatorWSInitialisation.java	2008-01-25 17:05:33 UTC (rev 18123)
+++ labs/jbosstm/workspace/adinn/XTSGF/WS-C/dev/src/com/arjuna/webservices/wscoor/server/RegistrationCoordinatorWSInitialisation.java	2008-01-25 17:18:13 UTC (rev 18124)
@@ -1,63 +0,0 @@
-/*
- * 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.wscoor.server;
-
-import com.arjuna.services.framework.startup.Sequencer;
-import com.arjuna.webservices.ServiceRegistryWS;
-import com.arjuna.webservices.wscoor.CoordinationConstantsWS;
-
-import javax.servlet.ServletContext;
-import javax.servlet.ServletContextEvent;
-import javax.servlet.ServletContextListener;
-
-/**
- * Activate the Registration Coordinator service
- * @author kevin
- */
-public class RegistrationCoordinatorWSInitialisation implements ServletContextListener
-{
-    /**
-     * The context has been initialized.
-     * @param servletContextEvent The servlet context event.
-     */
-    public void contextInitialized(final ServletContextEvent servletContextEvent)
-    {
-        ServletContext context = servletContextEvent.getServletContext();
-        String baseURI = context.getInitParameter("BaseURI");
-        final String uri = baseURI + "/RegistrationService";
-
-        Sequencer.Callback callback = new Sequencer.Callback(Sequencer.SEQUENCE_WSCOOR11, Sequencer.WEBAPP_WSC11) {
-           public void run() {
-               // TODO work out how to configure the endpoint name here
-               final ServiceRegistryWS serviceRegistry = ServiceRegistryWS.getRegistry() ;
-               serviceRegistry.registerServiceProvider(CoordinationConstantsWS.REGISTRATION_SERVICE_NAME, uri) ;
-           }
-        };
-    }
-
-    /**
-     * The context is about to be destroyed.
-     * @param servletContextEvent The servlet context event.
-     */
-    public void contextDestroyed(final ServletContextEvent servletContextEvent)
-    {
-    }
-}

Added: labs/jbosstm/workspace/adinn/XTSGF/WS-C/dev/src/com/arjuna/webservices11/ServiceRegistry.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WS-C/dev/src/com/arjuna/webservices11/ServiceRegistry.java	                        (rev 0)
+++ labs/jbosstm/workspace/adinn/XTSGF/WS-C/dev/src/com/arjuna/webservices11/ServiceRegistry.java	2008-01-25 17:18:13 UTC (rev 18124)
@@ -0,0 +1,92 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. 
+ * 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.webservices11;
+
+import java.util.Map;
+import java.util.TreeMap;
+
+/**
+ * The registry of WS service providers for the WS-C and WS-T services.
+ * @author kevin
+ */
+public class ServiceRegistry
+{
+    /**
+     * The registry singleton.
+     */
+    private static final ServiceRegistry REGISTRY = new ServiceRegistry() ;
+
+    /**
+     * The SOAP service provider registry.
+     */
+    private final Map<String, String> serviceProviderRegistry = new TreeMap<String, String>() ;
+
+    /**
+     * Get the service registry.
+     * @return The service registry.
+     */
+    public static ServiceRegistry getRegistry()
+    {
+        return REGISTRY ;
+    }
+
+    /**
+     * Register the specified service.
+     * @param serviceName The service name.
+     * @param url The service url.
+     */
+    public void registerServiceProvider(final String serviceName, final String url)
+    {
+        synchronized(serviceProviderRegistry)
+        {
+            serviceProviderRegistry.put(serviceName, url) ;
+        }
+    }
+
+    /**
+     * Remove the specified service.
+     * @param serviceName The service name.
+     */
+    public void removeServiceProvider(final String serviceName)
+    {
+        synchronized(serviceProviderRegistry)
+        {
+            serviceProviderRegistry.remove(serviceName) ;
+        }
+    }
+
+    /**
+     * Get the service URI.
+     * @param serviceName The service name.
+     * @return The service URI or null if not registered.
+     */
+    public String getServiceURI(final String serviceName)
+    {
+        String uri;
+
+        synchronized(serviceProviderRegistry)
+        {
+            uri = serviceProviderRegistry.get(serviceName) ;
+        }
+
+        return uri;
+    }
+}
\ No newline at end of file

Added: labs/jbosstm/workspace/adinn/XTSGF/WS-C/dev/src/com/arjuna/webservices11/wsarj/ArjunaContext.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WS-C/dev/src/com/arjuna/webservices11/wsarj/ArjunaContext.java	                        (rev 0)
+++ labs/jbosstm/workspace/adinn/XTSGF/WS-C/dev/src/com/arjuna/webservices11/wsarj/ArjunaContext.java	2008-01-25 17:18:13 UTC (rev 18124)
@@ -0,0 +1,84 @@
+package com.arjuna.webservices11.wsarj;
+
+import com.arjuna.webservices11.wsarj.InstanceIdentifier;
+
+import javax.xml.ws.handler.MessageContext;
+
+/**
+ * The arjuna context.
+ * @author kevin
+ */
+public class ArjunaContext
+{
+    /**
+     * The key used for the arjuna context within a message exchange.
+     */
+    private static final String ARJUNAWS_CONTEXT_PROPERTY = "org.jboss.xts.ws.context";
+
+    /**
+     * The InstanceIdentifier header.
+     */
+    private InstanceIdentifier instanceIdentifier ;
+
+    /**
+     * Default constructor.
+     */
+    private ArjunaContext()
+    {
+    }
+
+    /**
+     * 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 ;
+    }
+
+    /**
+     * Is the configuration of this element valid?
+     * @return true if valid, false otherwise.
+     */
+    public boolean isValid()
+    {
+        return ((instanceIdentifier != null) && instanceIdentifier.isValid()) ;
+    }
+
+    /**
+     * Get the arjuna context from the message context if present.
+     * @param messageContext The message context.
+     * @return The arjuna context or null if not present.
+     */
+    public static ArjunaContext getCurrentContext(final MessageContext messageContext)
+    {
+        return (ArjunaContext)messageContext.get(ARJUNAWS_CONTEXT_PROPERTY) ;
+    }
+
+    /**
+     * Get the arjuna context from the message context.
+     * @param messageContext The message context.
+     * @return The arjuna context.
+     */
+    public static ArjunaContext getContext(final MessageContext messageContext)
+    {
+        final ArjunaContext current = (ArjunaContext)messageContext.get(ARJUNAWS_CONTEXT_PROPERTY) ;
+        if (current != null)
+        {
+            return current ;
+        }
+        final ArjunaContext newContext = new ArjunaContext() ;
+        messageContext.put(ARJUNAWS_CONTEXT_PROPERTY, newContext) ;
+        messageContext.setScope(ARJUNAWS_CONTEXT_PROPERTY, MessageContext.Scope.APPLICATION);
+        return newContext ;
+    }
+}

Added: labs/jbosstm/workspace/adinn/XTSGF/WS-C/dev/src/com/arjuna/webservices11/wsarj/InstanceIdentifier.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WS-C/dev/src/com/arjuna/webservices11/wsarj/InstanceIdentifier.java	                        (rev 0)
+++ labs/jbosstm/workspace/adinn/XTSGF/WS-C/dev/src/com/arjuna/webservices11/wsarj/InstanceIdentifier.java	2008-01-25 17:18:13 UTC (rev 18124)
@@ -0,0 +1,152 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. 
+ * 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.webservices11.wsarj;
+
+import org.w3c.dom.Element;
+
+import javax.xml.soap.Name;
+import javax.xml.soap.SOAPElement;
+import javax.xml.soap.SOAPException;
+import javax.xml.soap.SOAPFactory;
+import javax.xml.ws.wsaddressing.W3CEndpointReferenceBuilder;
+
+import com.arjuna.webservices.wsarj.ArjunaConstants;
+
+/**
+ * Representation of an InstanceIdentifier element.
+ * @author kevin
+ */
+public class InstanceIdentifier
+{
+    /**
+     * 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 ;
+    }
+
+    /**
+     * 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 ;
+    }
+
+    /**
+     * Is the configuration of this element valid?
+     * @return true if valid, false otherwise.
+     */
+    public boolean isValid()
+    {
+        return (instanceIdentifier != null) && (instanceIdentifier.trim().length() > 0);
+    }
+
+    /**
+     * Get a string representation of this instance identifier.
+     * @return the string representation.
+     */
+    public String toString()
+    {
+        return (instanceIdentifier != null ? instanceIdentifier : "") ;
+    }
+
+     /**
+     * Set the identifier on an endpoint reference under construction.
+     * @param builder The endpoint reference builder.
+     * @param identifier The identifier.
+     */
+    public static void setEndpointInstanceIdentifier(final W3CEndpointReferenceBuilder builder, final String identifier)
+    {
+        builder.referenceParameter(createInstanceIdentifierElement(identifier));
+    }
+    
+    /**
+     * Set the identifier on an endpoint reference under construction.
+     * @param builder The endpoint reference builder.
+     * @param instanceIdentifier The identifier.
+     */
+    public static void setEndpointInstanceIdentifier(final W3CEndpointReferenceBuilder builder, final InstanceIdentifier instanceIdentifier)
+    {
+        builder.referenceParameter(createInstanceIdentifierElement(instanceIdentifier.getInstanceIdentifier())) ;
+    }
+
+    /**
+     * a soap factory used to construct SOAPElement instances representing InstanceIdentifier instances
+     */
+    private static SOAPFactory factory;
+
+    /**
+     * a name for the WSArj Instance element
+     */
+    private static Name WSARJ_ELEMENT_INSTANCE_NAME;
+
+    /**
+     * Create a SOAPElement representing an InstanceIdentifier
+     * @param instanceIdentifier the identifier string of the InstanceIdentifier being represented
+     * @return a SOAPElement with the InstancreIdentifier QName as its element tag and a text node containing the
+     * suppliedidentifier string as its value
+     */
+
+    private static Element createInstanceIdentifierElement(final String instanceIdentifier)
+    {
+        try {
+            if (factory == null) {
+                factory = SOAPFactory.newInstance();
+                Name name = factory.createName(ArjunaConstants.WSARJ_ELEMENT_INSTANCE_IDENTIFIER,
+                        ArjunaConstants.WSARJ_PREFIX,
+                        ArjunaConstants.WSARJ_NAMESPACE);
+                WSARJ_ELEMENT_INSTANCE_NAME = name;
+            }
+            SOAPElement element = factory.createElement(WSARJ_ELEMENT_INSTANCE_NAME);
+            element.addTextNode(instanceIdentifier);
+            return element;
+        } catch (SOAPException se) {
+            // TODO log error here (should never happen)
+            return null;
+        }
+    }
+}

Added: labs/jbosstm/workspace/adinn/XTSGF/WS-C/dev/src/com/arjuna/webservices11/wsarj/handler/InstanceIdentifierHandler.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WS-C/dev/src/com/arjuna/webservices11/wsarj/handler/InstanceIdentifierHandler.java	                        (rev 0)
+++ labs/jbosstm/workspace/adinn/XTSGF/WS-C/dev/src/com/arjuna/webservices11/wsarj/handler/InstanceIdentifierHandler.java	2008-01-25 17:18:13 UTC (rev 18124)
@@ -0,0 +1,172 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. 
+ * 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.webservices11.wsarj.handler;
+
+import com.arjuna.webservices.wsarj.ArjunaConstants;
+import com.arjuna.webservices11.wsarj.ArjunaContext;
+import com.arjuna.webservices11.wsarj.InstanceIdentifier;
+
+import javax.xml.namespace.QName;
+import javax.xml.soap.SOAPEnvelope;
+import javax.xml.soap.SOAPHeader;
+import javax.xml.soap.SOAPHeaderElement;
+import javax.xml.soap.SOAPMessage;
+import javax.xml.ws.ProtocolException;
+import javax.xml.ws.handler.MessageContext;
+import javax.xml.ws.handler.soap.SOAPHandler;
+import javax.xml.ws.handler.soap.SOAPMessageContext;
+import java.util.Collections;
+import java.util.Iterator;
+import java.util.Set;
+
+/**
+ * Header handler for parsing the Arjuna WS instance identifier header.
+ * @author adinn
+ */
+public class InstanceIdentifierHandler implements SOAPHandler<SOAPMessageContext>
+{
+    /**
+     * Gets the header blocks that can be processed by this Handler
+     * instance.
+     *
+     * @return Set of QNames of header blocks processed by this
+     *         handler instance. <code>QName</code> is the qualified
+     *         name of the outermost element of the Header block.
+     */
+    public Set<QName> getHeaders()
+    {
+        return headers;
+    }
+
+    /**
+     * Handle an outgoing message by inserting any current arjuna context attached to the context into the message
+     * headers and handle an incoming message by retrieving the context from the headers and attaching it to the
+     * context,
+     *
+     * @param context the message context.
+     * @return Always return true
+     * @throws RuntimeException               Causes the JAX-WS runtime to cease
+     *                                        handler processing and generate a fault.
+     * @throws javax.xml.ws.ProtocolException Causes the JAX-WS runtime to switch to
+     *                                        fault message processing.
+     */
+    public boolean handleMessage(SOAPMessageContext context) throws ProtocolException
+    {
+        final boolean outbound = (Boolean)context.get(MessageContext.MESSAGE_OUTBOUND_PROPERTY);
+        if (outbound) {
+            return handleMessageOutbound(context);
+        } else {
+            return handlemessageInbound(context);
+        }
+    }
+
+    /**
+     * check for an arjuna context attached to the message context and, if found, install its identifier as the value
+     * of a soap message header element
+     * @param context
+     * @return
+     * @throws ProtocolException
+     */
+    private boolean handleMessageOutbound(SOAPMessageContext context) throws ProtocolException
+    {
+        try {
+            ArjunaContext arjunaContext = ArjunaContext.getCurrentContext(context);
+            if (arjunaContext != null) {
+                InstanceIdentifier instanceIdentifier = arjunaContext.getInstanceIdentifier();
+                // insert a header into the current message containing the instance identifier as a text element
+                final SOAPMessage soapMessage = context.getMessage();
+                final SOAPEnvelope soapEnvelope = soapMessage.getSOAPPart().getEnvelope();
+                SOAPHeader soapHeader = soapEnvelope.getHeader() ;
+                if (soapHeader == null)
+                {
+                    soapHeader = soapEnvelope.addHeader() ;
+                }
+                final SOAPHeaderElement headerElement = soapHeader.addHeaderElement(ArjunaConstants.WSARJ_ELEMENT_INSTANCE_IDENTIFIER_QNAME);
+                headerElement.setValue(instanceIdentifier.getInstanceIdentifier());
+                headerElement.setMustUnderstand(true);
+            }
+        } catch (Exception se) {
+            throw new ProtocolException(se);
+        }
+
+        return true;
+    }
+
+    /**
+     * check for an arjuna instance identifier element embedded in the soap message headesr and, if found, use it to
+     * label an arjuna context attached to the message context
+     * @param context
+     * @return
+     * @throws ProtocolException
+     */
+    private boolean handlemessageInbound(SOAPMessageContext context)  throws ProtocolException
+    {
+        try {
+            final SOAPMessage soapMessage = context.getMessage();
+            final SOAPEnvelope soapEnvelope = soapMessage.getSOAPPart().getEnvelope();
+            Iterator<SOAPHeaderElement> iterator = soapEnvelope.getHeader().examineAllHeaderElements();
+            while (iterator.hasNext()) {
+                final SOAPHeaderElement headerElement = iterator.next();
+                if (ArjunaConstants.WSARJ_ELEMENT_INSTANCE_IDENTIFIER_QNAME.equals(headerElement.getElementQName())) {
+                    // found it - clear the must understand flag, retrieve the value and store an arjuna
+                    // context in the message context
+                    headerElement.setMustUnderstand(false);
+                    String identifierString = headerElement.getValue();
+                    if (identifierString != null) {
+                        ArjunaContext arjunaContext = ArjunaContext.getContext(context);
+                        arjunaContext.setInstanceIdentifier(new InstanceIdentifier(identifierString));
+                        break;
+                    }
+                }
+            }
+        } catch (Exception se) {
+            throw new ProtocolException(se);
+        }
+
+        return true;
+    }
+
+    /**
+     * this handler ignores faults but allows other handlers to deal with them
+     *
+     * @param context the message context
+     * @return true to allow fault handling to continue
+     */
+
+    public boolean handleFault(SOAPMessageContext context)
+    {
+        return true;
+    }
+
+    /**
+     * this hanlder ignores close messages
+     *
+     * @param context the message context
+     */
+    public void close(javax.xml.ws.handler.MessageContext context)
+    {
+    }
+
+    /**
+     * a singleton set containing the only header this handler is interested in
+     */
+    private static Set<QName> headers = Collections.singleton(ArjunaConstants.WSARJ_ELEMENT_INSTANCE_IDENTIFIER_QNAME);
+}
\ No newline at end of file

Added: labs/jbosstm/workspace/adinn/XTSGF/WS-C/dev/src/com/arjuna/webservices11/wsarj/processor/BaseNotificationProcessor.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WS-C/dev/src/com/arjuna/webservices11/wsarj/processor/BaseNotificationProcessor.java	                        (rev 0)
+++ labs/jbosstm/workspace/adinn/XTSGF/WS-C/dev/src/com/arjuna/webservices11/wsarj/processor/BaseNotificationProcessor.java	2008-01-25 17:18:13 UTC (rev 18124)
@@ -0,0 +1,33 @@
+package com.arjuna.webservices11.wsarj.processor;
+
+import com.arjuna.webservices.base.processors.BaseProcessor;
+import com.arjuna.webservices11.wsarj.ArjunaContext;
+import com.arjuna.webservices11.wsarj.InstanceIdentifier;
+
+import javax.xml.ws.addressing.AddressingProperties;
+
+/**
+ * Utility class handling common response functionality.
+ * @author kevin
+ */
+public abstract class BaseNotificationProcessor extends BaseProcessor
+{
+    /**
+     * Get the callback ids.
+     * @param addressingProperties The addressing context.
+     * @param arjunaContext The arjuna context.
+     * @return The callback ids.
+     */
+    protected String[] getIDs(final AddressingProperties addressingProperties, final ArjunaContext arjunaContext)
+    {
+        if (arjunaContext != null)
+        {
+            final InstanceIdentifier instanceIdentifier = arjunaContext.getInstanceIdentifier() ;
+            if (instanceIdentifier != null)
+            {
+                return new String[] {instanceIdentifier.getInstanceIdentifier()} ;
+            }
+        }
+        return null ;
+    }
+}

Added: labs/jbosstm/workspace/adinn/XTSGF/WS-C/dev/src/com/arjuna/webservices11/wscoor/CoordinationConstants.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WS-C/dev/src/com/arjuna/webservices11/wscoor/CoordinationConstants.java	                        (rev 0)
+++ labs/jbosstm/workspace/adinn/XTSGF/WS-C/dev/src/com/arjuna/webservices11/wscoor/CoordinationConstants.java	2008-01-25 17:18:13 UTC (rev 18124)
@@ -0,0 +1,247 @@
+/*
+ * 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.webservices11.wscoor;
+
+import javax.xml.namespace.QName;
+
+/**
+ * Interface containing WS-Coordination constants.
+ */
+public interface CoordinationConstants
+{
+    /**
+     * The Namespace.
+     */
+    public String WSCOOR_NAMESPACE = "http://docs.oasis-open.org/ws-tx/wscoor/2006/06" ;
+    /**
+     * The namespace prefix.
+     */
+    public String WSCOOR_PREFIX = "wscoor" ;
+
+    public String REGISTRATION_SERVICE_NAME = "RegistrationService";
+
+    public String ACTIVATION_SERVICE_NAME = "ActivationService";
+
+    public String ACTIVATION_ENDPOINT_NAME = "ActivationPortType";
+
+    public String REGISTRATION_ENDPOINT_NAME = "RegistrationPortType";
+
+    public QName REGISTRATION_SERVICE_QNAME = new QName(WSCOOR_NAMESPACE, REGISTRATION_SERVICE_NAME, WSCOOR_PREFIX) ;;
+
+    public QName ACTIVATION_SERVICE_QNAME = new QName(WSCOOR_NAMESPACE, ACTIVATION_SERVICE_NAME, WSCOOR_PREFIX) ;;
+
+    public QName ACTIVATION_ENDPOINT_QNAME = new QName(WSCOOR_NAMESPACE, ACTIVATION_ENDPOINT_NAME, WSCOOR_PREFIX) ;;
+
+    public QName REGISTRATION_ENDPOINT_QNAME = new QName(WSCOOR_NAMESPACE, REGISTRATION_ENDPOINT_NAME, WSCOOR_PREFIX) ;;
+    /**
+     * 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 AlreadyRegistered error code.
+     */
+    public String WSCOOR_ERROR_CODE_ALREADY_REGISTERED = "AlreadyRegistered" ;
+    /**
+     * The AlreadyRegistered error code QName.
+     */
+    public QName WSCOOR_ERROR_CODE_ALREADY_REGISTERED_QNAME = new QName(WSCOOR_NAMESPACE, WSCOOR_ERROR_CODE_ALREADY_REGISTERED, WSCOOR_PREFIX) ;
+    /**
+     * The ContextRefused error code.
+     */
+    public String WSCOOR_ERROR_CODE_CONTEXT_REFUSED = "ContextRefused" ;
+    /**
+     * The ContextRefused error code QName.
+     */
+    public QName WSCOOR_ERROR_CODE_CONTEXT_REFUSED_QNAME = new QName(WSCOOR_NAMESPACE, WSCOOR_ERROR_CODE_CONTEXT_REFUSED, WSCOOR_PREFIX) ;
+    /**
+     * 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 NoActivity error code.
+     */
+    public String WSCOOR_ERROR_CODE_NO_ACTIVITY = "NoActivity" ;
+    /**
+     * The NoActivity error code QName.
+     */
+    public QName WSCOOR_ERROR_CODE_NO_ACTIVITY_QNAME = new QName(WSCOOR_NAMESPACE, WSCOOR_ERROR_CODE_NO_ACTIVITY, WSCOOR_PREFIX) ;
+    /**
+     * The unexpected exception error code.
+     */
+    public String WSCOOR_ERROR_CODE_EXCEPTION = "Exception" ;
+    /**
+     * The NoActivity error code QName.
+     */
+    public QName WSCOOR_ERROR_CODE_EXCEPTION_QNAME = new QName(WSCOOR_NAMESPACE, WSCOOR_ERROR_CODE_EXCEPTION, WSCOOR_PREFIX) ;
+}

Added: labs/jbosstm/workspace/adinn/XTSGF/WS-C/dev/src/com/arjuna/webservices11/wscoor/client/ActivationCoordinatorClient.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WS-C/dev/src/com/arjuna/webservices11/wscoor/client/ActivationCoordinatorClient.java	                        (rev 0)
+++ labs/jbosstm/workspace/adinn/XTSGF/WS-C/dev/src/com/arjuna/webservices11/wscoor/client/ActivationCoordinatorClient.java	2008-01-25 17:18:13 UTC (rev 18124)
@@ -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.webservices11.wscoor.client;
+
+import com.arjuna.webservices.SoapFault;
+import com.arjuna.webservices11.wscoor.CoordinationConstants;
+import com.arjuna.webservices11.wscoor.client.WSCOORClient;
+import org.oasis_open.docs.ws_tx.wscoor._2006._06.*;
+
+import javax.xml.ws.addressing.AddressingProperties;
+import java.io.IOException;
+
+/**
+ * The Client side of the Activation Coordinator.
+ * @author kevin
+ */
+public class ActivationCoordinatorClient
+{
+    /**
+     * The client singleton.
+     */
+    private static final ActivationCoordinatorClient CLIENT = new ActivationCoordinatorClient() ;
+
+    /**
+     * Construct the activation coordinator client.
+     */
+    private ActivationCoordinatorClient()
+    {
+    }
+    
+    /**
+     * Send a create coordination request.
+     * @param addressingProperties addressing context initialised with to and message ID.
+     * @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 CreateCoordinationContextResponseType
+    sendCreateCoordination(final AddressingProperties addressingProperties,
+        final String coordinationType, final Expires expires, final CoordinationContext currentContext)
+        throws SoapFault, IOException
+    {
+        final CreateCoordinationContextType request = new CreateCoordinationContextType() ;
+        request.setCoordinationType(coordinationType) ;
+        request.setExpires(expires) ;
+        if (currentContext != null) {
+            // structurally a CreateCoordinationContextType.CurrentContext and a CoordinationContext are the same i.e.
+            // they are a CoordinationContextType extended with an Any list. but the schema does not use one to define
+            // the other so, until we can generate them as the same type we have to interconvert here (and elsewhere)
+
+            CreateCoordinationContextType.CurrentContext current = new CreateCoordinationContextType.CurrentContext();
+            current.setCoordinationType(currentContext.getCoordinationType());
+            current.setExpires(currentContext.getExpires());
+            current.setIdentifier(currentContext.getIdentifier());
+            current.setRegistrationService(currentContext.getRegistrationService());
+            current.getAny().addAll(currentContext.getAny());
+            request.setCurrentContext(current);
+        } else {
+            request.setCurrentContext(null) ;
+        }
+
+        // get proxy with required message id and end point address
+        ActivationPortType port = WSCOORClient.getActivationPort(addressingProperties, CoordinationConstants.WSCOOR_ACTION_CREATE_COORDINATION_CONTEXT);
+
+        // invoke remote method
+        return port.createCoordinationContextOperation(request);
+    }
+
+    /**
+     * Get the Activation Coordinator client singleton.
+     * @return The Activation Coordinator client singleton.
+     */
+    public static ActivationCoordinatorClient getClient()
+    {
+        return CLIENT ;
+    }
+}

Added: labs/jbosstm/workspace/adinn/XTSGF/WS-C/dev/src/com/arjuna/webservices11/wscoor/client/WSCOORClient.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WS-C/dev/src/com/arjuna/webservices11/wscoor/client/WSCOORClient.java	                        (rev 0)
+++ labs/jbosstm/workspace/adinn/XTSGF/WS-C/dev/src/com/arjuna/webservices11/wscoor/client/WSCOORClient.java	2008-01-25 17:18:13 UTC (rev 18124)
@@ -0,0 +1,137 @@
+package com.arjuna.webservices11.wscoor.client;
+
+import com.arjuna.webservices11.wsarj.handler.InstanceIdentifierHandler;
+import com.arjuna.webservices11.wsaddr.AddressingHelper;
+import org.jboss.ws.extensions.addressing.jaxws.WSAddressingClientHandler;
+import org.oasis_open.docs.ws_tx.wscoor._2006._06.ActivationPortType;
+import org.oasis_open.docs.ws_tx.wscoor._2006._06.ActivationService;
+import org.oasis_open.docs.ws_tx.wscoor._2006._06.RegistrationPortType;
+import org.oasis_open.docs.ws_tx.wscoor._2006._06.RegistrationService;
+
+import javax.xml.ws.BindingProvider;
+import javax.xml.ws.addressing.AddressingBuilder;
+import javax.xml.ws.addressing.AddressingProperties;
+import javax.xml.ws.addressing.AttributedURI;
+import javax.xml.ws.addressing.JAXWSAConstants;
+import javax.xml.ws.handler.Handler;
+import javax.xml.ws.soap.AddressingFeature;
+import javax.xml.ws.wsaddressing.W3CEndpointReference;
+import java.net.URISyntaxException;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * Created by IntelliJ IDEA.
+ * User: adinn
+ * Date: Oct 7, 2007
+ * Time: 3:14:28 PM
+ * To change this template use File | Settings | File Templates.
+ */
+public class WSCOORClient
+{
+    // TODO -- do we really need a thread local here or can we just use one service?
+    /**
+     *  thread local which maintains a per thread activation service instance
+     */
+    private static ThreadLocal<ActivationService> activationService = new ThreadLocal<ActivationService>();
+
+    /**
+     *  thread local which maintains a per thread activation service instance
+     */
+    private static ThreadLocal<RegistrationService> registrationService = new ThreadLocal<RegistrationService>();
+
+    /**
+     *  builder used to construct addressing info for calls
+     */
+    private static AddressingBuilder builder = AddressingBuilder.getAddressingBuilder();
+
+    /**
+     * fetch a coordinator activation service unique to the current thread
+     * @return
+     */
+    private static synchronized ActivationService getActivationService()
+    {
+        if (activationService.get() == null) {
+            activationService.set(new ActivationService());
+        }
+        return activationService.get();
+    }
+
+    /**
+     * fetch a coordinator registration service unique to the current thread
+     * @return
+     */
+    private static synchronized RegistrationService getRegistrationService()
+    {
+        if (registrationService.get() == null) {
+            registrationService.set(new RegistrationService());
+        }
+        return registrationService.get();
+    }
+
+    public static ActivationPortType getActivationPort(AddressingProperties addressingProperties,
+                                                       String action)
+    {
+        // TODO - we need the 2.1 verison of Service so we can specify that we want to use the WS Addressing feature
+        // JBossWs implements it on Service21, a subclass of Service, and our generated service inherots from Service.
+        ActivationService service = getActivationService();
+        // ActivationPortType port = service.getPort(ActivationPortType.class);
+        ActivationPortType port = service.getPort(ActivationPortType.class, new AddressingFeature(true, true));
+        BindingProvider bindingProvider = (BindingProvider)port;
+        AttributedURI toUri = addressingProperties.getTo();
+        /*
+         * we don't actually need to configure an instance identifier handler for this port -- it's the only one
+         * on which we do not need to pass implicit context data either outgoing or returning.
+         * But we do have to add the the WSAdressing client handler to ensure that the addressing properties
+         * are encoded into the SOAP message
+         */
+        List<Handler> customHandlerChain = new ArrayList<Handler>();
+		customHandlerChain.add(new WSAddressingClientHandler());
+		bindingProvider.getBinding().setHandlerChain(customHandlerChain);
+        Map<String, Object> requestContext = bindingProvider.getRequestContext();
+        requestContext.put(JAXWSAConstants.CLIENT_ADDRESSING_PROPERTIES, addressingProperties);
+	    // jbossws should do this for us . . .
+	    requestContext.put(JAXWSAConstants.CLIENT_ADDRESSING_PROPERTIES_OUTBOUND, addressingProperties);
+        requestContext.put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, toUri.getURI().toString());
+        try {
+            addressingProperties.setAction(builder.newURI(action));
+        } catch (URISyntaxException use) {
+            // TODO log this error
+        }
+
+        // TODO we should not need to do this?
+        requestContext.put(BindingProvider.SOAPACTION_USE_PROPERTY, new Boolean(true));
+        requestContext.put(BindingProvider.SOAPACTION_URI_PROPERTY, action);
+
+        return port;
+    }
+
+    // don't think we ever need this as we get a registration port from the endpoint ref returned by
+    // the activation port request
+    public static RegistrationPortType getRegistrationPort(W3CEndpointReference endpointReference, String action, String messageID)
+    {
+        RegistrationService service = getRegistrationService();
+        RegistrationPortType port = service.getPort(endpointReference, RegistrationPortType.class, new AddressingFeature(true, true));
+        BindingProvider bindingProvider = (BindingProvider)port;
+        /*
+         * we need to configure an instance identifier handler for this port to pass the tx context either
+         * outgoing or returning. We also have to add the the WSAdressing client handler to ensure that the
+         * addressing properties are encoded into the SOAP message
+         */
+        List<Handler> customHandlerChain = new ArrayList<Handler>();
+        customHandlerChain.add(new InstanceIdentifierHandler());
+        customHandlerChain.add(new WSAddressingClientHandler());
+		bindingProvider.getBinding().setHandlerChain(customHandlerChain);
+        // the address will have been pulled out of the endpoint by getPort but we still have to set it in the
+        // addressing properties along with the action and message id
+        Map<String, Object> requestContext = bindingProvider.getRequestContext();
+        String address = (String)requestContext.get(BindingProvider.ENDPOINT_ADDRESS_PROPERTY);
+        AddressingProperties addressingProperties = AddressingHelper.createRequestContext(address, action, messageID);
+        requestContext.put(JAXWSAConstants.CLIENT_ADDRESSING_PROPERTIES, addressingProperties);
+	    // jbossws should do this for us . . .
+	    requestContext.put(JAXWSAConstants.CLIENT_ADDRESSING_PROPERTIES_OUTBOUND, addressingProperties);
+
+        return port;
+    }
+}

Added: labs/jbosstm/workspace/adinn/XTSGF/WS-C/dev/src/com/arjuna/webservices11/wscoor/processors/ActivationCoordinatorProcessor.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WS-C/dev/src/com/arjuna/webservices11/wscoor/processors/ActivationCoordinatorProcessor.java	                        (rev 0)
+++ labs/jbosstm/workspace/adinn/XTSGF/WS-C/dev/src/com/arjuna/webservices11/wscoor/processors/ActivationCoordinatorProcessor.java	2008-01-25 17:18:13 UTC (rev 18124)
@@ -0,0 +1,69 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. 
+ * 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.webservices11.wscoor.processors;
+
+import javax.xml.ws.addressing.AddressingProperties;
+
+import org.oasis_open.docs.ws_tx.wscoor._2006._06.CreateCoordinationContextType;
+import org.oasis_open.docs.ws_tx.wscoor._2006._06.CreateCoordinationContextResponseType;
+
+/**
+ * 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.
+     * @return a response message containing the desired coordinaton context
+     */
+    public abstract CreateCoordinationContextResponseType
+        createCoordinationContext(final CreateCoordinationContextType createCoordinationContext,
+                                  final AddressingProperties addressingProperties) ;
+}

Added: labs/jbosstm/workspace/adinn/XTSGF/WS-C/dev/src/com/arjuna/webservices11/wscoor/processors/RegistrationCoordinatorProcessor.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WS-C/dev/src/com/arjuna/webservices11/wscoor/processors/RegistrationCoordinatorProcessor.java	                        (rev 0)
+++ labs/jbosstm/workspace/adinn/XTSGF/WS-C/dev/src/com/arjuna/webservices11/wscoor/processors/RegistrationCoordinatorProcessor.java	2008-01-25 17:18:13 UTC (rev 18124)
@@ -0,0 +1,71 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. 
+ * 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.webservices11.wscoor.processors;
+
+import com.arjuna.webservices11.wsarj.ArjunaContext;
+import com.arjuna.wsc11.messaging.RegistrationCoordinatorProcessorImpl;
+import org.oasis_open.docs.ws_tx.wscoor._2006._06.RegisterResponseType;
+import org.oasis_open.docs.ws_tx.wscoor._2006._06.RegisterType;
+
+import javax.xml.ws.addressing.AddressingProperties;
+
+
+/**
+ * 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 RegistrationCoordinatorProcessorImpl 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 arjunaContext The arjuna context.
+     */
+    public abstract RegisterResponseType register(final RegisterType register, final AddressingProperties addressingContext,
+        final ArjunaContext arjunaContext) ;
+}

Added: labs/jbosstm/workspace/adinn/XTSGF/WS-C/dev/src/com/arjuna/webservices11/wscoor/server/ActivationCoordinatorInitialisation.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WS-C/dev/src/com/arjuna/webservices11/wscoor/server/ActivationCoordinatorInitialisation.java	                        (rev 0)
+++ labs/jbosstm/workspace/adinn/XTSGF/WS-C/dev/src/com/arjuna/webservices11/wscoor/server/ActivationCoordinatorInitialisation.java	2008-01-25 17:18:13 UTC (rev 18124)
@@ -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.webservices11.wscoor.server;
+
+import com.arjuna.services.framework.startup.Sequencer;
+import com.arjuna.webservices11.wscoor.CoordinationConstants;
+import com.arjuna.webservices11.ServiceRegistry;
+
+import javax.servlet.ServletContext;
+import javax.servlet.ServletContextEvent;
+import javax.servlet.ServletContextListener;
+
+/**
+ * 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)
+    {
+        ServletContext context = servletContextEvent.getServletContext();
+        String baseURI = context.getInitParameter("BaseURI");
+        final String uri = baseURI + "/ActivationService";
+
+        Sequencer.Callback callback = new Sequencer.Callback(Sequencer.SEQUENCE_WSCOOR11, Sequencer.WEBAPP_WSC11) {
+           public void run() {
+               // TODO if we rely upon JaxWS to automatically publish implementation classes it will only
+               // do so under a URL based on service name. which means we cannot define a service using
+               // multiple port bindings because thsi causes a namespace clash
+               final ServiceRegistry serviceRegistry = ServiceRegistry.getRegistry() ;
+               serviceRegistry.registerServiceProvider(CoordinationConstants.ACTIVATION_SERVICE_NAME, uri) ;
+           }
+        };
+    }
+
+    /**
+     * The context is about to be destroyed.
+     * @param servletContextEvent The servlet context event.
+     */
+    public void contextDestroyed(final ServletContextEvent servletContextEvent)
+    {
+    }
+}

Added: labs/jbosstm/workspace/adinn/XTSGF/WS-C/dev/src/com/arjuna/webservices11/wscoor/server/RegistrationCoordinatorInitialisation.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WS-C/dev/src/com/arjuna/webservices11/wscoor/server/RegistrationCoordinatorInitialisation.java	                        (rev 0)
+++ labs/jbosstm/workspace/adinn/XTSGF/WS-C/dev/src/com/arjuna/webservices11/wscoor/server/RegistrationCoordinatorInitialisation.java	2008-01-25 17:18:13 UTC (rev 18124)
@@ -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.webservices11.wscoor.server;
+
+import com.arjuna.services.framework.startup.Sequencer;
+import com.arjuna.webservices11.wscoor.CoordinationConstants;
+import com.arjuna.webservices11.ServiceRegistry;
+
+import javax.servlet.ServletContext;
+import javax.servlet.ServletContextEvent;
+import javax.servlet.ServletContextListener;
+
+/**
+ * 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)
+    {
+        ServletContext context = servletContextEvent.getServletContext();
+        String baseURI = context.getInitParameter("BaseURI");
+        final String uri = baseURI + "/RegistrationService";
+
+        Sequencer.Callback callback = new Sequencer.Callback(Sequencer.SEQUENCE_WSCOOR11, Sequencer.WEBAPP_WSC11) {
+           public void run() {
+               // TODO work out how to configure the endpoint name here
+               final ServiceRegistry serviceRegistry = ServiceRegistry.getRegistry() ;
+               serviceRegistry.registerServiceProvider(CoordinationConstants.REGISTRATION_SERVICE_NAME, uri) ;
+           }
+        };
+    }
+
+    /**
+     * The context is about to be destroyed.
+     * @param servletContextEvent The servlet context event.
+     */
+    public void contextDestroyed(final ServletContextEvent servletContextEvent)
+    {
+    }
+}

Deleted: labs/jbosstm/workspace/adinn/XTSGF/WS-C/dev/src/com/arjuna/wsc/ActivationCoordinatorWS.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WS-C/dev/src/com/arjuna/wsc/ActivationCoordinatorWS.java	2008-01-25 17:05:33 UTC (rev 18123)
+++ labs/jbosstm/workspace/adinn/XTSGF/WS-C/dev/src/com/arjuna/wsc/ActivationCoordinatorWS.java	2008-01-25 17:18:13 UTC (rev 18124)
@@ -1,94 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. 
- * 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.wsaddrws.AddressingHelper;
-import com.arjuna.webservices.wscoor.client.ActivationCoordinatorClientWS;
-import com.arjuna.webservices.wscoor.CoordinationConstantsWS;
-import com.arjuna.wsc.messaging.MessageId;
-import org.oasis_open.docs.ws_tx.wscoor._2006._06.CoordinationContextType;
-import org.oasis_open.docs.ws_tx.wscoor._2006._06.Expires;
-import org.oasis_open.docs.ws_tx.wscoor._2006._06.CreateCoordinationContextResponseType;
-import org.oasis_open.docs.ws_tx.wscoor._2006._06.CoordinationContext;
-
-import javax.xml.ws.addressing.AddressingProperties;
-import javax.xml.ws.soap.SOAPFaultException;
-import javax.xml.soap.SOAPFault;
-import javax.xml.soap.SOAPException;
-import javax.xml.namespace.QName;
-
-/**
- * Wrapper around low level Activation Coordinator messaging.
- * @author kevin
- */
-public class ActivationCoordinatorWS
-{
-    /**
-     * 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.
-     */
-    public static CoordinationContextType createCoordinationContext(final String activationCoordinatorURI,
-        final String messageID, final String coordinationTypeURI, final Long expires,
-        final CoordinationContext currentContext)
-        throws InvalidCreateParametersException, SoapFault
-    {
-        final AddressingProperties addressingProperties = AddressingHelper.createRequestContext(activationCoordinatorURI, messageID) ;
-        
-        final Expires expiresValue;
-        if (expires == null) {
-            expiresValue = null;
-        } else {
-            expiresValue = new Expires();
-            expiresValue.setValue(expires.longValue());
-        }
-
-        try
-        {
-            CreateCoordinationContextResponseType response;
-            ActivationCoordinatorClientWS client = ActivationCoordinatorClientWS.getClient();
-            response = client.sendCreateCoordination(addressingProperties, coordinationTypeURI, expiresValue, currentContext) ;
-            return response.getCoordinationContext();
-        }
-        catch (final IOException ioe)
-        {
-            throw new SoapFault(ioe) ;
-        } catch (SOAPFaultException sfe) {
-            // TODO -- work out which faults we should really throw. in particular do we need to retain SoapFault
-            final SOAPFault soapFault = sfe.getFault() ;
-            final QName subcode = soapFault.getFaultCodeAsQName() ;
-            if (CoordinationConstantsWS.WSCOOR_ERROR_CODE_INVALID_PARAMETERS_QNAME.equals(subcode))
-            {
-                throw new InvalidCreateParametersException(soapFault.getFaultString());
-            }
-            throw new SoapFault(sfe);
-        }
-    }
-}

Deleted: labs/jbosstm/workspace/adinn/XTSGF/WS-C/dev/src/com/arjuna/wsc/ContextFactoryMapperWS.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WS-C/dev/src/com/arjuna/wsc/ContextFactoryMapperWS.java	2008-01-25 17:05:33 UTC (rev 18123)
+++ labs/jbosstm/workspace/adinn/XTSGF/WS-C/dev/src/com/arjuna/wsc/ContextFactoryMapperWS.java	2008-01-25 17:18:13 UTC (rev 18124)
@@ -1,139 +0,0 @@
-package com.arjuna.wsc;
-
-import java.util.Map;
-import java.util.HashMap;
-
-/**
- * The context factory mapper.
- * @author kevin
- */
-public class ContextFactoryMapperWS
-{
-    /**
-     * The factory singleton.
-     */
-    private static final ContextFactoryMapperWS FACTORY = new ContextFactoryMapperWS() ;
-
-    /**
-     * The context factory map.
-     */
-    private final Map contextFactoryMap = new HashMap() ;
-    /**
-     * The subordinate context factory mapper.
-     */
-    private ContextFactoryMapperWS subordinateContextFactoryMapper ;
-    /**
-     * The default context factory.
-     */
-    private ContextFactoryWS defaultContextFactory ;
-
-    /**
-     * Get the context factory mapper singleton.
-     * @return The context factory mapper singleton.
-     */
-    public static ContextFactoryMapperWS getFactory()
-    {
-        return FACTORY;
-    }
-
-    /**
-     * Default constructor
-     */
-    protected ContextFactoryMapperWS()
-    {
-    }
-
-    /**
-     * 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 ContextFactoryWS 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 ContextFactoryWS getContextFactory(final String coordinationTypeURI)
-    {
-        final Object localContextFactory ;
-        synchronized(contextFactoryMap)
-        {
-            localContextFactory = contextFactoryMap.get(coordinationTypeURI) ;
-        }
-        if (localContextFactory != null)
-        {
-            return (ContextFactoryWS)localContextFactory ;
-        }
-        if (subordinateContextFactoryMapper != null)
-        {
-            final ContextFactoryWS 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)
-        {
-            ((ContextFactoryWS)localContextFactory).uninstall(coordinationTypeURI) ;
-        }
-    }
-
-    /**
-     * Get the subordinate coordination factory mapper.
-     * @return The subordinate coordination factory mapper.
-     */
-    public ContextFactoryMapperWS getSubordinateContextFactoryMapper()
-    {
-        return subordinateContextFactoryMapper ;
-    }
-
-    /**
-     * Set a subordinate coordination factory mapper.
-     * @param subordinateContextFactoryMapper The subordinate coordination factory mapper.
-     */
-    public void setSubordinateContextFactoryMapper(final ContextFactoryMapperWS subordinateContextFactoryMapper)
-    {
-        this.subordinateContextFactoryMapper = subordinateContextFactoryMapper ;
-    }
-
-    /**
-     * Get the default coordination factory.
-     * @return The default coordination factory.
-     */
-    public ContextFactoryWS getDefaultContextFactory()
-    {
-        return defaultContextFactory ;
-    }
-
-    /**
-     * Set the default coordination factory.
-     * @param defaultContextFactory The default coordination factory.
-     */
-    public void setDefaultContextFactory(final ContextFactoryWS defaultContextFactory)
-    {
-        this.defaultContextFactory = defaultContextFactory ;
-    }
-}

Deleted: labs/jbosstm/workspace/adinn/XTSGF/WS-C/dev/src/com/arjuna/wsc/ContextFactoryWS.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WS-C/dev/src/com/arjuna/wsc/ContextFactoryWS.java	2008-01-25 17:05:33 UTC (rev 18123)
+++ labs/jbosstm/workspace/adinn/XTSGF/WS-C/dev/src/com/arjuna/wsc/ContextFactoryWS.java	2008-01-25 17:18:13 UTC (rev 18124)
@@ -1,70 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. 
- * 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.
- *
- * ContextFactory.java
- */
-
-package com.arjuna.wsc;
-
-import org.oasis_open.docs.ws_tx.wscoor._2006._06.CoordinationContext;
-import org.oasis_open.docs.ws_tx.wscoor._2006._06.CoordinationContextType;
-
-public interface ContextFactoryWS
-{
-    /**
-     * 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 CoordinationContext 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);
-}

Deleted: labs/jbosstm/workspace/adinn/XTSGF/WS-C/dev/src/com/arjuna/wsc/RegistrarMapperWS.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WS-C/dev/src/com/arjuna/wsc/RegistrarMapperWS.java	2008-01-25 17:05:33 UTC (rev 18123)
+++ labs/jbosstm/workspace/adinn/XTSGF/WS-C/dev/src/com/arjuna/wsc/RegistrarMapperWS.java	2008-01-25 17:18:13 UTC (rev 18124)
@@ -1,83 +0,0 @@
-package com.arjuna.wsc;
-
-import java.util.Map;
-import java.util.HashMap;
-
-/**
- * The registrar mapper.
- * @author kevin
- */
-public class RegistrarMapperWS
-{
-    /**
-     * The factory singleton.
-     */
-    private static final RegistrarMapperWS FACTORY = new RegistrarMapperWS() ;
-
-    /**
-     * The registrar map.
-     */
-    private final Map registrarMap = new HashMap() ;
-
-    /**
-     * Get the registrar mapper singleton.
-     * @return The registrar mapper singleton.
-     */
-    public static RegistrarMapperWS getFactory()
-    {
-        return FACTORY;
-    }
-
-    /**
-     * Default constructor
-     */
-    protected RegistrarMapperWS()
-    {
-    }
-
-    /**
-     * Add a registrar for the specified protocol identifier.
-     * @param protocolIdentifier The protocol identifier.
-     * @param registrar The registrar.
-     */
-    public void addRegistrar(final String protocolIdentifier, final RegistrarWS 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 RegistrarWS getRegistrar(final String protocolIdentifier)
-    {
-        final Object localRegistrar ;
-        synchronized(registrarMap)
-        {
-            localRegistrar = registrarMap.get(protocolIdentifier) ;
-        }
-        return (RegistrarWS)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)
-        {
-            ((Registrar)localRegistrar).uninstall(protocolIdentifier) ;
-        }
-    }
-}

Deleted: labs/jbosstm/workspace/adinn/XTSGF/WS-C/dev/src/com/arjuna/wsc/RegistrarWS.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WS-C/dev/src/com/arjuna/wsc/RegistrarWS.java	2008-01-25 17:05:33 UTC (rev 18123)
+++ labs/jbosstm/workspace/adinn/XTSGF/WS-C/dev/src/com/arjuna/wsc/RegistrarWS.java	2008-01-25 17:18:13 UTC (rev 18124)
@@ -1,46 +0,0 @@
-package com.arjuna.wsc;
-
-import com.arjuna.webservices.wsarj.InstanceIdentifierWS;
-
-import javax.xml.ws.wsaddressing.W3CEndpointReference;
-
-public interface RegistrarWS
-{
-    /**
-     * 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 participantProtocolService 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 com.arjuna.wsc.AlreadyRegisteredException if the participant is already registered for this coordination protocol under
-     *         this activity identifier
-     * @throws com.arjuna.wsc.InvalidProtocolException if the coordination protocol is not supported
-     * @throws com.arjuna.wsc.InvalidStateException if the state of the coordinator no longer allows registration for this
-     *         coordination protocol
-     * @throws com.arjuna.wsc.NoActivityException if the actvity does not exist
-     */
-    public W3CEndpointReference register(final W3CEndpointReference participantProtocolService,
-        final String protocolIdentifier, final InstanceIdentifierWS instanceIdentifier)
-        throws AlreadyRegisteredException, 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 protocolIdentifier the protocol identifier
-     */
-    public void uninstall(final String protocolIdentifier);
-}

Deleted: labs/jbosstm/workspace/adinn/XTSGF/WS-C/dev/src/com/arjuna/wsc/RegistrationCoordinatorWS.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WS-C/dev/src/com/arjuna/wsc/RegistrationCoordinatorWS.java	2008-01-25 17:05:33 UTC (rev 18123)
+++ labs/jbosstm/workspace/adinn/XTSGF/WS-C/dev/src/com/arjuna/wsc/RegistrationCoordinatorWS.java	2008-01-25 17:18:13 UTC (rev 18124)
@@ -1,87 +0,0 @@
-package com.arjuna.wsc;
-
-import com.arjuna.webservices.SoapFault;
-import com.arjuna.webservices.wsarj.handler.InstanceIdentifierHandlerWS;
-import com.arjuna.webservices.wsaddrws.AddressingHelper;
-import com.arjuna.webservices.wscoor.CoordinationConstantsWS;
-import com.arjuna.webservices.wscoor.client.WSCOORClientWS;
-import org.oasis_open.docs.ws_tx.wscoor._2006._06.*;
-import org.jboss.ws.extensions.addressing.jaxws.WSAddressingClientHandler;
-
-import javax.xml.namespace.QName;
-import javax.xml.soap.SOAPException;
-import javax.xml.soap.SOAPFault;
-import javax.xml.ws.BindingProvider;
-import javax.xml.ws.addressing.AddressingProperties;
-import javax.xml.ws.addressing.JAXWSAConstants;
-import javax.xml.ws.handler.MessageContext;
-import javax.xml.ws.handler.Handler;
-import javax.xml.ws.soap.AddressingFeature;
-import javax.xml.ws.soap.SOAPFaultException;
-import javax.xml.ws.wsaddressing.W3CEndpointReference;
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Map;
-import java.net.URISyntaxException;
-
-/**
- * Wrapper around low level Registration Coordinator messaging.
- * @author kevin
- */
-public class RegistrationCoordinatorWS
-{
-    /**
-     * 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 com.arjuna.wsc.AlreadyRegisteredException If the participant is already registered.
-     * @throws com.arjuna.wsc.InvalidProtocolException If the protocol is unsupported.
-     * @throws com.arjuna.wsc.InvalidStateException If the state is invalid
-     * @throws com.arjuna.wsc.NoActivityException If there is to activity context active.
-     * @throws com.arjuna.webservices.SoapFault for errors during processing.
-     */
-    public static W3CEndpointReference register(final CoordinationContextType coordinationContext,
-        final String messageID, final W3CEndpointReference participantProtocolService,
-        final String protocolIdentifier)
-        throws AlreadyRegisteredException, InvalidProtocolException,
-            InvalidStateException, NoActivityException, SoapFault
-    {
-        final W3CEndpointReference endpointReference = coordinationContext.getRegistrationService() ;
-
-        try
-        {
-            RegisterType registerType = new RegisterType();
-            RegisterResponseType response;
-
-            registerType.setProtocolIdentifier(protocolIdentifier);
-            registerType.setParticipantProtocolService(participantProtocolService);
-            RegistrationPortType port = WSCOORClientWS.getRegistrationPort(endpointReference, CoordinationConstantsWS.WSCOOR_ACTION_REGISTER, messageID);
-            response = port.registerOperation(registerType);
-            return response.getCoordinatorProtocolService();
-        } catch (SOAPFaultException sfe) {
-            // TODO -- work out which faults we should really throw. in particular do we need to retain SoapFault
-            final SOAPFault soapFault = sfe.getFault() ;
-            final QName subcode = soapFault.getFaultCodeAsQName() ;
-            if (CoordinationConstantsWS.WSCOOR_ERROR_CODE_ALREADY_REGISTERED_QNAME.equals(subcode))
-            {
-                throw new AlreadyRegisteredException(soapFault.getFaultString()) ;
-            }
-            else if (CoordinationConstantsWS.WSCOOR_ERROR_CODE_INVALID_PROTOCOL_QNAME.equals(subcode))
-            {
-                throw new InvalidProtocolException(soapFault.getFaultString()) ;
-            }
-            else if (CoordinationConstantsWS.WSCOOR_ERROR_CODE_INVALID_STATE_QNAME.equals(subcode))
-            {
-                throw new InvalidStateException(soapFault.getFaultString()) ;
-            }
-            else if (CoordinationConstantsWS.WSCOOR_ERROR_CODE_NO_ACTIVITY_QNAME.equals(subcode))
-            {
-                throw new NoActivityException(soapFault.getFaultString()) ;
-            }
-            throw new SoapFault(sfe);
-        }
-    }
-}

Deleted: labs/jbosstm/workspace/adinn/XTSGF/WS-C/dev/src/com/arjuna/wsc/messaging/ActivationCoordinatorProcessorWSImpl.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WS-C/dev/src/com/arjuna/wsc/messaging/ActivationCoordinatorProcessorWSImpl.java	2008-01-25 17:05:33 UTC (rev 18123)
+++ labs/jbosstm/workspace/adinn/XTSGF/WS-C/dev/src/com/arjuna/wsc/messaging/ActivationCoordinatorProcessorWSImpl.java	2008-01-25 17:18:13 UTC (rev 18124)
@@ -1,116 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. 
- * 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.logging.WSCLogger;
-import com.arjuna.webservices.wscoor.CoordinationConstants;
-import com.arjuna.webservices.wscoor.CoordinationConstantsWS;
-import com.arjuna.webservices.wscoor.processors.ActivationCoordinatorProcessorWS;
-import com.arjuna.webservices.SoapFaultType;
-import com.arjuna.wsc.ContextFactoryWS;
-import com.arjuna.wsc.InvalidCreateParametersException;
-import com.arjuna.wsc.ContextFactoryMapperWS;
-
-import javax.xml.ws.soap.SOAPFaultException;
-import javax.xml.ws.addressing.AddressingProperties;
-import javax.xml.ws.ProtocolException;
-import javax.xml.soap.SOAPFault;
-import javax.xml.soap.SOAPFactory;
-
-import org.oasis_open.docs.ws_tx.wscoor._2006._06.*;
-
-/**
- * The Activation Coordinator processor.
- * @author kevin
- */
-public class ActivationCoordinatorProcessorWSImpl extends ActivationCoordinatorProcessorWS
-{
-    /**
-     * Create the coordination context.
-     * @param createCoordinationContext The create coordination context request.
-     * @param addressingProperties The addressing context.
-     * @message com.arjuna.wsc.messaging.ActivationCoordinatorWSProcessorImpl_1 [com.arjuna.wsc.messaging.ActivationCoordinatorWSProcessorImpl_1] - Invalid create coordination context parameters
-     * @message com.arjuna.wsc.messaging.ActivationCoordinatorWSProcessorImpl_2 [com.arjuna.wsc.messaging.ActivationCoordinatorWSProcessorImpl_2] - Unexpected exception thrown from create:
-     * @message com.arjuna.wsc.messaging.ActivationCoordinatorWSProcessorImpl_3 [com.arjuna.wsc.messaging.ActivationCoordinatorWSProcessorImpl_3] - CreateCoordinationContext called for unknown coordination type: {0}
-     */
-    public CreateCoordinationContextResponseType
-        createCoordinationContext(final CreateCoordinationContextType createCoordinationContext,
-                                  final AddressingProperties addressingProperties)
-    {
-        final ContextFactoryMapperWS contextFactoryMapper = ContextFactoryMapperWS.getFactory() ;
-        try
-        {
-            final String coordinationType = createCoordinationContext.getCoordinationType() ;
-            final ContextFactoryWS contextFactory = contextFactoryMapper.getContextFactory(coordinationType) ;
-            
-            if (contextFactory != null)
-            {
-                final CoordinationContext coordinationContext ;
-                try
-                {
-                    final Expires expiresElement = createCoordinationContext.getExpires() ;
-                    final Long expires = (expiresElement == null ? null : new Long(expiresElement.getValue())) ;
-                    
-                    coordinationContext = contextFactory.create(coordinationType, expires, createCoordinationContext.getCurrentContext()) ;
-                    final CreateCoordinationContextResponseType response = new CreateCoordinationContextResponseType() ;
-                    response.setCoordinationContext(coordinationContext) ;
-                    return response;
-                }
-                catch (final InvalidCreateParametersException invalidCreateParametersException)
-                {
-	                SOAPFactory factory = SOAPFactory.newInstance();
-                    SOAPFault soapFault = factory.createFault(SoapFaultType.FAULT_SENDER.getValue(), CoordinationConstants.WSCOOR_ERROR_CODE_INVALID_PARAMETERS_QNAME);
-                    soapFault.addDetail().addDetailEntry(CoordinationConstantsWS.WSCOOR_ERROR_CODE_INVALID_PARAMETERS_QNAME).addTextNode(WSCLogger.log_mesg.getString("com.arjuna.wsc.messaging.ActivationCoordinatorWSProcessorImpl_1"));
-	                throw new SOAPFaultException(soapFault);
-                }
-                catch (final Throwable th)
-                {
-                    if (WSCLogger.arjLoggerI18N.isDebugEnabled())
-                    {
-                        WSCLogger.arjLoggerI18N.debug("com.arjuna.wsc.messaging.ActivationCoordinatorWSProcessorImpl_2", th) ;
-                    }
-                    SOAPFactory factory = SOAPFactory.newInstance();
-                    SOAPFault soapFault = factory.createFault() ;
-                    soapFault.addDetail().addDetailEntry(CoordinationConstantsWS.WSCOOR_ERROR_CODE_EXCEPTION_QNAME).addTextNode(th.getMessage());
-                    throw new SOAPFaultException(soapFault);
-                }
-            }
-            else
-            {
-                if (WSCLogger.arjLoggerI18N.isDebugEnabled())
-                {
-                    WSCLogger.arjLoggerI18N.debug("com.arjuna.wsc.messaging.ActivationCoordinatorWSProcessorImpl_3", new Object[] {coordinationType}) ;
-                }
-
-                SOAPFactory factory = SOAPFactory.newInstance();
-                SOAPFault soapFault = factory.createFault(SoapFaultType.FAULT_SENDER.getValue(), CoordinationConstants.WSCOOR_ERROR_CODE_INVALID_PARAMETERS_QNAME) ;
-                soapFault.addDetail().addDetailEntry(CoordinationConstantsWS.WSCOOR_ERROR_CODE_INVALID_PARAMETERS_QNAME).addTextNode(WSCLogger.log_mesg.getString("com.arjuna.wsc.messaging.ActivationCoordinatorWSProcessorImpl_1"));
-                throw new SOAPFaultException(soapFault);
-            }
-        }
-        catch (Throwable throwable)
-        {
-            throwable.printStackTrace(System.err);
-            throw new ProtocolException(throwable);
-
-        }
-    }
-}

Deleted: labs/jbosstm/workspace/adinn/XTSGF/WS-C/dev/src/com/arjuna/wsc/messaging/MessageIdWS.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WS-C/dev/src/com/arjuna/wsc/messaging/MessageIdWS.java	2008-01-25 17:05:33 UTC (rev 18123)
+++ labs/jbosstm/workspace/adinn/XTSGF/WS-C/dev/src/com/arjuna/wsc/messaging/MessageIdWS.java	2008-01-25 17:18:13 UTC (rev 18124)
@@ -1,49 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. 
- * 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.
- */
-/*
- * Created on 15-Jan-2005
- */
-package com.arjuna.wsc.messaging;
-
-import java.rmi.dgc.VMID;
-
-/**
- * A simple message id generator, used when UID is inaccessible.
- * @author kevin
- */
-public class MessageIdWS
-{
-    /**
-     * Prevent instantiation.
-     */
-    private MessageIdWS()
-    {
-    }
-
-    /**
-     * Get the next message identifier.
-     * @return The next message identifier.
-     */
-    public static String getMessageId()
-    {
-        return "urn:" + new VMID().toString() ;
-    }
-}
\ No newline at end of file

Deleted: labs/jbosstm/workspace/adinn/XTSGF/WS-C/dev/src/com/arjuna/wsc/messaging/RegistrationCoordinatorProcessorWSImpl.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WS-C/dev/src/com/arjuna/wsc/messaging/RegistrationCoordinatorProcessorWSImpl.java	2008-01-25 17:05:33 UTC (rev 18123)
+++ labs/jbosstm/workspace/adinn/XTSGF/WS-C/dev/src/com/arjuna/wsc/messaging/RegistrationCoordinatorProcessorWSImpl.java	2008-01-25 17:18:13 UTC (rev 18124)
@@ -1,140 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. 
- * 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.SoapFaultType;
-import com.arjuna.webservices.logging.WSCLogger;
-import com.arjuna.webservices.wsarj.ArjunaContextWS;
-import com.arjuna.webservices.wsarj.InstanceIdentifierWS;
-import com.arjuna.webservices.wscoor.CoordinationConstantsWS;
-import com.arjuna.webservices.wscoor.processors.RegistrationCoordinatorProcessorWS;
-import com.arjuna.wsc.*;
-import org.oasis_open.docs.ws_tx.wscoor._2006._06.RegisterResponseType;
-import org.oasis_open.docs.ws_tx.wscoor._2006._06.RegisterType;
-
-import javax.xml.soap.Detail;
-import javax.xml.soap.SOAPFactory;
-import javax.xml.soap.SOAPFault;
-import javax.xml.ws.ProtocolException;
-import javax.xml.ws.addressing.AddressingProperties;
-import javax.xml.ws.soap.SOAPFaultException;
-import javax.xml.ws.wsaddressing.W3CEndpointReference;
-
-
-/**
- * The Registration Coordinator processor.
- * @author kevin
- * @message com.arjuna.wsc.messaging.RegistrationCoordinatorWSProcessorImpl_1 [com.arjuna.wsc.messaging.RegistrationCoordinatorWSProcessorImpl_1] - Participant already registered
- * @message com.arjuna.wsc.messaging.RegistrationCoordinatorWSProcessorImpl_2 [com.arjuna.wsc.messaging.RegistrationCoordinatorWSProcessorImpl_2] - Invalid protocol identifier
- * @message com.arjuna.wsc.messaging.RegistrationCoordinatorWSProcessorImpl_3 [com.arjuna.wsc.messaging.RegistrationCoordinatorWSProcessorImpl_3] - Invalid coordination context state
- * @message com.arjuna.wsc.messaging.RegistrationCoordinatorWSProcessorImpl_4 [com.arjuna.wsc.messaging.RegistrationCoordinatorWSProcessorImpl_4] - Unknown activity identifier
- * @message com.arjuna.wsc.messaging.RegistrationCoordinatorWSProcessorImpl_5 [com.arjuna.wsc.messaging.RegistrationCoordinatorWSProcessorImpl_5] - Unexpected exception thrown from create:
- * @message com.arjuna.wsc.messaging.RegistrationCoordinatorWSProcessorImpl_6 [com.arjuna.wsc.messaging.RegistrationCoordinatorWSProcessorImpl_6] - Register called for unknown protocol identifier: {0}
- */
-public class RegistrationCoordinatorProcessorWSImpl extends RegistrationCoordinatorProcessorWS
-{
-    /**
-     * Register the participant in the protocol.
-     * @param register The register request.
-     * @param addressingContext The addressing context.
-     * @param arjunaContext The arjuna context.
-     */
-    public RegisterResponseType register(final RegisterType register, final AddressingProperties addressingContext,
-        final ArjunaContextWS arjunaContext)
-    {
-        final RegistrarMapperWS registrarMapper = RegistrarMapperWS.getFactory() ;
-        try
-        {
-            final String protocolIdentifier = register.getProtocolIdentifier() ;
-            final RegistrarWS registrar = registrarMapper.getRegistrar(protocolIdentifier) ;
-            
-            if (registrar != null)
-            {
-                try
-                {
-                    final W3CEndpointReference participantProtocolService = register.getParticipantProtocolService() ;
-                    final InstanceIdentifierWS instanceIdentifier = arjunaContext.getInstanceIdentifier();
-                    final W3CEndpointReference coordinationProtocolService =
-                            registrar.register(participantProtocolService, protocolIdentifier, instanceIdentifier) ;
-                    final RegisterResponseType response = new RegisterResponseType() ;
-
-                    response.setCoordinatorProtocolService(coordinationProtocolService);
-                    return response;
-                }
-                catch (final AlreadyRegisteredException alreadyRegisteredException)
-                {
-                    SOAPFactory factory = SOAPFactory.newInstance();
-                    SOAPFault soapFault = factory.createFault(SoapFaultType.FAULT_SENDER.getValue(), CoordinationConstantsWS.WSCOOR_ERROR_CODE_ALREADY_REGISTERED_QNAME);
-                    soapFault.addDetail().addDetailEntry(CoordinationConstantsWS.WSCOOR_ERROR_CODE_ALREADY_REGISTERED_QNAME).addTextNode(WSCLogger.log_mesg.getString("com.arjuna.wsc.messaging.RegistrationCoordinatorWSProcessorImpl_1"));
-                    throw new SOAPFaultException(soapFault);
-                }
-                catch (final InvalidProtocolException invalidProtocolException)
-                {
-                    SOAPFactory factory = SOAPFactory.newInstance();
-                    SOAPFault soapFault = factory.createFault(SoapFaultType.FAULT_SENDER.getValue(), CoordinationConstantsWS.WSCOOR_ERROR_CODE_INVALID_PROTOCOL_QNAME);
-                    soapFault.addDetail().addDetailEntry(CoordinationConstantsWS.WSCOOR_ERROR_CODE_INVALID_PARAMETERS_QNAME).addTextNode(WSCLogger.log_mesg.getString("com.arjuna.wsc.messaging.RegistrationCoordinatorWSProcessorImpl_2"));
-                    throw new SOAPFaultException(soapFault);
-                }
-                catch (final InvalidStateException InvalidStateException)
-                {
-                    SOAPFactory factory = SOAPFactory.newInstance();
-                    SOAPFault soapFault = factory.createFault(SoapFaultType.FAULT_SENDER.getValue(), CoordinationConstantsWS.WSCOOR_ERROR_CODE_INVALID_STATE_QNAME);
-                    soapFault.addDetail().addDetailEntry(CoordinationConstantsWS.WSCOOR_ERROR_CODE_INVALID_STATE_QNAME).addTextNode(WSCLogger.log_mesg.getString("com.arjuna.wsc.messaging.RegistrationCoordinatorWSProcessorImpl_3"));
-                    throw new SOAPFaultException(soapFault);
-                }
-                catch (final NoActivityException noActivityException)
-                {
-                    SOAPFactory factory = SOAPFactory.newInstance();
-                    SOAPFault soapFault = factory.createFault(SoapFaultType.FAULT_SENDER.getValue(), CoordinationConstantsWS.WSCOOR_ERROR_CODE_NO_ACTIVITY_QNAME);
-                    soapFault.addDetail().addDetailEntry(CoordinationConstantsWS.WSCOOR_ERROR_CODE_NO_ACTIVITY_QNAME).addTextNode(WSCLogger.log_mesg.getString("com.arjuna.wsc.messaging.RegistrationCoordinatorWSProcessorImpl_4"));
-                    throw new SOAPFaultException(soapFault);
-                }
-                catch (final Throwable th)
-                {
-                    if (WSCLogger.arjLoggerI18N.isDebugEnabled())
-                    {
-                        WSCLogger.arjLoggerI18N.debug("com.arjuna.wsc.messaging.RegistrationCoordinatorWSProcessorImpl_5", th) ;
-                    }
-                    SOAPFactory factory = SOAPFactory.newInstance();
-                    SOAPFault soapFault = factory.createFault();
-                    soapFault.addDetail().addDetailEntry(CoordinationConstantsWS.WSCOOR_ERROR_CODE_EXCEPTION_QNAME).addTextNode(th.getMessage());
-                    throw new SOAPFaultException(soapFault);
-                }
-            }
-            else
-            {
-                if (WSCLogger.arjLoggerI18N.isDebugEnabled())
-                {
-                    WSCLogger.arjLoggerI18N.debug("com.arjuna.wsc.messaging.RegistrationCoordinatorWSProcessorImpl_6", new Object[] {protocolIdentifier}) ;
-                }
-                SOAPFactory factory = SOAPFactory.newInstance();
-                SOAPFault soapFault = factory.createFault(SoapFaultType.FAULT_SENDER.getValue(), CoordinationConstantsWS.WSCOOR_ERROR_CODE_INVALID_PROTOCOL_QNAME);
-                WSCLogger.log_mesg.getString("com.arjuna.wsc.messaging.RegistrationCoordinatorWSProcessorImpl_2") ;
-                throw new SOAPFaultException(soapFault);
-            }
-        }
-        catch (Throwable throwable)
-        {
-            throwable.printStackTrace(System.err);
-            throw new ProtocolException(throwable);
-        }
-    }
-}

Deleted: labs/jbosstm/workspace/adinn/XTSGF/WS-C/dev/src/com/arjuna/wsc/messaging/deploy/CoordinationWSInitialisation.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WS-C/dev/src/com/arjuna/wsc/messaging/deploy/CoordinationWSInitialisation.java	2008-01-25 17:05:33 UTC (rev 18123)
+++ labs/jbosstm/workspace/adinn/XTSGF/WS-C/dev/src/com/arjuna/wsc/messaging/deploy/CoordinationWSInitialisation.java	2008-01-25 17:18:13 UTC (rev 18124)
@@ -1,61 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. 
- * 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 com.arjuna.services.framework.startup.Sequencer;
-import com.arjuna.webservices.wscoor.processors.ActivationCoordinatorProcessorWS;
-import com.arjuna.webservices.wscoor.processors.RegistrationCoordinatorProcessorWS;
-import com.arjuna.wsc.messaging.ActivationCoordinatorProcessorWSImpl;
-import com.arjuna.wsc.messaging.RegistrationCoordinatorProcessorWSImpl;
-
-import javax.servlet.ServletContextEvent;
-import javax.servlet.ServletContextListener;
-
-/**
- * Initialise the coordination services.
- * @author kevin
- */
-public class CoordinationWSInitialisation implements ServletContextListener
-{
-    /**
-     * The context has been initialized.
-     * @param servletContextEvent The servlet context event.
-     */
-    public void contextInitialized(final ServletContextEvent servletContextEvent)
-    {
-        Sequencer.Callback callback = new Sequencer.Callback(Sequencer.SEQUENCE_WSCOOR11, Sequencer.WEBAPP_WSC11) {
-           public void run() {
-               ActivationCoordinatorProcessorWS.setCoordinator(new ActivationCoordinatorProcessorWSImpl()) ;
-               RegistrationCoordinatorProcessorWS.setCoordinator(new RegistrationCoordinatorProcessorWSImpl()) ;
-           }
-        };
-        // this is the last WSC callback to be initialised so close the list
-        Sequencer.close(Sequencer.SEQUENCE_WSCOOR11, Sequencer.WEBAPP_WSC11);
-    }
-
-    /**
-     * The context is about to be destroyed.
-     * @param servletContextEvent The servlet context event.
-     */
-    public void contextDestroyed(final ServletContextEvent servletContextEvent)
-    {
-    }
-}
\ No newline at end of file

Added: labs/jbosstm/workspace/adinn/XTSGF/WS-C/dev/src/com/arjuna/wsc11/ActivationCoordinator.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WS-C/dev/src/com/arjuna/wsc11/ActivationCoordinator.java	                        (rev 0)
+++ labs/jbosstm/workspace/adinn/XTSGF/WS-C/dev/src/com/arjuna/wsc11/ActivationCoordinator.java	2008-01-25 17:18:13 UTC (rev 18124)
@@ -0,0 +1,93 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. 
+ * 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.wsc11;
+
+import java.io.IOException;
+
+import com.arjuna.webservices.SoapFault;
+import com.arjuna.webservices11.wsaddr.AddressingHelper;
+import com.arjuna.webservices11.wscoor.client.ActivationCoordinatorClient;
+import com.arjuna.webservices11.wscoor.CoordinationConstants;
+import com.arjuna.wsc.InvalidCreateParametersException;
+import org.oasis_open.docs.ws_tx.wscoor._2006._06.CoordinationContextType;
+import org.oasis_open.docs.ws_tx.wscoor._2006._06.Expires;
+import org.oasis_open.docs.ws_tx.wscoor._2006._06.CreateCoordinationContextResponseType;
+import org.oasis_open.docs.ws_tx.wscoor._2006._06.CoordinationContext;
+
+import javax.xml.ws.addressing.AddressingProperties;
+import javax.xml.ws.soap.SOAPFaultException;
+import javax.xml.soap.SOAPFault;
+import javax.xml.namespace.QName;
+
+/**
+ * Wrapper around low level Activation Coordinator messaging.
+ * @author kevin
+ */
+public class ActivationCoordinator
+{
+    /**
+     * 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 com.arjuna.wsc.InvalidCreateParametersException if the create parameters are invalid.
+     * @throws SoapFault for errors during processing.
+     */
+    public static CoordinationContextType createCoordinationContext(final String activationCoordinatorURI,
+        final String messageID, final String coordinationTypeURI, final Long expires,
+        final CoordinationContext currentContext)
+        throws InvalidCreateParametersException, SoapFault
+    {
+        final AddressingProperties addressingProperties = AddressingHelper.createRequestContext(activationCoordinatorURI, messageID) ;
+        
+        final Expires expiresValue;
+        if (expires == null) {
+            expiresValue = null;
+        } else {
+            expiresValue = new Expires();
+            expiresValue.setValue(expires.longValue());
+        }
+
+        try
+        {
+            CreateCoordinationContextResponseType response;
+            ActivationCoordinatorClient client = ActivationCoordinatorClient.getClient();
+            response = client.sendCreateCoordination(addressingProperties, coordinationTypeURI, expiresValue, currentContext) ;
+            return response.getCoordinationContext();
+        }
+        catch (final IOException ioe)
+        {
+            throw new SoapFault(ioe) ;
+        } catch (SOAPFaultException sfe) {
+            // TODO -- work out which faults we should really throw. in particular do we need to retain SoapFault
+            final SOAPFault soapFault = sfe.getFault() ;
+            final QName subcode = soapFault.getFaultCodeAsQName() ;
+            if (CoordinationConstants.WSCOOR_ERROR_CODE_INVALID_PARAMETERS_QNAME.equals(subcode))
+            {
+                throw new InvalidCreateParametersException(soapFault.getFaultString());
+            }
+            throw new SoapFault(sfe);
+        }
+    }
+}

Added: labs/jbosstm/workspace/adinn/XTSGF/WS-C/dev/src/com/arjuna/wsc11/ContextFactory.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WS-C/dev/src/com/arjuna/wsc11/ContextFactory.java	                        (rev 0)
+++ labs/jbosstm/workspace/adinn/XTSGF/WS-C/dev/src/com/arjuna/wsc11/ContextFactory.java	2008-01-25 17:18:13 UTC (rev 18124)
@@ -0,0 +1,71 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. 
+ * 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.
+ *
+ * ContextFactory.java
+ */
+
+package com.arjuna.wsc11;
+
+import org.oasis_open.docs.ws_tx.wscoor._2006._06.CoordinationContext;
+import org.oasis_open.docs.ws_tx.wscoor._2006._06.CoordinationContextType;
+import com.arjuna.wsc.InvalidCreateParametersException;
+
+public interface ContextFactory
+{
+    /**
+     * 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 com.arjuna.wsc.InvalidCreateParametersException if a parameter passed is invalid
+     *         this activity identifier
+     */
+	
+    public CoordinationContext 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);
+}

Added: labs/jbosstm/workspace/adinn/XTSGF/WS-C/dev/src/com/arjuna/wsc11/ContextFactoryMapper.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WS-C/dev/src/com/arjuna/wsc11/ContextFactoryMapper.java	                        (rev 0)
+++ labs/jbosstm/workspace/adinn/XTSGF/WS-C/dev/src/com/arjuna/wsc11/ContextFactoryMapper.java	2008-01-25 17:18:13 UTC (rev 18124)
@@ -0,0 +1,139 @@
+package com.arjuna.wsc11;
+
+import java.util.Map;
+import java.util.HashMap;
+
+/**
+ * The context factory mapper.
+ * @author kevin
+ */
+public class ContextFactoryMapper
+{
+    /**
+     * The factory singleton.
+     */
+    private static final ContextFactoryMapper FACTORY = new ContextFactoryMapper() ;
+
+    /**
+     * The context factory map.
+     */
+    private final Map contextFactoryMap = new HashMap() ;
+    /**
+     * The subordinate context factory mapper.
+     */
+    private ContextFactoryMapper subordinateContextFactoryMapper ;
+    /**
+     * The default context factory.
+     */
+    private ContextFactory defaultContextFactory ;
+
+    /**
+     * Get the context factory mapper singleton.
+     * @return The context factory mapper singleton.
+     */
+    public static ContextFactoryMapper getFactory()
+    {
+        return FACTORY;
+    }
+
+    /**
+     * Default constructor
+     */
+    protected ContextFactoryMapper()
+    {
+    }
+
+    /**
+     * 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 ContextFactory 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 ContextFactory getContextFactory(final String coordinationTypeURI)
+    {
+        final Object localContextFactory ;
+        synchronized(contextFactoryMap)
+        {
+            localContextFactory = contextFactoryMap.get(coordinationTypeURI) ;
+        }
+        if (localContextFactory != null)
+        {
+            return (ContextFactory)localContextFactory ;
+        }
+        if (subordinateContextFactoryMapper != null)
+        {
+            final ContextFactory 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)
+        {
+            ((ContextFactory)localContextFactory).uninstall(coordinationTypeURI) ;
+        }
+    }
+
+    /**
+     * Get the subordinate coordination factory mapper.
+     * @return The subordinate coordination factory mapper.
+     */
+    public ContextFactoryMapper getSubordinateContextFactoryMapper()
+    {
+        return subordinateContextFactoryMapper ;
+    }
+
+    /**
+     * Set a subordinate coordination factory mapper.
+     * @param subordinateContextFactoryMapper The subordinate coordination factory mapper.
+     */
+    public void setSubordinateContextFactoryMapper(final ContextFactoryMapper subordinateContextFactoryMapper)
+    {
+        this.subordinateContextFactoryMapper = subordinateContextFactoryMapper ;
+    }
+
+    /**
+     * Get the default coordination factory.
+     * @return The default coordination factory.
+     */
+    public ContextFactory getDefaultContextFactory()
+    {
+        return defaultContextFactory ;
+    }
+
+    /**
+     * Set the default coordination factory.
+     * @param defaultContextFactory The default coordination factory.
+     */
+    public void setDefaultContextFactory(final ContextFactory defaultContextFactory)
+    {
+        this.defaultContextFactory = defaultContextFactory ;
+    }
+}

Added: labs/jbosstm/workspace/adinn/XTSGF/WS-C/dev/src/com/arjuna/wsc11/Registrar.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WS-C/dev/src/com/arjuna/wsc11/Registrar.java	                        (rev 0)
+++ labs/jbosstm/workspace/adinn/XTSGF/WS-C/dev/src/com/arjuna/wsc11/Registrar.java	2008-01-25 17:18:13 UTC (rev 18124)
@@ -0,0 +1,50 @@
+package com.arjuna.wsc11;
+
+import com.arjuna.webservices11.wsarj.InstanceIdentifier;
+import com.arjuna.wsc.AlreadyRegisteredException;
+import com.arjuna.wsc.InvalidProtocolException;
+import com.arjuna.wsc.InvalidStateException;
+import com.arjuna.wsc.NoActivityException;
+
+import javax.xml.ws.wsaddressing.W3CEndpointReference;
+
+public interface Registrar
+{
+    /**
+     * 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 participantProtocolService 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 com.arjuna.wsc.AlreadyRegisteredException if the participant is already registered for this coordination protocol under
+     *         this activity identifier
+     * @throws com.arjuna.wsc.InvalidProtocolException if the coordination protocol is not supported
+     * @throws com.arjuna.wsc.InvalidStateException if the state of the coordinator no longer allows registration for this
+     *         coordination protocol
+     * @throws com.arjuna.wsc.NoActivityException if the actvity does not exist
+     */
+    public W3CEndpointReference register(final W3CEndpointReference participantProtocolService,
+        final String protocolIdentifier, final InstanceIdentifier instanceIdentifier)
+        throws AlreadyRegisteredException, 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 protocolIdentifier the protocol identifier
+     */
+    public void uninstall(final String protocolIdentifier);
+}

Added: labs/jbosstm/workspace/adinn/XTSGF/WS-C/dev/src/com/arjuna/wsc11/RegistrarMapper.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WS-C/dev/src/com/arjuna/wsc11/RegistrarMapper.java	                        (rev 0)
+++ labs/jbosstm/workspace/adinn/XTSGF/WS-C/dev/src/com/arjuna/wsc11/RegistrarMapper.java	2008-01-25 17:18:13 UTC (rev 18124)
@@ -0,0 +1,85 @@
+package com.arjuna.wsc11;
+
+import com.arjuna.wsc11.Registrar;
+
+import java.util.Map;
+import java.util.HashMap;
+
+/**
+ * The registrar mapper.
+ * @author kevin
+ */
+public class RegistrarMapper
+{
+    /**
+     * The factory singleton.
+     */
+    private static final RegistrarMapper FACTORY = new RegistrarMapper() ;
+
+    /**
+     * The registrar map.
+     */
+    private final Map registrarMap = new HashMap() ;
+
+    /**
+     * Get the registrar mapper singleton.
+     * @return The registrar mapper singleton.
+     */
+    public static RegistrarMapper getFactory()
+    {
+        return FACTORY;
+    }
+
+    /**
+     * Default constructor
+     */
+    protected RegistrarMapper()
+    {
+    }
+
+    /**
+     * Add a registrar for the specified protocol identifier.
+     * @param protocolIdentifier The protocol identifier.
+     * @param registrar The registrar.
+     */
+    public void addRegistrar(final String protocolIdentifier, final Registrar 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 Registrar getRegistrar(final String protocolIdentifier)
+    {
+        final Object localRegistrar ;
+        synchronized(registrarMap)
+        {
+            localRegistrar = registrarMap.get(protocolIdentifier) ;
+        }
+        return (Registrar)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)
+        {
+            ((com.arjuna.wsc.Registrar)localRegistrar).uninstall(protocolIdentifier) ;
+        }
+    }
+}

Added: labs/jbosstm/workspace/adinn/XTSGF/WS-C/dev/src/com/arjuna/wsc11/RegistrationCoordinator.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WS-C/dev/src/com/arjuna/wsc11/RegistrationCoordinator.java	                        (rev 0)
+++ labs/jbosstm/workspace/adinn/XTSGF/WS-C/dev/src/com/arjuna/wsc11/RegistrationCoordinator.java	2008-01-25 17:18:13 UTC (rev 18124)
@@ -0,0 +1,77 @@
+package com.arjuna.wsc11;
+
+import com.arjuna.webservices.SoapFault;
+import com.arjuna.webservices11.wscoor.CoordinationConstants;
+import com.arjuna.webservices11.wscoor.client.WSCOORClient;
+import com.arjuna.wsc.AlreadyRegisteredException;
+import com.arjuna.wsc.InvalidProtocolException;
+import com.arjuna.wsc.InvalidStateException;
+import com.arjuna.wsc.NoActivityException;
+import org.oasis_open.docs.ws_tx.wscoor._2006._06.*;
+
+import javax.xml.namespace.QName;
+import javax.xml.soap.SOAPFault;
+import javax.xml.ws.soap.SOAPFaultException;
+import javax.xml.ws.wsaddressing.W3CEndpointReference;
+
+/**
+ * Wrapper around low level Registration Coordinator messaging.
+ * @author kevin
+ */
+public class RegistrationCoordinator
+{
+    /**
+     * 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 com.arjuna.wsc.AlreadyRegisteredException If the participant is already registered.
+     * @throws com.arjuna.wsc.InvalidProtocolException If the protocol is unsupported.
+     * @throws com.arjuna.wsc.InvalidStateException If the state is invalid
+     * @throws com.arjuna.wsc.NoActivityException If there is to activity context active.
+     * @throws com.arjuna.webservices.SoapFault for errors during processing.
+     */
+    public static W3CEndpointReference register(final CoordinationContextType coordinationContext,
+        final String messageID, final W3CEndpointReference participantProtocolService,
+        final String protocolIdentifier)
+        throws AlreadyRegisteredException, InvalidProtocolException,
+            InvalidStateException, NoActivityException, SoapFault
+    {
+        final W3CEndpointReference endpointReference = coordinationContext.getRegistrationService() ;
+
+        try
+        {
+            RegisterType registerType = new RegisterType();
+            RegisterResponseType response;
+
+            registerType.setProtocolIdentifier(protocolIdentifier);
+            registerType.setParticipantProtocolService(participantProtocolService);
+            RegistrationPortType port = WSCOORClient.getRegistrationPort(endpointReference, CoordinationConstants.WSCOOR_ACTION_REGISTER, messageID);
+            response = port.registerOperation(registerType);
+            return response.getCoordinatorProtocolService();
+        } catch (SOAPFaultException sfe) {
+            // TODO -- work out which faults we should really throw. in particular do we need to retain SoapFault
+            final SOAPFault soapFault = sfe.getFault() ;
+            final QName subcode = soapFault.getFaultCodeAsQName() ;
+            if (CoordinationConstants.WSCOOR_ERROR_CODE_ALREADY_REGISTERED_QNAME.equals(subcode))
+            {
+                throw new AlreadyRegisteredException(soapFault.getFaultString()) ;
+            }
+            else if (CoordinationConstants.WSCOOR_ERROR_CODE_INVALID_PROTOCOL_QNAME.equals(subcode))
+            {
+                throw new InvalidProtocolException(soapFault.getFaultString()) ;
+            }
+            else if (CoordinationConstants.WSCOOR_ERROR_CODE_INVALID_STATE_QNAME.equals(subcode))
+            {
+                throw new InvalidStateException(soapFault.getFaultString()) ;
+            }
+            else if (CoordinationConstants.WSCOOR_ERROR_CODE_NO_ACTIVITY_QNAME.equals(subcode))
+            {
+                throw new NoActivityException(soapFault.getFaultString()) ;
+            }
+            throw new SoapFault(sfe);
+        }
+    }
+}

Added: labs/jbosstm/workspace/adinn/XTSGF/WS-C/dev/src/com/arjuna/wsc11/messaging/ActivationCoordinatorProcessorImpl.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WS-C/dev/src/com/arjuna/wsc11/messaging/ActivationCoordinatorProcessorImpl.java	                        (rev 0)
+++ labs/jbosstm/workspace/adinn/XTSGF/WS-C/dev/src/com/arjuna/wsc11/messaging/ActivationCoordinatorProcessorImpl.java	2008-01-25 17:18:13 UTC (rev 18124)
@@ -0,0 +1,115 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. 
+ * 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.wsc11.messaging;
+
+import com.arjuna.webservices.logging.WSCLogger;
+import com.arjuna.webservices11.wscoor.CoordinationConstants;
+import com.arjuna.webservices11.wscoor.processors.ActivationCoordinatorProcessor;
+import com.arjuna.webservices.SoapFaultType;
+import com.arjuna.wsc11.ContextFactory;
+import com.arjuna.wsc.InvalidCreateParametersException;
+import com.arjuna.wsc11.ContextFactoryMapper;
+
+import javax.xml.ws.soap.SOAPFaultException;
+import javax.xml.ws.addressing.AddressingProperties;
+import javax.xml.ws.ProtocolException;
+import javax.xml.soap.SOAPFault;
+import javax.xml.soap.SOAPFactory;
+
+import org.oasis_open.docs.ws_tx.wscoor._2006._06.*;
+
+/**
+ * The Activation Coordinator processor.
+ * @author kevin
+ */
+public class ActivationCoordinatorProcessorImpl extends ActivationCoordinatorProcessor
+{
+    /**
+     * Create the coordination context.
+     * @param createCoordinationContext The create coordination context request.
+     * @param addressingProperties 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}
+     */
+    public CreateCoordinationContextResponseType
+        createCoordinationContext(final CreateCoordinationContextType createCoordinationContext,
+                                  final AddressingProperties addressingProperties)
+    {
+        final ContextFactoryMapper contextFactoryMapper = ContextFactoryMapper.getFactory() ;
+        try
+        {
+            final String coordinationType = createCoordinationContext.getCoordinationType() ;
+            final ContextFactory contextFactory = contextFactoryMapper.getContextFactory(coordinationType) ;
+            
+            if (contextFactory != null)
+            {
+                final CoordinationContext coordinationContext ;
+                try
+                {
+                    final Expires expiresElement = createCoordinationContext.getExpires() ;
+                    final Long expires = (expiresElement == null ? null : new Long(expiresElement.getValue())) ;
+                    
+                    coordinationContext = contextFactory.create(coordinationType, expires, createCoordinationContext.getCurrentContext()) ;
+                    final CreateCoordinationContextResponseType response = new CreateCoordinationContextResponseType() ;
+                    response.setCoordinationContext(coordinationContext) ;
+                    return response;
+                }
+                catch (final InvalidCreateParametersException invalidCreateParametersException)
+                {
+	                SOAPFactory factory = SOAPFactory.newInstance();
+                    SOAPFault soapFault = factory.createFault(SoapFaultType.FAULT_SENDER.getValue(), com.arjuna.webservices.wscoor.CoordinationConstants.WSCOOR_ERROR_CODE_INVALID_PARAMETERS_QNAME);
+                    soapFault.addDetail().addDetailEntry(CoordinationConstants.WSCOOR_ERROR_CODE_INVALID_PARAMETERS_QNAME).addTextNode(WSCLogger.log_mesg.getString("com.arjuna.wsc.messaging.ActivationCoordinator11ProcessorImpl_1"));
+	                throw new SOAPFaultException(soapFault);
+                }
+                catch (final Throwable th)
+                {
+                    if (WSCLogger.arjLoggerI18N.isDebugEnabled())
+                    {
+                        WSCLogger.arjLoggerI18N.debug("com.arjuna.wsc.messaging.ActivationCoordinator11ProcessorImpl_2", th) ;
+                    }
+                    SOAPFactory factory = SOAPFactory.newInstance();
+                    SOAPFault soapFault = factory.createFault() ;
+                    soapFault.addDetail().addDetailEntry(CoordinationConstants.WSCOOR_ERROR_CODE_EXCEPTION_QNAME).addTextNode(th.getMessage());
+                    throw new SOAPFaultException(soapFault);
+                }
+            }
+            else
+            {
+                if (WSCLogger.arjLoggerI18N.isDebugEnabled())
+                {
+                    WSCLogger.arjLoggerI18N.debug("com.arjuna.wsc.messaging.ActivationCoordinator11ProcessorImpl_3", new Object[] {coordinationType}) ;
+                }
+
+                SOAPFactory factory = SOAPFactory.newInstance();
+                SOAPFault soapFault = factory.createFault(SoapFaultType.FAULT_SENDER.getValue(), com.arjuna.webservices.wscoor.CoordinationConstants.WSCOOR_ERROR_CODE_INVALID_PARAMETERS_QNAME) ;
+                soapFault.addDetail().addDetailEntry(CoordinationConstants.WSCOOR_ERROR_CODE_INVALID_PARAMETERS_QNAME).addTextNode(WSCLogger.log_mesg.getString("com.arjuna.wsc.messaging.ActivationCoordinator11ProcessorImpl_1"));
+                throw new SOAPFaultException(soapFault);
+            }
+        }
+        catch (Throwable throwable)
+        {
+            throwable.printStackTrace(System.err);
+            throw new ProtocolException(throwable);
+
+        }
+    }
+}

Added: labs/jbosstm/workspace/adinn/XTSGF/WS-C/dev/src/com/arjuna/wsc11/messaging/MessageId.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WS-C/dev/src/com/arjuna/wsc11/messaging/MessageId.java	                        (rev 0)
+++ labs/jbosstm/workspace/adinn/XTSGF/WS-C/dev/src/com/arjuna/wsc11/messaging/MessageId.java	2008-01-25 17:18:13 UTC (rev 18124)
@@ -0,0 +1,49 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. 
+ * 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.
+ */
+/*
+ * Created on 15-Jan-2005
+ */
+package com.arjuna.wsc11.messaging;
+
+import java.rmi.dgc.VMID;
+
+/**
+ * A simple message id generator, used when UID is inaccessible.
+ * @author kevin
+ */
+public class MessageId
+{
+    /**
+     * Prevent instantiation.
+     */
+    private MessageId()
+    {
+    }
+
+    /**
+     * Get the next message identifier.
+     * @return The next message identifier.
+     */
+    public static String getMessageId()
+    {
+        return "urn:" + new VMID().toString() ;
+    }
+}
\ No newline at end of file

Added: labs/jbosstm/workspace/adinn/XTSGF/WS-C/dev/src/com/arjuna/wsc11/messaging/RegistrationCoordinatorProcessorImpl.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WS-C/dev/src/com/arjuna/wsc11/messaging/RegistrationCoordinatorProcessorImpl.java	                        (rev 0)
+++ labs/jbosstm/workspace/adinn/XTSGF/WS-C/dev/src/com/arjuna/wsc11/messaging/RegistrationCoordinatorProcessorImpl.java	2008-01-25 17:18:13 UTC (rev 18124)
@@ -0,0 +1,141 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. 
+ * 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.wsc11.messaging;
+
+import com.arjuna.webservices.SoapFaultType;
+import com.arjuna.webservices.logging.WSCLogger;
+import com.arjuna.webservices11.wsarj.ArjunaContext;
+import com.arjuna.webservices11.wsarj.InstanceIdentifier;
+import com.arjuna.webservices11.wscoor.CoordinationConstants;
+import com.arjuna.webservices11.wscoor.processors.RegistrationCoordinatorProcessor;
+import com.arjuna.wsc.*;
+import com.arjuna.wsc11.RegistrarMapper;
+import com.arjuna.wsc11.Registrar;
+import org.oasis_open.docs.ws_tx.wscoor._2006._06.RegisterResponseType;
+import org.oasis_open.docs.ws_tx.wscoor._2006._06.RegisterType;
+
+import javax.xml.soap.SOAPFactory;
+import javax.xml.soap.SOAPFault;
+import javax.xml.ws.ProtocolException;
+import javax.xml.ws.addressing.AddressingProperties;
+import javax.xml.ws.soap.SOAPFaultException;
+import javax.xml.ws.wsaddressing.W3CEndpointReference;
+
+
+/**
+ * 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 RegistrationCoordinatorProcessorImpl extends RegistrationCoordinatorProcessor
+{
+    /**
+     * Register the participant in the protocol.
+     * @param register The register request.
+     * @param addressingContext The addressing context.
+     * @param arjunaContext The arjuna context.
+     */
+    public RegisterResponseType register(final RegisterType register, final AddressingProperties addressingContext,
+        final ArjunaContext arjunaContext)
+    {
+        final com.arjuna.wsc11.RegistrarMapper registrarMapper = RegistrarMapper.getFactory() ;
+        try
+        {
+            final String protocolIdentifier = register.getProtocolIdentifier() ;
+            final Registrar registrar = registrarMapper.getRegistrar(protocolIdentifier) ;
+            
+            if (registrar != null)
+            {
+                try
+                {
+                    final W3CEndpointReference participantProtocolService = register.getParticipantProtocolService() ;
+                    final InstanceIdentifier instanceIdentifier = arjunaContext.getInstanceIdentifier();
+                    final W3CEndpointReference coordinationProtocolService =
+                            registrar.register(participantProtocolService, protocolIdentifier, instanceIdentifier) ;
+                    final RegisterResponseType response = new RegisterResponseType() ;
+
+                    response.setCoordinatorProtocolService(coordinationProtocolService);
+                    return response;
+                }
+                catch (final AlreadyRegisteredException alreadyRegisteredException)
+                {
+                    SOAPFactory factory = SOAPFactory.newInstance();
+                    SOAPFault soapFault = factory.createFault(SoapFaultType.FAULT_SENDER.getValue(), CoordinationConstants.WSCOOR_ERROR_CODE_ALREADY_REGISTERED_QNAME);
+                    soapFault.addDetail().addDetailEntry(CoordinationConstants.WSCOOR_ERROR_CODE_ALREADY_REGISTERED_QNAME).addTextNode(WSCLogger.log_mesg.getString("com.arjuna.wsc.messaging.RegistrationCoordinator11ProcessorImpl_1"));
+                    throw new SOAPFaultException(soapFault);
+                }
+                catch (final InvalidProtocolException invalidProtocolException)
+                {
+                    SOAPFactory factory = SOAPFactory.newInstance();
+                    SOAPFault soapFault = factory.createFault(SoapFaultType.FAULT_SENDER.getValue(), CoordinationConstants.WSCOOR_ERROR_CODE_INVALID_PROTOCOL_QNAME);
+                    soapFault.addDetail().addDetailEntry(CoordinationConstants.WSCOOR_ERROR_CODE_INVALID_PARAMETERS_QNAME).addTextNode(WSCLogger.log_mesg.getString("com.arjuna.wsc.messaging.RegistrationCoordinator11ProcessorImpl_2"));
+                    throw new SOAPFaultException(soapFault);
+                }
+                catch (final InvalidStateException InvalidStateException)
+                {
+                    SOAPFactory factory = SOAPFactory.newInstance();
+                    SOAPFault soapFault = factory.createFault(SoapFaultType.FAULT_SENDER.getValue(), CoordinationConstants.WSCOOR_ERROR_CODE_INVALID_STATE_QNAME);
+                    soapFault.addDetail().addDetailEntry(CoordinationConstants.WSCOOR_ERROR_CODE_INVALID_STATE_QNAME).addTextNode(WSCLogger.log_mesg.getString("com.arjuna.wsc.messaging.RegistrationCoordinator11ProcessorImpl_3"));
+                    throw new SOAPFaultException(soapFault);
+                }
+                catch (final NoActivityException noActivityException)
+                {
+                    SOAPFactory factory = SOAPFactory.newInstance();
+                    SOAPFault soapFault = factory.createFault(SoapFaultType.FAULT_SENDER.getValue(), CoordinationConstants.WSCOOR_ERROR_CODE_NO_ACTIVITY_QNAME);
+                    soapFault.addDetail().addDetailEntry(CoordinationConstants.WSCOOR_ERROR_CODE_NO_ACTIVITY_QNAME).addTextNode(WSCLogger.log_mesg.getString("com.arjuna.wsc.messaging.RegistrationCoordinator11ProcessorImpl_4"));
+                    throw new SOAPFaultException(soapFault);
+                }
+                catch (final Throwable th)
+                {
+                    if (WSCLogger.arjLoggerI18N.isDebugEnabled())
+                    {
+                        WSCLogger.arjLoggerI18N.debug("com.arjuna.wsc.messaging.RegistrationCoordinator11ProcessorImpl_5", th) ;
+                    }
+                    SOAPFactory factory = SOAPFactory.newInstance();
+                    SOAPFault soapFault = factory.createFault();
+                    soapFault.addDetail().addDetailEntry(CoordinationConstants.WSCOOR_ERROR_CODE_EXCEPTION_QNAME).addTextNode(th.getMessage());
+                    throw new SOAPFaultException(soapFault);
+                }
+            }
+            else
+            {
+                if (WSCLogger.arjLoggerI18N.isDebugEnabled())
+                {
+                    WSCLogger.arjLoggerI18N.debug("com.arjuna.wsc.messaging.RegistrationCoordinator11ProcessorImpl_6", new Object[] {protocolIdentifier}) ;
+                }
+                SOAPFactory factory = SOAPFactory.newInstance();
+                SOAPFault soapFault = factory.createFault(SoapFaultType.FAULT_SENDER.getValue(), CoordinationConstants.WSCOOR_ERROR_CODE_INVALID_PROTOCOL_QNAME);
+                WSCLogger.log_mesg.getString("com.arjuna.wsc.messaging.RegistrationCoordinator11ProcessorImpl_2") ;
+                throw new SOAPFaultException(soapFault);
+            }
+        }
+        catch (Throwable throwable)
+        {
+            throwable.printStackTrace(System.err);
+            throw new ProtocolException(throwable);
+        }
+    }
+}

Added: labs/jbosstm/workspace/adinn/XTSGF/WS-C/dev/src/com/arjuna/wsc11/messaging/deploy/CoordinationInitialisation.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WS-C/dev/src/com/arjuna/wsc11/messaging/deploy/CoordinationInitialisation.java	                        (rev 0)
+++ labs/jbosstm/workspace/adinn/XTSGF/WS-C/dev/src/com/arjuna/wsc11/messaging/deploy/CoordinationInitialisation.java	2008-01-25 17:18:13 UTC (rev 18124)
@@ -0,0 +1,61 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. 
+ * 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.wsc11.messaging.deploy;
+
+import com.arjuna.services.framework.startup.Sequencer;
+import com.arjuna.webservices11.wscoor.processors.ActivationCoordinatorProcessor;
+import com.arjuna.webservices11.wscoor.processors.RegistrationCoordinatorProcessor;
+import com.arjuna.wsc11.messaging.ActivationCoordinatorProcessorImpl;
+import com.arjuna.wsc11.messaging.RegistrationCoordinatorProcessorImpl;
+
+import javax.servlet.ServletContextEvent;
+import javax.servlet.ServletContextListener;
+
+/**
+ * Initialise the coordination services.
+ * @author kevin
+ */
+public class CoordinationInitialisation implements ServletContextListener
+{
+    /**
+     * The context has been initialized.
+     * @param servletContextEvent The servlet context event.
+     */
+    public void contextInitialized(final ServletContextEvent servletContextEvent)
+    {
+        Sequencer.Callback callback = new Sequencer.Callback(Sequencer.SEQUENCE_WSCOOR11, Sequencer.WEBAPP_WSC11) {
+           public void run() {
+               ActivationCoordinatorProcessor.setCoordinator(new ActivationCoordinatorProcessorImpl()) ;
+               RegistrationCoordinatorProcessor.setCoordinator(new RegistrationCoordinatorProcessorImpl()) ;
+           }
+        };
+        // this is the last WSC callback to be initialised so close the list
+        Sequencer.close(Sequencer.SEQUENCE_WSCOOR11, Sequencer.WEBAPP_WSC11);
+    }
+
+    /**
+     * The context is about to be destroyed.
+     * @param servletContextEvent The servlet context event.
+     */
+    public void contextDestroyed(final ServletContextEvent servletContextEvent)
+    {
+    }
+}
\ No newline at end of file

Modified: labs/jbosstm/workspace/adinn/XTSGF/WS-T/build.xml
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WS-T/build.xml	2008-01-25 17:05:33 UTC (rev 18123)
+++ labs/jbosstm/workspace/adinn/XTSGF/WS-T/build.xml	2008-01-25 17:18:13 UTC (rev 18124)
@@ -198,7 +198,7 @@
 	<copy file="${dev.dd.dir}/wsarjtx/wsdl/wsarjtx-termination-coordinator-binding.wsdl" tofile="${build.dev.classes.dir}/com/arjuna/schemas/ws/_2005/_10/wsarjtx/wsdl/wsarjtx-termination-coordinator-binding.wsdl"/>
 	<copy file="${dev.dd.dir}/wsarjtx/wsdl/wsarjtx-termination-participant-binding.wsdl" tofile="${build.dev.classes.dir}/com/arjuna/schemas/ws/_2005/_10/wsarjtx/wsdl/wsarjtx-termination-participant-binding.wsdl"/>
         <jar jarfile="${build.dev.lib.dir}/ws-t.jar">
-            <fileset dir="${build.dev.classes.dir}" excludes="com/arjuna/webservices/wsat/sei/* com/arjuna/webservices/wsba/sei/* com/arjuna/webservices/wsarjtx/sei/* handlers.xml"/>
+            <fileset dir="${build.dev.classes.dir}" excludes="com/arjuna/webservices11/wsat/sei/* com/arjuna/webservices11/wsba/sei/* com/arjuna/webservices11/wsarjtx/sei/* handlers.xml"/>
 	    <!--
             <fileset dir="${build.dev.dd.dir}" includes="wsdl/**"/>
 	    -->
@@ -233,7 +233,7 @@
             </manifest>
         </war>
         <war warfile="${build.dev.webapps.dir}/ws-t11.war" needxmlfile="false">
-	    <webinf dir="${build.dir}/dev" includes="classes/com/arjuna/webservices/wsat/sei/* classes/com/arjuna/webservices/wsba/sei/* classes/com/arjuna/webservices/wsarjtx/sei/* classes/handlers.xml"/>
+	    <webinf dir="${build.dir}/dev" includes="classes/com/arjuna/webservices11/wsat/sei/* classes/com/arjuna/webservices11/wsba/sei/* classes/com/arjuna/webservices11/wsarjtx/sei/* classes/handlers.xml"/>
 	    <webinf dir="${build.dev.dd.dir}" includes="wsdl/**"/>
             <manifest>
                 <attribute name="Class-Path" value="WEB-INF/classes ws-c.jar ws-t.jar"/>

Modified: labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/dd/ws-t11_web-app.xml
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/dd/ws-t11_web-app.xml	2008-01-25 17:05:33 UTC (rev 18123)
+++ labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/dd/ws-t11_web-app.xml	2008-01-25 17:18:13 UTC (rev 18124)
@@ -33,42 +33,42 @@
     </context-param>
     <!-- Initialise Arjuna TX 1.1 services -->
     <listener>
-        <listener-class>com.arjuna.webservices.wsarjtx.server.TerminationParticipantWSInitialisation</listener-class>
+        <listener-class>com.arjuna.webservices11.wsarjtx.server.TerminationParticipantInitialisation</listener-class>
     </listener>
     <listener>
-        <listener-class>com.arjuna.webservices.wsarjtx.server.TerminationCoordinatorWSInitialisation</listener-class>
+        <listener-class>com.arjuna.webservices11.wsarjtx.server.TerminationCoordinatorInitialisation</listener-class>
     </listener>
     
     <!-- Initialise WS-AT 1.1 services -->
     <listener>
-        <listener-class>com.arjuna.webservices.wsat.server.CompletionCoordinatorWSInitialisation</listener-class>
+        <listener-class>com.arjuna.webservices11.wsat.server.CompletionCoordinatorInitialisation</listener-class>
     </listener>
     <listener>
-        <listener-class>com.arjuna.webservices.wsat.server.CompletionInitiatorWSInitialisation</listener-class>
+        <listener-class>com.arjuna.webservices11.wsat.server.CompletionInitiatorInitialisation</listener-class>
     </listener>
     <listener>
-        <listener-class>com.arjuna.webservices.wsat.server.CoordinatorWSInitialisation</listener-class>
+        <listener-class>com.arjuna.webservices11.wsat.server.CoordinatorInitialisation</listener-class>
     </listener>
     <listener>
-        <listener-class>com.arjuna.webservices.wsat.server.ParticipantWSInitialisation</listener-class>
+        <listener-class>com.arjuna.webservices11.wsat.server.ParticipantInitialisation</listener-class>
     </listener>
     
     <!-- Initialise WS-BA 1.1 services -->
     <listener>
-        <listener-class>com.arjuna.webservices.wsba.server.CoordinatorCompletionCoordinatorWSInitialisation</listener-class>
+        <listener-class>com.arjuna.webservices11.wsba.server.CoordinatorCompletionCoordinatorInitialisation</listener-class>
     </listener>
     <listener>
-        <listener-class>com.arjuna.webservices.wsba.server.CoordinatorCompletionParticipantWSInitialisation</listener-class>
+        <listener-class>com.arjuna.webservices11.wsba.server.CoordinatorCompletionParticipantInitialisation</listener-class>
     </listener>
     <listener>
-        <listener-class>com.arjuna.webservices.wsba.server.ParticipantCompletionCoordinatorWSInitialisation</listener-class>
+        <listener-class>com.arjuna.webservices11.wsba.server.ParticipantCompletionCoordinatorInitialisation</listener-class>
     </listener>
     <listener>
-        <listener-class>com.arjuna.webservices.wsba.server.ParticipantCompletionParticipantWSInitialisation</listener-class>
+        <listener-class>com.arjuna.webservices11.wsba.server.ParticipantCompletionParticipantInitialisation</listener-class>
     </listener>
     
     <!-- Initialise WS-T  1.1 -->
     <listener>
-        <listener-class>com.arjuna.wst.messaging.deploy.TransactionWSInitialisation</listener-class>
+        <listener-class>com.arjuna.wst11.messaging.deploy.TransactionInitialisation</listener-class>
     </listener>
 </web-app>

Modified: labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/dd/ws-t_handlers.xml
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/dd/ws-t_handlers.xml	2008-01-25 17:05:33 UTC (rev 18123)
+++ labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/dd/ws-t_handlers.xml	2008-01-25 17:18:13 UTC (rev 18124)
@@ -26,7 +26,7 @@
     <handler-chain>
 	<handler>
 		<handler-name>Instance Identifier Handler</handler-name>
-		<handler-class>com.arjuna.webservices.wsarj.handler.InstanceIdentifierHandlerWS</handler-class>
+		<handler-class>com.arjuna.webservices11.wsarj.handler.InstanceIdentifierHandler</handler-class>
 	</handler>
 	<handler>
 		<handler-name>WS Addressing Server Handler</handler-name>

Deleted: labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices/wsarjtx/ArjunaTXWSConstants.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices/wsarjtx/ArjunaTXWSConstants.java	2008-01-25 17:05:33 UTC (rev 18123)
+++ labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices/wsarjtx/ArjunaTXWSConstants.java	2008-01-25 17:18:13 UTC (rev 18124)
@@ -1,82 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. 
- * 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.wsarjtx;
-
-import javax.xml.namespace.QName;
-
-/**
- * Interface containing Arjuna WS constants.
- */
-public interface ArjunaTXWSConstants
-{
-    /**
-     * The Namespace.
-     */
-    public String WSARJTX_NAMESPACE = "http://schemas.arjuna.com/ws/2005/10/wsarjtx" ;
-    /**
-     * The Attribute Namespace.
-     */
-    public String WSARJTX_ATTRIBUTE_NAMESPACE = "" ;
-    /**
-     * The namespace prefix.
-     */
-    public String WSARJTX_PREFIX = "wsarjtx" ;
-    /**
-     * The attribute namespace prefix.
-     */
-    public String WSARJTX_ATTRIBUTE_PREFIX = "" ;
-
-    /**
-     * The termination participant service name.
-     */
-    public String TERMINATION_PARTICIPANT_SERVICE_NAME = "TerminationParticipantService" ;
-    /**
-     * The termination participant service qname.
-     */
-    public QName TERMINATION_PARTICIPANT_SERVICE_QNAME = new QName(WSARJTX_NAMESPACE, TERMINATION_PARTICIPANT_SERVICE_NAME, WSARJTX_PREFIX) ;
-
-    /**
-     * The termination participant soap service port name
-     */
-     public String TERMINATION_PARTICIPANT_PORT_NAME = "TerminationParticipantPortType";
-    /**
-     * The termination participant soap service port qname
-     */
-     public QName TERMINATION_PARTICIPANT_PORT_QNAME = new QName(WSARJTX_NAMESPACE, TERMINATION_PARTICIPANT_PORT_NAME, WSARJTX_PREFIX);
-
-    /**
-     * The termination coordinator service name.
-     */
-    public String TERMINATION_COORDINATOR_SERVICE_NAME = "TerminationCoordinatorService" ;
-    /**
-     * The termination coordinator service qname.
-     */
-    public QName TERMINATION_COORDINATOR_SERVICE_QNAME = new QName(WSARJTX_NAMESPACE, TERMINATION_COORDINATOR_SERVICE_NAME, WSARJTX_PREFIX) ;
-
-    /**
-     * The termination coordinator soap service port name
-     */
-     public String TERMINATION_COORDINATOR_PORT_NAME = "TerminationCoordinatorPortType";
-    /**
-     * The termination coordinator soap service port qname
-     */
-     public QName TERMINATION_COORDINATOR_PORT_QNAME = new QName(WSARJTX_NAMESPACE, TERMINATION_COORDINATOR_PORT_NAME, WSARJTX_PREFIX);
-}
\ No newline at end of file

Deleted: labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices/wsarjtx/client/TerminationCoordinatorClientWS.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices/wsarjtx/client/TerminationCoordinatorClientWS.java	2008-01-25 17:05:33 UTC (rev 18123)
+++ labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices/wsarjtx/client/TerminationCoordinatorClientWS.java	2008-01-25 17:18:13 UTC (rev 18124)
@@ -1,159 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. 
- * 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.wsarjtx.client;
-
-import com.arjuna.schemas.ws._2005._10.wsarjtx.NotificationType;
-import com.arjuna.schemas.ws._2005._10.wsarjtx.TerminationCoordinatorPortType;
-import com.arjuna.webservices.SoapFault;
-import com.arjuna.webservices.SoapRegistry;
-import com.arjuna.webservices.wsarj.InstanceIdentifierWS;
-import com.arjuna.webservices.wsarj.handler.InstanceIdentifierHandlerWS;
-import com.arjuna.webservices.wsarjtx.ArjunaTXConstants;
-import com.arjuna.webservices.wsarjtx.ArjunaTXWSConstants;
-
-import javax.xml.ws.BindingProvider;
-import javax.xml.ws.addressing.AddressingBuilder;
-import javax.xml.ws.addressing.AddressingProperties;
-import javax.xml.ws.addressing.AttributedURI;
-import javax.xml.ws.addressing.JAXWSAConstants;
-import javax.xml.ws.handler.Handler;
-import javax.xml.ws.soap.AddressingFeature;
-import javax.xml.ws.wsaddressing.W3CEndpointReference;
-import javax.xml.ws.wsaddressing.W3CEndpointReferenceBuilder;
-import java.io.IOException;
-import java.net.URISyntaxException;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Map;
-
-/**
- * The Client side of the Terminator Participant.
- * @author kevin
- */
-public class TerminationCoordinatorClientWS
-{
-    /**
-     * The client singleton.
-     */
-    private static final TerminationCoordinatorClientWS CLIENT = new TerminationCoordinatorClientWS() ;
-
-    /**
-     * The complete action.
-     */
-    private AttributedURI completeAction = null;
-    /**
-     * The close action.
-     */
-    private AttributedURI closeAction = null;
-    /**
-     * The cancel action.
-     */
-    private AttributedURI cancelAction = null;
-
-    /**
-     * Construct the terminator participant client.
-     */
-    private TerminationCoordinatorClientWS()
-    {
-        final AddressingBuilder builder = AddressingBuilder.getAddressingBuilder();
-        try {
-            completeAction = builder.newURI(ArjunaTXConstants.WSARJTX_ACTION_COMPLETE);
-            closeAction = builder.newURI(ArjunaTXConstants.WSARJTX_ACTION_CLOSE);
-            cancelAction = builder.newURI(ArjunaTXConstants.WSARJTX_ACTION_CANCEL);
-        } catch (URISyntaxException use) {
-            // TODO - log fault and throw exception
-        }
-        //final HandlerRegistry handlerRegistry = new HandlerRegistry() ;
-
-        // Add WS-Addressing
-        //AddressingPolicy.register(handlerRegistry) ;
-        // Add client policies
-        //ClientPolicy.register(handlerRegistry) ;
-    }
-
-    /**
-     * Send a complete request.
-     * @param addressingProperties addressing context initialised with to and message ID.
-     * @param identifier The identifier of the initiator.
-     * @throws com.arjuna.webservices.SoapFault For any errors.
-     * @throws java.io.IOException for any transport errors.
-     */
-    public void sendComplete(final W3CEndpointReference coordinator, final AddressingProperties addressingProperties, final InstanceIdentifierWS identifier)
-        throws SoapFault, IOException
-    {
-        final TerminationCoordinatorPortType port = getPort(coordinator, addressingProperties, identifier, completeAction);
-        final NotificationType complete = new NotificationType();
-
-        port.completeOperation(complete);
-    }
-
-    /**
-     * Send a close request.
-     * @param addressingProperties addressing context initialised with to and message ID.
-     * @param identifier The identifier of the initiator.
-     * @throws com.arjuna.webservices.SoapFault For any errors.
-     * @throws java.io.IOException for any transport errors.
-     */
-    public void sendClose(final W3CEndpointReference coordinator, final AddressingProperties addressingProperties, final InstanceIdentifierWS identifier)
-        throws SoapFault, IOException
-    {
-        final TerminationCoordinatorPortType port = getPort(coordinator, addressingProperties, identifier, closeAction);
-        final NotificationType close = new NotificationType();
-
-        port.closeOperation(close);
-    }
-
-    /**
-     * Send a cancel request.
-     * @param addressingProperties addressing context initialised with to and message ID.
-     * @param identifier The identifier of the initiator.
-     * @throws com.arjuna.webservices.SoapFault For any errors.
-     * @throws java.io.IOException for any transport errors.
-     */
-    public void sendCancel(final W3CEndpointReference coordinator, final AddressingProperties addressingProperties, final InstanceIdentifierWS identifier)
-        throws SoapFault, IOException
-    {
-        final TerminationCoordinatorPortType port = getPort(coordinator, addressingProperties, identifier, cancelAction);
-        final NotificationType cancel = new NotificationType();
-
-        port.cancelOperation(cancel);
-    }
-
-    /**
-     * Get the Terminator Coordinator client singleton.
-     * @return The Terminator Coordinator client singleton.
-     */
-    public static TerminationCoordinatorClientWS getClient()
-    {
-        return CLIENT ;
-    }
-
-    private TerminationCoordinatorPortType getPort(final W3CEndpointReference endpoint,
-                                                   final AddressingProperties addressingProperties,
-                                                   final InstanceIdentifierWS identifier,
-                                                   final AttributedURI action)
-    {
-        // we only need the message id from the addressing properties as the address is already wrapped up
-        // in the ednpoint reference. also the identifier should already be installed in the endpoint
-        // reference as a reference parameter so we don't need that either
-        return WSARJTXClientWS.getTerminationCoordinatorPort(endpoint, action, addressingProperties);
-    }
-}
\ No newline at end of file

Deleted: labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices/wsarjtx/client/TerminationParticipantClientWS.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices/wsarjtx/client/TerminationParticipantClientWS.java	2008-01-25 17:05:33 UTC (rev 18123)
+++ labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices/wsarjtx/client/TerminationParticipantClientWS.java	2008-01-25 17:18:13 UTC (rev 18124)
@@ -1,209 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. 
- * 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.wsarjtx.client;
-
-import com.arjuna.schemas.ws._2005._10.wsarjtx.ExceptionType;
-import com.arjuna.schemas.ws._2005._10.wsarjtx.NotificationType;
-import com.arjuna.schemas.ws._2005._10.wsarjtx.TerminationParticipantPortType;
-import com.arjuna.webservices.SoapFault;
-import com.arjuna.webservices.SoapService;
-import com.arjuna.webservices.wsarj.InstanceIdentifierWS;
-import com.arjuna.webservices.wsarj.handler.InstanceIdentifierHandlerWS;
-import com.arjuna.webservices.wsarjtx.ArjunaTXConstants;
-import com.arjuna.webservices.wsarjtx.ArjunaTXWSConstants;
-
-import javax.xml.ws.BindingProvider;
-import javax.xml.ws.addressing.AddressingBuilder;
-import javax.xml.ws.addressing.AddressingProperties;
-import javax.xml.ws.addressing.AttributedURI;
-import javax.xml.ws.addressing.JAXWSAConstants;
-import javax.xml.ws.handler.Handler;
-import javax.xml.ws.soap.AddressingFeature;
-import javax.xml.ws.wsaddressing.W3CEndpointReference;
-import javax.xml.ws.wsaddressing.W3CEndpointReferenceBuilder;
-import java.io.IOException;
-import java.net.URISyntaxException;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Map;
-
-/**
- * The Client side of the Terminator Coordinator.
- * @author kevin
- */
-public class TerminationParticipantClientWS
-{
-    /**
-     * The client singleton.
-     */
-    private static final TerminationParticipantClientWS CLIENT = new TerminationParticipantClientWS() ;
-
-    /**
-     * The completed action.
-     */
-    private AttributedURI completedAction = null;
-    /**
-     * The closed action.
-     */
-    private AttributedURI closedAction = null;
-    /**
-     * The cancelled action.
-     */
-    private AttributedURI cancelledAction = null;
-    /**
-     * The faulted action.
-     */
-    private AttributedURI faultedAction = null;
-    /**
-     * The SOAP fault action.
-     */
-    private AttributedURI soapFaultAction = null;
-
-    /**
-     * Construct the terminator coordinator client.
-     */
-    private TerminationParticipantClientWS()
-    {
-        final AddressingBuilder builder = AddressingBuilder.getAddressingBuilder();
-        try {
-            completedAction = builder.newURI(ArjunaTXConstants.WSARJTX_ACTION_COMPLETED);
-            closedAction = builder.newURI(ArjunaTXConstants.WSARJTX_ACTION_CLOSED);
-            cancelledAction = builder.newURI(ArjunaTXConstants.WSARJTX_ACTION_CANCELLED);
-            faultedAction = builder.newURI(ArjunaTXConstants.WSARJTX_ACTION_FAULTED);
-            soapFaultAction = builder.newURI(ArjunaTXConstants.WSARJTX_ACTION_SOAP_FAULT);
-        } catch (URISyntaxException use) {
-            // TODO - log fault and throw exception
-        }
-        // final HandlerRegistry handlerRegistry = new HandlerRegistry() ;
-
-        // Add WS-Addressing
-        // AddressingPolicy.register(handlerRegistry) ;
-        // Add client policies
-        // ClientPolicy.register(handlerRegistry) ;
-    }
-
-    /**
-     * Send a completed request.
-     * @param addressingProperties addressing context initialised with to and message ID.
-     * @param identifier The identifier of the initiator.
-     * @throws com.arjuna.webservices.SoapFault For any errors.
-     * @throws java.io.IOException for any transport errors.
-     */
-    public void sendCompleted(final W3CEndpointReference participant, final AddressingProperties addressingProperties, final InstanceIdentifierWS identifier)
-        throws SoapFault, IOException
-    {
-        final TerminationParticipantPortType port = getPort(participant, addressingProperties, identifier, completedAction);
-        final NotificationType completed = new NotificationType();
-
-        port.completedOperation(completed);
-    }
-
-    /**
-     * Send a closed request.
-     * @param addressingProperties addressing context initialised with to and message ID.
-     * @param identifier The identifier of the initiator.
-     * @throws com.arjuna.webservices.SoapFault For any errors.
-     * @throws java.io.IOException for any transport errors.
-     */
-    public void sendClosed(final W3CEndpointReference participant, final AddressingProperties addressingProperties, final InstanceIdentifierWS identifier)
-        throws SoapFault, IOException
-    {
-        final TerminationParticipantPortType port = getPort(participant, addressingProperties, identifier, closedAction);
-        final NotificationType closed = new NotificationType();
-
-        port.closedOperation(closed);
-    }
-
-    /**
-     * Send a cancelled request.
-     * @param addressingProperties addressing context initialised with to and message ID.
-     * @param identifier The identifier of the initiator.
-     * @throws com.arjuna.webservices.SoapFault For any errors.
-     * @throws java.io.IOException for any transport errors.
-     */
-    public void sendCancelled(final W3CEndpointReference participant,final AddressingProperties addressingProperties, final InstanceIdentifierWS identifier)
-        throws SoapFault, IOException
-    {
-        final TerminationParticipantPortType port = getPort(participant, addressingProperties, identifier, cancelledAction);
-        final NotificationType cancelled = new NotificationType();
-
-        port.cancelledOperation(cancelled);
-    }
-
-    /**
-     * Send a faulted request.
-     * @param addressingProperties addressing context initialised with to and message ID.
-     * @param identifier The identifier of the initiator.
-     * @throws com.arjuna.webservices.SoapFault For any errors.
-     * @throws java.io.IOException for any transport errors.
-     */
-    public void sendFaulted(final W3CEndpointReference participant, final AddressingProperties addressingProperties, final InstanceIdentifierWS identifier)
-        throws SoapFault, IOException
-    {
-        final TerminationParticipantPortType port = getPort(participant, addressingProperties, identifier, faultedAction);
-        final NotificationType faulted = new NotificationType();
-
-        port.faultedOperation(faulted);
-    }
-
-    /**
-     * Send a fault.
-     * @param addressingProperties The addressing context.
-     * @param soapFault The SOAP fault.
-     * @param identifier The arjuna  instance identifier.
-     * @throws com.arjuna.webservices.SoapFault For any errors.
-     * @throws java.io.IOException for any transport errors.
-     */
-    public void sendSoapFault(final W3CEndpointReference participant, final AddressingProperties addressingProperties, final SoapFault soapFault, final InstanceIdentifierWS identifier)
-        throws SoapFault, IOException
-    {
-        final TerminationParticipantPortType port = getPort(participant, addressingProperties, identifier, soapFaultAction);
-        final ExceptionType fault = new ExceptionType();
-        // we pass the fault type, reason and subcode. we cannot pass the detail and header elements as they are
-        // built from Kev's element types rather than dom element types. this is all we need anyway since we only
-        // see faults containing those values
-        fault.setSoapFaultType(soapFault.getSoapFaultType().getValue());
-        fault.setReason(soapFault.getReason());
-        fault.setSubCode(soapFault.getSubcode());
-
-        port.faultOperation(fault);
-    }
-
-    /**
-     * Get the Terminator Coordinator client singleton.
-     * @return The Terminator Coordinator client singleton.
-     */
-    public static TerminationParticipantClientWS getClient()
-    {
-        return CLIENT ;
-    }
-
-    private TerminationParticipantPortType getPort(final W3CEndpointReference endpoint,
-                                                   final AddressingProperties addressingProperties,
-                                                   final InstanceIdentifierWS identifier,
-                                                   final AttributedURI action)
-    {
-        // we only need the message id from the addressing properties as the address is already wrapped up
-        // in the ednpoint reference. also the identifier should already be installed in the endpoint
-        // reference as a reference parameter so we don't need that either
-        return WSARJTXClientWS.getTerminationParticipantPort(endpoint, action, addressingProperties);
-    }
-}
\ No newline at end of file

Deleted: labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices/wsarjtx/client/WSARJTXClientWS.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices/wsarjtx/client/WSARJTXClientWS.java	2008-01-25 17:05:33 UTC (rev 18123)
+++ labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices/wsarjtx/client/WSARJTXClientWS.java	2008-01-25 17:18:13 UTC (rev 18124)
@@ -1,140 +0,0 @@
-package com.arjuna.webservices.wsarjtx.client;
-
-import com.arjuna.schemas.ws._2005._10.wsarjtx.TerminationCoordinatorPortType;
-import com.arjuna.schemas.ws._2005._10.wsarjtx.TerminationCoordinatorService;
-import com.arjuna.schemas.ws._2005._10.wsarjtx.TerminationParticipantPortType;
-import com.arjuna.schemas.ws._2005._10.wsarjtx.TerminationParticipantService;
-import com.arjuna.webservices.wsarj.handler.InstanceIdentifierHandlerWS;
-
-import javax.xml.ws.BindingProvider;
-import javax.xml.ws.addressing.AddressingBuilder;
-import javax.xml.ws.addressing.AddressingProperties;
-import javax.xml.ws.addressing.AttributedURI;
-import javax.xml.ws.addressing.JAXWSAConstants;
-import javax.xml.ws.handler.Handler;
-import javax.xml.ws.soap.AddressingFeature;
-import javax.xml.ws.wsaddressing.W3CEndpointReference;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Map;
-import java.net.URISyntaxException;
-
-import org.jboss.ws.extensions.addressing.jaxws.WSAddressingClientHandler;
-
-/**
- * Created by IntelliJ IDEA.
- * User: adinn
- * Date: Oct 7, 2007
- * Time: 3:14:28 PM
- * To change this template use File | Settings | File Templates.
- */
-public class WSARJTXClientWS
-{
-    // TODO -- do we really need a thread local here or can we just use one service?
-    /**
-     *  thread local which maintains a per thread termination coordinator service instance
-     */
-    private static ThreadLocal<TerminationCoordinatorService> terminationCoordinatorService = new ThreadLocal<TerminationCoordinatorService>();
-
-    /**
-     *  thread local which maintains a per thread termination participant service instance
-     */
-    private static ThreadLocal<TerminationParticipantService> terminationParticipantService = new ThreadLocal<TerminationParticipantService>();
-
-    /**
-     *  builder used to construct addressing info for calls
-     */
-    private static AddressingBuilder builder = AddressingBuilder.getAddressingBuilder();
-
-    /**
-     * fetch a termination coordinator service unique to the current thread
-     * @return
-     */
-    private static synchronized TerminationCoordinatorService getTerminationCoordinatorService()
-    {
-        if (terminationCoordinatorService.get() == null) {
-            terminationCoordinatorService.set(new TerminationCoordinatorService());
-        }
-        return terminationCoordinatorService.get();
-    }
-
-    /**
-     * fetch a termination participant service unique to the current thread
-     * @return
-     */
-    private static synchronized TerminationParticipantService getTerminationParticipantService()
-    {
-        if (terminationParticipantService.get() == null) {
-            terminationParticipantService.set(new TerminationParticipantService());
-        }
-        return terminationParticipantService.get();
-    }
-
-    public static TerminationCoordinatorPortType getTerminationCoordinatorPort(W3CEndpointReference endpointReference,
-                                                                                AttributedURI action,
-                                                                                AddressingProperties addressingProperties)
-    {
-        TerminationCoordinatorService service = getTerminationCoordinatorService();
-        TerminationCoordinatorPortType port = service.getPort(endpointReference, TerminationCoordinatorPortType.class, new AddressingFeature(true, true));
-        BindingProvider bindingProvider = (BindingProvider)port;
-        /*
-         * we need to configure an instance identifier handler for this port to pass the tx context either
-         * outgoing or returning. We also have to add the the WSAdressing client handler to ensure that the
-         * addressing properties are encoded into the SOAP message
-         */
-        List<Handler> customHandlerChain = new ArrayList<Handler>();
-        customHandlerChain.add(new InstanceIdentifierHandlerWS());
-        customHandlerChain.add(new WSAddressingClientHandler());
-		bindingProvider.getBinding().setHandlerChain(customHandlerChain);
-        // the address will have been pulled out of the endpoint by getPort but we still have to set it in the
-        // addressing properties along with the action and message id
-        Map<String, Object> requestContext = bindingProvider.getRequestContext();
-        String address = (String)requestContext.get(BindingProvider.ENDPOINT_ADDRESS_PROPERTY);
-        try {
-            addressingProperties.setTo(builder.newURI(address));
-        } catch (URISyntaxException use) {
-            // TODO -- log unexpected error here
-        }
-        addressingProperties.setAction(action);
-        requestContext.put(JAXWSAConstants.CLIENT_ADDRESSING_PROPERTIES, addressingProperties);
-	    // jbossws should do this for us . . .
-	    requestContext.put(JAXWSAConstants.CLIENT_ADDRESSING_PROPERTIES_OUTBOUND, addressingProperties);
-
-        return port;
-    }
-
-    // don't think we ever need this as we get a registration port from the endpoint ref returned by
-    // the activation port request
-    public static TerminationParticipantPortType getTerminationParticipantPort(W3CEndpointReference endpointReference,
-                                                                               AttributedURI action,
-                                                                               AddressingProperties addressingProperties)
-    {
-        TerminationParticipantService service = getTerminationParticipantService();
-        TerminationParticipantPortType port = service.getPort(endpointReference, TerminationParticipantPortType.class, new AddressingFeature(true, true));
-        BindingProvider bindingProvider = (BindingProvider)port;
-        /*
-         * we need to configure an instance identifier handler for this port to pass the tx context either
-         * outgoing or returning. We also have to add the the WSAdressing client handler to ensure that the
-         * addressing properties are encoded into the SOAP message
-         */
-        List<Handler> customHandlerChain = new ArrayList<Handler>();
-        customHandlerChain.add(new InstanceIdentifierHandlerWS());
-        customHandlerChain.add(new WSAddressingClientHandler());
-		bindingProvider.getBinding().setHandlerChain(customHandlerChain);
-        // the address will have been pulled out of the endpoint by getPort but we still have to set it in the
-        // addressing properties along with the action and message id
-        Map<String, Object> requestContext = bindingProvider.getRequestContext();
-        String address = (String)requestContext.get(BindingProvider.ENDPOINT_ADDRESS_PROPERTY);
-        try {
-            addressingProperties.setTo(builder.newURI(address));
-        } catch (URISyntaxException use) {
-            // TODO -- log unexpected error here
-        }
-        addressingProperties.setAction(action);
-        requestContext.put(JAXWSAConstants.CLIENT_ADDRESSING_PROPERTIES, addressingProperties);
-	    // jbossws should do this for us . . .
-	    requestContext.put(JAXWSAConstants.CLIENT_ADDRESSING_PROPERTIES_OUTBOUND, addressingProperties);
-
-        return port;
-    }
-}
\ No newline at end of file

Deleted: labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices/wsarjtx/processors/TerminationCoordinatorProcessorWS.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices/wsarjtx/processors/TerminationCoordinatorProcessorWS.java	2008-01-25 17:05:33 UTC (rev 18123)
+++ labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices/wsarjtx/processors/TerminationCoordinatorProcessorWS.java	2008-01-25 17:18:13 UTC (rev 18124)
@@ -1,108 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. 
- * 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.wsarjtx.processors;
-
-import com.arjuna.schemas.ws._2005._10.wsarjtx.NotificationType;
-import com.arjuna.webservices.wsarj.ArjunaContextWS;
-import com.arjuna.webservices.wsarj.InstanceIdentifierWS;
-import com.arjuna.wst.BusinessActivityTerminatorWS;
-
-import javax.xml.ws.addressing.AddressingProperties;
-
-/**
- * The Terminator Participant processor.
- * @author kevin
- */
-public abstract class TerminationCoordinatorProcessorWS
-{
-    /**
-     * The participant processor.
-     */
-    private static TerminationCoordinatorProcessorWS PROCESSOR ;
-
-    /**
-     * Get the processor.
-     * @return The processor.
-     */
-    public static TerminationCoordinatorProcessorWS getProcessor()
-    {
-        return PROCESSOR ;
-    }
-
-    /**
-     * Set the processor.
-     * @param processor The processor.
-     * @return The previous processor.
-     */
-    public static TerminationCoordinatorProcessorWS setProcessor(final TerminationCoordinatorProcessorWS processor)
-    {
-        final TerminationCoordinatorProcessorWS origProcessor = PROCESSOR ;
-        PROCESSOR = processor ;
-        return origProcessor ;
-    }
-
-    /**
-     * Activate the participant.
-     * @param participant The participant.
-     * @param identifier The identifier.
-     */
-    public abstract void activateParticipant(final BusinessActivityTerminatorWS participant, final String identifier) ;
-
-    /**
-     * Deactivate the participant.
-     * @param participant The participant.
-     */
-    public abstract void deactivateParticipant(final BusinessActivityTerminatorWS participant) ;
-
-    /**
-     * Get the participant with the specified identifier.
-     * @param instanceIdentifier The participant identifier.
-     * @return The participant or null if not known.
-     */
-    public abstract BusinessActivityTerminatorWS getParticipant(final InstanceIdentifierWS instanceIdentifier) ;
-
-    /**
-     * Cancel.
-     * @param cancel The cancel notification.
-     * @param addressingProperties The addressing context.
-     * @param arjunaContext The arjuna context.
-     */
-    public abstract void cancel(final NotificationType cancel, final AddressingProperties addressingProperties,
-        final ArjunaContextWS arjunaContext) ;
-
-    /**
-     * Close.
-     * @param close The close notification.
-     * @param addressingProperties The addressing context.
-     * @param arjunaContext The arjuna context.
-     */
-    public abstract void close(final NotificationType close, final AddressingProperties addressingProperties,
-        final ArjunaContextWS arjunaContext) ;
-
-    /**
-     * Complete.
-     * @param complete The complete notification.
-     * @param addressingProperties The addressing context.
-     * @param arjunaContext The arjuna context.
-     */
-    public abstract void complete(final NotificationType complete, final AddressingProperties addressingProperties,
-        final ArjunaContextWS arjunaContext) ;
-}
\ No newline at end of file

Deleted: labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices/wsarjtx/processors/TerminationParticipantCallbackWS.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices/wsarjtx/processors/TerminationParticipantCallbackWS.java	2008-01-25 17:05:33 UTC (rev 18123)
+++ labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices/wsarjtx/processors/TerminationParticipantCallbackWS.java	2008-01-25 17:18:13 UTC (rev 18124)
@@ -1,80 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. 
- * 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.wsarjtx.processors;
-
-import com.arjuna.schemas.ws._2005._10.wsarjtx.NotificationType;
-import com.arjuna.webservices.SoapFault;
-import com.arjuna.webservices.base.processors.Callback;
-import com.arjuna.webservices.wsarj.ArjunaContextWS;
-
-import javax.xml.ws.addressing.AddressingProperties;
-
-/**
- * The Terminator Coordinator callback.
- * @author kevin
- */
-public abstract class TerminationParticipantCallbackWS extends Callback
-{
-    /**
-     * A cancelled response.
-     * @param cancelled The cancelled notification.
-     * @param addressingProperties The addressing context.
-     * @param arjunaContext The arjuna context.
-     */
-    public abstract void cancelled(final NotificationType cancelled, final AddressingProperties addressingProperties,
-        final ArjunaContextWS arjunaContext) ;
-
-    /**
-     * A closed response.
-     * @param closed The closed notification.
-     * @param addressingProperties The addressing context.
-     * @param arjunaContext The arjuna context.
-     */
-    public abstract void closed(final NotificationType closed, final AddressingProperties addressingProperties,
-        final ArjunaContextWS arjunaContext) ;
-
-    /**
-     * A completed response.
-     * @param completed The completed notification.
-     * @param addressingProperties The addressing context.
-     * @param arjunaContext The arjuna context.
-     */
-    public abstract void completed(final NotificationType completed, final AddressingProperties addressingProperties,
-        final ArjunaContextWS arjunaContext) ;
-
-    /**
-     * A faulted response.
-     * @param faulted The faulted notification.
-     * @param addressingProperties The addressing context.
-     * @param arjunaContext The arjuna context.
-     */
-    public abstract void faulted(final NotificationType faulted, final AddressingProperties addressingProperties,
-        final ArjunaContextWS arjunaContext) ;
-
-    /**
-     * A SOAP fault response.
-     * @param soapFault The SOAP fault.
-     * @param addressingProperties The addressing context.
-     * @param arjunaContext The arjuna context.
-     */
-    public abstract void soapFault(final SoapFault soapFault, final AddressingProperties addressingProperties,
-        final ArjunaContextWS arjunaContext) ;
-}
\ No newline at end of file

Deleted: labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices/wsarjtx/processors/TerminationParticipantProcessorWS.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices/wsarjtx/processors/TerminationParticipantProcessorWS.java	2008-01-25 17:05:33 UTC (rev 18123)
+++ labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices/wsarjtx/processors/TerminationParticipantProcessorWS.java	2008-01-25 17:18:13 UTC (rev 18124)
@@ -1,140 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. 
- * 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.wsarjtx.processors;
-
-import com.arjuna.schemas.ws._2005._10.wsarjtx.NotificationType;
-import com.arjuna.webservices.SoapFault;
-import com.arjuna.webservices.base.processors.Callback;
-import com.arjuna.webservices.wsarj.ArjunaContextWS;
-import com.arjuna.webservices.wsarj.processor.BaseNotificationProcessorWS;
-
-import javax.xml.ws.addressing.AddressingProperties;
-
-/**
- * The Terminator Coordinator processor.
- * @author kevin
- */
-public class TerminationParticipantProcessorWS extends BaseNotificationProcessorWS
-{
-    /**
-     * The coordinator processor.
-     */
-    private static final TerminationParticipantProcessorWS PROCESSOR = new TerminationParticipantProcessorWS() ;
-
-    /**
-     * Get the processor singleton.
-     * @return The singleton.
-     */
-    public static TerminationParticipantProcessorWS getProcessor()
-    {
-        return PROCESSOR ;
-    }
-
-    /**
-     * Handle a cancelled response.
-     * @param cancelled The cancelled notification.
-     * @param addressingProperties The addressing context.
-     * @param arjunaContext The arjuna context.
-     */
-    public void handleCancelled(final NotificationType cancelled, final AddressingProperties addressingProperties,
-        final ArjunaContextWS arjunaContext)
-    {
-        handleCallbacks(new CallbackExecutorAdapter() {
-            public void execute(final Callback callback) {
-                ((TerminationParticipantCallbackWS)callback).cancelled(cancelled, addressingProperties, arjunaContext) ;
-            }
-        }, getIDs(addressingProperties, arjunaContext)) ;
-    }
-
-    /**
-     * Handle a closed response.
-     * @param closed The closed notification.
-     * @param addressingProperties The addressing context.
-     * @param arjunaContext The arjuna context.
-     */
-    public void handleClosed(final NotificationType closed, final AddressingProperties addressingProperties,
-        final ArjunaContextWS arjunaContext)
-    {
-        handleCallbacks(new CallbackExecutorAdapter() {
-            public void execute(final Callback callback) {
-                ((TerminationParticipantCallbackWS)callback).closed(closed, addressingProperties, arjunaContext) ;
-            }
-        }, getIDs(addressingProperties, arjunaContext)) ;
-    }
-
-    /**
-     * Handle a completed response.
-     * @param completed The completed notification.
-     * @param addressingProperties The addressing context.
-     * @param arjunaContext The arjuna context.
-     */
-    public void handleCompleted(final NotificationType completed, final AddressingProperties addressingProperties,
-        final ArjunaContextWS arjunaContext)
-    {
-        handleCallbacks(new CallbackExecutorAdapter() {
-            public void execute(final Callback callback) {
-                ((TerminationParticipantCallbackWS)callback).completed(completed, addressingProperties, arjunaContext) ;
-            }
-        }, getIDs(addressingProperties, arjunaContext)) ;
-    }
-
-    /**
-     * Handle a faulted response.
-     * @param faulted The faulted notification.
-     * @param addressingProperties The addressing context.
-     * @param arjunaContext The arjuna context.
-     */
-    public void handleFaulted(final NotificationType faulted, final AddressingProperties addressingProperties,
-        final ArjunaContextWS arjunaContext)
-    {
-        handleCallbacks(new CallbackExecutorAdapter() {
-            public void execute(final Callback callback) {
-                ((TerminationParticipantCallbackWS)callback).faulted(faulted, addressingProperties, arjunaContext) ;
-            }
-        }, getIDs(addressingProperties, arjunaContext)) ;
-    }
-
-    /**
-     * Handle a SOAP fault response.
-     * @param soapFault The SOAP fault.
-     * @param addressingProperties The addressing context.
-     * @param arjunaContext The arjuna context.
-     */
-    public void handleSoapFault(final SoapFault soapFault, final AddressingProperties addressingProperties,
-        final ArjunaContextWS arjunaContext)
-    {
-        handleCallbacks(new CallbackExecutorAdapter() {
-            public void execute(final Callback callback) {
-                ((TerminationParticipantCallbackWS)callback).soapFault(soapFault, addressingProperties, arjunaContext) ;
-            }
-        }, getIDs(addressingProperties, 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 TerminationParticipantCallbackWS callback)
-    {
-        register(instanceIdentifier, callback) ;
-    }
-}
\ No newline at end of file

Deleted: labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices/wsarjtx/server/TerminationCoordinatorWSInitialisation.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices/wsarjtx/server/TerminationCoordinatorWSInitialisation.java	2008-01-25 17:05:33 UTC (rev 18123)
+++ labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices/wsarjtx/server/TerminationCoordinatorWSInitialisation.java	2008-01-25 17:18:13 UTC (rev 18124)
@@ -1,63 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. 
- * 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.wsarjtx.server;
-
-import com.arjuna.services.framework.startup.Sequencer;
-import com.arjuna.webservices.ServiceRegistryWS;
-import com.arjuna.webservices.wsarjtx.ArjunaTXWSConstants;
-
-import javax.servlet.ServletContext;
-import javax.servlet.ServletContextEvent;
-import javax.servlet.ServletContextListener;
-
-/**
- * Activate the Terminator Participant service
- * @author kevin
- */
-public class TerminationCoordinatorWSInitialisation implements ServletContextListener
-{
-    /**
-     * The context has been initialized.
-     * @param servletContextEvent The servlet context event.
-     */
-    public void contextInitialized(final ServletContextEvent servletContextEvent)
-    {
-        ServletContext context = servletContextEvent.getServletContext();
-        String baseURI = context.getInitParameter("BaseURI");
-        final String uri = baseURI + "/" + ArjunaTXWSConstants.TERMINATION_COORDINATOR_SERVICE_NAME;
-
-        Sequencer.Callback callback = new Sequencer.Callback(Sequencer.SEQUENCE_WSCOOR11, Sequencer.WEBAPP_WST11) {
-           public void run() {
-               // TODO work out how to configure the endpoint name here
-               final ServiceRegistryWS serviceRegistry = ServiceRegistryWS.getRegistry() ;
-               serviceRegistry.registerServiceProvider(ArjunaTXWSConstants.TERMINATION_COORDINATOR_SERVICE_NAME, uri) ;
-           }
-        };
-    }
-
-    /**
-     * The context is about to be destroyed.
-     * @param servletContextEvent The servlet context event.
-     */
-    public void contextDestroyed(final ServletContextEvent servletContextEvent)
-    {
-    }
-}
\ No newline at end of file

Modified: labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices/wsarjtx/server/TerminationParticipantInitialisation.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices/wsarjtx/server/TerminationParticipantInitialisation.java	2008-01-25 17:05:33 UTC (rev 18123)
+++ labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices/wsarjtx/server/TerminationParticipantInitialisation.java	2008-01-25 17:18:13 UTC (rev 18124)
@@ -22,16 +22,13 @@
 
 import javax.servlet.ServletContextEvent;
 import javax.servlet.ServletContextListener;
-import javax.servlet.ServletContext;
 
 import com.arjuna.webservices.HandlerRegistry;
 import com.arjuna.webservices.SoapRegistry;
 import com.arjuna.webservices.SoapService;
-import com.arjuna.webservices.ServiceRegistryWS;
 import com.arjuna.webservices.wsaddr.policy.AddressingPolicy;
 import com.arjuna.webservices.wsarj.policy.ArjunaPolicy;
 import com.arjuna.webservices.wsarjtx.ArjunaTXConstants;
-import com.arjuna.webservices.wsarjtx.ArjunaTXWSConstants;
 import com.arjuna.webservices.wsarjtx.policy.TerminationParticipantPolicy;
 import com.arjuna.services.framework.startup.Sequencer;
 

Deleted: labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices/wsarjtx/server/TerminationParticipantWSInitialisation.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices/wsarjtx/server/TerminationParticipantWSInitialisation.java	2008-01-25 17:05:33 UTC (rev 18123)
+++ labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices/wsarjtx/server/TerminationParticipantWSInitialisation.java	2008-01-25 17:18:13 UTC (rev 18124)
@@ -1,70 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. 
- * 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.wsarjtx.server;
-
-import javax.servlet.ServletContextEvent;
-import javax.servlet.ServletContextListener;
-import javax.servlet.ServletContext;
-
-import com.arjuna.webservices.HandlerRegistry;
-import com.arjuna.webservices.SoapRegistry;
-import com.arjuna.webservices.SoapService;
-import com.arjuna.webservices.ServiceRegistryWS;
-import com.arjuna.webservices.wsaddr.policy.AddressingPolicy;
-import com.arjuna.webservices.wsarj.policy.ArjunaPolicy;
-import com.arjuna.webservices.wsarjtx.ArjunaTXConstants;
-import com.arjuna.webservices.wsarjtx.ArjunaTXWSConstants;
-import com.arjuna.webservices.wsarjtx.policy.TerminationParticipantPolicy;
-import com.arjuna.services.framework.startup.Sequencer;
-
-/**
- * Activate the Terminator Coordinator service
- * @author kevin
- */
-public class TerminationParticipantWSInitialisation implements ServletContextListener
-{
-    /**
-     * The context has been initialized.
-     * @param servletContextEvent The servlet context event.
-     */
-    public void contextInitialized(final ServletContextEvent servletContextEvent)
-    {
-        ServletContext context = servletContextEvent.getServletContext();
-        String baseURI = context.getInitParameter("BaseURI");
-        final String uri = baseURI + "/" + ArjunaTXWSConstants.TERMINATION_PARTICIPANT_SERVICE_NAME;
-
-        Sequencer.Callback callback = new Sequencer.Callback(Sequencer.SEQUENCE_WSCOOR11, Sequencer.WEBAPP_WST11) {
-           public void run() {
-               // TODO work out how to configure the endpoint name here
-               final ServiceRegistryWS serviceRegistry = ServiceRegistryWS.getRegistry() ;
-               serviceRegistry.registerServiceProvider(ArjunaTXWSConstants.TERMINATION_PARTICIPANT_SERVICE_NAME, uri) ;
-           }
-        };
-    }
-
-    /**
-     * The context is about to be destroyed.
-     * @param servletContextEvent The servlet context event.
-     */
-    public void contextDestroyed(final ServletContextEvent servletContextEvent)
-    {
-    }
-}
\ No newline at end of file

Deleted: labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices/wsat/AtomicTransactionWSConstants.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices/wsat/AtomicTransactionWSConstants.java	2008-01-25 17:05:33 UTC (rev 18123)
+++ labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices/wsat/AtomicTransactionWSConstants.java	2008-01-25 17:18:13 UTC (rev 18124)
@@ -1,227 +0,0 @@
-package com.arjuna.webservices.wsat;
-
-import javax.xml.namespace.QName;
-
-/**
- * Interface containing WS-AtomicTransaction constants.
- */
-public interface AtomicTransactionWSConstants
-{
-    /**
-     * 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 completion coordinator service name.
-     */
-    public String COMPLETION_COORDINATOR_SERVICE_NAME = "CompletionCoordinatorService" ;
-    /**
-     * The completion coordinator service qname.
-     */
-    public QName COMPLETION_COORDINATOR_SERVICE_QNAME = new QName(WSAT_NAMESPACE, COMPLETION_COORDINATOR_SERVICE_NAME, WSAT_PREFIX);
-
-     /**
-     * The WSAT Completion Cordinator Port Name.
-     */
-    public String COMPLETION_COORDINATOR_PORT_NAME = "CompletionCoordinatorPortType";
-    /**
-     * The WSAT Completion Cordinator Port QName.
-     */
-    public QName COMPLETION_COORDINATOR_PORT_QNAME = new QName(WSAT_NAMESPACE, COMPLETION_COORDINATOR_PORT_NAME, WSAT_PREFIX);
-
-    /**
-      * The completion initiator service name.
-      */
-     public String COMPLETION_INITIATOR_SERVICE_NAME = "CompletionInitiatorService" ;
-     /**
-      * The completion initiator service qname.
-      */
-     public QName COMPLETION_INITIATOR_SERVICE_QNAME = new QName(WSAT_NAMESPACE, COMPLETION_INITIATOR_SERVICE_NAME, WSAT_PREFIX);
-    /**
-     * The WSAT Completion Initiator Port Name.
-     */
-    public String COMPLETION_INITIATOR_PORT_NAME = "CompletionInitiatorPortType";
-    /**
-     * The WSAT Completion Initiator Port QName.
-     */
-    public QName COMPLETION_INITIATOR_PORT_QNAME = new QName(WSAT_NAMESPACE, COMPLETION_INITIATOR_PORT_NAME, WSAT_PREFIX);
-
-    /**
-     * The coordinator service name.
-     */
-    public String COORDINATOR_SERVICE_NAME = "CoordinatorService" ;
-    /**
-     * The coordinator service qname.
-     */
-    public QName COORDINATOR_SERVICE_QNAME = new QName(WSAT_NAMESPACE, COORDINATOR_SERVICE_NAME, WSAT_PREFIX);
-    /**
-     * The WSAT Cordinator Port Name.
-     */
-    public String COORDINATOR_PORT_NAME = "CoordinatorPortType";
-    /**
-     * The WSAT Cordinator Port QName.
-     */
-    public QName COORDINATOR_PORT_QNAME = new QName(WSAT_NAMESPACE, COORDINATOR_PORT_NAME, WSAT_PREFIX);
-
-    /**
-     * The participant service name.
-     */
-    public String PARTICIPANT_SERVICE_NAME = "ParticipantService" ;
-    /**
-     * The participant service qname.
-     */
-    public QName PARTICIPANT_SERVICE_QNAME = new QName(WSAT_NAMESPACE, PARTICIPANT_SERVICE_NAME, WSAT_PREFIX);
-    /**
-     * The WSAT Participant Port Name.
-     */
-    public String PARTICIPANT_PORT_NAME = "ParticipantPortType";
-    /**
-     * The WSAT Participant Port QName.
-     */
-    public QName PARTICIPANT_PORT_QNAME = new QName(WSAT_NAMESPACE, PARTICIPANT_PORT_NAME, WSAT_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 vote attribute.
-     */
-    public String WSAT_ATTRIBUTE_VOTE = "vote" ;
-    /**
-     * The vote QName.
-     */
-    public QName WSAT_ATTRIBUTE_VOTE_QNAME = new QName(WSAT_ATTRIBUTE_NAMESPACE, WSAT_ATTRIBUTE_VOTE, WSAT_ATTRIBUTE_PREFIX) ;
-    /**
-     * The outcome attribute.
-     */
-    public String WSAT_ATTRIBUTE_OUTCOME = "outcome" ;
-    /**
-     * The outcome QName.
-     */
-    public QName WSAT_ATTRIBUTE_OUTCOME_QNAME = new QName(WSAT_ATTRIBUTE_NAMESPACE, WSAT_ATTRIBUTE_OUTCOME, WSAT_ATTRIBUTE_PREFIX) ;
-
-    /**
-     * 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 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" ;
-}

Deleted: labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices/wsat/CoordinatorInboundEventsWS.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices/wsat/CoordinatorInboundEventsWS.java	2008-01-25 17:05:33 UTC (rev 18123)
+++ labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices/wsat/CoordinatorInboundEventsWS.java	2008-01-25 17:18:13 UTC (rev 18124)
@@ -1,61 +0,0 @@
-package com.arjuna.webservices.wsat;
-
-import com.arjuna.webservices.wsarj.ArjunaContextWS;
-import com.arjuna.webservices.SoapFault;
-
-import javax.xml.ws.addressing.AddressingProperties;
-import javax.xml.ws.wsaddressing.W3CEndpointReference;
-
-import org.oasis_open.docs.ws_tx.wsat._2006._06.Notification;
-
-/**
- * The Coordinator events.
- */
-public interface CoordinatorInboundEventsWS
-{
-    /**
-     * Handle the aborted event.
-     * @param aborted The aborted notification.
-     * @param addressingContext The addressing context.
-     * @param arjunaContext The arjuna context.
-     */
-    public void aborted(final Notification aborted, final AddressingProperties addressingContext, final ArjunaContextWS arjunaContext) ;
-
-    /**
-     * Handle the committed event.
-     * @param committed The committed notification.
-     * @param addressingContext The addressing context.
-     * @param arjunaContext The arjuna context.
-     */
-    public void committed(final Notification committed, final AddressingProperties addressingContext, final ArjunaContextWS arjunaContext) ;
-
-    /**
-     * Handle the prepared event.
-     * @param prepared The prepared notification.
-     * @param addressingContext The addressing context.
-     * @param arjunaContext The arjuna context.
-     */
-    public void prepared(final Notification prepared, final AddressingProperties addressingContext, final ArjunaContextWS arjunaContext) ;
-
-    /**
-     * Handle the readOnly event.
-     * @param readOnly The readOnly notification.
-     * @param addressingContext The addressing context.
-     * @param arjunaContext The arjuna context.
-     */
-    public void readOnly(final Notification readOnly, final AddressingProperties addressingContext, final ArjunaContextWS 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 AddressingProperties addressingContext, final ArjunaContextWS arjunaContext) ;
-
-    /**
-     * Get the participant endpoint reference
-     * @return The participant endpoint reference
-     */
-    public W3CEndpointReference getParticipant();
-}

Deleted: labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices/wsat/ParticipantInboundEventsWS.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices/wsat/ParticipantInboundEventsWS.java	2008-01-25 17:05:33 UTC (rev 18123)
+++ labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices/wsat/ParticipantInboundEventsWS.java	2008-01-25 17:18:13 UTC (rev 18124)
@@ -1,52 +0,0 @@
-package com.arjuna.webservices.wsat;
-
-import com.arjuna.webservices.wsarj.ArjunaContextWS;
-import com.arjuna.webservices.SoapFault;
-
-import javax.xml.ws.addressing.AddressingProperties;
-import javax.xml.ws.wsaddressing.W3CEndpointReference;
-
-import org.oasis_open.docs.ws_tx.wsat._2006._06.Notification;
-
-/**
- * The Participant events.
- */
-public interface ParticipantInboundEventsWS
-{
-    /**
-     * Handle the commit event.
-     * @param commit The commit notification.
-     * @param addressingProperties The addressing context.
-     * @param arjunaContext The arjuna context.
-     */
-    public void commit(final Notification commit, final AddressingProperties addressingProperties, final ArjunaContextWS arjunaContext) ;
-
-    /**
-     * Handle the prepare event.
-     * @param prepare The prepare notification.
-     * @param addressingProperties The addressing context.
-     * @param arjunaContext The arjuna context.
-     */
-    public void prepare(final Notification prepare, final AddressingProperties addressingProperties, final ArjunaContextWS arjunaContext) ;
-
-    /**
-     * Handle the rollback event.
-     * @param rollback The rollback notification.
-     * @param addressingProperties The addressing context.
-     * @param arjunaContext The arjuna context.
-     */
-    public void rollback(final Notification rollback, final AddressingProperties addressingProperties, final ArjunaContextWS arjunaContext) ;
-
-    /**
-     * Handle the soap fault event.
-     * @param soapFault The soap fault.
-     * @param addressingProperties The addressing context.
-     * @param arjunaContext The arjuna context.
-     */
-    public void soapFault(final SoapFault soapFault, final AddressingProperties addressingProperties, final ArjunaContextWS arjunaContext) ;
-    /**
-     * Return the endpoint reference for the coordinator associated with this participant.
-     * @return the coordinator endpoint reference
-     */
-    public W3CEndpointReference getCoordinator();
-}

Deleted: labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices/wsat/StateWS.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices/wsat/StateWS.java	2008-01-25 17:05:33 UTC (rev 18123)
+++ labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices/wsat/StateWS.java	2008-01-25 17:18:13 UTC (rev 18124)
@@ -1,118 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. 
- * 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.wsat;
-
-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 StateWS extends Enumerated
-{
-    /**
-     * The Active state.
-     */
-    public static final StateWS STATE_ACTIVE = new StateWS("Active") ;
-    /**
-     * The Preparing state.
-     */
-    public static final StateWS STATE_PREPARING = new StateWS("Preparing") ;
-    /**
-     * The Prepared state.
-     */
-    public static final StateWS STATE_PREPARED = new StateWS("Prepared") ;
-    /**
-     * The PreparedSuccess state.
-     */
-    public static final StateWS STATE_PREPARED_SUCCESS = new StateWS("PreparedSuccess") ;
-    /**
-     * The Committing state.
-     */
-    public static final StateWS STATE_COMMITTING = new StateWS("Committing") ;
-    /**
-     * The Aborting state.
-     */
-    public static final StateWS STATE_ABORTING = new StateWS("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 value The localName of the state enumeration.
-     */
-    private StateWS(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 com.arjuna.webservices.util.InvalidEnumerationException if the value is not valid.
-     */
-    protected Enumerated resolveEnum(final Object value)
-        throws InvalidEnumerationException
-    {
-        return toStateWS((String)value) ;
-    }
-
-    /**
-     * Return the enumeration for the specified value.
-     * @param value The value.
-     * @return The enumeration.
-     * @throws com.arjuna.webservices.util.InvalidEnumerationException if the value is not valid.
-     * @message com.arjuna.webservices.wsat.StateWS_1 [com.arjuna.webservices.wsat.StateWS_1] - Invalid fault type enumeration: {0}
-     */
-    public static StateWS toStateWS(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.wsat.StateWS_1") ;
-            final String message = MessageFormat.format(pattern, new Object[] {value}) ;
-            throw new InvalidEnumerationException(message) ;
-        }
-        return (StateWS)state ;
-    }
-}
\ No newline at end of file

Deleted: labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices/wsat/client/CompletionCoordinatorClientWS.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices/wsat/client/CompletionCoordinatorClientWS.java	2008-01-25 17:05:33 UTC (rev 18123)
+++ labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices/wsat/client/CompletionCoordinatorClientWS.java	2008-01-25 17:18:13 UTC (rev 18124)
@@ -1,134 +0,0 @@
-package com.arjuna.webservices.wsat.client;
-
-import com.arjuna.webservices.ServiceRegistryWS;
-import com.arjuna.webservices.SoapFault;
-import com.arjuna.webservices.wsarj.InstanceIdentifierWS;
-import com.arjuna.webservices.wsarj.handler.InstanceIdentifierHandlerWS;
-import com.arjuna.webservices.wsat.AtomicTransactionConstants;
-import com.arjuna.webservices.wsat.AtomicTransactionWSConstants;
-import org.oasis_open.docs.ws_tx.wsat._2006._06.CompletionCoordinatorPortType;
-import org.oasis_open.docs.ws_tx.wsat._2006._06.Notification;
-
-import javax.xml.ws.BindingProvider;
-import javax.xml.ws.addressing.AddressingBuilder;
-import javax.xml.ws.addressing.AddressingProperties;
-import javax.xml.ws.addressing.AttributedURI;
-import javax.xml.ws.addressing.JAXWSAConstants;
-import javax.xml.ws.handler.Handler;
-import javax.xml.ws.soap.AddressingFeature;
-import javax.xml.ws.wsaddressing.W3CEndpointReference;
-import java.io.IOException;
-import java.net.URISyntaxException;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Map;
-
-/**
- * The Client side of the Completion Coordinator.
- * @author kevin
- */
-public class CompletionCoordinatorClientWS
-{
-    /**
-     * The client singleton.
-     */
-    private static final CompletionCoordinatorClientWS CLIENT = new CompletionCoordinatorClientWS() ;
-
-    /**
-     * The commit action.
-     */
-    private AttributedURI commitAction = null;
-    /**
-     * The rollback action.
-     */
-    private AttributedURI rollbackAction = null;
-
-    /**
-     * The completion initiator URI for replies.
-     */
-    private AttributedURI completionInitiator ;
-
-    /**
-     * Construct the completion coordinator client.
-     */
-    private CompletionCoordinatorClientWS()
-    {
-        final AddressingBuilder builder = AddressingBuilder.getAddressingBuilder();
-        try {
-            commitAction = builder.newURI(AtomicTransactionWSConstants.WSAT_ACTION_COMMIT);
-            rollbackAction = builder.newURI(AtomicTransactionWSConstants.WSAT_ACTION_ROLLBACK);
-        } catch (URISyntaxException use) {
-            // TODO - log fault and throw exception
-        }
-        // final HandlerRegistry handlerRegistry = new HandlerRegistry() ;
-
-        // Add WS-Addressing
-        // AddressingPolicy.register(handlerRegistry) ;
-        // Add client policies
-        // ClientPolicy.register(handlerRegistry) ;
-
-        final String completionInitiatorURI =
-            ServiceRegistryWS.getRegistry().getServiceURI(AtomicTransactionWSConstants.COMPLETION_INITIATOR_SERVICE_NAME) ;
-        try {
-            completionInitiator = builder.newURI(completionInitiatorURI) ;
-        } catch (URISyntaxException use) {
-            // TODO - log fault and throw exception
-        }
-    }
-
-    /**
-     * Send a commit request.
-     * @param addressingProperties addressing context initialised with to and message ID.
-     * @param identifier The identifier of the initiator.
-     * @throws com.arjuna.webservices.SoapFault For any errors.
-     * @throws java.io.IOException for any transport errors.
-     */
-    public void sendCommit(final W3CEndpointReference endpoint, final AddressingProperties addressingProperties, final InstanceIdentifierWS identifier)
-        throws SoapFault, IOException
-    {
-        CompletionCoordinatorPortType port = getPort(endpoint, addressingProperties, commitAction);
-        Notification commit = new Notification();
-
-        port.commitOperation(commit);
-    }
-
-    /**
-     * Send a rollback request.
-     * @param addressingProperties addressing context initialised with to and message ID.
-     * @param identifier The identifier of the initiator.
-     * @throws com.arjuna.webservices.SoapFault For any errors.
-     * @throws java.io.IOException for any transport errors.
-     */
-    public void sendRollback(final W3CEndpointReference endpoint, final AddressingProperties addressingProperties, final InstanceIdentifierWS identifier)
-        throws SoapFault, IOException
-    {
-        CompletionCoordinatorPortType port = getPort(endpoint, addressingProperties, rollbackAction);
-        Notification rollback = new Notification();
-                
-        port.rollbackOperation(rollback);
-    }
-
-    /**
-     * Get the Completion Coordinator client singleton.
-     * @return The Completion Coordinator client singleton.
-     */
-    public static CompletionCoordinatorClientWS getClient()
-    {
-        return CLIENT;
-    }
-
-    /**
-     * obtain a port from the endpoint configured with the instance identifier handler and the supplied
-     * addressing properties supplemented with the given action
-     * @param endpoint
-     * @param addressingProperties
-     * @param action
-     * @return
-     */
-    private CompletionCoordinatorPortType getPort(final W3CEndpointReference endpoint,
-                                                  final AddressingProperties addressingProperties,
-                                                  final AttributedURI action)
-    {
-        return WSATClientWS.getCompletionCoordinatorPort(endpoint, action, addressingProperties);
-    }
-}

Deleted: labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices/wsat/client/CompletionInitiatorClientWS.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices/wsat/client/CompletionInitiatorClientWS.java	2008-01-25 17:05:33 UTC (rev 18123)
+++ labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices/wsat/client/CompletionInitiatorClientWS.java	2008-01-25 17:18:13 UTC (rev 18124)
@@ -1,153 +0,0 @@
-package com.arjuna.webservices.wsat.client;
-
-import com.arjuna.webservices.ServiceRegistryWS;
-import com.arjuna.webservices.SoapFault;
-import com.arjuna.webservices.wsarj.InstanceIdentifierWS;
-import com.arjuna.webservices.wsarj.handler.InstanceIdentifierHandlerWS;
-import com.arjuna.webservices.wsat.AtomicTransactionConstants;
-import com.arjuna.webservices.wsat.AtomicTransactionWSConstants;
-import org.oasis_open.docs.ws_tx.wsat._2006._06.CompletionInitiatorPortType;
-import org.oasis_open.docs.ws_tx.wsat._2006._06.Notification;
-
-import javax.xml.ws.BindingProvider;
-import javax.xml.ws.addressing.AddressingBuilder;
-import javax.xml.ws.addressing.AddressingProperties;
-import javax.xml.ws.addressing.AttributedURI;
-import javax.xml.ws.addressing.JAXWSAConstants;
-import javax.xml.ws.handler.Handler;
-import javax.xml.ws.soap.AddressingFeature;
-import javax.xml.ws.wsaddressing.W3CEndpointReference;
-import java.io.IOException;
-import java.net.URISyntaxException;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Map;
-
-/**
- * The Client side of the Completion Initiator.
- * @author kevin
- */
-public class CompletionInitiatorClientWS
-{
-    /**
-     * The client singleton.
-     */
-    private static final CompletionInitiatorClientWS CLIENT = new CompletionInitiatorClientWS() ;
-
-    /**
-     * The committed action.
-     */
-    private AttributedURI committedAction = null;
-    /**
-     * The aborted action.
-     */
-    private AttributedURI abortedAction = null;
-    /**
-     * The fault action.
-     */
-    private AttributedURI faultAction = null;
-
-    /**
-     * The completion coordinator URI for replies.
-     */
-    private AttributedURI completionCoordinator ;
-
-    /**
-     * Construct the completion initiator client.
-     */
-    private CompletionInitiatorClientWS()
-    {
-        final AddressingBuilder builder = AddressingBuilder.getAddressingBuilder();
-        try {
-            committedAction = builder.newURI(AtomicTransactionWSConstants.WSAT_ACTION_COMMITTED);
-            abortedAction = builder.newURI(AtomicTransactionWSConstants.WSAT_ACTION_ABORTED);
-            faultAction = builder.newURI(AtomicTransactionWSConstants.WSAT_ACTION_FAULT);
-        } catch (URISyntaxException use) {
-            // TODO - log fault and throw exception
-        }
-        // final HandlerRegistry handlerRegistry = new HandlerRegistry() ;
-
-        // Add WS-Addressing
-        // AddressingPolicy.register(handlerRegistry) ;
-        // Add client policies
-        // ClientPolicy.register(handlerRegistry) ;
-
-        final String completionCoordinatorURI =
-            ServiceRegistryWS.getRegistry().getServiceURI(AtomicTransactionWSConstants.COMPLETION_COORDINATOR_SERVICE_NAME) ;
-        try {
-            completionCoordinator = builder.newURI(completionCoordinatorURI) ;
-        } catch (URISyntaxException use) {
-            // TODO - log fault and throw exception
-        }
-    }
-
-    /**
-     * Send a committed request.
-     * @param addressingProperties addressing context initialised with to and message ID.
-     * @param identifier The identifier of the initiator.
-     * @throws com.arjuna.webservices.SoapFault For any errors.
-     * @throws java.io.IOException for any transport errors.
-     */
-    public void sendCommitted(final W3CEndpointReference participant, final AddressingProperties addressingProperties, final InstanceIdentifierWS identifier)
-        throws SoapFault, IOException
-    {
-        CompletionInitiatorPortType port = getPort(participant, addressingProperties, committedAction);
-        Notification commited = new Notification();
-
-        port.committedOperation(commited);
-    }
-
-    /**
-     * Send an aborted request.
-     * @param addressingProperties addressing context initialised with to and message ID.
-     * @param identifier The identifier of the initiator.
-     * @throws com.arjuna.webservices.SoapFault For any errors.
-     * @throws java.io.IOException for any transport errors.
-     */
-    public void sendAborted(final W3CEndpointReference participant, final AddressingProperties addressingProperties, final InstanceIdentifierWS identifier)
-        throws SoapFault, IOException
-    {
-        CompletionInitiatorPortType port = getPort(participant, addressingProperties, abortedAction);
-        Notification aborted = new Notification();
-
-        port.abortedOperation(aborted);
-    }
-
-    /**
-     * Send a fault.
-     * @param addressingProperties The addressing context.
-     * @param soapFault The SOAP fault.
-     * @param identifier The arjuna instance identifier.
-     * @throws com.arjuna.webservices.SoapFault For any errors.
-     * @throws java.io.IOException for any transport errors.
-     */
-    public void sendSoapFault(final W3CEndpointReference participant, final AddressingProperties addressingProperties, final SoapFault soapFault, final InstanceIdentifierWS identifier)
-        throws SoapFault, IOException
-    {
-        // TODO - we only get here if we have no endpoitn so all we can do is log an error!
-    }
-
-    /**
-     * Get the Completion Coordinator client singleton.
-     * @return The Completion Coordinator client singleton.
-     */
-    public static CompletionInitiatorClientWS getClient()
-    {
-        return CLIENT;
-    }
-
-    /**
-     * obtain a port from the participant endpoint configured with the instance identifier handler and the supplied
-     * addressing properties supplemented with the given action
-     * @param participant
-     * @param addressingProperties
-     * @param action
-     * @return
-     */
-    private CompletionInitiatorPortType getPort(final W3CEndpointReference participant,
-                                                final AddressingProperties addressingProperties,
-                                                final AttributedURI action)
-    {
-        return WSATClientWS.getCompletionInitiatorPort(participant, action, addressingProperties);
-    }
-}

Deleted: labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices/wsat/client/CoordinatorClientWS.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices/wsat/client/CoordinatorClientWS.java	2008-01-25 17:05:33 UTC (rev 18123)
+++ labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices/wsat/client/CoordinatorClientWS.java	2008-01-25 17:18:13 UTC (rev 18124)
@@ -1,195 +0,0 @@
-package com.arjuna.webservices.wsat.client;
-
-import com.arjuna.webservices.ServiceRegistryWS;
-import com.arjuna.webservices.SoapFault;
-import com.arjuna.webservices.wsarj.InstanceIdentifierWS;
-import com.arjuna.webservices.wsarj.handler.InstanceIdentifierHandlerWS;
-import com.arjuna.webservices.wsat.AtomicTransactionConstants;
-import com.arjuna.webservices.wsat.AtomicTransactionWSConstants;
-import org.oasis_open.docs.ws_tx.wsat._2006._06.CoordinatorPortType;
-import org.oasis_open.docs.ws_tx.wsat._2006._06.Notification;
-
-import javax.xml.ws.BindingProvider;
-import javax.xml.ws.addressing.AddressingBuilder;
-import javax.xml.ws.addressing.AddressingProperties;
-import javax.xml.ws.addressing.AttributedURI;
-import javax.xml.ws.addressing.JAXWSAConstants;
-import javax.xml.ws.handler.Handler;
-import javax.xml.ws.soap.AddressingFeature;
-import javax.xml.ws.wsaddressing.W3CEndpointReference;
-import java.io.IOException;
-import java.net.URISyntaxException;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Map;
-
-/**
- * The Client side of the Coordinator.
- * @author kevin
- */
-public class CoordinatorClientWS
-{
-    /**
-     * The client singleton.
-     */
-    private static final CoordinatorClientWS CLIENT = new CoordinatorClientWS() ;
-
-    /**
-     * The prepared action.
-     */
-    private AttributedURI preparedAction = null;
-    /**
-     * The aborted action.
-     */
-    private AttributedURI abortedAction = null;
-    /**
-     * The read only action.
-     */
-    private AttributedURI readOnlyAction = null;
-    /**
-     * The committed action.
-     */
-    private AttributedURI committedAction = null;
-    /**
-     * The fault action.
-     */
-    private AttributedURI faultAction = null;
-
-    /**
-     * The participant URI for replies.
-     */
-    private AttributedURI participant ;
-
-    /**
-     * Construct the coordinator client.
-     */
-    private CoordinatorClientWS()
-    {
-        final AddressingBuilder builder = AddressingBuilder.getAddressingBuilder();
-        try {
-            preparedAction = builder.newURI(AtomicTransactionWSConstants.WSAT_ACTION_PREPARED);
-            abortedAction = builder.newURI(AtomicTransactionWSConstants.WSAT_ACTION_ABORTED);
-            readOnlyAction = builder.newURI(AtomicTransactionWSConstants.WSAT_ACTION_READ_ONLY);
-            committedAction = builder.newURI(AtomicTransactionWSConstants.WSAT_ACTION_COMMITTED);
-            faultAction = builder.newURI(AtomicTransactionWSConstants.WSAT_ACTION_FAULT);
-        } catch (URISyntaxException use) {
-            // TODO - log fault and throw exception
-        }
-        // final HandlerRegistry handlerRegistry = new HandlerRegistry() ;
-
-        // Add WS-Addressing
-        // AddressingPolicy.register(handlerRegistry) ;
-        // Add client policies
-        // ClientPolicy.register(handlerRegistry) ;
-
-        final String participantURI =
-            ServiceRegistryWS.getRegistry().getServiceURI(AtomicTransactionWSConstants.PARTICIPANT_SERVICE_NAME);
-        try {
-            participant = builder.newURI(participantURI);
-        } catch (URISyntaxException use) {
-            // TODO - log fault and throw exception
-        }
-    }
-
-    /**
-     * Send a prepared request.
-     * @param addressingProperties addressing context initialised with to and message ID.
-     * @param identifier The identifier of the initiator.
-     * @throws com.arjuna.webservices.SoapFault For any SOAP errors.
-     * @throws java.io.IOException for any transport errors.
-     */
-    public void sendPrepared(final W3CEndpointReference endpoint, final AddressingProperties addressingProperties, final InstanceIdentifierWS identifier)
-        throws SoapFault, IOException
-    {
-        CoordinatorPortType port = getPort(endpoint, addressingProperties, preparedAction);
-        Notification prepared = new Notification();
-
-        port.preparedOperation(prepared);
-    }
-
-    /**
-     * Send an aborted request.
-     * @param addressingProperties addressing context initialised with to and message ID.
-     * @param identifier The identifier of the initiator.
-     * @throws com.arjuna.webservices.SoapFault For any SOAP errors.
-     * @throws java.io.IOException for any transport errors.
-     */
-    public void sendAborted(final W3CEndpointReference endpoint, final AddressingProperties addressingProperties, final InstanceIdentifierWS identifier)
-        throws SoapFault, IOException
-    {
-        CoordinatorPortType port = getPort(endpoint, addressingProperties, abortedAction);
-        Notification aborted = new Notification();
-
-        port.abortedOperation(aborted);
-    }
-
-    /**
-     * Send a read only request.
-     * @param addressingProperties addressing context initialised with to and message ID.
-     * @param identifier The identifier of the initiator.
-     * @throws com.arjuna.webservices.SoapFault For any SOAP errors.
-     * @throws java.io.IOException for any transport errors.
-     */
-    public void sendReadOnly(final W3CEndpointReference endpoint, final AddressingProperties addressingProperties, final InstanceIdentifierWS identifier)
-        throws SoapFault, IOException
-    {
-        CoordinatorPortType port = getPort(endpoint, addressingProperties, readOnlyAction);
-        Notification readOnly = new Notification();
-
-        port.readOnlyOperation(readOnly);
-    }
-
-    /**
-     * Send a committed request.
-     * @param addressingProperties addressing context initialised with to and message ID.
-     * @param identifier The identifier of the initiator.
-     * @throws com.arjuna.webservices.SoapFault For any SOAP errors.
-     * @throws java.io.IOException for any transport errors.
-     */
-    public void sendCommitted(final W3CEndpointReference endpoint, final AddressingProperties addressingProperties, final InstanceIdentifierWS identifier)
-        throws SoapFault, IOException
-    {
-        CoordinatorPortType port = getPort(endpoint, addressingProperties, committedAction);
-        Notification committed = new Notification();
-
-        port.committedOperation(committed);
-    }
-
-    /**
-     * Send a fault.
-     * @param addressingProperties The addressing context.
-     * @param soapFault The SOAP fault.
-     * @param identifier The arjuna instance identifier.
-     * @throws com.arjuna.webservices.SoapFault For any SOAP errors.
-     * @throws java.io.IOException for any transport errors.
-     */
-    public void sendSoapFault(final W3CEndpointReference endpoint, final AddressingProperties addressingProperties, final SoapFault soapFault, final InstanceIdentifierWS identifier)
-        throws SoapFault, IOException
-    {
-        // TODO - we cannot do this without an endpoint so all we can do is log a message!
-    }
-
-    /**
-     * Get the Completion Coordinator client singleton.
-     * @return The Completion Coordinator client singleton.
-     */
-    public static CoordinatorClientWS getClient()
-    {
-        return CLIENT;
-    }
-
-    /**
-     * obtain a port from the participant endpoint configured with the instance identifier handler and the supplied
-     * addressing properties supplemented with the given action
-     * @param participant
-     * @param addressingProperties
-     * @param action
-     * @return
-     */
-    private CoordinatorPortType getPort(final W3CEndpointReference participant,
-                                                final AddressingProperties addressingProperties,
-                                                final AttributedURI action)
-    {
-        return WSATClientWS.getCoordinatorPort(participant, action, addressingProperties);
-    }
-}

Deleted: labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices/wsat/client/ParticipantClientWS.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices/wsat/client/ParticipantClientWS.java	2008-01-25 17:05:33 UTC (rev 18123)
+++ labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices/wsat/client/ParticipantClientWS.java	2008-01-25 17:18:13 UTC (rev 18124)
@@ -1,173 +0,0 @@
-package com.arjuna.webservices.wsat.client;
-
-import com.arjuna.webservices.ServiceRegistryWS;
-import com.arjuna.webservices.SoapFault;
-import com.arjuna.webservices.wsarj.InstanceIdentifierWS;
-import com.arjuna.webservices.wsarj.handler.InstanceIdentifierHandlerWS;
-import com.arjuna.webservices.wsat.AtomicTransactionConstants;
-import com.arjuna.webservices.wsat.AtomicTransactionWSConstants;
-import org.oasis_open.docs.ws_tx.wsat._2006._06.Notification;
-import org.oasis_open.docs.ws_tx.wsat._2006._06.ParticipantPortType;
-
-import javax.xml.ws.BindingProvider;
-import javax.xml.ws.addressing.AddressingBuilder;
-import javax.xml.ws.addressing.AddressingProperties;
-import javax.xml.ws.addressing.AttributedURI;
-import javax.xml.ws.addressing.JAXWSAConstants;
-import javax.xml.ws.handler.Handler;
-import javax.xml.ws.soap.AddressingFeature;
-import javax.xml.ws.wsaddressing.W3CEndpointReference;
-import java.io.IOException;
-import java.net.URISyntaxException;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Map;
-
-/**
- * The Client side of the Participant.
- * @author kevin
- */
-public class ParticipantClientWS
-{
-    /**
-     * The client singleton.
-     */
-    private static final ParticipantClientWS CLIENT = new ParticipantClientWS() ;
-
-    /**
-     * The prepare action.
-     */
-    private AttributedURI prepareAction = null;
-    /**
-     * The commit action.
-     */
-    private AttributedURI commitAction = null;
-    /**
-     * The rollback action.
-     */
-    private AttributedURI rollbackAction = null;
-    /**
-     * The SOAP fault action.
-     */
-    private AttributedURI faultAction;
-
-    /**
-     * The coordinator URI for replies.
-     */
-    private AttributedURI coordinator ;
-
-    /**
-     * Construct the completion initiator client.
-     */
-    {
-        final AddressingBuilder builder = AddressingBuilder.getAddressingBuilder();
-        try {
-            prepareAction = builder.newURI(AtomicTransactionWSConstants.WSAT_ACTION_PREPARE);
-            commitAction = builder.newURI(AtomicTransactionWSConstants.WSAT_ACTION_COMMIT);
-            rollbackAction = builder.newURI(AtomicTransactionWSConstants.WSAT_ACTION_ROLLBACK);
-            faultAction = builder.newURI(AtomicTransactionWSConstants.WSAT_ACTION_FAULT);
-        } catch (URISyntaxException use) {
-            // TODO - log fault and throw exception
-        }
-        // final HandlerRegistry handlerRegistry = new HandlerRegistry() ;
-
-        // Add WS-Addressing
-        // AddressingPolicy.register(handlerRegistry) ;
-        // Add client policies
-        // ClientPolicy.register(handlerRegistry) ;
-
-        final String coordinatorURI = ServiceRegistryWS.getRegistry().getServiceURI(AtomicTransactionWSConstants.COORDINATOR_SERVICE_NAME);
-        try {
-            coordinator = builder.newURI(coordinatorURI);
-        } catch (URISyntaxException use) {
-            // TODO - log fault and throw exception
-        }
-
-    }
-
-    /**
-     * Send a prepare request.
-     * @param addressingProperties addressing context initialised with to and message ID.
-     * @param identifier The identifier of the initiator.
-     * @throws com.arjuna.webservices.SoapFault For any errors.
-     * @throws java.io.IOException for any transport errors.
-     */
-    public void sendPrepare(final W3CEndpointReference endpoint, final AddressingProperties addressingProperties, final InstanceIdentifierWS identifier)
-        throws SoapFault, IOException
-    {
-        ParticipantPortType port = getPort(endpoint, addressingProperties, prepareAction);
-        Notification prepare = new Notification();
-
-        port.prepareOperation(prepare);
-    }
-
-    /**
-     * Send a commit request.
-     * @param addressingProperties addressing context initialised with to and message ID.
-     * @param identifier The identifier of the initiator.
-     * @throws com.arjuna.webservices.SoapFault For any errors.
-     * @throws java.io.IOException for any transport errors.
-     */
-    public void sendCommit(final W3CEndpointReference endpoint, final AddressingProperties addressingProperties, final InstanceIdentifierWS identifier)
-        throws SoapFault, IOException
-    {
-        ParticipantPortType port = getPort(endpoint, addressingProperties, commitAction);
-        Notification commit = new Notification();
-
-        port.commitOperation(commit);
-    }
-
-    /**
-     * Send a rollback request.
-     * @param addressingProperties addressing context initialised with to and message ID.
-     * @param identifier The identifier of the initiator.
-     * @throws com.arjuna.webservices.SoapFault For any errors.
-     * @throws java.io.IOException for any transport errors.
-     */
-    public void sendRollback(final W3CEndpointReference endpoint, final AddressingProperties addressingProperties, final InstanceIdentifierWS identifier)
-        throws SoapFault, IOException
-    {
-        ParticipantPortType port = getPort(endpoint, addressingProperties, rollbackAction);
-        Notification rollback = new Notification();
-
-        port.rollbackOperation(rollback);
-    }
-
-    /**
-     * Send a fault.
-     * @param addressingProperties The addressing context.
-     * @param soapFault The SOAP fault.
-     * @param identifier The arjuna instance identifier.
-     * @throws com.arjuna.webservices.SoapFault For any errors.
-     * @throws java.io.IOException for any transport errors.
-     */
-    public void sendSoapFault(final W3CEndpointReference endpoint, final AddressingProperties addressingProperties, final SoapFault soapFault, final InstanceIdentifierWS identifier)
-        throws SoapFault, IOException
-    {
-        // TODO - we cannot do this without an ednpoint so all we can do is log an error message!
-    }
-
-    /**
-     * Get the Completion Coordinator client singleton.
-     * @return The Completion Coordinator client singleton.
-     */
-    public static ParticipantClientWS getClient()
-    {
-        return CLIENT;
-    }
-
-    /**
-     * obtain a port from the participant endpoint configured with the instance identifier handler and the supplied
-     * addressing properties supplemented with the given action
-     * @param participant
-     * @param addressingProperties
-     * @param action
-     * @return
-     */
-    private ParticipantPortType getPort(final W3CEndpointReference participant,
-                                                final AddressingProperties addressingProperties,
-                                                final AttributedURI action)
-    {
-        return WSATClientWS.getParticipantPort(participant, action, addressingProperties);
-    }
-}

Deleted: labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices/wsat/client/WSATClientWS.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices/wsat/client/WSATClientWS.java	2008-01-25 17:05:33 UTC (rev 18123)
+++ labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices/wsat/client/WSATClientWS.java	2008-01-25 17:18:13 UTC (rev 18124)
@@ -1,236 +0,0 @@
-package com.arjuna.webservices.wsat.client;
-
-import com.arjuna.webservices.wsarj.handler.InstanceIdentifierHandlerWS;
-import org.oasis_open.docs.ws_tx.wsat._2006._06.*;
-import org.jboss.ws.extensions.addressing.jaxws.WSAddressingClientHandler;
-
-import javax.xml.ws.BindingProvider;
-import javax.xml.ws.addressing.AddressingBuilder;
-import javax.xml.ws.addressing.AddressingProperties;
-import javax.xml.ws.addressing.AttributedURI;
-import javax.xml.ws.addressing.JAXWSAConstants;
-import javax.xml.ws.handler.Handler;
-import javax.xml.ws.soap.AddressingFeature;
-import javax.xml.ws.wsaddressing.W3CEndpointReference;
-import java.net.URISyntaxException;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Map;
-
-/**
- * Created by IntelliJ IDEA.
- * User: adinn
- * Date: Oct 7, 2007
- * Time: 3:14:28 PM
- * To change this template use File | Settings | File Templates.
- */
-public class WSATClientWS
-{
-    // TODO -- do we really need a thread local here or can we just use one service?
-    /**
-     *  thread local which maintains a per thread coordinator service instance
-     */
-    private static ThreadLocal<CoordinatorService> coordinatorService = new ThreadLocal<CoordinatorService>();
-
-    /**
-     *  thread local which maintains a per thread participant service instance
-     */
-    private static ThreadLocal<ParticipantService> participantService = new ThreadLocal<ParticipantService>();
-
-    /**
-     *  thread local which maintains a per thread completion coordinator service instance
-     */
-    private static ThreadLocal<CompletionCoordinatorService> completionCoordinatorService = new ThreadLocal<CompletionCoordinatorService>();
-
-    /**
-     *  thread local which maintains a per thread completion initiator service instance
-     */
-    private static ThreadLocal<CompletionInitiatorService> completionInitiatorService = new ThreadLocal<CompletionInitiatorService>();
-
-    /**
-     *  builder used to construct addressing info for calls
-     */
-    private static AddressingBuilder builder = AddressingBuilder.getAddressingBuilder();
-
-    /**
-     * fetch a coordinator service unique to the current thread
-     * @return
-     */
-    private static synchronized CoordinatorService getCoordinatorService()
-    {
-        if (coordinatorService.get() == null) {
-            coordinatorService.set(new CoordinatorService());
-        }
-        return coordinatorService.get();
-    }
-
-    /**
-     * fetch a participant service unique to the current thread
-     * @return
-     */
-    private static synchronized ParticipantService getParticipantService()
-    {
-        if (participantService.get() == null) {
-            participantService.set(new ParticipantService());
-        }
-        return participantService.get();
-    }
-
-    /**
-     * fetch a completion coordinator service unique to the current thread
-     * @return
-     */
-    private static synchronized CompletionCoordinatorService getCompletionCoordinatorService()
-    {
-        if (completionCoordinatorService.get() == null) {
-            completionCoordinatorService.set(new CompletionCoordinatorService());
-        }
-        return completionCoordinatorService.get();
-    }
-
-    /**
-     * fetch a completion initiator service unique to the current thread
-     * @return
-     */
-    private static synchronized CompletionInitiatorService getCompletionInitiatorService()
-    {
-        if (completionInitiatorService.get() == null) {
-            completionInitiatorService.set(new CompletionInitiatorService());
-        }
-        return completionInitiatorService.get();
-    }
-
-    public static CoordinatorPortType getCoordinatorPort(W3CEndpointReference endpointReference,
-                                                         AttributedURI action,
-                                                         AddressingProperties addressingProperties)
-    {
-        CoordinatorService service = getCoordinatorService();
-        CoordinatorPortType port = service.getPort(endpointReference, CoordinatorPortType.class, new AddressingFeature(true, true));
-        BindingProvider bindingProvider = (BindingProvider)port;
-        /*
-         * we need to configure an instance identifier handler for this port to pass the tx context either
-         * outgoing or returning. We also have to add the the WSAdressing client handler to ensure that the
-         * addressing properties are encoded into the SOAP message
-         */
-        List<Handler> customHandlerChain = new ArrayList<Handler>();
-        customHandlerChain.add(new InstanceIdentifierHandlerWS());
-        customHandlerChain.add(new WSAddressingClientHandler());
-		bindingProvider.getBinding().setHandlerChain(customHandlerChain);
-        // the address will have been pulled out of the endpoint by getPort but we still have to set it in the
-        // addressing properties along with the action and message id
-        Map<String, Object> requestContext = bindingProvider.getRequestContext();
-        String address = (String)requestContext.get(BindingProvider.ENDPOINT_ADDRESS_PROPERTY);
-        try {
-            addressingProperties.setTo(builder.newURI(address));
-        } catch (URISyntaxException use) {
-            // TODO -- log unexpected error here
-        }
-        addressingProperties.setAction(action);
-        requestContext.put(JAXWSAConstants.CLIENT_ADDRESSING_PROPERTIES, addressingProperties);
-	    // jbossws should do this for us . . .
-	    requestContext.put(JAXWSAConstants.CLIENT_ADDRESSING_PROPERTIES_OUTBOUND, addressingProperties);
-
-        return port;
-    }
-
-    // don't think we ever need this as we get a registration port from the endpoint ref returned by
-    // the activation port request
-    public static ParticipantPortType getParticipantPort(W3CEndpointReference endpointReference,
-                                                         AttributedURI action,
-                                                         AddressingProperties addressingProperties)
-    {
-        ParticipantService service = getParticipantService();
-        ParticipantPortType port = service.getPort(endpointReference, ParticipantPortType.class, new AddressingFeature(true, true));
-        BindingProvider bindingProvider = (BindingProvider)port;
-        /*
-         * we need to configure an instance identifier handler for this port to pass the tx context either
-         * outgoing or returning. We also have to add the the WSAdressing client handler to ensure that the
-         * addressing properties are encoded into the SOAP message
-         */
-        List<Handler> customHandlerChain = new ArrayList<Handler>();
-        customHandlerChain.add(new InstanceIdentifierHandlerWS());
-        customHandlerChain.add(new WSAddressingClientHandler());
-		bindingProvider.getBinding().setHandlerChain(customHandlerChain);
-        // the address will have been pulled out of the endpoint by getPort but we still have to set it in the
-        // addressing properties along with the action and message id
-        Map<String, Object> requestContext = bindingProvider.getRequestContext();
-        String address = (String)requestContext.get(BindingProvider.ENDPOINT_ADDRESS_PROPERTY);
-        try {
-            addressingProperties.setTo(builder.newURI(address));
-        } catch (URISyntaxException use) {
-            // TODO -- log unexpected error here
-        }
-        addressingProperties.setAction(action);
-        requestContext.put(JAXWSAConstants.CLIENT_ADDRESSING_PROPERTIES, addressingProperties);
-	    // jbossws should do this for us . . .
-	    requestContext.put(JAXWSAConstants.CLIENT_ADDRESSING_PROPERTIES_OUTBOUND, addressingProperties);
-
-        return port;
-    }
-
-    public static CompletionCoordinatorPortType getCompletionCoordinatorPort(W3CEndpointReference endpointReference,
-                                                                             AttributedURI action,
-                                                                             AddressingProperties addressingProperties)
-    {
-        CompletionCoordinatorService service = getCompletionCoordinatorService();
-        CompletionCoordinatorPortType port = service.getPort(endpointReference, CompletionCoordinatorPortType.class, new AddressingFeature(true, true));
-        BindingProvider bindingProvider = (BindingProvider)port;
-        /*
-         * we need to configure an instance identifier handler for this port to pass the tx context either
-         * outgoing or returning. We also have to add the the WSAdressing client handler to ensure that the
-         * addressing properties are encoded into the SOAP message
-         */
-        List<Handler> customHandlerChain = new ArrayList<Handler>();
-        customHandlerChain.add(new InstanceIdentifierHandlerWS());
-        customHandlerChain.add(new WSAddressingClientHandler());
-		bindingProvider.getBinding().setHandlerChain(customHandlerChain);
-        // the address will have been pulled out of the endpoint by getPort but we still have to set it in the
-        // addressing properties along with the action and message id
-        Map<String, Object> requestContext = bindingProvider.getRequestContext();
-        String address = (String)requestContext.get(BindingProvider.ENDPOINT_ADDRESS_PROPERTY);
-        try {
-            addressingProperties.setTo(builder.newURI(address));
-        } catch (URISyntaxException use) {
-            // TODO -- log unexpected error here
-        }
-        addressingProperties.setAction(action);
-        requestContext.put(JAXWSAConstants.CLIENT_ADDRESSING_PROPERTIES, addressingProperties);
-	    // jbossws should do this for us . . .
-	    requestContext.put(JAXWSAConstants.CLIENT_ADDRESSING_PROPERTIES_OUTBOUND, addressingProperties);
-
-        return port;
-    }
-
-    public static CompletionInitiatorPortType getCompletionInitiatorPort(W3CEndpointReference endpointReference,
-                                                                         AttributedURI action,
-                                                                         AddressingProperties addressingProperties)
-    {
-        CompletionInitiatorService service = getCompletionInitiatorService();
-        CompletionInitiatorPortType port = service.getPort(endpointReference, CompletionInitiatorPortType.class, new AddressingFeature(true, true));
-        BindingProvider bindingProvider = (BindingProvider)port;
-        /*
-         * we need to configure an instance identifier handler for this port to pass the tx context either
-         * outgoing or returning. We also have to add the the WSAdressing client handler to ensure that the
-         * addressing properties are encoded into the SOAP message
-         */
-        List<Handler> customHandlerChain = new ArrayList<Handler>();
-        customHandlerChain.add(new InstanceIdentifierHandlerWS());
-        customHandlerChain.add(new WSAddressingClientHandler());
-		bindingProvider.getBinding().setHandlerChain(customHandlerChain);
-        // the address will have been pulled out of the endpoint by getPort but we still have to set it in the
-        // addressing properties along with the action and message id
-        Map<String, Object> requestContext = bindingProvider.getRequestContext();
-        String address = (String)requestContext.get(BindingProvider.ENDPOINT_ADDRESS_PROPERTY);
-        try {
-            addressingProperties.setTo(builder.newURI(address));
-        } catch (URISyntaxException use) {
-            // TODO -- log unexpected error here
-        }
-        addressingProperties.setAction(action);
-        requestContext.put(JAXWSAConstants.CLIENT_ADDRESSING_PROPERTIES, addressingProperties);
-	    // jbossws should do this for us . . .
-	    requestContext.put(JAXWSAConstants.CLIENT_ADDRESSING_PROPERTIES_OUTBOUND, addressingProperties);
-
-        return port;
-    }
-}
\ No newline at end of file

Deleted: labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices/wsat/processors/CompletionCoordinatorProcessorWS.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices/wsat/processors/CompletionCoordinatorProcessorWS.java	2008-01-25 17:05:33 UTC (rev 18123)
+++ labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices/wsat/processors/CompletionCoordinatorProcessorWS.java	2008-01-25 17:18:13 UTC (rev 18124)
@@ -1,72 +0,0 @@
-package com.arjuna.webservices.wsat.processors;
-
-import com.arjuna.wst.CompletionCoordinatorParticipant;
-import com.arjuna.wst.CompletionCoordinatorParticipantWS;
-import com.arjuna.webservices.wsarj.ArjunaContextWS;
-import javax.xml.ws.addressing.AddressingProperties;
-
-import org.oasis_open.docs.ws_tx.wsat._2006._06.Notification;
-
-/**
- * The Completion Coordinator processor.
- * @author kevin
- */
-public abstract class CompletionCoordinatorProcessorWS
-{
-    /**
-     * The coordinator processor.
-     */
-    private static CompletionCoordinatorProcessorWS PROCESSOR ;
-
-    /**
-     * Get the processor.
-     * @return The processor.
-     */
-    public static synchronized CompletionCoordinatorProcessorWS getProcessor()
-    {
-        return PROCESSOR;
-    }
-
-    /**
-     * Set the processor.
-     * @param processor The processor.
-     * @return The previous processor.
-     */
-    public static synchronized CompletionCoordinatorProcessorWS setProcessor(final CompletionCoordinatorProcessorWS processor)
-    {
-        final CompletionCoordinatorProcessorWS origProcessor = PROCESSOR;
-        PROCESSOR = processor ;
-        return origProcessor ;
-    }
-
-    /**
-     * Activate the participant.
-     * @param participant The participant.
-     * @param identifier The identifier.
-     */
-    public abstract void activateParticipant(final CompletionCoordinatorParticipantWS participant, final String identifier) ;
-
-    /**
-     * Deactivate the participant.
-     * @param participant The participant.
-     */
-    public abstract void deactivateParticipant(final CompletionCoordinatorParticipantWS participant) ;
-
-    /**
-     * Commit.
-     * @param commit The commit notification.
-     * @param addressingProperties The addressing context.
-     * @param arjunaContext The arjuna context.
-     */
-    public abstract void commit(final Notification commit, final AddressingProperties addressingProperties,
-        final ArjunaContextWS arjunaContext) ;
-
-    /**
-     * Rollback.
-     * @param rollback The rollback notification.
-     * @param addressingProperties The addressing context.
-     * @param arjunaContext The arjuna context.
-     */
-    public abstract void rollback(final Notification rollback, final AddressingProperties addressingProperties,
-        final ArjunaContextWS arjunaContext) ;
-}

Deleted: labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices/wsat/processors/CompletionInitiatorCallbackWS.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices/wsat/processors/CompletionInitiatorCallbackWS.java	2008-01-25 17:05:33 UTC (rev 18123)
+++ labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices/wsat/processors/CompletionInitiatorCallbackWS.java	2008-01-25 17:18:13 UTC (rev 18124)
@@ -1,42 +0,0 @@
-package com.arjuna.webservices.wsat.processors;
-
-import com.arjuna.webservices.base.processors.Callback;
-import com.arjuna.webservices.wsarj.ArjunaContextWS;
-import com.arjuna.webservices.SoapFault;
-import org.oasis_open.docs.ws_tx.wsat._2006._06.Notification;
-
-import javax.xml.ws.addressing.AddressingProperties;
-
-/**
- * The Completion Initiator callback.
- * @author kevin
- */
-public abstract class CompletionInitiatorCallbackWS extends Callback
-{
-    /**
-     * An aborted response.
-     * @param aborted The aborted notification.
-     * @param addressingProperties The addressing context.
-     * @param arjunaContext The arjuna context.
-     */
-    public abstract void aborted(final Notification aborted, final AddressingProperties addressingProperties,
-        final ArjunaContextWS arjunaContext) ;
-
-    /**
-     * A committed response.
-     * @param committed The committed notification.
-     * @param addressingProperties The addressing context.
-     * @param arjunaContext The arjuna context.
-     */
-    public abstract void committed(final Notification committed, final AddressingProperties addressingProperties,
-        final ArjunaContextWS arjunaContext) ;
-
-    /**
-     * A SOAP fault response.
-     * @param soapFault The SOAP fault.
-     * @param addressingProperties The addressing context.
-     * @param arjunaContext The arjuna context.
-     */
-    public abstract void soapFault(final SoapFault soapFault, final AddressingProperties addressingProperties,
-        final ArjunaContextWS arjunaContext) ;
-}

Deleted: labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices/wsat/processors/CompletionInitiatorProcessorWS.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices/wsat/processors/CompletionInitiatorProcessorWS.java	2008-01-25 17:05:33 UTC (rev 18123)
+++ labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices/wsat/processors/CompletionInitiatorProcessorWS.java	2008-01-25 17:18:13 UTC (rev 18124)
@@ -1,88 +0,0 @@
-package com.arjuna.webservices.wsat.processors;
-
-import com.arjuna.webservices.wsarj.processor.BaseNotificationProcessorWS;
-import com.arjuna.webservices.wsarj.ArjunaContextWS;
-import com.arjuna.webservices.base.processors.Callback;
-import com.arjuna.webservices.SoapFault;
-import org.oasis_open.docs.ws_tx.wsat._2006._06.Notification;
-
-import javax.xml.ws.addressing.AddressingProperties;
-
-/**
- * The Completion Initiator processor.
- * @author kevin
- */
-public class CompletionInitiatorProcessorWS extends BaseNotificationProcessorWS
-{
-    /**
-     * The initiator singleton.
-     */
-    private static final CompletionInitiatorProcessorWS PROCESSOR = new CompletionInitiatorProcessorWS() ;
-
-    /**
-     * Get the processor singleton.
-     * @return The singleton.
-     */
-    public static CompletionInitiatorProcessorWS getProcessor()
-    {
-        return PROCESSOR;
-    }
-
-    /**
-     * Handle an aborted response.
-     * @param aborted The aborted notification.
-     * @param addressingProperties The addressing context.
-     * @param arjunaContext The arjuna context.
-     */
-    public void handleAborted(final Notification aborted, final AddressingProperties addressingProperties,
-        final ArjunaContextWS arjunaContext)
-    {
-        handleCallbacks(new CallbackExecutorAdapter() {
-            public void execute(final Callback callback) {
-                ((CompletionInitiatorCallbackWS)callback).aborted(aborted, addressingProperties, arjunaContext) ;
-            }
-        }, getIDs(addressingProperties, arjunaContext)) ;
-    }
-
-    /**
-     * Handle a committed response.
-     * @param committed The committed notification.
-     * @param addressingProperties The addressing context.
-     * @param arjunaContext The arjuna context.
-     */
-    public void handleCommitted(final Notification committed, final AddressingProperties addressingProperties,
-        final ArjunaContextWS arjunaContext)
-    {
-        handleCallbacks(new CallbackExecutorAdapter() {
-            public void execute(final Callback callback) {
-                ((CompletionInitiatorCallbackWS)callback).committed(committed, addressingProperties, arjunaContext) ;
-            }
-        }, getIDs(addressingProperties, arjunaContext)) ;
-    }
-
-    /**
-     * Handle a SOAP fault response.
-     * @param soapFault The SOAP fault.
-     * @param addressingProperties The addressing context.
-     * @param arjunaContext The arjuna context.
-     */
-    public void handleSoapFault(final SoapFault soapFault, final AddressingProperties addressingProperties,
-        final ArjunaContextWS arjunaContext)
-    {
-        handleCallbacks(new CallbackExecutorAdapter() {
-            public void execute(final Callback callback) {
-                ((CompletionInitiatorCallbackWS)callback).soapFault(soapFault, addressingProperties, arjunaContext) ;
-            }
-        }, getIDs(addressingProperties, 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 CompletionInitiatorCallbackWS callback)
-    {
-        register(instanceIdentifier, callback) ;
-    }
-}

Deleted: labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices/wsat/processors/CoordinatorProcessorWS.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices/wsat/processors/CoordinatorProcessorWS.java	2008-01-25 17:05:33 UTC (rev 18123)
+++ labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices/wsat/processors/CoordinatorProcessorWS.java	2008-01-25 17:18:13 UTC (rev 18124)
@@ -1,101 +0,0 @@
-package com.arjuna.webservices.wsat.processors;
-
-import com.arjuna.webservices.wsat.NotificationType;
-import com.arjuna.webservices.wsat.CoordinatorInboundEventsWS;
-import com.arjuna.webservices.wsarj.ArjunaContextWS;
-import com.arjuna.webservices.SoapFault;
-
-import javax.xml.ws.addressing.AddressingProperties;
-
-import org.oasis_open.docs.ws_tx.wsat._2006._06.Notification;
-
-/**
- * The Coordinator processor.
- * @author kevin
- */
-public abstract class CoordinatorProcessorWS
-{
-    /**
-     * The coordinator processor.
-     */
-    private static CoordinatorProcessorWS PROCESSOR ;
-
-    /**
-     * Get the processor singleton.
-     * @return The singleton.
-     */
-    public static synchronized CoordinatorProcessorWS getProcessor()
-    {
-        return PROCESSOR;
-    }
-
-    /**
-     * Set the processor singleton.
-     * @param processor The processor.
-     * @return The previous singleton.
-     */
-    public static synchronized CoordinatorProcessorWS setProcessor(final CoordinatorProcessorWS processor)
-    {
-        final CoordinatorProcessorWS origProcessor = PROCESSOR;
-        PROCESSOR = processor ;
-        return origProcessor ;
-    }
-
-    /**
-     * Activate the coordinator.
-     * @param coordinator The coordinator.
-     * @param identifier The identifier.
-     */
-    public abstract void activateCoordinator(final CoordinatorInboundEventsWS coordinator, final String identifier) ;
-
-    /**
-     * Deactivate the coordinator.
-     * @param coordinator The coordinator.
-     */
-    public abstract void deactivateCoordinator(final CoordinatorInboundEventsWS coordinator) ;
-
-    /**
-     * Aborted.
-     * @param aborted The aborted notification.
-     * @param addressingProperties The addressing context.
-     * @param arjunaContext The arjuna context.
-     */
-    public abstract void aborted(final Notification aborted, final AddressingProperties addressingProperties,
-        final ArjunaContextWS arjunaContext) ;
-
-    /**
-     * Committed.
-     * @param committed The committed notification.
-     * @param addressingProperties The addressing context.
-     * @param arjunaContext The arjuna context.
-     */
-    public abstract void committed(final Notification committed, final AddressingProperties addressingProperties,
-        final ArjunaContextWS arjunaContext) ;
-
-    /**
-     * Prepared.
-     * @param prepared The prepared notification.
-     * @param addressingProperties The addressing context.
-     * @param arjunaContext The arjuna context.
-     */
-    public abstract void prepared(final Notification prepared, final AddressingProperties addressingProperties,
-        final ArjunaContextWS arjunaContext) ;
-
-    /**
-     * Read only.
-     * @param readOnly The read only notification.
-     * @param addressingProperties The addressing context.
-     * @param arjunaContext The arjuna context.
-     */
-    public abstract void readOnly(final Notification readOnly, final AddressingProperties addressingProperties,
-        final ArjunaContextWS 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 AddressingProperties addressingContext,
-        final ArjunaContextWS arjunaContext) ;
-}

Deleted: labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices/wsat/processors/ParticipantProcessorWS.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices/wsat/processors/ParticipantProcessorWS.java	2008-01-25 17:05:33 UTC (rev 18123)
+++ labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices/wsat/processors/ParticipantProcessorWS.java	2008-01-25 17:18:13 UTC (rev 18124)
@@ -1,92 +0,0 @@
-package com.arjuna.webservices.wsat.processors;
-
-import com.arjuna.webservices.wsat.ParticipantInboundEventsWS;
-import com.arjuna.webservices.wsat.NotificationType;
-import com.arjuna.webservices.wsarj.ArjunaContextWS;
-import com.arjuna.webservices.SoapFault;
-
-import javax.xml.ws.addressing.AddressingProperties;
-
-import org.oasis_open.docs.ws_tx.wsat._2006._06.Notification;
-
-/**
- * The Participant processor.
- * @author kevin
- */
-public abstract class ParticipantProcessorWS
-{
-    /**
-     * The participant processor.
-     */
-    private static ParticipantProcessorWS PROCESSOR ;
-
-    /**
-     * Get the processor.
-     * @return The processor.
-     */
-    public static synchronized ParticipantProcessorWS getProcessor()
-    {
-        return PROCESSOR;
-    }
-
-    /**
-     * Set the processor.
-     * @param processor The processor.
-     * @return The previous processor.
-     */
-    public static synchronized ParticipantProcessorWS setProcessor(final ParticipantProcessorWS processor)
-    {
-        final ParticipantProcessorWS origProcessor = PROCESSOR;
-        PROCESSOR = processor ;
-        return origProcessor ;
-    }
-
-    /**
-     * Activate the participant.
-     * @param participant The participant.
-     * @param identifier The identifier.
-     */
-    public abstract void activateParticipant(final ParticipantInboundEventsWS participant, final String identifier) ;
-
-    /**
-     * Deactivate the participant.
-     * @param participant The participant.
-     */
-    public abstract void deactivateParticipant(final ParticipantInboundEventsWS participant) ;
-
-    /**
-     * Commit.
-     * @param commit The commit notification.
-     * @param addressingProperties The addressing context.
-     * @param arjunaContext The arjuna context.
-     */
-    public abstract void commit(final Notification commit, final AddressingProperties addressingProperties,
-        final ArjunaContextWS arjunaContext) ;
-
-    /**
-     * Prepare.
-     * @param prepare The prepare notification.
-     * @param addressingProperties The addressing context.
-     * @param arjunaContext The arjuna context.
-     */
-    public abstract void prepare(final Notification prepare, final AddressingProperties addressingProperties,
-        final ArjunaContextWS arjunaContext) ;
-
-    /**
-     * Rollback.
-     * @param rollback The rollback notification.
-     * @param addressingProperties The addressing context.
-     * @param arjunaContext The arjuna context.
-     */
-    public abstract void rollback(final Notification rollback, final AddressingProperties addressingProperties,
-        final ArjunaContextWS arjunaContext) ;
-
-    /**
-     * SOAP Fault.
-     * @param soapFault The SOAP fault notification.
-     * @param addressingProperties The addressing context.
-     * @param arjunaContext The arjuna context.
-     */
-    public abstract void soapFault(final SoapFault soapFault, final AddressingProperties addressingProperties,
-        final ArjunaContextWS arjunaContext) ;
-}

Deleted: labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices/wsat/server/CompletionCoordinatorWSInitialisation.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices/wsat/server/CompletionCoordinatorWSInitialisation.java	2008-01-25 17:05:33 UTC (rev 18123)
+++ labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices/wsat/server/CompletionCoordinatorWSInitialisation.java	2008-01-25 17:18:13 UTC (rev 18124)
@@ -1,63 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. 
- * 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.wsat.server;
-
-import com.arjuna.services.framework.startup.Sequencer;
-import com.arjuna.webservices.ServiceRegistryWS;
-import com.arjuna.webservices.wsat.AtomicTransactionWSConstants;
-
-import javax.servlet.ServletContext;
-import javax.servlet.ServletContextEvent;
-import javax.servlet.ServletContextListener;
-
-/**
- * Activate the Completion Coordinator service
- * @author kevin
- */
-public class CompletionCoordinatorWSInitialisation implements ServletContextListener
-{
-    /**
-     * The context has been initialized.
-     * @param servletContextEvent The servlet context event.
-     */
-    public void contextInitialized(final ServletContextEvent servletContextEvent)
-    {
-        ServletContext context = servletContextEvent.getServletContext();
-        String baseURI = context.getInitParameter("BaseURI");
-        final String uri = baseURI + "/" + AtomicTransactionWSConstants.COMPLETION_COORDINATOR_SERVICE_NAME;
-
-        Sequencer.Callback callback = new Sequencer.Callback(Sequencer.SEQUENCE_WSCOOR11, Sequencer.WEBAPP_WST11) {
-           public void run() {
-               // TODO work out how to configure the endpoint name here
-               final ServiceRegistryWS serviceRegistry = ServiceRegistryWS.getRegistry() ;
-               serviceRegistry.registerServiceProvider(AtomicTransactionWSConstants.COMPLETION_COORDINATOR_SERVICE_NAME, uri) ;
-           }
-        };
-    }
-
-    /**
-     * The context is about to be destroyed.
-     * @param servletContextEvent The servlet context event.
-     */
-    public void contextDestroyed(final ServletContextEvent servletContextEvent)
-    {
-    }
-}
\ No newline at end of file

Deleted: labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices/wsat/server/CompletionInitiatorWSInitialisation.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices/wsat/server/CompletionInitiatorWSInitialisation.java	2008-01-25 17:05:33 UTC (rev 18123)
+++ labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices/wsat/server/CompletionInitiatorWSInitialisation.java	2008-01-25 17:18:13 UTC (rev 18124)
@@ -1,63 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. 
- * 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.wsat.server;
-
-import javax.servlet.ServletContextEvent;
-import javax.servlet.ServletContextListener;
-import javax.servlet.ServletContext;
-
-import com.arjuna.webservices.ServiceRegistryWS;
-import com.arjuna.webservices.wsat.AtomicTransactionWSConstants;
-import com.arjuna.services.framework.startup.Sequencer;
-
-/**
- * Activate the Completion Initiator service
- * @author kevin
- */
-public class CompletionInitiatorWSInitialisation implements ServletContextListener
-{
-    /**
-     * The context has been initialized.
-     * @param servletContextEvent The servlet context event.
-     */
-    public void contextInitialized(final ServletContextEvent servletContextEvent)
-    {
-        ServletContext context = servletContextEvent.getServletContext();
-        String baseURI = context.getInitParameter("BaseURI");
-        final String uri = baseURI + "/" + AtomicTransactionWSConstants.COMPLETION_INITIATOR_SERVICE_NAME;
-
-        Sequencer.Callback callback = new Sequencer.Callback(Sequencer.SEQUENCE_WSCOOR11, Sequencer.WEBAPP_WST11) {
-           public void run() {
-               // TODO work out how to configure the endpoint name here
-               final ServiceRegistryWS serviceRegistry = ServiceRegistryWS.getRegistry() ;
-               serviceRegistry.registerServiceProvider(AtomicTransactionWSConstants.COMPLETION_INITIATOR_SERVICE_NAME, uri) ;
-           }
-        };
-    }
-
-    /**
-     * The context is about to be destroyed.
-     * @param servletContextEvent The servlet context event.
-     */
-    public void contextDestroyed(final ServletContextEvent servletContextEvent)
-    {
-    }
-}
\ No newline at end of file

Deleted: labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices/wsat/server/CoordinatorWSInitialisation.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices/wsat/server/CoordinatorWSInitialisation.java	2008-01-25 17:05:33 UTC (rev 18123)
+++ labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices/wsat/server/CoordinatorWSInitialisation.java	2008-01-25 17:18:13 UTC (rev 18124)
@@ -1,63 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. 
- * 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.wsat.server;
-
-import javax.servlet.ServletContextEvent;
-import javax.servlet.ServletContextListener;
-import javax.servlet.ServletContext;
-
-import com.arjuna.webservices.ServiceRegistryWS;
-import com.arjuna.webservices.wsat.AtomicTransactionWSConstants;
-import com.arjuna.services.framework.startup.Sequencer;
-
-/**
- * Activate the Coordinator service
- * @author kevin
- */
-public class CoordinatorWSInitialisation implements ServletContextListener
-{
-    /**
-     * The context has been initialized.
-     * @param servletContextEvent The servlet context event.
-     */
-    public void contextInitialized(final ServletContextEvent servletContextEvent)
-    {
-        ServletContext context = servletContextEvent.getServletContext();
-        String baseURI = context.getInitParameter("BaseURI");
-        final String uri = baseURI + "/" + AtomicTransactionWSConstants.COORDINATOR_SERVICE_NAME;
-
-        Sequencer.Callback callback = new Sequencer.Callback(Sequencer.SEQUENCE_WSCOOR10, Sequencer.WEBAPP_WST11) {
-           public void run() {
-               // TODO work out how to configure the endpoint name here
-               final ServiceRegistryWS serviceRegistry = ServiceRegistryWS.getRegistry() ;
-               serviceRegistry.registerServiceProvider(AtomicTransactionWSConstants.COORDINATOR_SERVICE_NAME, uri) ;
-           }
-        };
-    }
-
-    /**
-     * The context is about to be destroyed.
-     * @param servletContextEvent The servlet context event.
-     */
-    public void contextDestroyed(final ServletContextEvent servletContextEvent)
-    {
-    }
-}
\ No newline at end of file

Deleted: labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices/wsat/server/ParticipantWSInitialisation.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices/wsat/server/ParticipantWSInitialisation.java	2008-01-25 17:05:33 UTC (rev 18123)
+++ labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices/wsat/server/ParticipantWSInitialisation.java	2008-01-25 17:18:13 UTC (rev 18124)
@@ -1,63 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. 
- * 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.wsat.server;
-
-import javax.servlet.ServletContextEvent;
-import javax.servlet.ServletContextListener;
-import javax.servlet.ServletContext;
-
-import com.arjuna.webservices.ServiceRegistryWS;
-import com.arjuna.webservices.wsat.AtomicTransactionWSConstants;
-import com.arjuna.services.framework.startup.Sequencer;
-
-/**
- * Activate the Participant service
- * @author kevin
- */
-public class ParticipantWSInitialisation implements ServletContextListener
-{
-    /**
-     * The context has been initialized.
-     * @param servletContextEvent The servlet context event.
-     */
-    public void contextInitialized(final ServletContextEvent servletContextEvent)
-    {
-        ServletContext context = servletContextEvent.getServletContext();
-        String baseURI = context.getInitParameter("BaseURI");
-        final String uri = baseURI + "/" + AtomicTransactionWSConstants.PARTICIPANT_SERVICE_NAME;
-
-        Sequencer.Callback callback = new Sequencer.Callback(Sequencer.SEQUENCE_WSCOOR11, Sequencer.WEBAPP_WST11) {
-           public void run() {
-               // TODO work out how to configure the endpoint name here
-               final ServiceRegistryWS serviceRegistry = ServiceRegistryWS.getRegistry() ;
-               serviceRegistry.registerServiceProvider(AtomicTransactionWSConstants.PARTICIPANT_SERVICE_NAME, uri) ;
-           }
-        };
-    }
-
-    /**
-     * The context is about to be destroyed.
-     * @param servletContextEvent The servlet context event.
-     */
-    public void contextDestroyed(final ServletContextEvent servletContextEvent)
-    {
-    }
-}
\ No newline at end of file

Deleted: labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices/wsba/BusinessActivityWSConstants.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices/wsba/BusinessActivityWSConstants.java	2008-01-25 17:05:33 UTC (rev 18123)
+++ labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices/wsba/BusinessActivityWSConstants.java	2008-01-25 17:18:13 UTC (rev 18124)
@@ -1,362 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. 
- * 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.wsba;
-
-import javax.xml.namespace.QName;
-
-/**
- * Interface containing WS-BusinessActivity constants.
- */
-public interface BusinessActivityWSConstants
-{
-    /**
-     * 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 WSBA Participant Completion Cordinator Service Name.
-     */
-    public String PARTICIPANT_COMPLETION_COORDINATOR_SERVICE_NAME = "BusinessAgreementWithParticipantCompletionCoordinatorService";
-    /**
-     * The WSBA Participant Completion Cordinator Service QName.
-     */
-    public QName PARTICIPANT_COMPLETION_COORDINATOR_SERVICE_QNAME = new QName(WSBA_NAMESPACE, PARTICIPANT_COMPLETION_COORDINATOR_SERVICE_NAME, WSBA_PREFIX);
-    /**
-     * The WSBA Participant Completion Cordinator Port Name.
-     */
-    public String PARTICIPANT_COMPLETION_COORDINATOR_PORT_NAME = "BusinessAgreementWithParticipantCompletionCoordinatorPortType";
-    /**
-     * The WSBA Participant Completion Cordinator Port QName.
-     */
-    public QName PARTICIPANT_COMPLETION_COORDINATOR_PORT_QNAME = new QName(WSBA_NAMESPACE, PARTICIPANT_COMPLETION_COORDINATOR_PORT_NAME, WSBA_PREFIX);
-
-    /**
-     * The WSBA Participant Completion Participant Service Name.
-     */
-    public String PARTICIPANT_COMPLETION_PARTICIPANT_SERVICE_NAME = "BusinessAgreementWithParticipantCompletionParticipantService";
-    /**
-     * The WSBA Participant Completion Participant Service QName.
-     */
-    public QName PARTICIPANT_COMPLETION_PARTICIPANT_SERVICE_QNAME = new QName(WSBA_NAMESPACE, PARTICIPANT_COMPLETION_PARTICIPANT_SERVICE_NAME, WSBA_PREFIX);
-    /**
-     * The WSBA Participant Completion Participant Port Name.
-     */
-    public String PARTICIPANT_COMPLETION_PARTICIPANT_PORT_NAME = "BusinessAgreementWithParticipantCompletionParticipantPortType";
-    /**
-     * The WSBA Participant Completion Participant Port QName.
-     */
-    public QName PARTICIPANT_COMPLETION_PARTICIPANT_PORT_QNAME = new QName(WSBA_NAMESPACE, PARTICIPANT_COMPLETION_PARTICIPANT_PORT_NAME, WSBA_PREFIX);
-
-    /**
-     * The WSBA Coordinator Completion Coordinator Service Name.
-     */
-    public String COORDINATOR_COMPLETION_COORDINATOR_SERVICE_NAME = "BusinessAgreementWithCoordinatorCompletionCoordinatorService";
-    /**
-     * The WSBA Coordinator Completion Coordinator Service QName.
-     */
-    public QName COORDINATOR_COMPLETION_COORDINATOR_SERVICE_QNAME = new QName(WSBA_NAMESPACE, COORDINATOR_COMPLETION_COORDINATOR_SERVICE_NAME, WSBA_PREFIX);
-    /**
-     * The WSBA Coordinator Completion Coordinator Port Name.
-     */
-    public String COORDINATOR_COMPLETION_COORDINATOR_PORT_NAME = "BusinessAgreementWithCoordinatorCompletionCoordinatorPortType";
-    /**
-     * The WSBA Coordinator Completion Coordinator Port QName.
-     */
-    public QName COORDINATOR_COMPLETION_COORDINATOR_PORT_QNAME = new QName(WSBA_NAMESPACE, COORDINATOR_COMPLETION_COORDINATOR_PORT_NAME, WSBA_PREFIX);
-
-    /**
-     * The WSBA Coordinator Completion Participant Service Name.
-     */
-    public String COORDINATOR_COMPLETION_PARTICIPANT_SERVICE_NAME = "BusinessAgreementWithCoordinatorCompletionParticipantService";
-    /**
-     * The WSBA Coordinator Completion Participant Service QName.
-     */
-    public QName COORDINATOR_COMPLETION_PARTICIPANT_SERVICE_QNAME = new QName(WSBA_NAMESPACE, COORDINATOR_COMPLETION_PARTICIPANT_SERVICE_NAME, WSBA_PREFIX);
-    /**
-     * The WSBA Cordinator Completion Participant Port Name.
-     */
-    public String COORDINATOR_COMPLETION_PARTICIPANT_PORT_NAME = "BusinessAgreementWithCoordinatorCompletionParticipantPortType";
-    /**
-     * The WSBA Cordinator Completion Participant Port QName.
-     */
-    public QName COORDINATOR_COMPLETION_PARTICIPANT_PORT_QNAME = new QName(WSBA_NAMESPACE, COORDINATOR_COMPLETION_PARTICIPANT_PORT_NAME, WSBA_PREFIX);
-
-    /* extra ops for 1.1. protocol*/
-
-    /**
-     * 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 ;
-
-    /**
-     * 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) ;
-    /**
-     * 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 Fault element.
-     */
-    public String WSBA_ELEMENT_FAULT = "Fault" ;
-    /**
-     * The Fault QName.
-     */
-    public QName WSBA_ELEMENT_FAULT_QNAME = new QName(WSBA_NAMESPACE, WSBA_ELEMENT_FAULT, WSBA_PREFIX) ;
-    /**
-     * The Fault Action.
-     */
-    public String WSBA_ACTION_FAULT = WSBA_NAMESPACE + "/" + WSBA_ELEMENT_FAULT ;
-    /**
-     * 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 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 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 ;
-    /**
-     * 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 State Action.
-     */
-    public String WSBA_ACTION_STATE = WSBA_NAMESPACE + "/" + WSBA_ELEMENT_STATE ;
-    /**
-     * 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 InconsistentInternalState error code.
-     */
-    public String WSBA_ERROR_CODE_INCONSISTENT_INTERNAL_STATE = "InconsistentInternalState" ;
-    /**
-     * The InconsistentInternalState error code QName.
-     */
-    public QName WSBA_ERROR_CODE_INCONSISTENT_INTERNAL_STATE_QNAME = new QName(WSBA_NAMESPACE, WSBA_ERROR_CODE_INCONSISTENT_INTERNAL_STATE, WSBA_PREFIX) ;
-
-    /**
-     * 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" ;
-}
\ No newline at end of file

Deleted: labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices/wsba/CoordinatorCompletionCoordinatorInboundEventsWS.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices/wsba/CoordinatorCompletionCoordinatorInboundEventsWS.java	2008-01-25 17:05:33 UTC (rev 18123)
+++ labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices/wsba/CoordinatorCompletionCoordinatorInboundEventsWS.java	2008-01-25 17:18:13 UTC (rev 18124)
@@ -1,119 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. 
- * 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.wsba;
-
-import com.arjuna.webservices.SoapFault;
-import com.arjuna.webservices.wsarj.ArjunaContextWS;
-import org.oasis_open.docs.ws_tx.wsba._2006._06.NotificationType;
-import org.oasis_open.docs.ws_tx.wsba._2006._06.ExceptionType;
-import org.oasis_open.docs.ws_tx.wsba._2006._06.StatusType;
-
-import javax.xml.ws.addressing.AddressingProperties;
-
-
-/**
- * The Participant events.
- */
-public interface CoordinatorCompletionCoordinatorInboundEventsWS
-{
-    /**
-     * Handle the cancelled event.
-     * @param cancelled The cancelled notification.
-     * @param addressingProperties The addressing context.
-     * @param arjunaContext The arjuna context.
-     */
-    public void cancelled(final NotificationType cancelled, final AddressingProperties addressingProperties, final ArjunaContextWS arjunaContext) ;
-
-    /**
-     * Handle the closed event.
-     * @param closed The closed notification.
-     * @param addressingProperties The addressing context.
-     * @param arjunaContext The arjuna context.
-     */
-    public void closed(final NotificationType closed, final AddressingProperties addressingProperties, final ArjunaContextWS arjunaContext) ;
-
-    /**
-     * Handle the compensated event.
-     * @param compensated The compensated notification.
-     * @param addressingProperties The addressing context.
-     * @param arjunaContext The arjuna context.
-     */
-    public void compensated(final NotificationType compensated, final AddressingProperties addressingProperties, final ArjunaContextWS arjunaContext) ;
-
-    /**
-     * Handle the completed event.
-     * @param completed The completed notification.
-     * @param addressingProperties The addressing context.
-     * @param arjunaContext The arjuna context.
-     */
-    public void completed(final NotificationType completed, final AddressingProperties addressingProperties,
-        final ArjunaContextWS arjunaContext) ;
-
-    /**
-     * Handle the exit event.
-     * @param exit The exit notification.
-     * @param addressingProperties The addressing context.
-     * @param arjunaContext The arjuna context.
-     */
-    public void exit(final NotificationType exit, final AddressingProperties addressingProperties, final ArjunaContextWS arjunaContext) ;
-
-    /**
-     * Handle the fail event.
-     * @param fail The fail exception.
-     * @param addressingProperties The addressing context.
-     * @param arjunaContext The arjuna context.
-     */
-    public void fail(final ExceptionType fail, final AddressingProperties addressingProperties,
-        final ArjunaContextWS arjunaContext) ;
-
-    /**
-     * Handle the cannotComplete event.
-     * @param cannotComplete The cannotComplete notification.
-     * @param addressingProperties The addressing context.
-     * @param arjunaContext The arjuna context.
-     */
-    public void cannotComplete(final NotificationType cannotComplete, final AddressingProperties addressingProperties,
-        final ArjunaContextWS arjunaContext) ;
-
-    /**
-     * Handle the getStatus event.
-     * @param getStatus The getStatus notification.
-     * @param addressingProperties The addressing context.
-     * @param arjunaContext The arjuna context.
-     */
-    public void getStatus(final NotificationType getStatus, final AddressingProperties addressingProperties, final ArjunaContextWS arjunaContext) ;
-
-    /**
-     * Handle the status event.
-     * @param status The status.
-     * @param addressingProperties The addressing context.
-     * @param arjunaContext The arjuna context.
-     */
-    public void status(final StatusType status, final AddressingProperties addressingProperties, final ArjunaContextWS arjunaContext) ;
-
-    /**
-     * Handle the soap fault event.
-     * @param soapFault The soap fault.
-     * @param addressingProperties The addressing context.
-     * @param arjunaContext The arjuna context.
-     */
-    public void soapFault(final SoapFault soapFault, final AddressingProperties addressingProperties, final ArjunaContextWS arjunaContext) ;
-}
\ No newline at end of file

Deleted: labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices/wsba/CoordinatorCompletionParticipantInboundEventsWS.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices/wsba/CoordinatorCompletionParticipantInboundEventsWS.java	2008-01-25 17:05:33 UTC (rev 18123)
+++ labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices/wsba/CoordinatorCompletionParticipantInboundEventsWS.java	2008-01-25 17:18:13 UTC (rev 18124)
@@ -1,115 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. 
- * 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.wsba;
-
-import com.arjuna.webservices.SoapFault;
-import com.arjuna.webservices.wsarj.ArjunaContextWS;
-
-import javax.xml.ws.addressing.AddressingProperties;
-import org.oasis_open.docs.ws_tx.wsba._2006._06.NotificationType;
-import org.oasis_open.docs.ws_tx.wsba._2006._06.StatusType;
-
-
-/**
- * The Participant events.
- */
-public interface CoordinatorCompletionParticipantInboundEventsWS
-{
-    /**
-     * Handle the cancel event.
-     * @param cancel The cancel notification.
-     * @param addressingProperties The addressing context.
-     * @param arjunaContext The arjuna context.
-     */
-    public void cancel(final NotificationType cancel, final AddressingProperties addressingProperties, final ArjunaContextWS arjunaContext) ;
-
-    /**
-     * Handle the close event.
-     * @param close The close notification.
-     * @param addressingProperties The addressing context.
-     * @param arjunaContext The arjuna context.
-     */
-    public void close(final NotificationType close, final AddressingProperties addressingProperties, final ArjunaContextWS arjunaContext) ;
-
-    /**
-     * Handle the compensate event.
-     * @param compensate The compensate notification.
-     * @param addressingProperties The addressing context.
-     * @param arjunaContext The arjuna context.
-     */
-    public void compensate(final NotificationType compensate, final AddressingProperties addressingProperties, final ArjunaContextWS arjunaContext) ;
-
-    /**
-     * Handle the complete event.
-     * @param complete The complete notification.
-     * @param addressingProperties The addressing context.
-     * @param arjunaContext The arjuna context.
-     */
-    public void complete(final NotificationType complete, final AddressingProperties addressingProperties, final ArjunaContextWS arjunaContext) ;
-
-    /**
-     * Handle the exited event.
-     * @param exited The exited notification.
-     * @param addressingProperties The addressing context.
-     * @param arjunaContext The arjuna context.
-     */
-    public void exited(final NotificationType exited, final AddressingProperties addressingProperties, final ArjunaContextWS arjunaContext) ;
-
-    /**
-     * Handle the failed event.
-     * @param failed The failed notification.
-     * @param addressingProperties The addressing context.
-     * @param arjunaContext The arjuna context.
-     */
-    public void failed(final NotificationType failed, final AddressingProperties addressingProperties, final ArjunaContextWS arjunaContext) ;
-
-    /**
-     * Handle the not completed event.
-     * @param notCompleted The not completed notification.
-     * @param addressingProperties The addressing context.
-     * @param arjunaContext The arjuna context.
-     */
-    public void notCompleted(final NotificationType notCompleted, final AddressingProperties addressingProperties, final ArjunaContextWS arjunaContext) ;
-
-    /**
-     * Handle the getStatus event.
-     * @param getStatus The getStatus notification.
-     * @param addressingProperties The addressing context.
-     * @param arjunaContext The arjuna context.
-     */
-    public void getStatus(final NotificationType getStatus, final AddressingProperties addressingProperties, final ArjunaContextWS arjunaContext) ;
-
-    /**
-     * Handle the status event.
-     * @param status The status type.
-     * @param addressingProperties The addressing context.
-     * @param arjunaContext The arjuna context.
-     */
-    public void status(final StatusType status, final AddressingProperties addressingProperties, final ArjunaContextWS arjunaContext) ;
-
-    /**
-     * Handle the soap fault event.
-     * @param soapFault The soap fault.
-     * @param addressingProperties The addressing context.
-     * @param arjunaContext The arjuna context.
-     */
-    public void soapFault(final SoapFault soapFault, final AddressingProperties addressingProperties, final ArjunaContextWS arjunaContext) ;
-}
\ No newline at end of file

Deleted: labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices/wsba/ParticipantCompletionCoordinatorInboundEventsWS.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices/wsba/ParticipantCompletionCoordinatorInboundEventsWS.java	2008-01-25 17:05:33 UTC (rev 18123)
+++ labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices/wsba/ParticipantCompletionCoordinatorInboundEventsWS.java	2008-01-25 17:18:13 UTC (rev 18124)
@@ -1,119 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. 
- * 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.wsba;
-
-import com.arjuna.webservices.SoapFault;
-import com.arjuna.webservices.wsarj.ArjunaContextWS;
-import org.oasis_open.docs.ws_tx.wsba._2006._06.NotificationType;
-import org.oasis_open.docs.ws_tx.wsba._2006._06.ExceptionType;
-import org.oasis_open.docs.ws_tx.wsba._2006._06.StatusType;
-
-import javax.xml.ws.addressing.AddressingProperties;
-
-
-/**
- * The Participant events.
- */
-public interface ParticipantCompletionCoordinatorInboundEventsWS
-{
-    /**
-     * Handle the cancelled event.
-     * @param cancelled The cancelled notification.
-     * @param addressingProperties The addressing context.
-     * @param arjunaContext The arjuna context.
-     */
-    public void cancelled(final NotificationType cancelled, final AddressingProperties addressingProperties, final ArjunaContextWS arjunaContext) ;
-
-    /**
-     * Handle the closed event.
-     * @param closed The closed notification.
-     * @param addressingProperties The addressing context.
-     * @param arjunaContext The arjuna context.
-     */
-    public void closed(final NotificationType closed, final AddressingProperties addressingProperties, final ArjunaContextWS arjunaContext) ;
-
-    /**
-     * Handle the compensated event.
-     * @param compensated The compensated notification.
-     * @param addressingProperties The addressing context.
-     * @param arjunaContext The arjuna context.
-     */
-    public void compensated(final NotificationType compensated, final AddressingProperties addressingProperties, final ArjunaContextWS arjunaContext) ;
-
-    /**
-     * Handle the completed event.
-     * @param completed The completed notification.
-     * @param addressingProperties The addressing context.
-     * @param arjunaContext The arjuna context.
-     */
-    public void completed(final NotificationType completed, final AddressingProperties addressingProperties,
-        final ArjunaContextWS arjunaContext) ;
-
-    /**
-     * Handle the exit event.
-     * @param exit The exit notification.
-     * @param addressingProperties The addressing context.
-     * @param arjunaContext The arjuna context.
-     */
-    public void exit(final NotificationType exit, final AddressingProperties addressingProperties, final ArjunaContextWS arjunaContext) ;
-
-    /**
-     * Handle the fail event.
-     * @param fail The fail exception.
-     * @param addressingProperties The addressing context.
-     * @param arjunaContext The arjuna context.
-     */
-    public void fail(final ExceptionType fail, final AddressingProperties addressingProperties,
-        final ArjunaContextWS arjunaContext) ;
-
-    /**
-     * Handle the cannotComplete event.
-     * @param cannotComplete The cannotComplete notification.
-     * @param addressingProperties The addressing context.
-     * @param arjunaContext The arjuna context.
-     */
-    public void cannotComplete(final NotificationType cannotComplete, final AddressingProperties addressingProperties,
-        final ArjunaContextWS arjunaContext) ;
-
-    /**
-     * Handle the getStatus event.
-     * @param getStatus The getStatus notification.
-     * @param addressingProperties The addressing context.
-     * @param arjunaContext The arjuna context.
-     */
-    public void getStatus(final NotificationType getStatus, final AddressingProperties addressingProperties, final ArjunaContextWS arjunaContext) ;
-
-    /**
-     * Handle the status event.
-     * @param status The status.
-     * @param addressingProperties The addressing context.
-     * @param arjunaContext The arjuna context.
-     */
-    public void status(final StatusType status, final AddressingProperties addressingProperties, final ArjunaContextWS arjunaContext) ;
-
-    /**
-     * Handle the soap fault event.
-     * @param soapFault The soap fault.
-     * @param addressingProperties The addressing context.
-     * @param arjunaContext The arjuna context.
-     */
-    public void soapFault(final SoapFault soapFault, final AddressingProperties addressingProperties, final ArjunaContextWS arjunaContext) ;
-}
\ No newline at end of file

Deleted: labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices/wsba/ParticipantCompletionParticipantInboundEventsWS.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices/wsba/ParticipantCompletionParticipantInboundEventsWS.java	2008-01-25 17:05:33 UTC (rev 18123)
+++ labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices/wsba/ParticipantCompletionParticipantInboundEventsWS.java	2008-01-25 17:18:13 UTC (rev 18124)
@@ -1,107 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. 
- * 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.wsba;
-
-import com.arjuna.webservices.SoapFault;
-import com.arjuna.webservices.wsarj.ArjunaContextWS;
-import org.oasis_open.docs.ws_tx.wsba._2006._06.NotificationType;
-import org.oasis_open.docs.ws_tx.wsba._2006._06.StatusType;
-
-import javax.xml.ws.addressing.AddressingProperties;
-
-
-/**
- * The Participant events.
- */
-public interface ParticipantCompletionParticipantInboundEventsWS
-{
-    /**
-     * Handle the cancel event.
-     * @param cancel The cancel notification.
-     * @param addressingProperties The addressing context.
-     * @param arjunaContext The arjuna context.
-     */
-    public void cancel(final NotificationType cancel, final AddressingProperties addressingProperties, final ArjunaContextWS arjunaContext) ;
-
-    /**
-     * Handle the close event.
-     * @param close The close notification.
-     * @param addressingProperties The addressing context.
-     * @param arjunaContext The arjuna context.
-     */
-    public void close(final NotificationType close, final AddressingProperties addressingProperties, final ArjunaContextWS arjunaContext) ;
-
-    /**
-     * Handle the compensate event.
-     * @param compensate The compensate notification.
-     * @param addressingProperties The addressing context.
-     * @param arjunaContext The arjuna context.
-     */
-    public void compensate(final NotificationType compensate, final AddressingProperties addressingProperties, final ArjunaContextWS arjunaContext) ;
-
-    /**
-     * Handle the exited event.
-     * @param exited The exited notification.
-     * @param addressingProperties The addressing context.
-     * @param arjunaContext The arjuna context.
-     */
-    public void exited(final NotificationType exited, final AddressingProperties addressingProperties, final ArjunaContextWS arjunaContext) ;
-
-    /**
-     * Handle the failed event.
-     * @param failed The failed notification.
-     * @param addressingProperties The addressing context.
-     * @param arjunaContext The arjuna context.
-     */
-    public void failed(final NotificationType failed, final AddressingProperties addressingProperties, final ArjunaContextWS arjunaContext) ;
-
-    /**
-     * Handle the not completed event.
-     * @param notCompleted The not completed notification.
-     * @param addressingProperties The addressing context.
-     * @param arjunaContext The arjuna context.
-     */
-    public void notCompleted(final NotificationType notCompleted, final AddressingProperties addressingProperties, final ArjunaContextWS arjunaContext) ;
-
-    /**
-     * Handle the getStatus event.
-     * @param getStatus The getStatus notification.
-     * @param addressingProperties The addressing context.
-     * @param arjunaContext The arjuna context.
-     */
-    public void getStatus(final NotificationType getStatus, final AddressingProperties addressingProperties, final ArjunaContextWS arjunaContext) ;
-
-    /**
-     * Handle the status event.
-     * @param status The status type.
-     * @param addressingProperties The addressing context.
-     * @param arjunaContext The arjuna context.
-     */
-    public void status(final StatusType status, final AddressingProperties addressingProperties, final ArjunaContextWS arjunaContext) ;
-
-    /**
-     * Handle the soap fault event.
-     * @param soapFault The soap fault.
-     * @param addressingProperties The addressing context.
-     * @param arjunaContext The arjuna context.
-     */
-    public void soapFault(final SoapFault soapFault, final AddressingProperties addressingProperties, final ArjunaContextWS arjunaContext) ;
-}
\ No newline at end of file

Deleted: labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices/wsba/StateWS.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices/wsba/StateWS.java	2008-01-25 17:05:33 UTC (rev 18123)
+++ labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices/wsba/StateWS.java	2008-01-25 17:18:13 UTC (rev 18124)
@@ -1,208 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. 
- * 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.wsba;
-
-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 StateWS extends Enumerated
-{
-    /**
-     * Serial version UID for serialisation.
-     */
-
-    /**
-     * The Active state.
-     */
-    public static final StateWS STATE_ACTIVE = new StateWS("Active") ;
-    /**
-     * The Canceling state.
-     */
-    public static final StateWS STATE_CANCELING = new StateWS("Canceling") ;
-    /**
-     * The Canceling-Active state.
-     */
-    public static final StateWS STATE_CANCELING_ACTIVE = new StateWS("Canceling-Active") ;
-    /**
-     * The Canceling-Completing state.
-     */
-    public static final StateWS STATE_CANCELING_COMPLETING = new StateWS("Canceling-Completing") ;
-    /**
-     * The Completing state.
-     */
-    public static final StateWS STATE_COMPLETING = new StateWS("Completing") ;
-    /**
-     * The Completed state.
-     */
-    public static final StateWS STATE_COMPLETED = new StateWS("Completed") ;
-    /**
-     * The Closing state.
-     */
-    public static final StateWS STATE_CLOSING = new StateWS("Closing") ;
-    /**
-     * The Compensating state.
-     */
-    public static final StateWS STATE_COMPENSATING = new StateWS("Compensating") ;
-    /**
-     * The Failing-Active state.
-     */
-    public static final StateWS STATE_FAILING_ACTIVE = new StateWS("Failing-Active") ;
-    /**
-     * The Failing-Canceling state.
-     */
-    public static final StateWS STATE_FAILING_CANCELING = new StateWS("Failing-Canceling") ;
-    /**
-     * The Failing-Completing state.
-     */
-    public static final StateWS STATE_FAILING_COMPLETING = new StateWS("Failing-Completing") ;
-    /**
-     * The Failing-Compensating state.
-     */
-    public static final StateWS STATE_FAILING_COMPENSATING = new StateWS("Failing-Compensating") ;
-    /**
-     * The Exiting state.
-     */
-    public static final StateWS STATE_EXITING = new StateWS("Exiting") ;
-    /**
-     * The NotCompleting state.
-     */
-    public static final StateWS STATE_NOT_COMPLETING = new StateWS("NotCompleting") ;
-
-    /**
-     * The Ended state.
-     */
-    public static final StateWS STATE_ENDED = new StateWS("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 value The localName of the state enumeration.
-     */
-    private StateWS(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 com.arjuna.webservices.util.InvalidEnumerationException if the value is not valid.
-     */
-    protected Enumerated resolveEnum(final Object value)
-        throws InvalidEnumerationException
-    {
-        return toStateWS((QName)value) ;
-    }
-
-    /**
-     * Return the enumeration for the specified value.
-     * @param name The name.
-     * @return The enumeration.
-     * @throws com.arjuna.webservices.util.InvalidEnumerationException if the name is not valid.
-     */
-    public static StateWS toStateWS(final String name)
-        throws InvalidEnumerationException
-    {
-        return toStateWS(getQualifiedName(name)) ;
-    }
-
-    /**
-     * Return the enumeration for the specified value.
-     * @param qName The qName value.
-     * @return The enumeration.
-     * @throws com.arjuna.webservices.util.InvalidEnumerationException if the value is not valid.
-     * @message com.arjuna.webservices.wsba.StateWS_1 [com.arjuna.webservices.wsba.StateWS_1] - Invalid state enumeration: {0}
-     */
-    public static StateWS toStateWS(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.wsba.StateWS_1") ;
-            final String message = MessageFormat.format(pattern, new Object[] {qName}) ;
-            throw new InvalidEnumerationException(message) ;
-        }
-        return (StateWS)state ;
-    }
-
-    /**
-     * Get the qualified name.
-     * @param name The name to qualify.
-     * @return The qualified name.
-     */
-    private static QName getQualifiedName(final String name)
-    {
-        return new QName(BusinessActivityWSConstants.WSBA_NAMESPACE,
-                name, BusinessActivityWSConstants.WSBA_PREFIX) ;
-    }
-}
\ No newline at end of file

Deleted: labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices/wsba/client/CoordinatorCompletionCoordinatorClientWS.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices/wsba/client/CoordinatorCompletionCoordinatorClientWS.java	2008-01-25 17:05:33 UTC (rev 18123)
+++ labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices/wsba/client/CoordinatorCompletionCoordinatorClientWS.java	2008-01-25 17:18:13 UTC (rev 18124)
@@ -1,316 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. 
- * 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.wsba.client;
-
-import com.arjuna.webservices.ServiceRegistryWS;
-import com.arjuna.webservices.SoapFault;
-import com.arjuna.webservices.wsarj.InstanceIdentifierWS;
-import com.arjuna.webservices.wsarj.handler.InstanceIdentifierHandlerWS;
-import com.arjuna.webservices.wsba.BusinessActivityConstants;
-import com.arjuna.webservices.wsba.BusinessActivityWSConstants;
-import org.oasis_open.docs.ws_tx.wsba._2006._06.BusinessAgreementWithCoordinatorCompletionCoordinatorPortType;
-import org.oasis_open.docs.ws_tx.wsba._2006._06.ExceptionType;
-import org.oasis_open.docs.ws_tx.wsba._2006._06.NotificationType;
-import org.oasis_open.docs.ws_tx.wsba._2006._06.StatusType;
-
-import javax.xml.namespace.QName;
-import javax.xml.ws.BindingProvider;
-import javax.xml.ws.addressing.AddressingBuilder;
-import javax.xml.ws.addressing.AddressingProperties;
-import javax.xml.ws.addressing.AttributedURI;
-import javax.xml.ws.addressing.JAXWSAConstants;
-import javax.xml.ws.handler.Handler;
-import javax.xml.ws.soap.AddressingFeature;
-import javax.xml.ws.wsaddressing.W3CEndpointReference;
-import java.io.IOException;
-import java.net.URISyntaxException;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Map;
-
-/**
- * The Client side of the Coordinator Completion Coordinator.
- * @author kevin
- */
-public class CoordinatorCompletionCoordinatorClientWS
-{
-    /**
-     * The client singleton.
-     */
-    private static final CoordinatorCompletionCoordinatorClientWS CLIENT = new CoordinatorCompletionCoordinatorClientWS() ;
-
-    /**
-     * The completed action.
-     */
-    private AttributedURI completedAction = null;
-    /**
-     * The fault action.
-     */
-    private AttributedURI failAction = null;
-    /**
-     * The compensated action.
-     */
-    private AttributedURI compensatedAction = null;
-    /**
-     * The closed action.
-     */
-    private AttributedURI closedAction = null;
-    /**
-     * The cancelled action.
-     */
-    private AttributedURI cancelledAction = null;
-    /**
-     * The exit action.
-     */
-    private AttributedURI cannotCompleteAction = null;
-    /**
-     * The exit action.
-     */
-    private AttributedURI exitAction = null;
-    /**
-     * The get status action.
-     */
-    private AttributedURI getStatusAction = null;
-    /**
-     * The status action.
-     */
-    private AttributedURI statusAction = null;
-
-    /**
-     * The coordinator completion participant URI for replies.
-     */
-    private AttributedURI coordinatorCompletionParticipant = null;
-
-    /**
-     * Construct the participant completion coordinator client.
-     */
-    private CoordinatorCompletionCoordinatorClientWS()
-    {
-        final AddressingBuilder builder = AddressingBuilder.getAddressingBuilder();
-        try {
-            completedAction = builder.newURI(BusinessActivityWSConstants.WSBA_ACTION_COMPLETED);
-            failAction = builder.newURI(BusinessActivityWSConstants.WSBA_ACTION_FAIL);
-            compensatedAction = builder.newURI(BusinessActivityWSConstants.WSBA_ACTION_COMPENSATED);
-            closedAction = builder.newURI(BusinessActivityWSConstants.WSBA_ACTION_CLOSED);
-            cancelledAction = builder.newURI(BusinessActivityWSConstants.WSBA_ACTION_CANCELLED);
-            exitAction = builder.newURI(BusinessActivityWSConstants.WSBA_ACTION_EXIT);
-            cannotCompleteAction = builder.newURI(BusinessActivityWSConstants.WSBA_ACTION_CANNOT_COMPLETE);
-            getStatusAction = builder.newURI(BusinessActivityWSConstants.WSBA_ACTION_GET_STATUS);
-            statusAction = builder.newURI(BusinessActivityWSConstants.WSBA_ACTION_STATUS);
-        } catch (URISyntaxException use) {
-            // TODO - log fault and throw exception
-        }
-        //final HandlerRegistry handlerRegistry = new HandlerRegistry() ;
-
-        // Add WS-Addressing
-        //AddressingPolicy.register(handlerRegistry) ;
-        // Add client policies
-        //ClientPolicy.register(handlerRegistry) ;
-
-        final String coordinatorCompletionParticipantURI =
-            ServiceRegistryWS.getRegistry().getServiceURI(BusinessActivityWSConstants.COORDINATOR_COMPLETION_PARTICIPANT_SERVICE_NAME) ;
-        try {
-            coordinatorCompletionParticipant = builder.newURI(coordinatorCompletionParticipantURI) ;
-        } catch (URISyntaxException use) {
-            // TODO - log fault and throw exception
-        }
-    }
-
-    /**
-     * Send a completed request.
-     * @param addressingProperties addressing context initialised with to and message ID.
-     * @param identifier The identifier of the initiator.
-     * @throws com.arjuna.webservices.SoapFault For any errors.
-     * @throws java.io.IOException for any transport errors.
-     */
-    public void sendCompleted(W3CEndpointReference endpoint, final AddressingProperties addressingProperties, final InstanceIdentifierWS identifier)
-        throws SoapFault, IOException
-    {
-        BusinessAgreementWithCoordinatorCompletionCoordinatorPortType port;
-        port = getPort(endpoint, addressingProperties, completedAction);
-        NotificationType completed = new NotificationType();
-
-        port.completedOperation(completed);
-    }
-
-    /**
-     * Send a fail request.
-     * @param addressingProperties addressing context initialised with to and message ID.
-     * @param identifier The identifier of the initiator.
-     * @throws com.arjuna.webservices.SoapFault For any errors.
-     * @throws java.io.IOException for any transport errors.
-     */
-    public void sendFail(W3CEndpointReference endpoint, final AddressingProperties addressingProperties, final InstanceIdentifierWS identifier,
-        final QName exceptionIdentifier)
-        throws SoapFault, IOException
-    {
-        BusinessAgreementWithCoordinatorCompletionCoordinatorPortType port;
-        port = getPort(endpoint, addressingProperties, failAction);
-        ExceptionType fail = new ExceptionType();
-        fail.setExceptionIdentifier(exceptionIdentifier);
-
-        port.failOperation(fail);
-    }
-
-    /**
-     * Send a compensated request.
-     * @param addressingProperties addressing context initialised with to and message ID.
-     * @param identifier The identifier of the initiator.
-     * @throws com.arjuna.webservices.SoapFault For any errors.
-     * @throws java.io.IOException for any transport errors.
-     */
-    public void sendCompensated(W3CEndpointReference endpoint, final AddressingProperties addressingProperties, final InstanceIdentifierWS identifier)
-        throws SoapFault, IOException
-    {
-        BusinessAgreementWithCoordinatorCompletionCoordinatorPortType port;
-        port = getPort(endpoint, addressingProperties, compensatedAction);
-        NotificationType compensated = new NotificationType();
-
-        port.compensatedOperation(compensated);
-    }
-
-    /**
-     * Send a closed request.
-     * @param addressingProperties addressing context initialised with to and message ID.
-     * @param identifier The identifier of the initiator.
-     * @throws com.arjuna.webservices.SoapFault For any errors.
-     * @throws java.io.IOException for any transport errors.
-     */
-    public void sendClosed(W3CEndpointReference endpoint, final AddressingProperties addressingProperties, final InstanceIdentifierWS identifier)
-        throws SoapFault, IOException
-    {
-        BusinessAgreementWithCoordinatorCompletionCoordinatorPortType port;
-        port = getPort(endpoint, addressingProperties, closedAction);
-        NotificationType closed = new NotificationType();
-
-        port.closedOperation(closed);
-    }
-
-    /**
-     * Send a cancelled request.
-     * @param addressingProperties addressing context initialised with to and message ID.
-     * @param identifier The identifier of the initiator.
-     * @throws com.arjuna.webservices.SoapFault For any errors.
-     * @throws java.io.IOException for any transport errors.
-     */
-    public void sendCancelled(W3CEndpointReference endpoint, final AddressingProperties addressingProperties, final InstanceIdentifierWS identifier)
-        throws SoapFault, IOException
-    {
-        BusinessAgreementWithCoordinatorCompletionCoordinatorPortType port;
-        port = getPort(endpoint, addressingProperties, cancelledAction);
-        NotificationType camcelled = new NotificationType();
-
-        port.canceledOperation(camcelled);
-    }
-
-    /**
-     * Send an exit request.
-     * @param addressingProperties addressing context initialised with to and message ID.
-     * @param identifier The identifier of the initiator.
-     * @throws com.arjuna.webservices.SoapFault For any errors.
-     * @throws java.io.IOException for any transport errors.
-     */
-    public void sendExit(W3CEndpointReference endpoint, final AddressingProperties addressingProperties, final InstanceIdentifierWS identifier)
-        throws SoapFault, IOException
-    {
-        BusinessAgreementWithCoordinatorCompletionCoordinatorPortType port;
-        port = getPort(endpoint, addressingProperties, exitAction);
-        NotificationType exited = new NotificationType();
-
-        port.exitOperation(exited);
-    }
-
-    /**
-     * Send a cannot complete request.
-     * @param addressingProperties addressing context initialised with to and message ID.
-     * @param identifier The identifier of the initiator.
-     * @throws com.arjuna.webservices.SoapFault For any errors.
-     * @throws java.io.IOException for any transport errors.
-     */
-    public void sendCannotComplete(W3CEndpointReference endpoint, final AddressingProperties addressingProperties, final InstanceIdentifierWS identifier)
-        throws SoapFault, IOException
-    {
-        BusinessAgreementWithCoordinatorCompletionCoordinatorPortType port;
-        port = getPort(endpoint, addressingProperties, cannotCompleteAction);
-        NotificationType cannotComplete = new NotificationType();
-
-        port.cannotComplete(cannotComplete);
-    }
-
-    /**
-     * Send a get status request.
-     * @param addressingProperties addressing context initialised with to and message ID.
-     * @param identifier The identifier of the initiator.
-     * @throws com.arjuna.webservices.SoapFault For any errors.
-     * @throws java.io.IOException for any transport errors.
-     */
-    public void sendGetStatus(W3CEndpointReference endpoint, final AddressingProperties addressingProperties, final InstanceIdentifierWS identifier)
-        throws SoapFault, IOException
-    {
-        BusinessAgreementWithCoordinatorCompletionCoordinatorPortType port;
-        port = getPort(endpoint, addressingProperties, getStatusAction);
-        NotificationType getStatus = new NotificationType();
-
-        port.getStatusOperation(getStatus);
-    }
-
-    /**
-     * Send a status request.
-     * @param addressingProperties addressing context initialised with to and message ID.
-     * @param identifier The identifier of the initiator.
-     * @throws com.arjuna.webservices.SoapFault For any errors.
-     * @throws java.io.IOException for any transport errors.
-     */
-    public void sendStatus(W3CEndpointReference endpoint, final AddressingProperties addressingProperties, final InstanceIdentifierWS identifier,
-        final QName state)
-        throws SoapFault, IOException
-    {
-        BusinessAgreementWithCoordinatorCompletionCoordinatorPortType port;
-        port = getPort(endpoint, addressingProperties, statusAction);
-        StatusType status = new StatusType();
-        status.setState(state);
-
-        port.statusOperation(status);
-    }
-
-    /**
-     * Get the Completion Coordinator client singleton.
-     * @return The Completion Coordinator client singleton.
-     */
-    public static CoordinatorCompletionCoordinatorClientWS getClient()
-    {
-        return CLIENT ;
-    }
-
-    /**
-     * obtain a port from the participant endpoint configured with the instance identifier handler and the supplied
-     * addressing properties supplemented with the given action
-     * @param participant
-     * @param addressingProperties
-     * @param action
-     * @return
-     */
-    private BusinessAgreementWithCoordinatorCompletionCoordinatorPortType
-    getPort(final W3CEndpointReference participant, final AddressingProperties addressingProperties, final AttributedURI action)
-    {
-        return WSBAClientWS.getCoordinatorCompletionCoordinatorPort(participant, action, addressingProperties);
-    }
-}
\ No newline at end of file

Deleted: labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices/wsba/client/CoordinatorCompletionParticipantClientWS.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices/wsba/client/CoordinatorCompletionParticipantClientWS.java	2008-01-25 17:05:33 UTC (rev 18123)
+++ labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices/wsba/client/CoordinatorCompletionParticipantClientWS.java	2008-01-25 17:18:13 UTC (rev 18124)
@@ -1,313 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. 
- * 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.wsba.client;
-
-import com.arjuna.webservices.ServiceRegistryWS;
-import com.arjuna.webservices.SoapFault;
-import com.arjuna.webservices.wsarj.InstanceIdentifierWS;
-import com.arjuna.webservices.wsarj.handler.InstanceIdentifierHandlerWS;
-import com.arjuna.webservices.wsba.BusinessActivityConstants;
-import com.arjuna.webservices.wsba.BusinessActivityWSConstants;
-import org.oasis_open.docs.ws_tx.wsba._2006._06.BusinessAgreementWithCoordinatorCompletionParticipantPortType;
-import org.oasis_open.docs.ws_tx.wsba._2006._06.NotificationType;
-import org.oasis_open.docs.ws_tx.wsba._2006._06.StatusType;
-
-import javax.xml.namespace.QName;
-import javax.xml.ws.BindingProvider;
-import javax.xml.ws.addressing.AddressingBuilder;
-import javax.xml.ws.addressing.AddressingProperties;
-import javax.xml.ws.addressing.AttributedURI;
-import javax.xml.ws.addressing.JAXWSAConstants;
-import javax.xml.ws.handler.Handler;
-import javax.xml.ws.soap.AddressingFeature;
-import javax.xml.ws.wsaddressing.W3CEndpointReference;
-import java.io.IOException;
-import java.net.URISyntaxException;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Map;
-
-/**
- * The Client side of the Coordinator Participant Coordinator.
- * @author kevin
- */
-public class CoordinatorCompletionParticipantClientWS
-{
-    /**
-     * The client singleton.
-     */
-    private static final CoordinatorCompletionParticipantClientWS CLIENT = new CoordinatorCompletionParticipantClientWS() ;
-
-    /**
-     * The complete action.
-     */
-    private AttributedURI completeAction = null;
-    /**
-     * The close action.
-     */
-    private AttributedURI closeAction = null;
-    /**
-     * The cancel action.
-     */
-    private AttributedURI cancelAction = null;
-    /**
-     * The compensat action.
-     */
-    private AttributedURI compensateAction = null;
-    /**
-     * The faulted action.
-     */
-    private AttributedURI failedAction = null;
-    /**
-     * The exited action.
-     */
-    private AttributedURI exitedAction = null;
-    /**
-     * The not completed action.
-     */
-    private AttributedURI notCompletedAction = null;
-    /**
-     * The get status action.
-     */
-    private AttributedURI getStatusAction = null;
-    /**
-     * The status action.
-     */
-    private AttributedURI statusAction = null;
-
-    /**
-     * The coordinator completion coordinator URI for replies.
-     */
-    private AttributedURI coordinatorCompletionCoordinator = null;
-
-    /**
-     * Construct the participant completion coordinator client.
-     */
-    private CoordinatorCompletionParticipantClientWS()
-    {
-        final AddressingBuilder builder = AddressingBuilder.getAddressingBuilder();
-        try {
-            completeAction = builder.newURI(BusinessActivityWSConstants.WSBA_ACTION_COMPLETE);
-            closeAction = builder.newURI(BusinessActivityWSConstants.WSBA_ACTION_CLOSE);
-            cancelAction = builder.newURI(BusinessActivityWSConstants.WSBA_ACTION_CANCEL);
-            compensateAction = builder.newURI(BusinessActivityWSConstants.WSBA_ACTION_COMPENSATE);
-            failedAction = builder.newURI(BusinessActivityWSConstants.WSBA_ACTION_FAILED);
-            exitedAction = builder.newURI(BusinessActivityWSConstants.WSBA_ACTION_EXITED);
-            notCompletedAction = builder.newURI(BusinessActivityWSConstants.WSBA_ACTION_NOT_COMPLETED);
-            getStatusAction = builder.newURI(BusinessActivityWSConstants.WSBA_ACTION_GET_STATUS);
-            statusAction = builder.newURI(BusinessActivityWSConstants.WSBA_ACTION_STATUS);
-        } catch (URISyntaxException use) {
-            // TODO - log fault and throw exception
-        }
-        // final HandlerRegistry handlerRegistry = new HandlerRegistry() ;
-
-        // Add WS-Addressing
-        // AddressingPolicy.register(handlerRegistry) ;
-        // Add client policies
-        // ClientPolicy.register(handlerRegistry) ;
-
-        final String coordinatorCompletionCoordinatorURI =
-            ServiceRegistryWS.getRegistry().getServiceURI(BusinessActivityWSConstants.COORDINATOR_COMPLETION_COORDINATOR_SERVICE_NAME) ;
-        try {
-            coordinatorCompletionCoordinator = builder.newURI(coordinatorCompletionCoordinatorURI) ;
-        } catch (URISyntaxException use) {
-            // TODO - log fault and throw exception
-        }
-    }
-
-    /**
-     * Send a complete request.
-     * @param addressingProperties addressing context initialised with to and message ID.
-     * @param identifier The identifier of the initiator.
-     * @throws com.arjuna.webservices.SoapFault For any errors.
-     * @throws java.io.IOException for any transport errors.
-     */
-    public void sendComplete(W3CEndpointReference endpoint, final AddressingProperties addressingProperties, final InstanceIdentifierWS identifier)
-        throws SoapFault, IOException
-    {
-        BusinessAgreementWithCoordinatorCompletionParticipantPortType port;
-        port = getPort(endpoint, addressingProperties, completeAction);
-        NotificationType complete = new NotificationType();
-
-        port.completeOperation(complete);
-    }
-
-    /**
-     * Send a close request.
-     * @param addressingProperties addressing context initialised with to and message ID.
-     * @param identifier The identifier of the initiator.
-     * @throws com.arjuna.webservices.SoapFault For any errors.
-     * @throws java.io.IOException for any transport errors.
-     */
-    public void sendClose(W3CEndpointReference endpoint, final AddressingProperties addressingProperties, final InstanceIdentifierWS identifier)
-        throws SoapFault, IOException
-    {
-        BusinessAgreementWithCoordinatorCompletionParticipantPortType port;
-        port = getPort(endpoint, addressingProperties, closeAction);
-        NotificationType close = new NotificationType();
-
-        port.closeOperation(close);
-    }
-
-    /**
-     * Send a cancel request.
-     * @param addressingProperties addressing context initialised with to and message ID.
-     * @param identifier The identifier of the initiator.
-     * @throws com.arjuna.webservices.SoapFault For any errors.
-     * @throws java.io.IOException for any transport errors.
-     */
-    public void sendCancel(W3CEndpointReference endpoint, final AddressingProperties addressingProperties, final InstanceIdentifierWS identifier)
-        throws SoapFault, IOException
-    {
-        BusinessAgreementWithCoordinatorCompletionParticipantPortType port;
-        port = getPort(endpoint, addressingProperties, cancelAction);
-        NotificationType cancel = new NotificationType();
-
-        port.cancelOperation(cancel);
-    }
-
-    /**
-     * Send a compensate request.
-     * @param addressingProperties addressing context initialised with to and message ID.
-     * @param identifier The identifier of the initiator.
-     * @throws com.arjuna.webservices.SoapFault For any errors.
-     * @throws java.io.IOException for any transport errors.
-     */
-    public void sendCompensate(W3CEndpointReference endpoint, final AddressingProperties addressingProperties, final InstanceIdentifierWS identifier)
-        throws SoapFault, IOException
-    {
-        BusinessAgreementWithCoordinatorCompletionParticipantPortType port;
-        port = getPort(endpoint, addressingProperties, compensateAction);
-        NotificationType compensate = new NotificationType();
-
-        port.compensateOperation(compensate);
-    }
-
-    /**
-     * Send a failed request.
-     * @param addressingProperties addressing context initialised with to and message ID.
-     * @param identifier The identifier of the initiator.
-     * @throws com.arjuna.webservices.SoapFault For any errors.
-     * @throws java.io.IOException for any transport errors.
-     */
-    public void sendFailed(W3CEndpointReference endpoint, final AddressingProperties addressingProperties, final InstanceIdentifierWS identifier)
-        throws SoapFault, IOException
-    {
-        BusinessAgreementWithCoordinatorCompletionParticipantPortType port;
-        port = getPort(endpoint, addressingProperties, failedAction);
-        NotificationType failed = new NotificationType();
-
-        port.failedOperation(failed);
-    }
-
-    /**
-     * Send an exited request.
-     * @param addressingProperties addressing context initialised with to and message ID.
-     * @param identifier The identifier of the initiator.
-     * @throws com.arjuna.webservices.SoapFault For any errors.
-     * @throws java.io.IOException for any transport errors.
-     */
-    public void sendExited(W3CEndpointReference endpoint, final AddressingProperties addressingProperties, final InstanceIdentifierWS identifier)
-        throws SoapFault, IOException
-    {
-        BusinessAgreementWithCoordinatorCompletionParticipantPortType port;
-        port = getPort(endpoint, addressingProperties, exitedAction);
-        NotificationType exit = new NotificationType();
-
-        port.exitedOperation(exit);
-    }
-
-    /**
-     * Send an exited request.
-     * @param addressingProperties addressing context initialised with to and message ID.
-     * @param identifier The identifier of the initiator.
-     * @throws com.arjuna.webservices.SoapFault For any errors.
-     * @throws java.io.IOException for any transport errors.
-     */
-    public void sendNotCompleted(W3CEndpointReference endpoint, final AddressingProperties addressingProperties, final InstanceIdentifierWS identifier)
-        throws SoapFault, IOException
-    {
-        BusinessAgreementWithCoordinatorCompletionParticipantPortType port;
-        port = getPort(endpoint, addressingProperties, notCompletedAction);
-        NotificationType notCompleted = new NotificationType();
-
-        port.notCompleted(notCompleted);
-    }
-
-    /**
-     * Send a get status request.
-     * @param addressingProperties addressing context initialised with to and message ID.
-     * @param identifier The identifier of the initiator.
-     * @throws com.arjuna.webservices.SoapFault For any errors.
-     * @throws java.io.IOException for any transport errors.
-     */
-    public void sendGetStatus(W3CEndpointReference endpoint, final AddressingProperties addressingProperties, final InstanceIdentifierWS identifier)
-        throws SoapFault, IOException
-    {
-        BusinessAgreementWithCoordinatorCompletionParticipantPortType port;
-        port = getPort(endpoint, addressingProperties, getStatusAction);
-        NotificationType getStatus = new NotificationType();
-
-        port.getStatusOperation(getStatus);
-    }
-
-    /**
-     * Send a status request.
-     * @param addressingProperties addressing context initialised with to and message ID.
-     * @param identifier The identifier of the initiator.
-     * @throws com.arjuna.webservices.SoapFault For any errors.
-     * @throws java.io.IOException for any transport errors.
-     */
-    public void sendStatus(W3CEndpointReference endpoint, final AddressingProperties addressingProperties, final InstanceIdentifierWS identifier,
-        final QName state)
-        throws SoapFault, IOException
-    {
-        BusinessAgreementWithCoordinatorCompletionParticipantPortType port;
-        port = getPort(endpoint, addressingProperties, statusAction);
-        StatusType status = new StatusType();
-        status.setState(state);
-
-        port.statusOperation(status);
-    }
-
-    /**
-     * Get the Completion Coordinator client singleton.
-     * @return The Completion Coordinator client singleton.
-     */
-    public static CoordinatorCompletionParticipantClientWS getClient()
-    {
-        return CLIENT;
-    }
-
-    /**
-     * obtain a port from the participant endpoint configured with the instance identifier handler and the supplied
-     * addressing properties supplemented with the given action
-     * @param participant
-     * @param addressingProperties
-     * @param action
-     * @return
-     */
-    private BusinessAgreementWithCoordinatorCompletionParticipantPortType
-    getPort(final W3CEndpointReference participant, final AddressingProperties addressingProperties, final AttributedURI action)
-    {
-        return WSBAClientWS.getCoordinatorCompletionParticipantPort(participant, action, addressingProperties);
-    }
-}
\ No newline at end of file

Deleted: labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices/wsba/client/ParticipantCompletionCoordinatorClientWS.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices/wsba/client/ParticipantCompletionCoordinatorClientWS.java	2008-01-25 17:05:33 UTC (rev 18123)
+++ labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices/wsba/client/ParticipantCompletionCoordinatorClientWS.java	2008-01-25 17:18:13 UTC (rev 18124)
@@ -1,316 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. 
- * 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.wsba.client;
-
-import com.arjuna.webservices.ServiceRegistryWS;
-import com.arjuna.webservices.SoapFault;
-import com.arjuna.webservices.wsarj.InstanceIdentifierWS;
-import com.arjuna.webservices.wsarj.handler.InstanceIdentifierHandlerWS;
-import com.arjuna.webservices.wsba.BusinessActivityConstants;
-import com.arjuna.webservices.wsba.BusinessActivityWSConstants;
-import org.oasis_open.docs.ws_tx.wsba._2006._06.BusinessAgreementWithParticipantCompletionCoordinatorPortType;
-import org.oasis_open.docs.ws_tx.wsba._2006._06.ExceptionType;
-import org.oasis_open.docs.ws_tx.wsba._2006._06.NotificationType;
-import org.oasis_open.docs.ws_tx.wsba._2006._06.StatusType;
-
-import javax.xml.namespace.QName;
-import javax.xml.ws.BindingProvider;
-import javax.xml.ws.addressing.AddressingBuilder;
-import javax.xml.ws.addressing.AddressingProperties;
-import javax.xml.ws.addressing.AttributedURI;
-import javax.xml.ws.addressing.JAXWSAConstants;
-import javax.xml.ws.handler.Handler;
-import javax.xml.ws.soap.AddressingFeature;
-import javax.xml.ws.wsaddressing.W3CEndpointReference;
-import java.io.IOException;
-import java.net.URISyntaxException;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Map;
-
-/**
- * The Client side of the Participant Completion Coordinator.
- * @author kevin
- */
-public class ParticipantCompletionCoordinatorClientWS
-{
-    /**
-     * The client singleton.
-     */
-    private static final ParticipantCompletionCoordinatorClientWS CLIENT = new ParticipantCompletionCoordinatorClientWS() ;
-
-    /**
-     * The completed action.
-     */
-    private AttributedURI completedAction = null;
-    /**
-     * The fault action.
-     */
-    private AttributedURI failAction = null;
-    /**
-     * The compensated action.
-     */
-    private AttributedURI compensatedAction = null;
-    /**
-     * The closed action.
-     */
-    private AttributedURI closedAction = null;
-    /**
-     * The cancelled action.
-     */
-    private AttributedURI cancelledAction = null;
-    /**
-     * The exit action.
-     */
-    private AttributedURI exitAction = null;
-    /**
-     * The cannot complete action.
-     */
-    private AttributedURI cannotCompleteAction = null;
-    /**
-     * The get status action.
-     */
-    private AttributedURI getStatusAction = null;
-    /**
-     * The status action.
-     */
-    private AttributedURI statusAction = null;
-
-    /**
-     * The participant completion participant URI for replies.
-     */
-    private AttributedURI participantCompletionParticipant = null;
-
-    /**
-     * Construct the participant completion coordinator client.
-     */
-    private ParticipantCompletionCoordinatorClientWS()
-    {
-        final AddressingBuilder builder = AddressingBuilder.getAddressingBuilder();
-        try {
-            completedAction = builder.newURI(BusinessActivityWSConstants.WSBA_ACTION_COMPLETED);
-            failAction = builder.newURI(BusinessActivityWSConstants.WSBA_ACTION_FAIL);
-            compensatedAction = builder.newURI(BusinessActivityWSConstants.WSBA_ACTION_COMPENSATED);
-            closedAction = builder.newURI(BusinessActivityWSConstants.WSBA_ACTION_CLOSED);
-            cancelledAction = builder.newURI(BusinessActivityWSConstants.WSBA_ACTION_CANCELLED);
-            exitAction = builder.newURI(BusinessActivityWSConstants.WSBA_ACTION_EXIT);
-            cannotCompleteAction = builder.newURI(BusinessActivityWSConstants.WSBA_ACTION_CANNOT_COMPLETE);
-            getStatusAction = builder.newURI(BusinessActivityWSConstants.WSBA_ACTION_GET_STATUS);
-            statusAction = builder.newURI(BusinessActivityWSConstants.WSBA_ACTION_STATUS);
-        } catch (URISyntaxException use) {
-            // TODO - log fault and throw exception
-        }
-        // final HandlerRegistry handlerRegistry = new HandlerRegistry() ;
-
-        // Add WS-Addressing
-        // AddressingPolicy.register(handlerRegistry) ;
-        // Add client policies
-        // ClientPolicy.register(handlerRegistry) ;
-
-        final String participantCompletionParticipantURI =
-            ServiceRegistryWS.getRegistry().getServiceURI(BusinessActivityWSConstants.PARTICIPANT_COMPLETION_PARTICIPANT_SERVICE_NAME) ;
-        try {
-            participantCompletionParticipant = builder.newURI(participantCompletionParticipantURI) ;
-        } catch (URISyntaxException use) {
-            // TODO - log fault and throw exception
-        }
-    }
-
-    /**
-     * Send a completed request.
-     * @param addressingProperties addressing context initialised with to and message ID.
-     * @param identifier The identifier of the initiator.
-     * @throws com.arjuna.webservices.SoapFault For any errors.
-     * @throws java.io.IOException for any transport errors.
-     */
-    public void sendCompleted(W3CEndpointReference endpoint, final AddressingProperties addressingProperties, final InstanceIdentifierWS identifier)
-        throws SoapFault, IOException
-    {
-        BusinessAgreementWithParticipantCompletionCoordinatorPortType port;
-        port = getPort(endpoint, addressingProperties, completedAction);
-        NotificationType completed = new NotificationType();
-
-        port.completedOperation(completed);
-    }
-
-    /**
-     * Send a fault request.
-     * @param addressingProperties addressing context initialised with to and message ID.
-     * @param identifier The identifier of the initiator.
-     * @throws com.arjuna.webservices.SoapFault For any errors.
-     * @throws java.io.IOException for any transport errors.
-     */
-    public void sendFail(W3CEndpointReference endpoint, final AddressingProperties addressingProperties, final InstanceIdentifierWS identifier,
-        final QName exceptionIdentifier)
-        throws SoapFault, IOException
-    {
-        BusinessAgreementWithParticipantCompletionCoordinatorPortType port;
-        port = getPort(endpoint, addressingProperties, failAction);
-        ExceptionType fail = new ExceptionType();
-        fail.setExceptionIdentifier(exceptionIdentifier);
-
-        port.failOperation(fail);
-    }
-
-    /**
-     * Send a compensated request.
-     * @param addressingProperties addressing context initialised with to and message ID.
-     * @param identifier The identifier of the initiator.
-     * @throws com.arjuna.webservices.SoapFault For any errors.
-     * @throws java.io.IOException for any transport errors.
-     */
-    public void sendCompensated(W3CEndpointReference endpoint, final AddressingProperties addressingProperties, final InstanceIdentifierWS identifier)
-        throws SoapFault, IOException
-    {
-        BusinessAgreementWithParticipantCompletionCoordinatorPortType port;
-        port = getPort(endpoint, addressingProperties, compensatedAction);
-        NotificationType compensated = new NotificationType();
-
-        port.compensatedOperation(compensated);
-    }
-
-    /**
-     * Send a closed request.
-     * @param addressingProperties addressing context initialised with to and message ID.
-     * @param identifier The identifier of the initiator.
-     * @throws com.arjuna.webservices.SoapFault For any errors.
-     * @throws java.io.IOException for any transport errors.
-     */
-    public void sendClosed(W3CEndpointReference endpoint, final AddressingProperties addressingProperties, final InstanceIdentifierWS identifier)
-        throws SoapFault, IOException
-    {
-        BusinessAgreementWithParticipantCompletionCoordinatorPortType port;
-        port = getPort(endpoint, addressingProperties, closedAction);
-        NotificationType closed = new NotificationType();
-
-        port.closedOperation(closed);
-    }
-
-    /**
-     * Send a cancelled request.
-     * @param addressingProperties addressing context initialised with to and message ID.
-     * @param identifier The identifier of the initiator.
-     * @throws com.arjuna.webservices.SoapFault For any errors.
-     * @throws java.io.IOException for any transport errors.
-     */
-    public void sendCancelled(W3CEndpointReference endpoint, final AddressingProperties addressingProperties, final InstanceIdentifierWS identifier)
-        throws SoapFault, IOException
-    {
-        BusinessAgreementWithParticipantCompletionCoordinatorPortType port;
-        port = getPort(endpoint, addressingProperties, cancelledAction);
-        NotificationType cancelled = new NotificationType();
-
-        port.canceledOperation(cancelled);
-    }
-
-    /**
-     * Send an exit request.
-     * @param addressingProperties addressing context initialised with to and message ID.
-     * @param identifier The identifier of the initiator.
-     * @throws com.arjuna.webservices.SoapFault For any errors.
-     * @throws java.io.IOException for any transport errors.
-     */
-    public void sendExit(W3CEndpointReference endpoint, final AddressingProperties addressingProperties, final InstanceIdentifierWS identifier)
-        throws SoapFault, IOException
-    {
-        BusinessAgreementWithParticipantCompletionCoordinatorPortType port;
-        port = getPort(endpoint, addressingProperties, exitAction);
-        NotificationType exit = new NotificationType();
-
-        port.exitOperation(exit);
-    }
-
-    /**
-     * Send a cannot complete request.
-     * @param addressingProperties addressing context initialised with to and message ID.
-     * @param identifier The identifier of the initiator.
-     * @throws com.arjuna.webservices.SoapFault For any errors.
-     * @throws java.io.IOException for any transport errors.
-     */
-    public void sendCannotComplete(W3CEndpointReference endpoint, final AddressingProperties addressingProperties, final InstanceIdentifierWS identifier)
-        throws SoapFault, IOException
-    {
-        BusinessAgreementWithParticipantCompletionCoordinatorPortType port;
-        port = getPort(endpoint, addressingProperties, cannotCompleteAction);
-        NotificationType cannotComplete = new NotificationType();
-
-        port.cannotComplete(cannotComplete);
-    }
-
-    /**
-     * Send a get status request.
-     * @param addressingProperties addressing context initialised with to and message ID.
-     * @param identifier The identifier of the initiator.
-     * @throws com.arjuna.webservices.SoapFault For any errors.
-     * @throws java.io.IOException for any transport errors.
-     */
-    public void sendGetStatus(W3CEndpointReference endpoint, final AddressingProperties addressingProperties, final InstanceIdentifierWS identifier)
-        throws SoapFault, IOException
-    {
-        BusinessAgreementWithParticipantCompletionCoordinatorPortType port;
-        port = getPort(endpoint, addressingProperties, getStatusAction);
-        NotificationType getStatus = new NotificationType();
-
-        port.getStatusOperation(getStatus);
-    }
-
-    /**
-     * Send a status request.
-     * @param addressingProperties addressing context initialised with to and message ID.
-     * @param identifier The identifier of the initiator.
-     * @throws com.arjuna.webservices.SoapFault For any errors.
-     * @throws java.io.IOException for any transport errors.
-     */
-    public void sendStatus(W3CEndpointReference endpoint, final AddressingProperties addressingProperties, final InstanceIdentifierWS identifier,
-        final QName state)
-        throws SoapFault, IOException
-    {
-        BusinessAgreementWithParticipantCompletionCoordinatorPortType port;
-        port = getPort(endpoint, addressingProperties, statusAction);
-        StatusType status = new StatusType();
-        status.setState(state);
-
-        port.statusOperation(status);
-    }
-
-    /**
-     * Get the Completion Coordinator client singleton.
-     * @return The Completion Coordinator client singleton.
-     */
-    public static ParticipantCompletionCoordinatorClientWS getClient()
-    {
-        return CLIENT;
-    }
-
-    /**
-     * obtain a port from the participant endpoint configured with the instance identifier handler and the supplied
-     * addressing properties supplemented with the given action
-     * @param participant
-     * @param addressingProperties
-     * @param action
-     * @return
-     */
-    private BusinessAgreementWithParticipantCompletionCoordinatorPortType
-    getPort(final W3CEndpointReference participant, final AddressingProperties addressingProperties, final AttributedURI action)
-    {
-        return WSBAClientWS.getParticipantCompletionCoordinatorPort(participant, action, addressingProperties);
-    }
-}
\ No newline at end of file

Deleted: labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices/wsba/client/ParticipantCompletionParticipantClientWS.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices/wsba/client/ParticipantCompletionParticipantClientWS.java	2008-01-25 17:05:33 UTC (rev 18123)
+++ labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices/wsba/client/ParticipantCompletionParticipantClientWS.java	2008-01-25 17:18:13 UTC (rev 18124)
@@ -1,291 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. 
- * 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.wsba.client;
-
-import com.arjuna.webservices.ServiceRegistryWS;
-import com.arjuna.webservices.SoapFault;
-import com.arjuna.webservices.wsarj.InstanceIdentifierWS;
-import com.arjuna.webservices.wsarj.handler.InstanceIdentifierHandlerWS;
-import com.arjuna.webservices.wsba.BusinessActivityConstants;
-import com.arjuna.webservices.wsba.BusinessActivityWSConstants;
-import org.oasis_open.docs.ws_tx.wsba._2006._06.BusinessAgreementWithParticipantCompletionParticipantPortType;
-import org.oasis_open.docs.ws_tx.wsba._2006._06.NotificationType;
-import org.oasis_open.docs.ws_tx.wsba._2006._06.StatusType;
-
-import javax.xml.namespace.QName;
-import javax.xml.ws.BindingProvider;
-import javax.xml.ws.addressing.AddressingBuilder;
-import javax.xml.ws.addressing.AddressingProperties;
-import javax.xml.ws.addressing.AttributedURI;
-import javax.xml.ws.addressing.JAXWSAConstants;
-import javax.xml.ws.handler.Handler;
-import javax.xml.ws.soap.AddressingFeature;
-import javax.xml.ws.wsaddressing.W3CEndpointReference;
-import java.io.IOException;
-import java.net.URISyntaxException;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Map;
-
-/**
- * The Client side of the Participant Participant Coordinator.
- * @author kevin
- */
-public class ParticipantCompletionParticipantClientWS
-{
-    /**
-     * The client singleton.
-     */
-    private static final ParticipantCompletionParticipantClientWS CLIENT = new ParticipantCompletionParticipantClientWS() ;
-
-    /**
-     * The close action.
-     */
-    private AttributedURI closeAction = null;
-    /**
-     * The cancel action.
-     */
-    private AttributedURI cancelAction = null;
-    /**
-     * The compensat action.
-     */
-    private AttributedURI compensateAction = null;
-    /**
-     * The failed action.
-     */
-    private AttributedURI failedAction = null;
-    /**
-     * The exited action.
-     */
-    private AttributedURI exitedAction = null;
-    /**
-     * The not completed action.
-     */
-    private AttributedURI notCompletedAction = null;
-    /**
-     * The get status action.
-     */
-    private AttributedURI getStatusAction = null;
-    /**
-     * The status action.
-     */
-    private AttributedURI statusAction = null;
-
-    /**
-     * The participant completion coordinator URI for replies.
-     */
-    private AttributedURI participantCompletionCoordinator = null;
-
-    /**
-     * Construct the participant completion coordinator client.
-     */
-    private ParticipantCompletionParticipantClientWS()
-    {
-        final AddressingBuilder builder = AddressingBuilder.getAddressingBuilder();
-        try {
-            closeAction = builder.newURI(BusinessActivityWSConstants.WSBA_ACTION_CLOSE);
-            cancelAction = builder.newURI(BusinessActivityWSConstants.WSBA_ACTION_CANCEL);
-            compensateAction = builder.newURI(BusinessActivityWSConstants.WSBA_ACTION_COMPENSATE);
-            failedAction = builder.newURI(BusinessActivityWSConstants.WSBA_ACTION_FAILED);
-            exitedAction = builder.newURI(BusinessActivityWSConstants.WSBA_ACTION_EXITED);
-            notCompletedAction = builder.newURI(BusinessActivityWSConstants.WSBA_ACTION_NOT_COMPLETED);
-            getStatusAction = builder.newURI(BusinessActivityWSConstants.WSBA_ACTION_GET_STATUS);
-            statusAction = builder.newURI(BusinessActivityWSConstants.WSBA_ACTION_STATUS);
-        } catch (URISyntaxException use) {
-            // TODO - log fault and throw exception
-        }
-        // final HandlerRegistry handlerRegistry = new HandlerRegistry() ;
-
-        // Add WS-Addressing
-        // AddressingPolicy.register(handlerRegistry) ;
-        // Add client policies
-        // ClientPolicy.register(handlerRegistry) ;
-
-        final String participantCompletionCoordinatorURI =
-            ServiceRegistryWS.getRegistry().getServiceURI(BusinessActivityWSConstants.PARTICIPANT_COMPLETION_COORDINATOR_SERVICE_NAME) ;
-        try {
-            participantCompletionCoordinator = builder.newURI(participantCompletionCoordinatorURI) ;
-        } catch (URISyntaxException use) {
-            // TODO - log fault and throw exception
-        }
-    }
-
-    /**
-     * Send a close request.
-     * @param addressingProperties addressing context initialised with to and message ID.
-     * @param identifier The identifier of the initiator.
-     * @throws com.arjuna.webservices.SoapFault For any errors.
-     * @throws java.io.IOException for any transport errors.
-     */
-    public void sendClose(W3CEndpointReference endpoint, final AddressingProperties addressingProperties, final InstanceIdentifierWS identifier)
-        throws SoapFault, IOException
-    {
-        BusinessAgreementWithParticipantCompletionParticipantPortType port;
-        port = getPort(endpoint, addressingProperties, closeAction);
-        NotificationType close = new NotificationType();
-
-        port.closeOperation(close);
-    }
-
-    /**
-     * Send a cancel request.
-     * @param addressingProperties addressing context initialised with to and message ID.
-     * @param identifier The identifier of the initiator.
-     * @throws com.arjuna.webservices.SoapFault For any errors.
-     * @throws java.io.IOException for any transport errors.
-     */
-    public void sendCancel(W3CEndpointReference endpoint, final AddressingProperties addressingProperties, final InstanceIdentifierWS identifier)
-        throws SoapFault, IOException
-    {
-        BusinessAgreementWithParticipantCompletionParticipantPortType port;
-        port = getPort(endpoint, addressingProperties, cancelAction);
-        NotificationType cancel = new NotificationType();
-
-        port.cancelOperation(cancel);
-    }
-
-    /**
-     * Send a compensate request.
-     * @param addressingProperties addressing context initialised with to and message ID.
-     * @param identifier The identifier of the initiator.
-     * @throws com.arjuna.webservices.SoapFault For any errors.
-     * @throws java.io.IOException for any transport errors.
-     */
-    public void sendCompensate(W3CEndpointReference endpoint, final AddressingProperties addressingProperties, final InstanceIdentifierWS identifier)
-        throws SoapFault, IOException
-    {
-        BusinessAgreementWithParticipantCompletionParticipantPortType port;
-        port = getPort(endpoint, addressingProperties, compensateAction);
-        NotificationType compensate = new NotificationType();
-
-        port.compensateOperation(compensate);
-    }
-
-    /**
-     * Send a failed request.
-     * @param addressingProperties addressing context initialised with to and message ID.
-     * @param identifier The identifier of the initiator.
-     * @throws com.arjuna.webservices.SoapFault For any errors.
-     * @throws java.io.IOException for any transport errors.
-     */
-    public void sendFailed(W3CEndpointReference endpoint, final AddressingProperties addressingProperties, final InstanceIdentifierWS identifier)
-        throws SoapFault, IOException
-    {
-        BusinessAgreementWithParticipantCompletionParticipantPortType port;
-        port = getPort(endpoint, addressingProperties, failedAction);
-        NotificationType failed = new NotificationType();
-
-        port.failedOperation(failed);
-    }
-
-    /**
-     * Send an exited request.
-     * @param addressingProperties addressing context initialised with to and message ID.
-     * @param identifier The identifier of the initiator.
-     * @throws com.arjuna.webservices.SoapFault For any errors.
-     * @throws java.io.IOException for any transport errors.
-     */
-    public void sendExited(W3CEndpointReference endpoint, final AddressingProperties addressingProperties, final InstanceIdentifierWS identifier)
-        throws SoapFault, IOException
-    {
-        BusinessAgreementWithParticipantCompletionParticipantPortType port;
-        port = getPort(endpoint, addressingProperties, exitedAction);
-        NotificationType exited = new NotificationType();
-
-        port.exitedOperation(exited);
-    }
-
-    /**
-     * Send a not completed request.
-     * @param addressingProperties addressing context initialised with to and message ID.
-     * @param identifier The identifier of the initiator.
-     * @throws com.arjuna.webservices.SoapFault For any errors.
-     * @throws java.io.IOException for any transport errors.
-     */
-    public void sendNotCompleted(W3CEndpointReference endpoint, final AddressingProperties addressingProperties, final InstanceIdentifierWS identifier)
-        throws SoapFault, IOException
-    {
-        BusinessAgreementWithParticipantCompletionParticipantPortType port;
-        port = getPort(endpoint, addressingProperties, notCompletedAction);
-        NotificationType notCompleted = new NotificationType();
-
-        port.notCompleted(notCompleted);
-    }
-
-    /**
-     * Send a get status request.
-     * @param addressingProperties addressing context initialised with to and message ID.
-     * @param identifier The identifier of the initiator.
-     * @throws com.arjuna.webservices.SoapFault For any errors.
-     * @throws java.io.IOException for any transport errors.
-     */
-    public void sendGetStatus(W3CEndpointReference endpoint, final AddressingProperties addressingProperties, final InstanceIdentifierWS identifier)
-        throws SoapFault, IOException
-    {
-        BusinessAgreementWithParticipantCompletionParticipantPortType port;
-        port = getPort(endpoint, addressingProperties, getStatusAction);
-        NotificationType getStatus = new NotificationType();
-
-        port.getStatusOperation(getStatus);
-    }
-
-    /**
-     * Send a status request.
-     * @param addressingProperties addressing context initialised with to and message ID.
-     * @param identifier The identifier of the initiator.
-     * @throws com.arjuna.webservices.SoapFault For any errors.
-     * @throws java.io.IOException for any transport errors.
-     */
-    public void sendStatus(W3CEndpointReference endpoint, final AddressingProperties addressingProperties, final InstanceIdentifierWS identifier,
-        final QName state)
-        throws SoapFault, IOException
-    {
-        BusinessAgreementWithParticipantCompletionParticipantPortType port;
-        port = getPort(endpoint, addressingProperties, statusAction);
-        StatusType status = new StatusType();
-        status.setState(state);
-
-        port.statusOperation(status);
-    }
-
-   /**
-     * Get the Completion Coordinator client singleton.
-     * @return The Completion Coordinator client singleton.
-     */
-    public static ParticipantCompletionParticipantClientWS getClient()
-    {
-        return CLIENT;
-    }
-
-    /**
-     * obtain a port from the participant endpoint configured with the instance identifier handler and the supplied
-     * addressing properties supplemented with the given action
-     * @param participant
-     * @param addressingProperties
-     * @param action
-     * @return
-     */
-    private BusinessAgreementWithParticipantCompletionParticipantPortType
-    getPort(final W3CEndpointReference participant, final AddressingProperties addressingProperties, final AttributedURI action)
-    {
-        return WSBAClientWS.getParticipantCompletionParticipantPort(participant, action, addressingProperties);
-    }
-}
\ No newline at end of file

Deleted: labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices/wsba/client/WSBAClientWS.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices/wsba/client/WSBAClientWS.java	2008-01-25 17:05:33 UTC (rev 18123)
+++ labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices/wsba/client/WSBAClientWS.java	2008-01-25 17:18:13 UTC (rev 18124)
@@ -1,237 +0,0 @@
-package com.arjuna.webservices.wsba.client;
-
-import com.arjuna.webservices.wsarj.handler.InstanceIdentifierHandlerWS;
-import org.oasis_open.docs.ws_tx.wsat._2006._06.CoordinatorPortType;
-import org.oasis_open.docs.ws_tx.wsba._2006._06.*;
-import org.jboss.ws.extensions.addressing.jaxws.WSAddressingClientHandler;
-
-import javax.xml.ws.BindingProvider;
-import javax.xml.ws.addressing.AddressingBuilder;
-import javax.xml.ws.addressing.AddressingProperties;
-import javax.xml.ws.addressing.AttributedURI;
-import javax.xml.ws.addressing.JAXWSAConstants;
-import javax.xml.ws.handler.Handler;
-import javax.xml.ws.soap.AddressingFeature;
-import javax.xml.ws.wsaddressing.W3CEndpointReference;
-import java.net.URISyntaxException;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Map;
-
-/**
- * Created by IntelliJ IDEA.
- * User: adinn
- * Date: Oct 7, 2007
- * Time: 3:14:28 PM
- * To change this template use File | Settings | File Templates.
- */
-public class WSBAClientWS
-{
-    // TODO -- do we really need a thread local here or can we just use one service?
-    /**
-     *  thread local which maintains a per thread participant completion coordinator service instance
-     */
-    private static ThreadLocal<BusinessAgreementWithParticipantCompletionCoordinatorService> participantCompletionCoordinatorService = new ThreadLocal<BusinessAgreementWithParticipantCompletionCoordinatorService>();
-
-    /**
-     *  thread local which maintains a per thread participant completion participant service instance
-     */
-    private static ThreadLocal<BusinessAgreementWithParticipantCompletionParticipantService> participantCompletionParticipantService = new ThreadLocal<BusinessAgreementWithParticipantCompletionParticipantService>();
-
-    /**
-     *  thread local which maintains a per thread coordinator completion coordinator service instance
-     */
-    private static ThreadLocal<BusinessAgreementWithCoordinatorCompletionCoordinatorService> coordinatorCompletionCoordinatorService = new ThreadLocal<BusinessAgreementWithCoordinatorCompletionCoordinatorService>();
-
-    /**
-     *  thread local which maintains a per thread coordinator completion participant service instance
-     */
-    private static ThreadLocal<BusinessAgreementWithCoordinatorCompletionParticipantService> coordinatorCompletionParticipantService = new ThreadLocal<BusinessAgreementWithCoordinatorCompletionParticipantService>();
-
-    /**
-     *  builder used to construct addressing info for calls
-     */
-    private static AddressingBuilder builder = AddressingBuilder.getAddressingBuilder();
-
-    /**
-     * fetch a participant completion coordinator service unique to the current thread
-     * @return
-     */
-    private static synchronized BusinessAgreementWithParticipantCompletionCoordinatorService getParticipantCompletionCoordinatorService()
-    {
-        if (participantCompletionCoordinatorService.get() == null) {
-            participantCompletionCoordinatorService.set(new BusinessAgreementWithParticipantCompletionCoordinatorService());
-        }
-        return participantCompletionCoordinatorService.get();
-    }
-
-    /**
-     * fetch a participant completion participant service unique to the current thread
-     * @return
-     */
-    private static synchronized BusinessAgreementWithParticipantCompletionParticipantService getParticipantCompletionParticipantService()
-    {
-        if (participantCompletionParticipantService.get() == null) {
-            participantCompletionParticipantService.set(new BusinessAgreementWithParticipantCompletionParticipantService());
-        }
-        return participantCompletionParticipantService.get();
-    }
-
-    /**
-     * fetch a coordinator completion coordinator service unique to the current thread
-     * @return
-     */
-    private static synchronized BusinessAgreementWithCoordinatorCompletionCoordinatorService getCoordinatorCompletionCoordinatorService()
-    {
-        if (coordinatorCompletionCoordinatorService.get() == null) {
-            coordinatorCompletionCoordinatorService.set(new BusinessAgreementWithCoordinatorCompletionCoordinatorService());
-        }
-        return coordinatorCompletionCoordinatorService.get();
-    }
-
-    /**
-     * fetch a coordinator completion participant service unique to the current thread
-     * @return
-     */
-    private static synchronized BusinessAgreementWithCoordinatorCompletionParticipantService getCoordinatorCompletionParticipantService()
-    {
-        if (coordinatorCompletionParticipantService.get() == null) {
-            coordinatorCompletionParticipantService.set(new BusinessAgreementWithCoordinatorCompletionParticipantService());
-        }
-        return coordinatorCompletionParticipantService.get();
-    }
-
-    public static BusinessAgreementWithParticipantCompletionCoordinatorPortType getParticipantCompletionCoordinatorPort(W3CEndpointReference endpointReference,
-                                                         AttributedURI action,
-                                                         AddressingProperties addressingProperties)
-    {
-        BusinessAgreementWithParticipantCompletionCoordinatorService service = getParticipantCompletionCoordinatorService();
-        BusinessAgreementWithParticipantCompletionCoordinatorPortType port = service.getPort(endpointReference, BusinessAgreementWithParticipantCompletionCoordinatorPortType.class, new AddressingFeature(true, true));
-        BindingProvider bindingProvider = (BindingProvider)port;
-        /*
-         * we need to configure an instance identifier handler for this port to pass the tx context either
-         * outgoing or returning. We also have to add the the WSAdressing client handler to ensure that the
-         * addressing properties are encoded into the SOAP message
-         */
-        List<Handler> customHandlerChain = new ArrayList<Handler>();
-        customHandlerChain.add(new InstanceIdentifierHandlerWS());
-        customHandlerChain.add(new WSAddressingClientHandler());
-		bindingProvider.getBinding().setHandlerChain(customHandlerChain);
-        // the address will have been pulled out of the endpoint by getPort but we still have to set it in the
-        // addressing properties along with the action and message id
-        Map<String, Object> requestContext = bindingProvider.getRequestContext();
-        String address = (String)requestContext.get(BindingProvider.ENDPOINT_ADDRESS_PROPERTY);
-        try {
-            addressingProperties.setTo(builder.newURI(address));
-        } catch (URISyntaxException use) {
-            // TODO -- log unexpected error here
-        }
-        addressingProperties.setAction(action);
-        requestContext.put(JAXWSAConstants.CLIENT_ADDRESSING_PROPERTIES, addressingProperties);
-	    // jbossws should do this for us . . .
-	    requestContext.put(JAXWSAConstants.CLIENT_ADDRESSING_PROPERTIES_OUTBOUND, addressingProperties);
-
-        return port;
-    }
-
-    // don't think we ever need this as we get a registration port from the endpoint ref returned by
-    // the activation port request
-    public static BusinessAgreementWithParticipantCompletionParticipantPortType getParticipantCompletionParticipantPort(W3CEndpointReference endpointReference,
-                                                         AttributedURI action,
-                                                         AddressingProperties addressingProperties)
-    {
-        BusinessAgreementWithParticipantCompletionParticipantService service = getParticipantCompletionParticipantService();
-        BusinessAgreementWithParticipantCompletionParticipantPortType port = service.getPort(endpointReference, BusinessAgreementWithParticipantCompletionParticipantPortType.class, new AddressingFeature(true, true));
-        BindingProvider bindingProvider = (BindingProvider)port;
-        /*
-         * we need to configure an instance identifier handler for this port to pass the tx context either
-         * outgoing or returning. We also have to add the the WSAdressing client handler to ensure that the
-         * addressing properties are encoded into the SOAP message
-         */
-        List<Handler> customHandlerChain = new ArrayList<Handler>();
-        customHandlerChain.add(new InstanceIdentifierHandlerWS());
-        customHandlerChain.add(new WSAddressingClientHandler());
-		bindingProvider.getBinding().setHandlerChain(customHandlerChain);
-        // the address will have been pulled out of the endpoint by getPort but we still have to set it in the
-        // addressing properties along with the action and message id
-        Map<String, Object> requestContext = bindingProvider.getRequestContext();
-        String address = (String)requestContext.get(BindingProvider.ENDPOINT_ADDRESS_PROPERTY);
-        try {
-            addressingProperties.setTo(builder.newURI(address));
-        } catch (URISyntaxException use) {
-            // TODO -- log unexpected error here
-        }
-        addressingProperties.setAction(action);
-        requestContext.put(JAXWSAConstants.CLIENT_ADDRESSING_PROPERTIES, addressingProperties);
-	    // jbossws should do this for us . . .
-	    requestContext.put(JAXWSAConstants.CLIENT_ADDRESSING_PROPERTIES_OUTBOUND, addressingProperties);
-
-        return port;
-    }
-
-    public static BusinessAgreementWithCoordinatorCompletionCoordinatorPortType getCoordinatorCompletionCoordinatorPort(W3CEndpointReference endpointReference,
-                                                                             AttributedURI action,
-                                                                             AddressingProperties addressingProperties)
-    {
-        BusinessAgreementWithCoordinatorCompletionCoordinatorService service = getCoordinatorCompletionCoordinatorService();
-        BusinessAgreementWithCoordinatorCompletionCoordinatorPortType port = service.getPort(endpointReference, BusinessAgreementWithCoordinatorCompletionCoordinatorPortType.class, new AddressingFeature(true, true));
-        BindingProvider bindingProvider = (BindingProvider)port;
-        /*
-         * we need to configure an instance identifier handler for this port to pass the tx context either
-         * outgoing or returning. We also have to add the the WSAdressing client handler to ensure that the
-         * addressing properties are encoded into the SOAP message
-         */
-        List<Handler> customHandlerChain = new ArrayList<Handler>();
-        customHandlerChain.add(new InstanceIdentifierHandlerWS());
-        customHandlerChain.add(new WSAddressingClientHandler());
-		bindingProvider.getBinding().setHandlerChain(customHandlerChain);
-        // the address will have been pulled out of the endpoint by getPort but we still have to set it in the
-        // addressing properties along with the action and message id
-        Map<String, Object> requestContext = bindingProvider.getRequestContext();
-        String address = (String)requestContext.get(BindingProvider.ENDPOINT_ADDRESS_PROPERTY);
-        try {
-            addressingProperties.setTo(builder.newURI(address));
-        } catch (URISyntaxException use) {
-            // TODO -- log unexpected error here
-        }
-        addressingProperties.setAction(action);
-        requestContext.put(JAXWSAConstants.CLIENT_ADDRESSING_PROPERTIES, addressingProperties);
-	    // jbossws should do this for us . . .
-	    requestContext.put(JAXWSAConstants.CLIENT_ADDRESSING_PROPERTIES_OUTBOUND, addressingProperties);
-
-        return port;
-    }
-
-    public static BusinessAgreementWithCoordinatorCompletionParticipantPortType getCoordinatorCompletionParticipantPort(W3CEndpointReference endpointReference,
-                                                                         AttributedURI action,
-                                                                         AddressingProperties addressingProperties)
-    {
-        BusinessAgreementWithCoordinatorCompletionParticipantService service = getCoordinatorCompletionParticipantService();
-        BusinessAgreementWithCoordinatorCompletionParticipantPortType port = service.getPort(endpointReference, BusinessAgreementWithCoordinatorCompletionParticipantPortType.class, new AddressingFeature(true, true));
-        BindingProvider bindingProvider = (BindingProvider)port;
-        /*
-         * we need to configure an instance identifier handler for this port to pass the tx context either
-         * outgoing or returning. We also have to add the the WSAdressing client handler to ensure that the
-         * addressing properties are encoded into the SOAP message
-         */
-        List<Handler> customHandlerChain = new ArrayList<Handler>();
-        customHandlerChain.add(new InstanceIdentifierHandlerWS());
-        customHandlerChain.add(new WSAddressingClientHandler());
-		bindingProvider.getBinding().setHandlerChain(customHandlerChain);
-        // the address will have been pulled out of the endpoint by getPort but we still have to set it in the
-        // addressing properties along with the action and message id
-        Map<String, Object> requestContext = bindingProvider.getRequestContext();
-        String address = (String)requestContext.get(BindingProvider.ENDPOINT_ADDRESS_PROPERTY);
-        try {
-            addressingProperties.setTo(builder.newURI(address));
-        } catch (URISyntaxException use) {
-            // TODO -- log unexpected error here
-        }
-        addressingProperties.setAction(action);
-        requestContext.put(JAXWSAConstants.CLIENT_ADDRESSING_PROPERTIES, addressingProperties);
-	    // jbossws should do this for us . . .
-	    requestContext.put(JAXWSAConstants.CLIENT_ADDRESSING_PROPERTIES_OUTBOUND, addressingProperties);
-
-        return port;
-    }
-}
\ No newline at end of file

Deleted: labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices/wsba/processors/CoordinatorCompletionCoordinatorProcessorWS.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices/wsba/processors/CoordinatorCompletionCoordinatorProcessorWS.java	2008-01-25 17:05:33 UTC (rev 18123)
+++ labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices/wsba/processors/CoordinatorCompletionCoordinatorProcessorWS.java	2008-01-25 17:18:13 UTC (rev 18124)
@@ -1,160 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. 
- * 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.wsba.processors;
-
-import com.arjuna.webservices.SoapFault;
-import com.arjuna.webservices.wsarj.ArjunaContextWS;
-import com.arjuna.webservices.wsba.CoordinatorCompletionCoordinatorInboundEventsWS;
-import org.oasis_open.docs.ws_tx.wsba._2006._06.ExceptionType;
-import org.oasis_open.docs.ws_tx.wsba._2006._06.NotificationType;
-import org.oasis_open.docs.ws_tx.wsba._2006._06.StatusType;
-
-import javax.xml.ws.addressing.AddressingProperties;
-
-
-/**
- * The Coordinator Completion Coordinator processor.
- * @author kevin
- */
-public abstract class CoordinatorCompletionCoordinatorProcessorWS
-{
-    /**
-     * The coordinator processor.
-     */
-    private static CoordinatorCompletionCoordinatorProcessorWS PROCESSOR ;
-
-    /**
-     * Get the processor.
-     * @return The singleton.
-     */
-    public static synchronized CoordinatorCompletionCoordinatorProcessorWS getProcessor()
-    {
-        return PROCESSOR ;
-    }
-
-    /**
-     * Set the processor.
-     * @param processor The processor.
-     * @return The previous processor.
-     */
-    public static synchronized CoordinatorCompletionCoordinatorProcessorWS setProcessor(final CoordinatorCompletionCoordinatorProcessorWS processor)
-    {
-        final CoordinatorCompletionCoordinatorProcessorWS origProcessor = PROCESSOR ;
-        PROCESSOR = processor ;
-        return origProcessor ;
-    }
-
-    /**
-     * Activate the coordinator.
-     * @param coordinator The coordinator.
-     * @param identifier The identifier.
-     */
-    public abstract void activateCoordinator(final CoordinatorCompletionCoordinatorInboundEventsWS coordinator, final String identifier) ;
-
-    /**
-     * Deactivate the coordinator.
-     * @param coordinator The coordinator.
-     */
-    public abstract void deactivateCoordinator(final CoordinatorCompletionCoordinatorInboundEventsWS coordinator) ;
-
-    /**
-     * Cancelled.
-     * @param cancelled The cancelled notification.
-     * @param addressingProperties The addressing context.
-     * @param arjunaContext The arjuna context.
-     */
-    public abstract void cancelled(final NotificationType cancelled, final AddressingProperties addressingProperties, final ArjunaContextWS arjunaContext) ;
-
-    /**
-     * Closed.
-     * @param closed The closed notification.
-     * @param addressingProperties The addressing context.
-     * @param arjunaContext The arjuna context.
-     */
-    public abstract void closed(final NotificationType closed, final AddressingProperties addressingProperties, final ArjunaContextWS arjunaContext) ;
-
-    /**
-     * Compensated.
-     * @param compensated The compensated notification.
-     * @param addressingProperties The addressing context.
-     * @param arjunaContext The arjuna context.
-     */
-    public abstract void compensated(final NotificationType compensated, final AddressingProperties addressingProperties, final ArjunaContextWS arjunaContext) ;
-
-    /**
-     * Fail.
-     * @param fail The fail exception.
-     * @param addressingProperties The addressing context.
-     * @param arjunaContext The arjuna context.
-     */
-    public abstract void fail(final ExceptionType fail, final AddressingProperties addressingProperties, final ArjunaContextWS arjunaContext) ;
-
-    /**
-     * Completed.
-     * @param completed The completed notification.
-     * @param addressingProperties The addressing context.
-     * @param arjunaContext The arjuna context.
-     */
-    public abstract void completed(final NotificationType completed, final AddressingProperties addressingProperties,
-        final ArjunaContextWS arjunaContext) ;
-
-    /**
-     * Exit.
-     * @param exit The exit notification.
-     * @param addressingProperties The addressing context.
-     * @param arjunaContext The arjuna context.
-     */
-    public abstract void exit(final NotificationType exit, final AddressingProperties addressingProperties, final ArjunaContextWS arjunaContext) ;
-
-    /**
-     * Cannot complete.
-     * @param cannotComplete The cannot complete notification.
-     * @param addressingProperties The addressing context.
-     * @param arjunaContext The arjuna context.
-     */
-    public abstract void cannotComplete(final NotificationType cannotComplete, final AddressingProperties addressingProperties,
-        final ArjunaContextWS arjunaContext) ;
-
-    /**
-     * Get Status.
-     * @param getStatus The get status notification.
-     * @param addressingProperties The addressing context.
-     * @param arjunaContext The arjuna context.
-     */
-    public abstract void getStatus(final NotificationType getStatus, final AddressingProperties addressingProperties, final ArjunaContextWS arjunaContext) ;
-
-    /**
-     * Status.
-     * @param status The status.
-     * @param addressingProperties The addressing context.
-     * @param arjunaContext The arjuna context.
-     */
-    public abstract void status(final StatusType status, final AddressingProperties addressingProperties, final ArjunaContextWS arjunaContext) ;
-
-    /**
-     * SOAP fault.
-     * @param soapFault The SOAP fault.
-     * @param addressingProperties The addressing context.
-     * @param arjunaContext The arjuna context.
-     */
-    public abstract void soapFault(final SoapFault soapFault, final AddressingProperties addressingProperties,
-        final ArjunaContextWS arjunaContext) ;
-}
\ No newline at end of file

Deleted: labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices/wsba/processors/CoordinatorCompletionParticipantProcessorWS.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices/wsba/processors/CoordinatorCompletionParticipantProcessorWS.java	2008-01-25 17:05:33 UTC (rev 18123)
+++ labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices/wsba/processors/CoordinatorCompletionParticipantProcessorWS.java	2008-01-25 17:18:13 UTC (rev 18124)
@@ -1,157 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. 
- * 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.wsba.processors;
-
-import com.arjuna.webservices.SoapFault;
-import com.arjuna.webservices.wsarj.ArjunaContextWS;
-import com.arjuna.webservices.wsba.CoordinatorCompletionParticipantInboundEventsWS;
-import org.oasis_open.docs.ws_tx.wsba._2006._06.NotificationType;
-import org.oasis_open.docs.ws_tx.wsba._2006._06.StatusType;
-
-import javax.xml.ws.addressing.AddressingProperties;
-
-
-/**
- * The Coordinator Completion Participant processor.
- * @author kevin
- */
-public abstract class CoordinatorCompletionParticipantProcessorWS
-{
-    /**
-     * The participant processor.
-     */
-    private static CoordinatorCompletionParticipantProcessorWS PROCESSOR ;
-
-    /**
-     * Get the processor.
-     * @return The processor.
-     */
-    public static synchronized CoordinatorCompletionParticipantProcessorWS getProcessor()
-    {
-        return PROCESSOR ;
-    }
-
-    /**
-     * Set the processor.
-     * @param processor The processor.
-     * @return The previous processor.
-     */
-    public static synchronized CoordinatorCompletionParticipantProcessorWS setProcessor(final CoordinatorCompletionParticipantProcessorWS processor)
-    {
-        final CoordinatorCompletionParticipantProcessorWS origProcessor = PROCESSOR ;
-        PROCESSOR = processor ;
-        return origProcessor ;
-    }
-
-    /**
-     * Activate the participant.
-     * @param participant The participant.
-     * @param identifier The identifier.
-     */
-    public abstract void activateParticipant(final CoordinatorCompletionParticipantInboundEventsWS participant, final String identifier) ;
-
-    /**
-     * Deactivate the participant.
-     * @param participant The participant.
-     */
-    public abstract void deactivateParticipant(final CoordinatorCompletionParticipantInboundEventsWS participant) ;
-
-    /**
-     * Cancel.
-     * @param cancel The cancel notification.
-     * @param addressingProperties The addressing context.
-     * @param arjunaContext The arjuna context.
-     */
-    public abstract void cancel(final NotificationType cancel, final AddressingProperties addressingProperties, final ArjunaContextWS arjunaContext) ;
-
-    /**
-     * Close.
-     * @param close The close notification.
-     * @param addressingProperties The addressing context.
-     * @param arjunaContext The arjuna context.
-     */
-    public abstract void close(final NotificationType close, final AddressingProperties addressingProperties, final ArjunaContextWS arjunaContext) ;
-
-    /**
-     * Compensate.
-     * @param compensate The compensate notification.
-     * @param addressingProperties The addressing context.
-     * @param arjunaContext The arjuna context.
-     */
-    public abstract void compensate(final NotificationType compensate, final AddressingProperties addressingProperties, final ArjunaContextWS arjunaContext) ;
-
-    /**
-     * Complete.
-     * @param complete The complete notification.
-     * @param addressingProperties The addressing context.
-     * @param arjunaContext The arjuna context.
-     */
-    public abstract void complete(final NotificationType complete, final AddressingProperties addressingProperties, final ArjunaContextWS arjunaContext) ;
-
-    /**
-     * Exited.
-     * @param exited The exited notification.
-     * @param addressingProperties The addressing context.
-     * @param arjunaContext The arjuna context.
-     */
-    public abstract void exited(final NotificationType exited, final AddressingProperties addressingProperties, final ArjunaContextWS arjunaContext) ;
-
-    /**
-     * Not Completed.
-     * @param notCompleted The not completed notification.
-     * @param addressingProperties The addressing context.
-     * @param arjunaContext The arjuna context.
-     */
-    public abstract void notCompleted(final NotificationType notCompleted, final AddressingProperties addressingProperties, final ArjunaContextWS arjunaContext) ;
-
-    /**
-     * Failed.
-     * @param failed The failed notification.
-     * @param addressingProperties The addressing context.
-     * @param arjunaContext The arjuna context.
-     */
-    public abstract void failed(final NotificationType failed, final AddressingProperties addressingProperties, final ArjunaContextWS arjunaContext) ;
-
-    /**
-     * Get Status.
-     * @param getStatus The get status notification.
-     * @param addressingProperties The addressing context.
-     * @param arjunaContext The arjuna context.
-     */
-    public abstract void getStatus(final NotificationType getStatus, final AddressingProperties addressingProperties, final ArjunaContextWS arjunaContext) ;
-
-    /**
-     * Status.
-     * @param status The status.
-     * @param addressingProperties The addressing context.
-     * @param arjunaContext The arjuna context.
-     */
-    public abstract void status(final StatusType status, final AddressingProperties addressingProperties, final ArjunaContextWS arjunaContext) ;
-
-    /**
-     * SOAP fault.
-     * @param soapFault The SOAP fault.
-     * @param addressingProperties The addressing context.
-     * @param arjunaContext The arjuna context.
-     */
-    public abstract void soapFault(final SoapFault soapFault, final AddressingProperties addressingProperties,
-        final ArjunaContextWS arjunaContext) ;
-}
\ No newline at end of file

Deleted: labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices/wsba/processors/ParticipantCompletionCoordinatorProcessorWS.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices/wsba/processors/ParticipantCompletionCoordinatorProcessorWS.java	2008-01-25 17:05:33 UTC (rev 18123)
+++ labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices/wsba/processors/ParticipantCompletionCoordinatorProcessorWS.java	2008-01-25 17:18:13 UTC (rev 18124)
@@ -1,160 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. 
- * 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.wsba.processors;
-
-import com.arjuna.webservices.SoapFault;
-import com.arjuna.webservices.wsarj.ArjunaContextWS;
-import com.arjuna.webservices.wsba.ParticipantCompletionCoordinatorInboundEventsWS;
-import org.oasis_open.docs.ws_tx.wsba._2006._06.ExceptionType;
-import org.oasis_open.docs.ws_tx.wsba._2006._06.NotificationType;
-import org.oasis_open.docs.ws_tx.wsba._2006._06.StatusType;
-
-import javax.xml.ws.addressing.AddressingProperties;
-
-
-/**
- * The Participant Completion Coordinator processor.
- * @author kevin
- */
-public abstract class ParticipantCompletionCoordinatorProcessorWS
-{
-    /**
-     * The coordinator processor.
-     */
-    private static ParticipantCompletionCoordinatorProcessorWS PROCESSOR ;
-
-    /**
-     * Get the processor.
-     * @return The processor.
-     */
-    public static synchronized ParticipantCompletionCoordinatorProcessorWS getProcessor()
-    {
-        return PROCESSOR ;
-    }
-
-    /**
-     * Set the processor.
-     * @param processor The processor.
-     * @return The previous processor.
-     */
-    public static synchronized ParticipantCompletionCoordinatorProcessorWS setProcessor(final ParticipantCompletionCoordinatorProcessorWS processor)
-    {
-        final ParticipantCompletionCoordinatorProcessorWS origProcessor = PROCESSOR ;
-        PROCESSOR = processor ;
-        return origProcessor ;
-    }
-
-    /**
-     * Activate the coordinator.
-     * @param coordinator The coordinator.
-     * @param identifier The identifier.
-     */
-    public abstract void activateCoordinator(final ParticipantCompletionCoordinatorInboundEventsWS coordinator, final String identifier) ;
-
-    /**
-     * Deactivate the coordinator.
-     * @param coordinator The coordinator.
-     */
-    public abstract void deactivateCoordinator(final ParticipantCompletionCoordinatorInboundEventsWS coordinator) ;
-
-    /**
-     * Cancelled.
-     * @param cancelled The cancelled notification.
-     * @param addressingProperties The addressing context.
-     * @param arjunaContext The arjuna context.
-     */
-    public abstract void cancelled(final NotificationType cancelled, final AddressingProperties addressingProperties, final ArjunaContextWS arjunaContext) ;
-
-    /**
-     * Closed.
-     * @param closed The closed notification.
-     * @param addressingProperties The addressing context.
-     * @param arjunaContext The arjuna context.
-     */
-    public abstract void closed(final NotificationType closed, final AddressingProperties addressingProperties, final ArjunaContextWS arjunaContext) ;
-
-    /**
-     * Compensated.
-     * @param compensated The compensated notification.
-     * @param addressingProperties The addressing context.
-     * @param arjunaContext The arjuna context.
-     */
-    public abstract void compensated(final NotificationType compensated, final AddressingProperties addressingProperties, final ArjunaContextWS arjunaContext) ;
-
-    /**
-     * Completed.
-     * @param completed The completed notification.
-     * @param addressingProperties The addressing context.
-     * @param arjunaContext The arjuna context.
-     */
-    public abstract void completed(final NotificationType completed, final AddressingProperties addressingProperties,
-        final ArjunaContextWS arjunaContext) ;
-
-    /**
-     * Completed.
-     * @param cannotComplete The cannot complete notification.
-     * @param addressingProperties The addressing context.
-     * @param arjunaContext The arjuna context.
-     */
-    public abstract void cannotComplete(final NotificationType cannotComplete, final AddressingProperties addressingProperties, final ArjunaContextWS arjunaContext);
-
-    /**
-     * Exit.
-     * @param exit The exit notification.
-     * @param addressingProperties The addressing context.
-     * @param arjunaContext The arjuna context.
-     */
-    public abstract void exit(final NotificationType exit, final AddressingProperties addressingProperties, final ArjunaContextWS arjunaContext) ;
-
-    /**
-     * Fault.
-     * @param fail The fault exception.
-     * @param addressingProperties The addressing context.
-     * @param arjunaContext The arjuna context.
-     */
-    public abstract void fail(final ExceptionType fail, final AddressingProperties addressingProperties,
-        final ArjunaContextWS arjunaContext) ;
-
-    /**
-     * Get Status.
-     * @param getStatus The get status notification.
-     * @param addressingProperties The addressing context.
-     * @param arjunaContext The arjuna context.
-     */
-    public abstract void getStatus(final NotificationType getStatus, final AddressingProperties addressingProperties, final ArjunaContextWS arjunaContext) ;
-
-    /**
-     * Status.
-     * @param status The status.
-     * @param addressingProperties The addressing context.
-     * @param arjunaContext The arjuna context.
-     */
-    public abstract void status(final StatusType status, final AddressingProperties addressingProperties, final ArjunaContextWS arjunaContext) ;
-
-    /**
-     * SOAP fault.
-     * @param soapFault The SOAP fault.
-     * @param addressingProperties The addressing context.
-     * @param arjunaContext The arjuna context.
-     */
-    public abstract void soapFault(final SoapFault soapFault, final AddressingProperties addressingProperties,
-        final ArjunaContextWS arjunaContext) ;
-}
\ No newline at end of file

Deleted: labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices/wsba/processors/ParticipantCompletionParticipantProcessorWS.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices/wsba/processors/ParticipantCompletionParticipantProcessorWS.java	2008-01-25 17:05:33 UTC (rev 18123)
+++ labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices/wsba/processors/ParticipantCompletionParticipantProcessorWS.java	2008-01-25 17:18:13 UTC (rev 18124)
@@ -1,148 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. 
- * 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.wsba.processors;
-
-import com.arjuna.webservices.SoapFault;
-import com.arjuna.webservices.wsarj.ArjunaContextWS;
-import com.arjuna.webservices.wsba.ParticipantCompletionParticipantInboundEventsWS;
-import org.oasis_open.docs.ws_tx.wsba._2006._06.NotificationType;
-import org.oasis_open.docs.ws_tx.wsba._2006._06.StatusType;
-
-import javax.xml.ws.addressing.AddressingProperties;
-
-/**
- * The Participant Completion Participant processor.
- * @author kevin
- */
-public abstract class ParticipantCompletionParticipantProcessorWS
-{
-    /**
-     * The participant processor.
-     */
-    private static ParticipantCompletionParticipantProcessorWS PROCESSOR ;
-
-    /**
-     * Get the processor.
-     * @return The processor.
-     */
-    public static synchronized ParticipantCompletionParticipantProcessorWS getProcessor()
-    {
-        return PROCESSOR ;
-    }
-
-    /**
-     * Set the processor.
-     * @param processor The processor.
-     * @return The previous processor.
-     */
-    public static synchronized ParticipantCompletionParticipantProcessorWS setProcessor(final ParticipantCompletionParticipantProcessorWS processor)
-    {
-        final ParticipantCompletionParticipantProcessorWS origProcessor = PROCESSOR ;
-        PROCESSOR = processor ;
-        return origProcessor ;
-    }
-
-    /**
-     * Activate the participant.
-     * @param participant The participant.
-     * @param identifier The identifier.
-     */
-    public abstract void activateParticipant(final ParticipantCompletionParticipantInboundEventsWS participant, final String identifier) ;
-
-    /**
-     * Deactivate the participant.
-     * @param participant The participant.
-     */
-    public abstract void deactivateParticipant(final ParticipantCompletionParticipantInboundEventsWS participant) ;
-
-    /**
-     * Cancel.
-     * @param cancel The cancel notification.
-     * @param addressingProperties The addressing context.
-     * @param arjunaContext The arjuna context.
-     */
-    public abstract void cancel(final NotificationType cancel, final AddressingProperties addressingProperties, final ArjunaContextWS arjunaContext) ;
-
-    /**
-     * Close.
-     * @param close The close notification.
-     * @param addressingProperties The addressing context.
-     * @param arjunaContext The arjuna context.
-     */
-    public abstract void close(final NotificationType close, final AddressingProperties addressingProperties, final ArjunaContextWS arjunaContext) ;
-
-    /**
-     * Compensate.
-     * @param compensate The compensate notification.
-     * @param addressingProperties The addressing context.
-     * @param arjunaContext The arjuna context.
-     */
-    public abstract void compensate(final NotificationType compensate, final AddressingProperties addressingProperties, final ArjunaContextWS arjunaContext) ;
-
-    /**
-     * Exited.
-     * @param exited The exited notification.
-     * @param addressingProperties The addressing context.
-     * @param arjunaContext The arjuna context.
-     */
-    public abstract void exited(final NotificationType exited, final AddressingProperties addressingProperties, final ArjunaContextWS arjunaContext) ;
-
-    /**
-     * Not Completed.
-     * @param notCompleted The not completed notification.
-     * @param addressingProperties The addressing context.
-     * @param arjunaContext The arjuna context.
-     */
-    public abstract void notCompleted(final NotificationType notCompleted, final AddressingProperties addressingProperties, final ArjunaContextWS arjunaContext) ;
-
-    /**
-     * Faulted.
-     * @param failed The failed notification.
-     * @param addressingProperties The addressing context.
-     * @param arjunaContext The arjuna context.
-     */
-    public abstract void failed(final NotificationType failed, final AddressingProperties addressingProperties, final ArjunaContextWS arjunaContext) ;
-
-    /**
-     * Get Status.
-     * @param getStatus The get status notification.
-     * @param addressingProperties The addressing context.
-     * @param arjunaContext The arjuna context.
-     */
-    public abstract void getStatus(final NotificationType getStatus, final AddressingProperties addressingProperties, final ArjunaContextWS arjunaContext) ;
-
-    /**
-     * Status.
-     * @param status The status.
-     * @param addressingProperties The addressing context.
-     * @param arjunaContext The arjuna context.
-     */
-    public abstract void status(final StatusType status, final AddressingProperties addressingProperties, final ArjunaContextWS arjunaContext) ;
-
-    /**
-     * SOAP fault.
-     * @param soapFault The SOAP fault.
-     * @param addressingProperties The addressing context.
-     * @param arjunaContext The arjuna context.
-     */
-    public abstract void soapFault(final SoapFault soapFault, final AddressingProperties addressingProperties,
-        final ArjunaContextWS arjunaContext) ;
-}
\ No newline at end of file

Deleted: labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices/wsba/server/CoordinatorCompletionCoordinatorWSInitialisation.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices/wsba/server/CoordinatorCompletionCoordinatorWSInitialisation.java	2008-01-25 17:05:33 UTC (rev 18123)
+++ labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices/wsba/server/CoordinatorCompletionCoordinatorWSInitialisation.java	2008-01-25 17:18:13 UTC (rev 18124)
@@ -1,63 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. 
- * 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.wsba.server;
-
-import com.arjuna.services.framework.startup.Sequencer;
-import com.arjuna.webservices.ServiceRegistryWS;
-import com.arjuna.webservices.wsba.BusinessActivityWSConstants;
-
-import javax.servlet.ServletContext;
-import javax.servlet.ServletContextEvent;
-import javax.servlet.ServletContextListener;
-
-/**
- * Activate the Coordinator Completion Coordinator service
- * @author kevin
- */
-public class CoordinatorCompletionCoordinatorWSInitialisation implements ServletContextListener
-{
-    /**
-     * The context has been initialized.
-     * @param servletContextEvent The servlet context event.
-     */
-    public void contextInitialized(final ServletContextEvent servletContextEvent)
-    {
-        ServletContext context = servletContextEvent.getServletContext();
-        String baseURI = context.getInitParameter("BaseURI");
-        final String uri = baseURI + "/" + BusinessActivityWSConstants.COORDINATOR_COMPLETION_COORDINATOR_SERVICE_NAME;
-
-        Sequencer.Callback callback = new Sequencer.Callback(Sequencer.SEQUENCE_WSCOOR11, Sequencer.WEBAPP_WST11) {
-           public void run() {
-               // TODO work out how to configure the endpoint name here
-               final ServiceRegistryWS serviceRegistry = ServiceRegistryWS.getRegistry() ;
-               serviceRegistry.registerServiceProvider(BusinessActivityWSConstants.COORDINATOR_COMPLETION_COORDINATOR_SERVICE_NAME, uri) ;
-           }
-        };
-    }
-
-    /**
-     * The context is about to be destroyed.
-     * @param servletContextEvent The servlet context event.
-     */
-    public void contextDestroyed(final ServletContextEvent servletContextEvent)
-    {
-    }
-}
\ No newline at end of file

Deleted: labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices/wsba/server/CoordinatorCompletionParticipantWSInitialisation.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices/wsba/server/CoordinatorCompletionParticipantWSInitialisation.java	2008-01-25 17:05:33 UTC (rev 18123)
+++ labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices/wsba/server/CoordinatorCompletionParticipantWSInitialisation.java	2008-01-25 17:18:13 UTC (rev 18124)
@@ -1,70 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. 
- * 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.wsba.server;
-
-import javax.servlet.ServletContextEvent;
-import javax.servlet.ServletContextListener;
-import javax.servlet.ServletContext;
-
-import com.arjuna.webservices.HandlerRegistry;
-import com.arjuna.webservices.SoapRegistry;
-import com.arjuna.webservices.SoapService;
-import com.arjuna.webservices.ServiceRegistryWS;
-import com.arjuna.webservices.wsaddr.policy.AddressingPolicy;
-import com.arjuna.webservices.wsarj.policy.ArjunaPolicy;
-import com.arjuna.webservices.wsba.BusinessActivityConstants;
-import com.arjuna.webservices.wsba.BusinessActivityWSConstants;
-import com.arjuna.webservices.wsba.policy.CoordinatorCompletionParticipantPolicy;
-import com.arjuna.services.framework.startup.Sequencer;
-
-/**
- * Activate the Coordinator Completion Participant service
- * @author kevin
- */
-public class CoordinatorCompletionParticipantWSInitialisation implements ServletContextListener
-{
-    /**
-     * The context has been initialized.
-     * @param servletContextEvent The servlet context event.
-     */
-    public void contextInitialized(final ServletContextEvent servletContextEvent)
-    {
-        ServletContext context = servletContextEvent.getServletContext();
-        String baseURI = context.getInitParameter("BaseURI");
-        final String uri = baseURI + "/" + BusinessActivityWSConstants.COORDINATOR_COMPLETION_PARTICIPANT_SERVICE_NAME;
-
-        Sequencer.Callback callback = new Sequencer.Callback(Sequencer.SEQUENCE_WSCOOR11, Sequencer.WEBAPP_WST11) {
-           public void run() {
-               // TODO work out how to configure the endpoint name here
-               final ServiceRegistryWS serviceRegistry = ServiceRegistryWS.getRegistry() ;
-               serviceRegistry.registerServiceProvider(BusinessActivityWSConstants.COORDINATOR_COMPLETION_PARTICIPANT_SERVICE_NAME, uri) ;
-           }
-        };
-    }
-
-    /**
-     * The context is about to be destroyed.
-     * @param servletContextEvent The servlet context event.
-     */
-    public void contextDestroyed(final ServletContextEvent servletContextEvent)
-    {
-    }
-}
\ No newline at end of file

Deleted: labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices/wsba/server/ParticipantCompletionCoordinatorWSInitialisation.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices/wsba/server/ParticipantCompletionCoordinatorWSInitialisation.java	2008-01-25 17:05:33 UTC (rev 18123)
+++ labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices/wsba/server/ParticipantCompletionCoordinatorWSInitialisation.java	2008-01-25 17:18:13 UTC (rev 18124)
@@ -1,70 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. 
- * 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.wsba.server;
-
-import javax.servlet.ServletContextEvent;
-import javax.servlet.ServletContextListener;
-import javax.servlet.ServletContext;
-
-import com.arjuna.webservices.HandlerRegistry;
-import com.arjuna.webservices.SoapRegistry;
-import com.arjuna.webservices.SoapService;
-import com.arjuna.webservices.ServiceRegistryWS;
-import com.arjuna.webservices.wsaddr.policy.AddressingPolicy;
-import com.arjuna.webservices.wsarj.policy.ArjunaPolicy;
-import com.arjuna.webservices.wsba.BusinessActivityConstants;
-import com.arjuna.webservices.wsba.BusinessActivityWSConstants;
-import com.arjuna.webservices.wsba.policy.ParticipantCompletionCoordinatorPolicy;
-import com.arjuna.services.framework.startup.Sequencer;
-
-/**
- * Activate the Participant Completion Coordinator service
- * @author kevin
- */
-public class ParticipantCompletionCoordinatorWSInitialisation implements ServletContextListener
-{
-    /**
-     * The context has been initialized.
-     * @param servletContextEvent The servlet context event.
-     */
-    public void contextInitialized(final ServletContextEvent servletContextEvent)
-    {
-        ServletContext context = servletContextEvent.getServletContext();
-        String baseURI = context.getInitParameter("BaseURI");
-        final String uri = baseURI + "/" + BusinessActivityWSConstants.PARTICIPANT_COMPLETION_COORDINATOR_SERVICE_NAME;
-
-        Sequencer.Callback callback = new Sequencer.Callback(Sequencer.SEQUENCE_WSCOOR11, Sequencer.WEBAPP_WST11) {
-           public void run() {
-               // TODO work out how to configure the endpoint name here
-               final ServiceRegistryWS serviceRegistry = ServiceRegistryWS.getRegistry() ;
-               serviceRegistry.registerServiceProvider(BusinessActivityWSConstants.PARTICIPANT_COMPLETION_COORDINATOR_SERVICE_NAME, uri) ;
-           }
-        };
-    }
-
-    /**
-     * The context is about to be destroyed.
-     * @param servletContextEvent The servlet context event.
-     */
-    public void contextDestroyed(final ServletContextEvent servletContextEvent)
-    {
-    }
-}
\ No newline at end of file

Deleted: labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices/wsba/server/ParticipantCompletionParticipantWSInitialisation.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices/wsba/server/ParticipantCompletionParticipantWSInitialisation.java	2008-01-25 17:05:33 UTC (rev 18123)
+++ labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices/wsba/server/ParticipantCompletionParticipantWSInitialisation.java	2008-01-25 17:18:13 UTC (rev 18124)
@@ -1,70 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. 
- * 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.wsba.server;
-
-import javax.servlet.ServletContextEvent;
-import javax.servlet.ServletContextListener;
-import javax.servlet.ServletContext;
-
-import com.arjuna.webservices.HandlerRegistry;
-import com.arjuna.webservices.SoapRegistry;
-import com.arjuna.webservices.SoapService;
-import com.arjuna.webservices.ServiceRegistryWS;
-import com.arjuna.webservices.wsaddr.policy.AddressingPolicy;
-import com.arjuna.webservices.wsarj.policy.ArjunaPolicy;
-import com.arjuna.webservices.wsba.BusinessActivityConstants;
-import com.arjuna.webservices.wsba.BusinessActivityWSConstants;
-import com.arjuna.webservices.wsba.policy.ParticipantCompletionParticipantPolicy;
-import com.arjuna.services.framework.startup.Sequencer;
-
-/**
- * Activate the Participant Completion Participant service
- * @author kevin
- */
-public class ParticipantCompletionParticipantWSInitialisation implements ServletContextListener
-{
-    /**
-     * The context has been initialized.
-     * @param servletContextEvent The servlet context event.
-     */
-    public void contextInitialized(final ServletContextEvent servletContextEvent)
-    {
-        ServletContext context = servletContextEvent.getServletContext();
-        String baseURI = context.getInitParameter("BaseURI");
-        final String uri = baseURI + "/" + BusinessActivityWSConstants.PARTICIPANT_COMPLETION_PARTICIPANT_SERVICE_NAME;
-
-        Sequencer.Callback callback = new Sequencer.Callback(Sequencer.SEQUENCE_WSCOOR11, Sequencer.WEBAPP_WST11) {
-           public void run() {
-               // TODO work out how to configure the endpoint name here
-               final ServiceRegistryWS serviceRegistry = ServiceRegistryWS.getRegistry() ;
-               serviceRegistry.registerServiceProvider(BusinessActivityWSConstants.PARTICIPANT_COMPLETION_PARTICIPANT_SERVICE_NAME, uri) ;
-           }
-        };
-    }
-
-    /**
-     * The context is about to be destroyed.
-     * @param servletContextEvent The servlet context event.
-     */
-    public void contextDestroyed(final ServletContextEvent servletContextEvent)
-    {
-    }
-}
\ No newline at end of file

Added: labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices11/wsarjtx/ArjunaTXConstants.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices11/wsarjtx/ArjunaTXConstants.java	                        (rev 0)
+++ labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices11/wsarjtx/ArjunaTXConstants.java	2008-01-25 17:18:13 UTC (rev 18124)
@@ -0,0 +1,82 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. 
+ * 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.webservices11.wsarjtx;
+
+import javax.xml.namespace.QName;
+
+/**
+ * Interface containing Arjuna WS constants.
+ */
+public interface ArjunaTXConstants
+{
+    /**
+     * The Namespace.
+     */
+    public String WSARJTX_NAMESPACE = "http://schemas.arjuna.com/ws/2005/10/wsarjtx" ;
+    /**
+     * The Attribute Namespace.
+     */
+    public String WSARJTX_ATTRIBUTE_NAMESPACE = "" ;
+    /**
+     * The namespace prefix.
+     */
+    public String WSARJTX_PREFIX = "wsarjtx" ;
+    /**
+     * The attribute namespace prefix.
+     */
+    public String WSARJTX_ATTRIBUTE_PREFIX = "" ;
+
+    /**
+     * The termination participant service name.
+     */
+    public String TERMINATION_PARTICIPANT_SERVICE_NAME = "TerminationParticipantService" ;
+    /**
+     * The termination participant service qname.
+     */
+    public QName TERMINATION_PARTICIPANT_SERVICE_QNAME = new QName(WSARJTX_NAMESPACE, TERMINATION_PARTICIPANT_SERVICE_NAME, WSARJTX_PREFIX) ;
+
+    /**
+     * The termination participant soap service port name
+     */
+     public String TERMINATION_PARTICIPANT_PORT_NAME = "TerminationParticipantPortType";
+    /**
+     * The termination participant soap service port qname
+     */
+     public QName TERMINATION_PARTICIPANT_PORT_QNAME = new QName(WSARJTX_NAMESPACE, TERMINATION_PARTICIPANT_PORT_NAME, WSARJTX_PREFIX);
+
+    /**
+     * The termination coordinator service name.
+     */
+    public String TERMINATION_COORDINATOR_SERVICE_NAME = "TerminationCoordinatorService" ;
+    /**
+     * The termination coordinator service qname.
+     */
+    public QName TERMINATION_COORDINATOR_SERVICE_QNAME = new QName(WSARJTX_NAMESPACE, TERMINATION_COORDINATOR_SERVICE_NAME, WSARJTX_PREFIX) ;
+
+    /**
+     * The termination coordinator soap service port name
+     */
+     public String TERMINATION_COORDINATOR_PORT_NAME = "TerminationCoordinatorPortType";
+    /**
+     * The termination coordinator soap service port qname
+     */
+     public QName TERMINATION_COORDINATOR_PORT_QNAME = new QName(WSARJTX_NAMESPACE, TERMINATION_COORDINATOR_PORT_NAME, WSARJTX_PREFIX);
+}
\ No newline at end of file

Added: labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices11/wsarjtx/client/TerminationCoordinatorClient.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices11/wsarjtx/client/TerminationCoordinatorClient.java	                        (rev 0)
+++ labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices11/wsarjtx/client/TerminationCoordinatorClient.java	2008-01-25 17:18:13 UTC (rev 18124)
@@ -0,0 +1,149 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. 
+ * 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.webservices11.wsarjtx.client;
+
+import com.arjuna.schemas.ws._2005._10.wsarjtx.NotificationType;
+import com.arjuna.schemas.ws._2005._10.wsarjtx.TerminationCoordinatorPortType;
+import com.arjuna.webservices.SoapFault;
+import com.arjuna.webservices11.wsarj.InstanceIdentifier;
+import com.arjuna.webservices.wsarjtx.ArjunaTXConstants;
+import com.arjuna.webservices11.wsarjtx.client.WSARJTXClient;
+
+import javax.xml.ws.addressing.AddressingBuilder;
+import javax.xml.ws.addressing.AddressingProperties;
+import javax.xml.ws.addressing.AttributedURI;
+import javax.xml.ws.wsaddressing.W3CEndpointReference;
+import java.io.IOException;
+import java.net.URISyntaxException;
+
+/**
+ * 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 AttributedURI completeAction = null;
+    /**
+     * The close action.
+     */
+    private AttributedURI closeAction = null;
+    /**
+     * The cancel action.
+     */
+    private AttributedURI cancelAction = null;
+
+    /**
+     * Construct the terminator participant client.
+     */
+    private TerminationCoordinatorClient()
+    {
+        final AddressingBuilder builder = AddressingBuilder.getAddressingBuilder();
+        try {
+            completeAction = builder.newURI(ArjunaTXConstants.WSARJTX_ACTION_COMPLETE);
+            closeAction = builder.newURI(ArjunaTXConstants.WSARJTX_ACTION_CLOSE);
+            cancelAction = builder.newURI(ArjunaTXConstants.WSARJTX_ACTION_CANCEL);
+        } catch (URISyntaxException use) {
+            // TODO - log fault and throw exception
+        }
+        //final HandlerRegistry handlerRegistry = new HandlerRegistry() ;
+
+        // Add WS-Addressing
+        //AddressingPolicy.register(handlerRegistry) ;
+        // Add client policies
+        //ClientPolicy.register(handlerRegistry) ;
+    }
+
+    /**
+     * Send a complete request.
+     * @param addressingProperties addressing context initialised with to and message ID.
+     * @param identifier The identifier of the initiator.
+     * @throws com.arjuna.webservices.SoapFault For any errors.
+     * @throws java.io.IOException for any transport errors.
+     */
+    public void sendComplete(final W3CEndpointReference coordinator, final AddressingProperties addressingProperties, final InstanceIdentifier identifier)
+        throws SoapFault, IOException
+    {
+        final TerminationCoordinatorPortType port = getPort(coordinator, addressingProperties, identifier, completeAction);
+        final NotificationType complete = new NotificationType();
+
+        port.completeOperation(complete);
+    }
+
+    /**
+     * Send a close request.
+     * @param addressingProperties addressing context initialised with to and message ID.
+     * @param identifier The identifier of the initiator.
+     * @throws com.arjuna.webservices.SoapFault For any errors.
+     * @throws java.io.IOException for any transport errors.
+     */
+    public void sendClose(final W3CEndpointReference coordinator, final AddressingProperties addressingProperties, final InstanceIdentifier identifier)
+        throws SoapFault, IOException
+    {
+        final TerminationCoordinatorPortType port = getPort(coordinator, addressingProperties, identifier, closeAction);
+        final NotificationType close = new NotificationType();
+
+        port.closeOperation(close);
+    }
+
+    /**
+     * Send a cancel request.
+     * @param addressingProperties addressing context initialised with to and message ID.
+     * @param identifier The identifier of the initiator.
+     * @throws com.arjuna.webservices.SoapFault For any errors.
+     * @throws java.io.IOException for any transport errors.
+     */
+    public void sendCancel(final W3CEndpointReference coordinator, final AddressingProperties addressingProperties, final InstanceIdentifier identifier)
+        throws SoapFault, IOException
+    {
+        final TerminationCoordinatorPortType port = getPort(coordinator, addressingProperties, identifier, cancelAction);
+        final NotificationType cancel = new NotificationType();
+
+        port.cancelOperation(cancel);
+    }
+
+    /**
+     * Get the Terminator Coordinator client singleton.
+     * @return The Terminator Coordinator client singleton.
+     */
+    public static TerminationCoordinatorClient getClient()
+    {
+        return CLIENT ;
+    }
+
+    private TerminationCoordinatorPortType getPort(final W3CEndpointReference endpoint,
+                                                   final AddressingProperties addressingProperties,
+                                                   final InstanceIdentifier identifier,
+                                                   final AttributedURI action)
+    {
+        // we only need the message id from the addressing properties as the address is already wrapped up
+        // in the ednpoint reference. also the identifier should already be installed in the endpoint
+        // reference as a reference parameter so we don't need that either
+        return WSARJTXClient.getTerminationCoordinatorPort(endpoint, action, addressingProperties);
+    }
+}
\ No newline at end of file

Added: labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices11/wsarjtx/client/TerminationParticipantClient.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices11/wsarjtx/client/TerminationParticipantClient.java	                        (rev 0)
+++ labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices11/wsarjtx/client/TerminationParticipantClient.java	2008-01-25 17:18:13 UTC (rev 18124)
@@ -0,0 +1,199 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. 
+ * 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.webservices11.wsarjtx.client;
+
+import com.arjuna.schemas.ws._2005._10.wsarjtx.ExceptionType;
+import com.arjuna.schemas.ws._2005._10.wsarjtx.NotificationType;
+import com.arjuna.schemas.ws._2005._10.wsarjtx.TerminationParticipantPortType;
+import com.arjuna.webservices.SoapFault;
+import com.arjuna.webservices11.wsarj.InstanceIdentifier;
+import com.arjuna.webservices.wsarjtx.ArjunaTXConstants;
+import com.arjuna.webservices11.wsarjtx.client.WSARJTXClient;
+
+import javax.xml.ws.addressing.AddressingBuilder;
+import javax.xml.ws.addressing.AddressingProperties;
+import javax.xml.ws.addressing.AttributedURI;
+import javax.xml.ws.wsaddressing.W3CEndpointReference;
+import java.io.IOException;
+import java.net.URISyntaxException;
+
+/**
+ * The Client side of the Terminator Coordinator.
+ * @author kevin
+ */
+public class TerminationParticipantClient
+{
+    /**
+     * The client singleton.
+     */
+    private static final TerminationParticipantClient CLIENT = new TerminationParticipantClient() ;
+
+    /**
+     * The completed action.
+     */
+    private AttributedURI completedAction = null;
+    /**
+     * The closed action.
+     */
+    private AttributedURI closedAction = null;
+    /**
+     * The cancelled action.
+     */
+    private AttributedURI cancelledAction = null;
+    /**
+     * The faulted action.
+     */
+    private AttributedURI faultedAction = null;
+    /**
+     * The SOAP fault action.
+     */
+    private AttributedURI soapFaultAction = null;
+
+    /**
+     * Construct the terminator coordinator client.
+     */
+    private TerminationParticipantClient()
+    {
+        final AddressingBuilder builder = AddressingBuilder.getAddressingBuilder();
+        try {
+            completedAction = builder.newURI(ArjunaTXConstants.WSARJTX_ACTION_COMPLETED);
+            closedAction = builder.newURI(ArjunaTXConstants.WSARJTX_ACTION_CLOSED);
+            cancelledAction = builder.newURI(ArjunaTXConstants.WSARJTX_ACTION_CANCELLED);
+            faultedAction = builder.newURI(ArjunaTXConstants.WSARJTX_ACTION_FAULTED);
+            soapFaultAction = builder.newURI(ArjunaTXConstants.WSARJTX_ACTION_SOAP_FAULT);
+        } catch (URISyntaxException use) {
+            // TODO - log fault and throw exception
+        }
+        // final HandlerRegistry handlerRegistry = new HandlerRegistry() ;
+
+        // Add WS-Addressing
+        // AddressingPolicy.register(handlerRegistry) ;
+        // Add client policies
+        // ClientPolicy.register(handlerRegistry) ;
+    }
+
+    /**
+     * Send a completed request.
+     * @param addressingProperties addressing context initialised with to and message ID.
+     * @param identifier The identifier of the initiator.
+     * @throws com.arjuna.webservices.SoapFault For any errors.
+     * @throws java.io.IOException for any transport errors.
+     */
+    public void sendCompleted(final W3CEndpointReference participant, final AddressingProperties addressingProperties, final InstanceIdentifier identifier)
+        throws SoapFault, IOException
+    {
+        final TerminationParticipantPortType port = getPort(participant, addressingProperties, identifier, completedAction);
+        final NotificationType completed = new NotificationType();
+
+        port.completedOperation(completed);
+    }
+
+    /**
+     * Send a closed request.
+     * @param addressingProperties addressing context initialised with to and message ID.
+     * @param identifier The identifier of the initiator.
+     * @throws com.arjuna.webservices.SoapFault For any errors.
+     * @throws java.io.IOException for any transport errors.
+     */
+    public void sendClosed(final W3CEndpointReference participant, final AddressingProperties addressingProperties, final InstanceIdentifier identifier)
+        throws SoapFault, IOException
+    {
+        final TerminationParticipantPortType port = getPort(participant, addressingProperties, identifier, closedAction);
+        final NotificationType closed = new NotificationType();
+
+        port.closedOperation(closed);
+    }
+
+    /**
+     * Send a cancelled request.
+     * @param addressingProperties addressing context initialised with to and message ID.
+     * @param identifier The identifier of the initiator.
+     * @throws com.arjuna.webservices.SoapFault For any errors.
+     * @throws java.io.IOException for any transport errors.
+     */
+    public void sendCancelled(final W3CEndpointReference participant,final AddressingProperties addressingProperties, final InstanceIdentifier identifier)
+        throws SoapFault, IOException
+    {
+        final TerminationParticipantPortType port = getPort(participant, addressingProperties, identifier, cancelledAction);
+        final NotificationType cancelled = new NotificationType();
+
+        port.cancelledOperation(cancelled);
+    }
+
+    /**
+     * Send a faulted request.
+     * @param addressingProperties addressing context initialised with to and message ID.
+     * @param identifier The identifier of the initiator.
+     * @throws com.arjuna.webservices.SoapFault For any errors.
+     * @throws java.io.IOException for any transport errors.
+     */
+    public void sendFaulted(final W3CEndpointReference participant, final AddressingProperties addressingProperties, final InstanceIdentifier identifier)
+        throws SoapFault, IOException
+    {
+        final TerminationParticipantPortType port = getPort(participant, addressingProperties, identifier, faultedAction);
+        final NotificationType faulted = new NotificationType();
+
+        port.faultedOperation(faulted);
+    }
+
+    /**
+     * Send a fault.
+     * @param addressingProperties The addressing context.
+     * @param soapFault The SOAP fault.
+     * @param identifier The arjuna  instance identifier.
+     * @throws com.arjuna.webservices.SoapFault For any errors.
+     * @throws java.io.IOException for any transport errors.
+     */
+    public void sendSoapFault(final W3CEndpointReference participant, final AddressingProperties addressingProperties, final SoapFault soapFault, final InstanceIdentifier identifier)
+        throws SoapFault, IOException
+    {
+        final TerminationParticipantPortType port = getPort(participant, addressingProperties, identifier, soapFaultAction);
+        final ExceptionType fault = new ExceptionType();
+        // we pass the fault type, reason and subcode. we cannot pass the detail and header elements as they are
+        // built from Kev's element types rather than dom element types. this is all we need anyway since we only
+        // see faults containing those values
+        fault.setSoapFaultType(soapFault.getSoapFaultType().getValue());
+        fault.setReason(soapFault.getReason());
+        fault.setSubCode(soapFault.getSubcode());
+
+        port.faultOperation(fault);
+    }
+
+    /**
+     * Get the Terminator Coordinator client singleton.
+     * @return The Terminator Coordinator client singleton.
+     */
+    public static TerminationParticipantClient getClient()
+    {
+        return CLIENT ;
+    }
+
+    private TerminationParticipantPortType getPort(final W3CEndpointReference endpoint,
+                                                   final AddressingProperties addressingProperties,
+                                                   final InstanceIdentifier identifier,
+                                                   final AttributedURI action)
+    {
+        // we only need the message id from the addressing properties as the address is already wrapped up
+        // in the ednpoint reference. also the identifier should already be installed in the endpoint
+        // reference as a reference parameter so we don't need that either
+        return WSARJTXClient.getTerminationParticipantPort(endpoint, action, addressingProperties);
+    }
+}
\ No newline at end of file

Added: labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices11/wsarjtx/client/WSARJTXClient.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices11/wsarjtx/client/WSARJTXClient.java	                        (rev 0)
+++ labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices11/wsarjtx/client/WSARJTXClient.java	2008-01-25 17:18:13 UTC (rev 18124)
@@ -0,0 +1,140 @@
+package com.arjuna.webservices11.wsarjtx.client;
+
+import com.arjuna.schemas.ws._2005._10.wsarjtx.TerminationCoordinatorPortType;
+import com.arjuna.schemas.ws._2005._10.wsarjtx.TerminationCoordinatorService;
+import com.arjuna.schemas.ws._2005._10.wsarjtx.TerminationParticipantPortType;
+import com.arjuna.schemas.ws._2005._10.wsarjtx.TerminationParticipantService;
+import com.arjuna.webservices11.wsarj.handler.InstanceIdentifierHandler;
+
+import javax.xml.ws.BindingProvider;
+import javax.xml.ws.addressing.AddressingBuilder;
+import javax.xml.ws.addressing.AddressingProperties;
+import javax.xml.ws.addressing.AttributedURI;
+import javax.xml.ws.addressing.JAXWSAConstants;
+import javax.xml.ws.handler.Handler;
+import javax.xml.ws.soap.AddressingFeature;
+import javax.xml.ws.wsaddressing.W3CEndpointReference;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+import java.net.URISyntaxException;
+
+import org.jboss.ws.extensions.addressing.jaxws.WSAddressingClientHandler;
+
+/**
+ * Created by IntelliJ IDEA.
+ * User: adinn
+ * Date: Oct 7, 2007
+ * Time: 3:14:28 PM
+ * To change this template use File | Settings | File Templates.
+ */
+public class WSARJTXClient
+{
+    // TODO -- do we really need a thread local here or can we just use one service?
+    /**
+     *  thread local which maintains a per thread termination coordinator service instance
+     */
+    private static ThreadLocal<TerminationCoordinatorService> terminationCoordinatorService = new ThreadLocal<TerminationCoordinatorService>();
+
+    /**
+     *  thread local which maintains a per thread termination participant service instance
+     */
+    private static ThreadLocal<TerminationParticipantService> terminationParticipantService = new ThreadLocal<TerminationParticipantService>();
+
+    /**
+     *  builder used to construct addressing info for calls
+     */
+    private static AddressingBuilder builder = AddressingBuilder.getAddressingBuilder();
+
+    /**
+     * fetch a termination coordinator service unique to the current thread
+     * @return
+     */
+    private static synchronized TerminationCoordinatorService getTerminationCoordinatorService()
+    {
+        if (terminationCoordinatorService.get() == null) {
+            terminationCoordinatorService.set(new TerminationCoordinatorService());
+        }
+        return terminationCoordinatorService.get();
+    }
+
+    /**
+     * fetch a termination participant service unique to the current thread
+     * @return
+     */
+    private static synchronized TerminationParticipantService getTerminationParticipantService()
+    {
+        if (terminationParticipantService.get() == null) {
+            terminationParticipantService.set(new TerminationParticipantService());
+        }
+        return terminationParticipantService.get();
+    }
+
+    public static TerminationCoordinatorPortType getTerminationCoordinatorPort(W3CEndpointReference endpointReference,
+                                                                                AttributedURI action,
+                                                                                AddressingProperties addressingProperties)
+    {
+        TerminationCoordinatorService service = getTerminationCoordinatorService();
+        TerminationCoordinatorPortType port = service.getPort(endpointReference, TerminationCoordinatorPortType.class, new AddressingFeature(true, true));
+        BindingProvider bindingProvider = (BindingProvider)port;
+        /*
+         * we need to configure an instance identifier handler for this port to pass the tx context either
+         * outgoing or returning. We also have to add the the WSAdressing client handler to ensure that the
+         * addressing properties are encoded into the SOAP message
+         */
+        List<Handler> customHandlerChain = new ArrayList<Handler>();
+        customHandlerChain.add(new InstanceIdentifierHandler());
+        customHandlerChain.add(new WSAddressingClientHandler());
+		bindingProvider.getBinding().setHandlerChain(customHandlerChain);
+        // the address will have been pulled out of the endpoint by getPort but we still have to set it in the
+        // addressing properties along with the action and message id
+        Map<String, Object> requestContext = bindingProvider.getRequestContext();
+        String address = (String)requestContext.get(BindingProvider.ENDPOINT_ADDRESS_PROPERTY);
+        try {
+            addressingProperties.setTo(builder.newURI(address));
+        } catch (URISyntaxException use) {
+            // TODO -- log unexpected error here
+        }
+        addressingProperties.setAction(action);
+        requestContext.put(JAXWSAConstants.CLIENT_ADDRESSING_PROPERTIES, addressingProperties);
+	    // jbossws should do this for us . . .
+	    requestContext.put(JAXWSAConstants.CLIENT_ADDRESSING_PROPERTIES_OUTBOUND, addressingProperties);
+
+        return port;
+    }
+
+    // don't think we ever need this as we get a registration port from the endpoint ref returned by
+    // the activation port request
+    public static TerminationParticipantPortType getTerminationParticipantPort(W3CEndpointReference endpointReference,
+                                                                               AttributedURI action,
+                                                                               AddressingProperties addressingProperties)
+    {
+        TerminationParticipantService service = getTerminationParticipantService();
+        TerminationParticipantPortType port = service.getPort(endpointReference, TerminationParticipantPortType.class, new AddressingFeature(true, true));
+        BindingProvider bindingProvider = (BindingProvider)port;
+        /*
+         * we need to configure an instance identifier handler for this port to pass the tx context either
+         * outgoing or returning. We also have to add the the WSAdressing client handler to ensure that the
+         * addressing properties are encoded into the SOAP message
+         */
+        List<Handler> customHandlerChain = new ArrayList<Handler>();
+        customHandlerChain.add(new InstanceIdentifierHandler());
+        customHandlerChain.add(new WSAddressingClientHandler());
+		bindingProvider.getBinding().setHandlerChain(customHandlerChain);
+        // the address will have been pulled out of the endpoint by getPort but we still have to set it in the
+        // addressing properties along with the action and message id
+        Map<String, Object> requestContext = bindingProvider.getRequestContext();
+        String address = (String)requestContext.get(BindingProvider.ENDPOINT_ADDRESS_PROPERTY);
+        try {
+            addressingProperties.setTo(builder.newURI(address));
+        } catch (URISyntaxException use) {
+            // TODO -- log unexpected error here
+        }
+        addressingProperties.setAction(action);
+        requestContext.put(JAXWSAConstants.CLIENT_ADDRESSING_PROPERTIES, addressingProperties);
+	    // jbossws should do this for us . . .
+	    requestContext.put(JAXWSAConstants.CLIENT_ADDRESSING_PROPERTIES_OUTBOUND, addressingProperties);
+
+        return port;
+    }
+}
\ No newline at end of file

Added: labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices11/wsarjtx/processors/TerminationCoordinatorProcessor.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices11/wsarjtx/processors/TerminationCoordinatorProcessor.java	                        (rev 0)
+++ labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices11/wsarjtx/processors/TerminationCoordinatorProcessor.java	2008-01-25 17:18:13 UTC (rev 18124)
@@ -0,0 +1,108 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. 
+ * 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.webservices11.wsarjtx.processors;
+
+import com.arjuna.schemas.ws._2005._10.wsarjtx.NotificationType;
+import com.arjuna.webservices11.wsarj.ArjunaContext;
+import com.arjuna.webservices11.wsarj.InstanceIdentifier;
+import com.arjuna.wst11.BusinessActivityTerminator;
+
+import javax.xml.ws.addressing.AddressingProperties;
+
+/**
+ * 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) ;
+
+    /**
+     * Get the participant with the specified identifier.
+     * @param instanceIdentifier The participant identifier.
+     * @return The participant or null if not known.
+     */
+    public abstract BusinessActivityTerminator getParticipant(final InstanceIdentifier instanceIdentifier) ;
+
+    /**
+     * Cancel.
+     * @param cancel The cancel notification.
+     * @param addressingProperties The addressing context.
+     * @param arjunaContext The arjuna context.
+     */
+    public abstract void cancel(final NotificationType cancel, final AddressingProperties addressingProperties,
+        final ArjunaContext arjunaContext) ;
+
+    /**
+     * Close.
+     * @param close The close notification.
+     * @param addressingProperties The addressing context.
+     * @param arjunaContext The arjuna context.
+     */
+    public abstract void close(final NotificationType close, final AddressingProperties addressingProperties,
+        final ArjunaContext arjunaContext) ;
+
+    /**
+     * Complete.
+     * @param complete The complete notification.
+     * @param addressingProperties The addressing context.
+     * @param arjunaContext The arjuna context.
+     */
+    public abstract void complete(final NotificationType complete, final AddressingProperties addressingProperties,
+        final ArjunaContext arjunaContext) ;
+}
\ No newline at end of file

Added: labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices11/wsarjtx/processors/TerminationParticipantCallback.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices11/wsarjtx/processors/TerminationParticipantCallback.java	                        (rev 0)
+++ labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices11/wsarjtx/processors/TerminationParticipantCallback.java	2008-01-25 17:18:13 UTC (rev 18124)
@@ -0,0 +1,80 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. 
+ * 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.webservices11.wsarjtx.processors;
+
+import com.arjuna.schemas.ws._2005._10.wsarjtx.NotificationType;
+import com.arjuna.webservices.SoapFault;
+import com.arjuna.webservices.base.processors.Callback;
+import com.arjuna.webservices11.wsarj.ArjunaContext;
+
+import javax.xml.ws.addressing.AddressingProperties;
+
+/**
+ * The Terminator Coordinator callback.
+ * @author kevin
+ */
+public abstract class TerminationParticipantCallback extends Callback
+{
+    /**
+     * A cancelled response.
+     * @param cancelled The cancelled notification.
+     * @param addressingProperties The addressing context.
+     * @param arjunaContext The arjuna context.
+     */
+    public abstract void cancelled(final NotificationType cancelled, final AddressingProperties addressingProperties,
+        final ArjunaContext arjunaContext) ;
+
+    /**
+     * A closed response.
+     * @param closed The closed notification.
+     * @param addressingProperties The addressing context.
+     * @param arjunaContext The arjuna context.
+     */
+    public abstract void closed(final NotificationType closed, final AddressingProperties addressingProperties,
+        final ArjunaContext arjunaContext) ;
+
+    /**
+     * A completed response.
+     * @param completed The completed notification.
+     * @param addressingProperties The addressing context.
+     * @param arjunaContext The arjuna context.
+     */
+    public abstract void completed(final NotificationType completed, final AddressingProperties addressingProperties,
+        final ArjunaContext arjunaContext) ;
+
+    /**
+     * A faulted response.
+     * @param faulted The faulted notification.
+     * @param addressingProperties The addressing context.
+     * @param arjunaContext The arjuna context.
+     */
+    public abstract void faulted(final NotificationType faulted, final AddressingProperties addressingProperties,
+        final ArjunaContext arjunaContext) ;
+
+    /**
+     * A SOAP fault response.
+     * @param soapFault The SOAP fault.
+     * @param addressingProperties The addressing context.
+     * @param arjunaContext The arjuna context.
+     */
+    public abstract void soapFault(final SoapFault soapFault, final AddressingProperties addressingProperties,
+        final ArjunaContext arjunaContext) ;
+}
\ No newline at end of file

Added: labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices11/wsarjtx/processors/TerminationParticipantProcessor.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices11/wsarjtx/processors/TerminationParticipantProcessor.java	                        (rev 0)
+++ labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices11/wsarjtx/processors/TerminationParticipantProcessor.java	2008-01-25 17:18:13 UTC (rev 18124)
@@ -0,0 +1,140 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. 
+ * 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.webservices11.wsarjtx.processors;
+
+import com.arjuna.schemas.ws._2005._10.wsarjtx.NotificationType;
+import com.arjuna.webservices.SoapFault;
+import com.arjuna.webservices.base.processors.Callback;
+import com.arjuna.webservices11.wsarj.ArjunaContext;
+import com.arjuna.webservices11.wsarj.processor.BaseNotificationProcessor;
+
+import javax.xml.ws.addressing.AddressingProperties;
+
+/**
+ * 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 addressingProperties The addressing context.
+     * @param arjunaContext The arjuna context.
+     */
+    public void handleCancelled(final NotificationType cancelled, final AddressingProperties addressingProperties,
+        final ArjunaContext arjunaContext)
+    {
+        handleCallbacks(new CallbackExecutorAdapter() {
+            public void execute(final Callback callback) {
+                ((TerminationParticipantCallback)callback).cancelled(cancelled, addressingProperties, arjunaContext) ;
+            }
+        }, getIDs(addressingProperties, arjunaContext)) ;
+    }
+
+    /**
+     * Handle a closed response.
+     * @param closed The closed notification.
+     * @param addressingProperties The addressing context.
+     * @param arjunaContext The arjuna context.
+     */
+    public void handleClosed(final NotificationType closed, final AddressingProperties addressingProperties,
+        final ArjunaContext arjunaContext)
+    {
+        handleCallbacks(new CallbackExecutorAdapter() {
+            public void execute(final Callback callback) {
+                ((TerminationParticipantCallback)callback).closed(closed, addressingProperties, arjunaContext) ;
+            }
+        }, getIDs(addressingProperties, arjunaContext)) ;
+    }
+
+    /**
+     * Handle a completed response.
+     * @param completed The completed notification.
+     * @param addressingProperties The addressing context.
+     * @param arjunaContext The arjuna context.
+     */
+    public void handleCompleted(final NotificationType completed, final AddressingProperties addressingProperties,
+        final ArjunaContext arjunaContext)
+    {
+        handleCallbacks(new CallbackExecutorAdapter() {
+            public void execute(final Callback callback) {
+                ((TerminationParticipantCallback)callback).completed(completed, addressingProperties, arjunaContext) ;
+            }
+        }, getIDs(addressingProperties, arjunaContext)) ;
+    }
+
+    /**
+     * Handle a faulted response.
+     * @param faulted The faulted notification.
+     * @param addressingProperties The addressing context.
+     * @param arjunaContext The arjuna context.
+     */
+    public void handleFaulted(final NotificationType faulted, final AddressingProperties addressingProperties,
+        final ArjunaContext arjunaContext)
+    {
+        handleCallbacks(new CallbackExecutorAdapter() {
+            public void execute(final Callback callback) {
+                ((TerminationParticipantCallback)callback).faulted(faulted, addressingProperties, arjunaContext) ;
+            }
+        }, getIDs(addressingProperties, arjunaContext)) ;
+    }
+
+    /**
+     * Handle a SOAP fault response.
+     * @param soapFault The SOAP fault.
+     * @param addressingProperties The addressing context.
+     * @param arjunaContext The arjuna context.
+     */
+    public void handleSoapFault(final SoapFault soapFault, final AddressingProperties addressingProperties,
+        final ArjunaContext arjunaContext)
+    {
+        handleCallbacks(new CallbackExecutorAdapter() {
+            public void execute(final Callback callback) {
+                ((TerminationParticipantCallback)callback).soapFault(soapFault, addressingProperties, arjunaContext) ;
+            }
+        }, getIDs(addressingProperties, 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 TerminationParticipantCallback callback)
+    {
+        register(instanceIdentifier, callback) ;
+    }
+}
\ No newline at end of file

Added: labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices11/wsat/AtomicTransactionConstants.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices11/wsat/AtomicTransactionConstants.java	                        (rev 0)
+++ labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices11/wsat/AtomicTransactionConstants.java	2008-01-25 17:18:13 UTC (rev 18124)
@@ -0,0 +1,227 @@
+package com.arjuna.webservices11.wsat;
+
+import javax.xml.namespace.QName;
+
+/**
+ * Interface containing WS-AtomicTransaction constants.
+ */
+public interface AtomicTransactionConstants
+{
+    /**
+     * 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 completion coordinator service name.
+     */
+    public String COMPLETION_COORDINATOR_SERVICE_NAME = "CompletionCoordinatorService" ;
+    /**
+     * The completion coordinator service qname.
+     */
+    public QName COMPLETION_COORDINATOR_SERVICE_QNAME = new QName(WSAT_NAMESPACE, COMPLETION_COORDINATOR_SERVICE_NAME, WSAT_PREFIX);
+
+     /**
+     * The WSAT Completion Cordinator Port Name.
+     */
+    public String COMPLETION_COORDINATOR_PORT_NAME = "CompletionCoordinatorPortType";
+    /**
+     * The WSAT Completion Cordinator Port QName.
+     */
+    public QName COMPLETION_COORDINATOR_PORT_QNAME = new QName(WSAT_NAMESPACE, COMPLETION_COORDINATOR_PORT_NAME, WSAT_PREFIX);
+
+    /**
+      * The completion initiator service name.
+      */
+     public String COMPLETION_INITIATOR_SERVICE_NAME = "CompletionInitiatorService" ;
+     /**
+      * The completion initiator service qname.
+      */
+     public QName COMPLETION_INITIATOR_SERVICE_QNAME = new QName(WSAT_NAMESPACE, COMPLETION_INITIATOR_SERVICE_NAME, WSAT_PREFIX);
+    /**
+     * The WSAT Completion Initiator Port Name.
+     */
+    public String COMPLETION_INITIATOR_PORT_NAME = "CompletionInitiatorPortType";
+    /**
+     * The WSAT Completion Initiator Port QName.
+     */
+    public QName COMPLETION_INITIATOR_PORT_QNAME = new QName(WSAT_NAMESPACE, COMPLETION_INITIATOR_PORT_NAME, WSAT_PREFIX);
+
+    /**
+     * The coordinator service name.
+     */
+    public String COORDINATOR_SERVICE_NAME = "CoordinatorService" ;
+    /**
+     * The coordinator service qname.
+     */
+    public QName COORDINATOR_SERVICE_QNAME = new QName(WSAT_NAMESPACE, COORDINATOR_SERVICE_NAME, WSAT_PREFIX);
+    /**
+     * The WSAT Cordinator Port Name.
+     */
+    public String COORDINATOR_PORT_NAME = "CoordinatorPortType";
+    /**
+     * The WSAT Cordinator Port QName.
+     */
+    public QName COORDINATOR_PORT_QNAME = new QName(WSAT_NAMESPACE, COORDINATOR_PORT_NAME, WSAT_PREFIX);
+
+    /**
+     * The participant service name.
+     */
+    public String PARTICIPANT_SERVICE_NAME = "ParticipantService" ;
+    /**
+     * The participant service qname.
+     */
+    public QName PARTICIPANT_SERVICE_QNAME = new QName(WSAT_NAMESPACE, PARTICIPANT_SERVICE_NAME, WSAT_PREFIX);
+    /**
+     * The WSAT Participant Port Name.
+     */
+    public String PARTICIPANT_PORT_NAME = "ParticipantPortType";
+    /**
+     * The WSAT Participant Port QName.
+     */
+    public QName PARTICIPANT_PORT_QNAME = new QName(WSAT_NAMESPACE, PARTICIPANT_PORT_NAME, WSAT_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 vote attribute.
+     */
+    public String WSAT_ATTRIBUTE_VOTE = "vote" ;
+    /**
+     * The vote QName.
+     */
+    public QName WSAT_ATTRIBUTE_VOTE_QNAME = new QName(WSAT_ATTRIBUTE_NAMESPACE, WSAT_ATTRIBUTE_VOTE, WSAT_ATTRIBUTE_PREFIX) ;
+    /**
+     * The outcome attribute.
+     */
+    public String WSAT_ATTRIBUTE_OUTCOME = "outcome" ;
+    /**
+     * The outcome QName.
+     */
+    public QName WSAT_ATTRIBUTE_OUTCOME_QNAME = new QName(WSAT_ATTRIBUTE_NAMESPACE, WSAT_ATTRIBUTE_OUTCOME, WSAT_ATTRIBUTE_PREFIX) ;
+
+    /**
+     * 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 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" ;
+}

Added: labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices11/wsat/CoordinatorInboundEvents.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices11/wsat/CoordinatorInboundEvents.java	                        (rev 0)
+++ labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices11/wsat/CoordinatorInboundEvents.java	2008-01-25 17:18:13 UTC (rev 18124)
@@ -0,0 +1,61 @@
+package com.arjuna.webservices11.wsat;
+
+import com.arjuna.webservices11.wsarj.ArjunaContext;
+import com.arjuna.webservices.SoapFault;
+
+import javax.xml.ws.addressing.AddressingProperties;
+import javax.xml.ws.wsaddressing.W3CEndpointReference;
+
+import org.oasis_open.docs.ws_tx.wsat._2006._06.Notification;
+
+/**
+ * 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 Notification aborted, final AddressingProperties addressingContext, final ArjunaContext arjunaContext) ;
+
+    /**
+     * Handle the committed event.
+     * @param committed The committed notification.
+     * @param addressingContext The addressing context.
+     * @param arjunaContext The arjuna context.
+     */
+    public void committed(final Notification committed, final AddressingProperties addressingContext, final ArjunaContext arjunaContext) ;
+
+    /**
+     * Handle the prepared event.
+     * @param prepared The prepared notification.
+     * @param addressingContext The addressing context.
+     * @param arjunaContext The arjuna context.
+     */
+    public void prepared(final Notification prepared, final AddressingProperties addressingContext, final ArjunaContext arjunaContext) ;
+
+    /**
+     * Handle the readOnly event.
+     * @param readOnly The readOnly notification.
+     * @param addressingContext The addressing context.
+     * @param arjunaContext The arjuna context.
+     */
+    public void readOnly(final Notification readOnly, final AddressingProperties addressingContext, final ArjunaContext 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 AddressingProperties addressingContext, final ArjunaContext arjunaContext) ;
+
+    /**
+     * Get the participant endpoint reference
+     * @return The participant endpoint reference
+     */
+    public W3CEndpointReference getParticipant();
+}

Added: labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices11/wsat/ParticipantInboundEvents.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices11/wsat/ParticipantInboundEvents.java	                        (rev 0)
+++ labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices11/wsat/ParticipantInboundEvents.java	2008-01-25 17:18:13 UTC (rev 18124)
@@ -0,0 +1,52 @@
+package com.arjuna.webservices11.wsat;
+
+import com.arjuna.webservices11.wsarj.ArjunaContext;
+import com.arjuna.webservices.SoapFault;
+
+import javax.xml.ws.addressing.AddressingProperties;
+import javax.xml.ws.wsaddressing.W3CEndpointReference;
+
+import org.oasis_open.docs.ws_tx.wsat._2006._06.Notification;
+
+/**
+ * The Participant events.
+ */
+public interface ParticipantInboundEvents
+{
+    /**
+     * Handle the commit event.
+     * @param commit The commit notification.
+     * @param addressingProperties The addressing context.
+     * @param arjunaContext The arjuna context.
+     */
+    public void commit(final Notification commit, final AddressingProperties addressingProperties, final ArjunaContext arjunaContext) ;
+
+    /**
+     * Handle the prepare event.
+     * @param prepare The prepare notification.
+     * @param addressingProperties The addressing context.
+     * @param arjunaContext The arjuna context.
+     */
+    public void prepare(final Notification prepare, final AddressingProperties addressingProperties, final ArjunaContext arjunaContext) ;
+
+    /**
+     * Handle the rollback event.
+     * @param rollback The rollback notification.
+     * @param addressingProperties The addressing context.
+     * @param arjunaContext The arjuna context.
+     */
+    public void rollback(final Notification rollback, final AddressingProperties addressingProperties, final ArjunaContext arjunaContext) ;
+
+    /**
+     * Handle the soap fault event.
+     * @param soapFault The soap fault.
+     * @param addressingProperties The addressing context.
+     * @param arjunaContext The arjuna context.
+     */
+    public void soapFault(final SoapFault soapFault, final AddressingProperties addressingProperties, final ArjunaContext arjunaContext) ;
+    /**
+     * Return the endpoint reference for the coordinator associated with this participant.
+     * @return the coordinator endpoint reference
+     */
+    public W3CEndpointReference getCoordinator();
+}

Added: labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices11/wsat/State.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices11/wsat/State.java	                        (rev 0)
+++ labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices11/wsat/State.java	2008-01-25 17:18:13 UTC (rev 18124)
@@ -0,0 +1,118 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. 
+ * 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.webservices11.wsat;
+
+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 value 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 com.arjuna.webservices.util.InvalidEnumerationException if the value is not valid.
+     */
+    protected Enumerated resolveEnum(final Object value)
+        throws InvalidEnumerationException
+    {
+        return toState11((String)value) ;
+    }
+
+    /**
+     * Return the enumeration for the specified value.
+     * @param value The value.
+     * @return The enumeration.
+     * @throws com.arjuna.webservices.util.InvalidEnumerationException if the value is not valid.
+     * @message com.arjuna.webservices.wsat.State11_1 [com.arjuna.webservices.wsat.State11_1] - Invalid fault type enumeration: {0}
+     */
+    public static State toState11(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.wsat.State11_1") ;
+            final String message = MessageFormat.format(pattern, new Object[] {value}) ;
+            throw new InvalidEnumerationException(message) ;
+        }
+        return (State)state ;
+    }
+}
\ No newline at end of file

Added: labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices11/wsat/client/CompletionCoordinatorClient.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices11/wsat/client/CompletionCoordinatorClient.java	                        (rev 0)
+++ labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices11/wsat/client/CompletionCoordinatorClient.java	2008-01-25 17:18:13 UTC (rev 18124)
@@ -0,0 +1,126 @@
+package com.arjuna.webservices11.wsat.client;
+
+import com.arjuna.webservices.SoapFault;
+import com.arjuna.webservices11.wsarj.InstanceIdentifier;
+import com.arjuna.webservices11.wsat.AtomicTransactionConstants;
+import com.arjuna.webservices11.wsat.client.WSATClient;
+import com.arjuna.webservices11.ServiceRegistry;
+import org.oasis_open.docs.ws_tx.wsat._2006._06.CompletionCoordinatorPortType;
+import org.oasis_open.docs.ws_tx.wsat._2006._06.Notification;
+
+import javax.xml.ws.addressing.AddressingBuilder;
+import javax.xml.ws.addressing.AddressingProperties;
+import javax.xml.ws.addressing.AttributedURI;
+import javax.xml.ws.wsaddressing.W3CEndpointReference;
+import java.io.IOException;
+import java.net.URISyntaxException;
+
+/**
+ * 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 AttributedURI commitAction = null;
+    /**
+     * The rollback action.
+     */
+    private AttributedURI rollbackAction = null;
+
+    /**
+     * The completion initiator URI for replies.
+     */
+    private AttributedURI completionInitiator ;
+
+    /**
+     * Construct the completion coordinator client.
+     */
+    private CompletionCoordinatorClient()
+    {
+        final AddressingBuilder builder = AddressingBuilder.getAddressingBuilder();
+        try {
+            commitAction = builder.newURI(AtomicTransactionConstants.WSAT_ACTION_COMMIT);
+            rollbackAction = builder.newURI(AtomicTransactionConstants.WSAT_ACTION_ROLLBACK);
+        } catch (URISyntaxException use) {
+            // TODO - log fault and throw exception
+        }
+        // final HandlerRegistry handlerRegistry = new HandlerRegistry() ;
+
+        // Add WS-Addressing
+        // AddressingPolicy.register(handlerRegistry) ;
+        // Add client policies
+        // ClientPolicy.register(handlerRegistry) ;
+
+        final String completionInitiatorURI =
+            ServiceRegistry.getRegistry().getServiceURI(AtomicTransactionConstants.COMPLETION_INITIATOR_SERVICE_NAME) ;
+        try {
+            completionInitiator = builder.newURI(completionInitiatorURI) ;
+        } catch (URISyntaxException use) {
+            // TODO - log fault and throw exception
+        }
+    }
+
+    /**
+     * Send a commit request.
+     * @param addressingProperties addressing context initialised with to and message ID.
+     * @param identifier The identifier of the initiator.
+     * @throws com.arjuna.webservices.SoapFault For any errors.
+     * @throws java.io.IOException for any transport errors.
+     */
+    public void sendCommit(final W3CEndpointReference endpoint, final AddressingProperties addressingProperties, final InstanceIdentifier identifier)
+        throws SoapFault, IOException
+    {
+        CompletionCoordinatorPortType port = getPort(endpoint, addressingProperties, commitAction);
+        Notification commit = new Notification();
+
+        port.commitOperation(commit);
+    }
+
+    /**
+     * Send a rollback request.
+     * @param addressingProperties addressing context initialised with to and message ID.
+     * @param identifier The identifier of the initiator.
+     * @throws com.arjuna.webservices.SoapFault For any errors.
+     * @throws java.io.IOException for any transport errors.
+     */
+    public void sendRollback(final W3CEndpointReference endpoint, final AddressingProperties addressingProperties, final InstanceIdentifier identifier)
+        throws SoapFault, IOException
+    {
+        CompletionCoordinatorPortType port = getPort(endpoint, addressingProperties, rollbackAction);
+        Notification rollback = new Notification();
+                
+        port.rollbackOperation(rollback);
+    }
+
+    /**
+     * Get the Completion Coordinator client singleton.
+     * @return The Completion Coordinator client singleton.
+     */
+    public static CompletionCoordinatorClient getClient()
+    {
+        return CLIENT;
+    }
+
+    /**
+     * obtain a port from the endpoint configured with the instance identifier handler and the supplied
+     * addressing properties supplemented with the given action
+     * @param endpoint
+     * @param addressingProperties
+     * @param action
+     * @return
+     */
+    private CompletionCoordinatorPortType getPort(final W3CEndpointReference endpoint,
+                                                  final AddressingProperties addressingProperties,
+                                                  final AttributedURI action)
+    {
+        return WSATClient.getCompletionCoordinatorPort(endpoint, action, addressingProperties);
+    }
+}

Added: labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices11/wsat/client/CompletionInitiatorClient.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices11/wsat/client/CompletionInitiatorClient.java	                        (rev 0)
+++ labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices11/wsat/client/CompletionInitiatorClient.java	2008-01-25 17:18:13 UTC (rev 18124)
@@ -0,0 +1,145 @@
+package com.arjuna.webservices11.wsat.client;
+
+import com.arjuna.webservices.SoapFault;
+import com.arjuna.webservices11.wsarj.InstanceIdentifier;
+import com.arjuna.webservices11.wsat.AtomicTransactionConstants;
+import com.arjuna.webservices11.wsat.client.WSATClient;
+import com.arjuna.webservices11.ServiceRegistry;
+import org.oasis_open.docs.ws_tx.wsat._2006._06.CompletionInitiatorPortType;
+import org.oasis_open.docs.ws_tx.wsat._2006._06.Notification;
+
+import javax.xml.ws.addressing.AddressingBuilder;
+import javax.xml.ws.addressing.AddressingProperties;
+import javax.xml.ws.addressing.AttributedURI;
+import javax.xml.ws.wsaddressing.W3CEndpointReference;
+import java.io.IOException;
+import java.net.URISyntaxException;
+
+/**
+ * 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 AttributedURI committedAction = null;
+    /**
+     * The aborted action.
+     */
+    private AttributedURI abortedAction = null;
+    /**
+     * The fault action.
+     */
+    private AttributedURI faultAction = null;
+
+    /**
+     * The completion coordinator URI for replies.
+     */
+    private AttributedURI completionCoordinator ;
+
+    /**
+     * Construct the completion initiator client.
+     */
+    private CompletionInitiatorClient()
+    {
+        final AddressingBuilder builder = AddressingBuilder.getAddressingBuilder();
+        try {
+            committedAction = builder.newURI(AtomicTransactionConstants.WSAT_ACTION_COMMITTED);
+            abortedAction = builder.newURI(AtomicTransactionConstants.WSAT_ACTION_ABORTED);
+            faultAction = builder.newURI(AtomicTransactionConstants.WSAT_ACTION_FAULT);
+        } catch (URISyntaxException use) {
+            // TODO - log fault and throw exception
+        }
+        // final HandlerRegistry handlerRegistry = new HandlerRegistry() ;
+
+        // Add WS-Addressing
+        // AddressingPolicy.register(handlerRegistry) ;
+        // Add client policies
+        // ClientPolicy.register(handlerRegistry) ;
+
+        final String completionCoordinatorURI =
+            ServiceRegistry.getRegistry().getServiceURI(AtomicTransactionConstants.COMPLETION_COORDINATOR_SERVICE_NAME) ;
+        try {
+            completionCoordinator = builder.newURI(completionCoordinatorURI) ;
+        } catch (URISyntaxException use) {
+            // TODO - log fault and throw exception
+        }
+    }
+
+    /**
+     * Send a committed request.
+     * @param addressingProperties addressing context initialised with to and message ID.
+     * @param identifier The identifier of the initiator.
+     * @throws com.arjuna.webservices.SoapFault For any errors.
+     * @throws java.io.IOException for any transport errors.
+     */
+    public void sendCommitted(final W3CEndpointReference participant, final AddressingProperties addressingProperties, final InstanceIdentifier identifier)
+        throws SoapFault, IOException
+    {
+        CompletionInitiatorPortType port = getPort(participant, addressingProperties, committedAction);
+        Notification commited = new Notification();
+
+        port.committedOperation(commited);
+    }
+
+    /**
+     * Send an aborted request.
+     * @param addressingProperties addressing context initialised with to and message ID.
+     * @param identifier The identifier of the initiator.
+     * @throws com.arjuna.webservices.SoapFault For any errors.
+     * @throws java.io.IOException for any transport errors.
+     */
+    public void sendAborted(final W3CEndpointReference participant, final AddressingProperties addressingProperties, final InstanceIdentifier identifier)
+        throws SoapFault, IOException
+    {
+        CompletionInitiatorPortType port = getPort(participant, addressingProperties, abortedAction);
+        Notification aborted = new Notification();
+
+        port.abortedOperation(aborted);
+    }
+
+    /**
+     * Send a fault.
+     * @param addressingProperties The addressing context.
+     * @param soapFault The SOAP fault.
+     * @param identifier The arjuna instance identifier.
+     * @throws com.arjuna.webservices.SoapFault For any errors.
+     * @throws java.io.IOException for any transport errors.
+     */
+    public void sendSoapFault(final W3CEndpointReference participant, final AddressingProperties addressingProperties, final SoapFault soapFault, final InstanceIdentifier identifier)
+        throws SoapFault, IOException
+    {
+        // TODO - we only get here if we have no endpoitn so all we can do is log an error!
+    }
+
+    /**
+     * Get the Completion Coordinator client singleton.
+     * @return The Completion Coordinator client singleton.
+     */
+    public static CompletionInitiatorClient getClient()
+    {
+        return CLIENT;
+    }
+
+    /**
+     * obtain a port from the participant endpoint configured with the instance identifier handler and the supplied
+     * addressing properties supplemented with the given action
+     * @param participant
+     * @param addressingProperties
+     * @param action
+     * @return
+     */
+    private CompletionInitiatorPortType getPort(final W3CEndpointReference participant,
+                                                final AddressingProperties addressingProperties,
+                                                final AttributedURI action)
+    {
+        return WSATClient.getCompletionInitiatorPort(participant, action, addressingProperties);
+    }
+}

Added: labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices11/wsat/client/CoordinatorClient.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices11/wsat/client/CoordinatorClient.java	                        (rev 0)
+++ labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices11/wsat/client/CoordinatorClient.java	2008-01-25 17:18:13 UTC (rev 18124)
@@ -0,0 +1,187 @@
+package com.arjuna.webservices11.wsat.client;
+
+import com.arjuna.webservices.SoapFault;
+import com.arjuna.webservices11.wsarj.InstanceIdentifier;
+import com.arjuna.webservices11.wsat.AtomicTransactionConstants;
+import com.arjuna.webservices11.wsat.client.WSATClient;
+import com.arjuna.webservices11.ServiceRegistry;
+import org.oasis_open.docs.ws_tx.wsat._2006._06.CoordinatorPortType;
+import org.oasis_open.docs.ws_tx.wsat._2006._06.Notification;
+
+import javax.xml.ws.addressing.AddressingBuilder;
+import javax.xml.ws.addressing.AddressingProperties;
+import javax.xml.ws.addressing.AttributedURI;
+import javax.xml.ws.wsaddressing.W3CEndpointReference;
+import java.io.IOException;
+import java.net.URISyntaxException;
+
+/**
+ * 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 AttributedURI preparedAction = null;
+    /**
+     * The aborted action.
+     */
+    private AttributedURI abortedAction = null;
+    /**
+     * The read only action.
+     */
+    private AttributedURI readOnlyAction = null;
+    /**
+     * The committed action.
+     */
+    private AttributedURI committedAction = null;
+    /**
+     * The fault action.
+     */
+    private AttributedURI faultAction = null;
+
+    /**
+     * The participant URI for replies.
+     */
+    private AttributedURI participant ;
+
+    /**
+     * Construct the coordinator client.
+     */
+    private CoordinatorClient()
+    {
+        final AddressingBuilder builder = AddressingBuilder.getAddressingBuilder();
+        try {
+            preparedAction = builder.newURI(AtomicTransactionConstants.WSAT_ACTION_PREPARED);
+            abortedAction = builder.newURI(AtomicTransactionConstants.WSAT_ACTION_ABORTED);
+            readOnlyAction = builder.newURI(AtomicTransactionConstants.WSAT_ACTION_READ_ONLY);
+            committedAction = builder.newURI(AtomicTransactionConstants.WSAT_ACTION_COMMITTED);
+            faultAction = builder.newURI(AtomicTransactionConstants.WSAT_ACTION_FAULT);
+        } catch (URISyntaxException use) {
+            // TODO - log fault and throw exception
+        }
+        // final HandlerRegistry handlerRegistry = new HandlerRegistry() ;
+
+        // Add WS-Addressing
+        // AddressingPolicy.register(handlerRegistry) ;
+        // Add client policies
+        // ClientPolicy.register(handlerRegistry) ;
+
+        final String participantURI =
+            ServiceRegistry.getRegistry().getServiceURI(AtomicTransactionConstants.PARTICIPANT_SERVICE_NAME);
+        try {
+            participant = builder.newURI(participantURI);
+        } catch (URISyntaxException use) {
+            // TODO - log fault and throw exception
+        }
+    }
+
+    /**
+     * Send a prepared request.
+     * @param addressingProperties addressing context initialised with to and message ID.
+     * @param identifier The identifier of the initiator.
+     * @throws com.arjuna.webservices.SoapFault For any SOAP errors.
+     * @throws java.io.IOException for any transport errors.
+     */
+    public void sendPrepared(final W3CEndpointReference endpoint, final AddressingProperties addressingProperties, final InstanceIdentifier identifier)
+        throws SoapFault, IOException
+    {
+        CoordinatorPortType port = getPort(endpoint, addressingProperties, preparedAction);
+        Notification prepared = new Notification();
+
+        port.preparedOperation(prepared);
+    }
+
+    /**
+     * Send an aborted request.
+     * @param addressingProperties addressing context initialised with to and message ID.
+     * @param identifier The identifier of the initiator.
+     * @throws com.arjuna.webservices.SoapFault For any SOAP errors.
+     * @throws java.io.IOException for any transport errors.
+     */
+    public void sendAborted(final W3CEndpointReference endpoint, final AddressingProperties addressingProperties, final InstanceIdentifier identifier)
+        throws SoapFault, IOException
+    {
+        CoordinatorPortType port = getPort(endpoint, addressingProperties, abortedAction);
+        Notification aborted = new Notification();
+
+        port.abortedOperation(aborted);
+    }
+
+    /**
+     * Send a read only request.
+     * @param addressingProperties addressing context initialised with to and message ID.
+     * @param identifier The identifier of the initiator.
+     * @throws com.arjuna.webservices.SoapFault For any SOAP errors.
+     * @throws java.io.IOException for any transport errors.
+     */
+    public void sendReadOnly(final W3CEndpointReference endpoint, final AddressingProperties addressingProperties, final InstanceIdentifier identifier)
+        throws SoapFault, IOException
+    {
+        CoordinatorPortType port = getPort(endpoint, addressingProperties, readOnlyAction);
+        Notification readOnly = new Notification();
+
+        port.readOnlyOperation(readOnly);
+    }
+
+    /**
+     * Send a committed request.
+     * @param addressingProperties addressing context initialised with to and message ID.
+     * @param identifier The identifier of the initiator.
+     * @throws com.arjuna.webservices.SoapFault For any SOAP errors.
+     * @throws java.io.IOException for any transport errors.
+     */
+    public void sendCommitted(final W3CEndpointReference endpoint, final AddressingProperties addressingProperties, final InstanceIdentifier identifier)
+        throws SoapFault, IOException
+    {
+        CoordinatorPortType port = getPort(endpoint, addressingProperties, committedAction);
+        Notification committed = new Notification();
+
+        port.committedOperation(committed);
+    }
+
+    /**
+     * Send a fault.
+     * @param addressingProperties The addressing context.
+     * @param soapFault The SOAP fault.
+     * @param identifier The arjuna instance identifier.
+     * @throws com.arjuna.webservices.SoapFault For any SOAP errors.
+     * @throws java.io.IOException for any transport errors.
+     */
+    public void sendSoapFault(final W3CEndpointReference endpoint, final AddressingProperties addressingProperties, final SoapFault soapFault, final InstanceIdentifier identifier)
+        throws SoapFault, IOException
+    {
+        // TODO - we cannot do this without an endpoint so all we can do is log a message!
+    }
+
+    /**
+     * Get the Completion Coordinator client singleton.
+     * @return The Completion Coordinator client singleton.
+     */
+    public static CoordinatorClient getClient()
+    {
+        return CLIENT;
+    }
+
+    /**
+     * obtain a port from the participant endpoint configured with the instance identifier handler and the supplied
+     * addressing properties supplemented with the given action
+     * @param participant
+     * @param addressingProperties
+     * @param action
+     * @return
+     */
+    private CoordinatorPortType getPort(final W3CEndpointReference participant,
+                                                final AddressingProperties addressingProperties,
+                                                final AttributedURI action)
+    {
+        return WSATClient.getCoordinatorPort(participant, action, addressingProperties);
+    }
+}

Added: labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices11/wsat/client/ParticipantClient.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices11/wsat/client/ParticipantClient.java	                        (rev 0)
+++ labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices11/wsat/client/ParticipantClient.java	2008-01-25 17:18:13 UTC (rev 18124)
@@ -0,0 +1,165 @@
+package com.arjuna.webservices11.wsat.client;
+
+import com.arjuna.webservices.SoapFault;
+import com.arjuna.webservices11.wsarj.InstanceIdentifier;
+import com.arjuna.webservices11.wsat.AtomicTransactionConstants;
+import com.arjuna.webservices11.wsat.client.WSATClient;
+import com.arjuna.webservices11.ServiceRegistry;
+import org.oasis_open.docs.ws_tx.wsat._2006._06.Notification;
+import org.oasis_open.docs.ws_tx.wsat._2006._06.ParticipantPortType;
+
+import javax.xml.ws.addressing.AddressingBuilder;
+import javax.xml.ws.addressing.AddressingProperties;
+import javax.xml.ws.addressing.AttributedURI;
+import javax.xml.ws.wsaddressing.W3CEndpointReference;
+import java.io.IOException;
+import java.net.URISyntaxException;
+
+/**
+ * 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 AttributedURI prepareAction = null;
+    /**
+     * The commit action.
+     */
+    private AttributedURI commitAction = null;
+    /**
+     * The rollback action.
+     */
+    private AttributedURI rollbackAction = null;
+    /**
+     * The SOAP fault action.
+     */
+    private AttributedURI faultAction;
+
+    /**
+     * The coordinator URI for replies.
+     */
+    private AttributedURI coordinator ;
+
+    /**
+     * Construct the completion initiator client.
+     */
+    {
+        final AddressingBuilder builder = AddressingBuilder.getAddressingBuilder();
+        try {
+            prepareAction = builder.newURI(AtomicTransactionConstants.WSAT_ACTION_PREPARE);
+            commitAction = builder.newURI(AtomicTransactionConstants.WSAT_ACTION_COMMIT);
+            rollbackAction = builder.newURI(AtomicTransactionConstants.WSAT_ACTION_ROLLBACK);
+            faultAction = builder.newURI(AtomicTransactionConstants.WSAT_ACTION_FAULT);
+        } catch (URISyntaxException use) {
+            // TODO - log fault and throw exception
+        }
+        // final HandlerRegistry handlerRegistry = new HandlerRegistry() ;
+
+        // Add WS-Addressing
+        // AddressingPolicy.register(handlerRegistry) ;
+        // Add client policies
+        // ClientPolicy.register(handlerRegistry) ;
+
+        final String coordinatorURI = ServiceRegistry.getRegistry().getServiceURI(AtomicTransactionConstants.COORDINATOR_SERVICE_NAME);
+        try {
+            coordinator = builder.newURI(coordinatorURI);
+        } catch (URISyntaxException use) {
+            // TODO - log fault and throw exception
+        }
+
+    }
+
+    /**
+     * Send a prepare request.
+     * @param addressingProperties addressing context initialised with to and message ID.
+     * @param identifier The identifier of the initiator.
+     * @throws com.arjuna.webservices.SoapFault For any errors.
+     * @throws java.io.IOException for any transport errors.
+     */
+    public void sendPrepare(final W3CEndpointReference endpoint, final AddressingProperties addressingProperties, final InstanceIdentifier identifier)
+        throws SoapFault, IOException
+    {
+        ParticipantPortType port = getPort(endpoint, addressingProperties, prepareAction);
+        Notification prepare = new Notification();
+
+        port.prepareOperation(prepare);
+    }
+
+    /**
+     * Send a commit request.
+     * @param addressingProperties addressing context initialised with to and message ID.
+     * @param identifier The identifier of the initiator.
+     * @throws com.arjuna.webservices.SoapFault For any errors.
+     * @throws java.io.IOException for any transport errors.
+     */
+    public void sendCommit(final W3CEndpointReference endpoint, final AddressingProperties addressingProperties, final InstanceIdentifier identifier)
+        throws SoapFault, IOException
+    {
+        ParticipantPortType port = getPort(endpoint, addressingProperties, commitAction);
+        Notification commit = new Notification();
+
+        port.commitOperation(commit);
+    }
+
+    /**
+     * Send a rollback request.
+     * @param addressingProperties addressing context initialised with to and message ID.
+     * @param identifier The identifier of the initiator.
+     * @throws com.arjuna.webservices.SoapFault For any errors.
+     * @throws java.io.IOException for any transport errors.
+     */
+    public void sendRollback(final W3CEndpointReference endpoint, final AddressingProperties addressingProperties, final InstanceIdentifier identifier)
+        throws SoapFault, IOException
+    {
+        ParticipantPortType port = getPort(endpoint, addressingProperties, rollbackAction);
+        Notification rollback = new Notification();
+
+        port.rollbackOperation(rollback);
+    }
+
+    /**
+     * Send a fault.
+     * @param addressingProperties The addressing context.
+     * @param soapFault The SOAP fault.
+     * @param identifier The arjuna instance identifier.
+     * @throws com.arjuna.webservices.SoapFault For any errors.
+     * @throws java.io.IOException for any transport errors.
+     */
+    public void sendSoapFault(final W3CEndpointReference endpoint, final AddressingProperties addressingProperties, final SoapFault soapFault, final InstanceIdentifier identifier)
+        throws SoapFault, IOException
+    {
+        // TODO - we cannot do this without an ednpoint so all we can do is log an error message!
+    }
+
+    /**
+     * Get the Completion Coordinator client singleton.
+     * @return The Completion Coordinator client singleton.
+     */
+    public static ParticipantClient getClient()
+    {
+        return CLIENT;
+    }
+
+    /**
+     * obtain a port from the participant endpoint configured with the instance identifier handler and the supplied
+     * addressing properties supplemented with the given action
+     * @param participant
+     * @param addressingProperties
+     * @param action
+     * @return
+     */
+    private ParticipantPortType getPort(final W3CEndpointReference participant,
+                                                final AddressingProperties addressingProperties,
+                                                final AttributedURI action)
+    {
+        return WSATClient.getParticipantPort(participant, action, addressingProperties);
+    }
+}

Added: labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices11/wsat/client/WSATClient.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices11/wsat/client/WSATClient.java	                        (rev 0)
+++ labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices11/wsat/client/WSATClient.java	2008-01-25 17:18:13 UTC (rev 18124)
@@ -0,0 +1,236 @@
+package com.arjuna.webservices11.wsat.client;
+
+import com.arjuna.webservices11.wsarj.handler.InstanceIdentifierHandler;
+import org.oasis_open.docs.ws_tx.wsat._2006._06.*;
+import org.jboss.ws.extensions.addressing.jaxws.WSAddressingClientHandler;
+
+import javax.xml.ws.BindingProvider;
+import javax.xml.ws.addressing.AddressingBuilder;
+import javax.xml.ws.addressing.AddressingProperties;
+import javax.xml.ws.addressing.AttributedURI;
+import javax.xml.ws.addressing.JAXWSAConstants;
+import javax.xml.ws.handler.Handler;
+import javax.xml.ws.soap.AddressingFeature;
+import javax.xml.ws.wsaddressing.W3CEndpointReference;
+import java.net.URISyntaxException;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * Created by IntelliJ IDEA.
+ * User: adinn
+ * Date: Oct 7, 2007
+ * Time: 3:14:28 PM
+ * To change this template use File | Settings | File Templates.
+ */
+public class WSATClient
+{
+    // TODO -- do we really need a thread local here or can we just use one service?
+    /**
+     *  thread local which maintains a per thread coordinator service instance
+     */
+    private static ThreadLocal<CoordinatorService> coordinatorService = new ThreadLocal<CoordinatorService>();
+
+    /**
+     *  thread local which maintains a per thread participant service instance
+     */
+    private static ThreadLocal<ParticipantService> participantService = new ThreadLocal<ParticipantService>();
+
+    /**
+     *  thread local which maintains a per thread completion coordinator service instance
+     */
+    private static ThreadLocal<CompletionCoordinatorService> completionCoordinatorService = new ThreadLocal<CompletionCoordinatorService>();
+
+    /**
+     *  thread local which maintains a per thread completion initiator service instance
+     */
+    private static ThreadLocal<CompletionInitiatorService> completionInitiatorService = new ThreadLocal<CompletionInitiatorService>();
+
+    /**
+     *  builder used to construct addressing info for calls
+     */
+    private static AddressingBuilder builder = AddressingBuilder.getAddressingBuilder();
+
+    /**
+     * fetch a coordinator service unique to the current thread
+     * @return
+     */
+    private static synchronized CoordinatorService getCoordinatorService()
+    {
+        if (coordinatorService.get() == null) {
+            coordinatorService.set(new CoordinatorService());
+        }
+        return coordinatorService.get();
+    }
+
+    /**
+     * fetch a participant service unique to the current thread
+     * @return
+     */
+    private static synchronized ParticipantService getParticipantService()
+    {
+        if (participantService.get() == null) {
+            participantService.set(new ParticipantService());
+        }
+        return participantService.get();
+    }
+
+    /**
+     * fetch a completion coordinator service unique to the current thread
+     * @return
+     */
+    private static synchronized CompletionCoordinatorService getCompletionCoordinatorService()
+    {
+        if (completionCoordinatorService.get() == null) {
+            completionCoordinatorService.set(new CompletionCoordinatorService());
+        }
+        return completionCoordinatorService.get();
+    }
+
+    /**
+     * fetch a completion initiator service unique to the current thread
+     * @return
+     */
+    private static synchronized CompletionInitiatorService getCompletionInitiatorService()
+    {
+        if (completionInitiatorService.get() == null) {
+            completionInitiatorService.set(new CompletionInitiatorService());
+        }
+        return completionInitiatorService.get();
+    }
+
+    public static CoordinatorPortType getCoordinatorPort(W3CEndpointReference endpointReference,
+                                                         AttributedURI action,
+                                                         AddressingProperties addressingProperties)
+    {
+        CoordinatorService service = getCoordinatorService();
+        CoordinatorPortType port = service.getPort(endpointReference, CoordinatorPortType.class, new AddressingFeature(true, true));
+        BindingProvider bindingProvider = (BindingProvider)port;
+        /*
+         * we need to configure an instance identifier handler for this port to pass the tx context either
+         * outgoing or returning. We also have to add the the WSAdressing client handler to ensure that the
+         * addressing properties are encoded into the SOAP message
+         */
+        List<Handler> customHandlerChain = new ArrayList<Handler>();
+        customHandlerChain.add(new InstanceIdentifierHandler());
+        customHandlerChain.add(new WSAddressingClientHandler());
+		bindingProvider.getBinding().setHandlerChain(customHandlerChain);
+        // the address will have been pulled out of the endpoint by getPort but we still have to set it in the
+        // addressing properties along with the action and message id
+        Map<String, Object> requestContext = bindingProvider.getRequestContext();
+        String address = (String)requestContext.get(BindingProvider.ENDPOINT_ADDRESS_PROPERTY);
+        try {
+            addressingProperties.setTo(builder.newURI(address));
+        } catch (URISyntaxException use) {
+            // TODO -- log unexpected error here
+        }
+        addressingProperties.setAction(action);
+        requestContext.put(JAXWSAConstants.CLIENT_ADDRESSING_PROPERTIES, addressingProperties);
+	    // jbossws should do this for us . . .
+	    requestContext.put(JAXWSAConstants.CLIENT_ADDRESSING_PROPERTIES_OUTBOUND, addressingProperties);
+
+        return port;
+    }
+
+    // don't think we ever need this as we get a registration port from the endpoint ref returned by
+    // the activation port request
+    public static ParticipantPortType getParticipantPort(W3CEndpointReference endpointReference,
+                                                         AttributedURI action,
+                                                         AddressingProperties addressingProperties)
+    {
+        ParticipantService service = getParticipantService();
+        ParticipantPortType port = service.getPort(endpointReference, ParticipantPortType.class, new AddressingFeature(true, true));
+        BindingProvider bindingProvider = (BindingProvider)port;
+        /*
+         * we need to configure an instance identifier handler for this port to pass the tx context either
+         * outgoing or returning. We also have to add the the WSAdressing client handler to ensure that the
+         * addressing properties are encoded into the SOAP message
+         */
+        List<Handler> customHandlerChain = new ArrayList<Handler>();
+        customHandlerChain.add(new InstanceIdentifierHandler());
+        customHandlerChain.add(new WSAddressingClientHandler());
+		bindingProvider.getBinding().setHandlerChain(customHandlerChain);
+        // the address will have been pulled out of the endpoint by getPort but we still have to set it in the
+        // addressing properties along with the action and message id
+        Map<String, Object> requestContext = bindingProvider.getRequestContext();
+        String address = (String)requestContext.get(BindingProvider.ENDPOINT_ADDRESS_PROPERTY);
+        try {
+            addressingProperties.setTo(builder.newURI(address));
+        } catch (URISyntaxException use) {
+            // TODO -- log unexpected error here
+        }
+        addressingProperties.setAction(action);
+        requestContext.put(JAXWSAConstants.CLIENT_ADDRESSING_PROPERTIES, addressingProperties);
+	    // jbossws should do this for us . . .
+	    requestContext.put(JAXWSAConstants.CLIENT_ADDRESSING_PROPERTIES_OUTBOUND, addressingProperties);
+
+        return port;
+    }
+
+    public static CompletionCoordinatorPortType getCompletionCoordinatorPort(W3CEndpointReference endpointReference,
+                                                                             AttributedURI action,
+                                                                             AddressingProperties addressingProperties)
+    {
+        CompletionCoordinatorService service = getCompletionCoordinatorService();
+        CompletionCoordinatorPortType port = service.getPort(endpointReference, CompletionCoordinatorPortType.class, new AddressingFeature(true, true));
+        BindingProvider bindingProvider = (BindingProvider)port;
+        /*
+         * we need to configure an instance identifier handler for this port to pass the tx context either
+         * outgoing or returning. We also have to add the the WSAdressing client handler to ensure that the
+         * addressing properties are encoded into the SOAP message
+         */
+        List<Handler> customHandlerChain = new ArrayList<Handler>();
+        customHandlerChain.add(new InstanceIdentifierHandler());
+        customHandlerChain.add(new WSAddressingClientHandler());
+		bindingProvider.getBinding().setHandlerChain(customHandlerChain);
+        // the address will have been pulled out of the endpoint by getPort but we still have to set it in the
+        // addressing properties along with the action and message id
+        Map<String, Object> requestContext = bindingProvider.getRequestContext();
+        String address = (String)requestContext.get(BindingProvider.ENDPOINT_ADDRESS_PROPERTY);
+        try {
+            addressingProperties.setTo(builder.newURI(address));
+        } catch (URISyntaxException use) {
+            // TODO -- log unexpected error here
+        }
+        addressingProperties.setAction(action);
+        requestContext.put(JAXWSAConstants.CLIENT_ADDRESSING_PROPERTIES, addressingProperties);
+	    // jbossws should do this for us . . .
+	    requestContext.put(JAXWSAConstants.CLIENT_ADDRESSING_PROPERTIES_OUTBOUND, addressingProperties);
+
+        return port;
+    }
+
+    public static CompletionInitiatorPortType getCompletionInitiatorPort(W3CEndpointReference endpointReference,
+                                                                         AttributedURI action,
+                                                                         AddressingProperties addressingProperties)
+    {
+        CompletionInitiatorService service = getCompletionInitiatorService();
+        CompletionInitiatorPortType port = service.getPort(endpointReference, CompletionInitiatorPortType.class, new AddressingFeature(true, true));
+        BindingProvider bindingProvider = (BindingProvider)port;
+        /*
+         * we need to configure an instance identifier handler for this port to pass the tx context either
+         * outgoing or returning. We also have to add the the WSAdressing client handler to ensure that the
+         * addressing properties are encoded into the SOAP message
+         */
+        List<Handler> customHandlerChain = new ArrayList<Handler>();
+        customHandlerChain.add(new InstanceIdentifierHandler());
+        customHandlerChain.add(new WSAddressingClientHandler());
+		bindingProvider.getBinding().setHandlerChain(customHandlerChain);
+        // the address will have been pulled out of the endpoint by getPort but we still have to set it in the
+        // addressing properties along with the action and message id
+        Map<String, Object> requestContext = bindingProvider.getRequestContext();
+        String address = (String)requestContext.get(BindingProvider.ENDPOINT_ADDRESS_PROPERTY);
+        try {
+            addressingProperties.setTo(builder.newURI(address));
+        } catch (URISyntaxException use) {
+            // TODO -- log unexpected error here
+        }
+        addressingProperties.setAction(action);
+        requestContext.put(JAXWSAConstants.CLIENT_ADDRESSING_PROPERTIES, addressingProperties);
+	    // jbossws should do this for us . . .
+	    requestContext.put(JAXWSAConstants.CLIENT_ADDRESSING_PROPERTIES_OUTBOUND, addressingProperties);
+
+        return port;
+    }
+}
\ No newline at end of file

Added: labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices11/wsat/processors/CompletionCoordinatorProcessor.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices11/wsat/processors/CompletionCoordinatorProcessor.java	                        (rev 0)
+++ labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices11/wsat/processors/CompletionCoordinatorProcessor.java	2008-01-25 17:18:13 UTC (rev 18124)
@@ -0,0 +1,72 @@
+package com.arjuna.webservices11.wsat.processors;
+
+import com.arjuna.wst11.CompletionCoordinatorParticipant;
+import com.arjuna.webservices11.wsarj.ArjunaContext;
+
+import javax.xml.ws.addressing.AddressingProperties;
+
+import org.oasis_open.docs.ws_tx.wsat._2006._06.Notification;
+
+/**
+ * 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 addressingProperties The addressing context.
+     * @param arjunaContext The arjuna context.
+     */
+    public abstract void commit(final Notification commit, final AddressingProperties addressingProperties,
+        final ArjunaContext arjunaContext) ;
+
+    /**
+     * Rollback.
+     * @param rollback The rollback notification.
+     * @param addressingProperties The addressing context.
+     * @param arjunaContext The arjuna context.
+     */
+    public abstract void rollback(final Notification rollback, final AddressingProperties addressingProperties,
+        final ArjunaContext arjunaContext) ;
+}

Added: labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices11/wsat/processors/CompletionInitiatorCallback.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices11/wsat/processors/CompletionInitiatorCallback.java	                        (rev 0)
+++ labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices11/wsat/processors/CompletionInitiatorCallback.java	2008-01-25 17:18:13 UTC (rev 18124)
@@ -0,0 +1,42 @@
+package com.arjuna.webservices11.wsat.processors;
+
+import com.arjuna.webservices.base.processors.Callback;
+import com.arjuna.webservices11.wsarj.ArjunaContext;
+import com.arjuna.webservices.SoapFault;
+import org.oasis_open.docs.ws_tx.wsat._2006._06.Notification;
+
+import javax.xml.ws.addressing.AddressingProperties;
+
+/**
+ * The Completion Initiator callback.
+ * @author kevin
+ */
+public abstract class CompletionInitiatorCallback extends Callback
+{
+    /**
+     * An aborted response.
+     * @param aborted The aborted notification.
+     * @param addressingProperties The addressing context.
+     * @param arjunaContext The arjuna context.
+     */
+    public abstract void aborted(final Notification aborted, final AddressingProperties addressingProperties,
+        final ArjunaContext arjunaContext) ;
+
+    /**
+     * A committed response.
+     * @param committed The committed notification.
+     * @param addressingProperties The addressing context.
+     * @param arjunaContext The arjuna context.
+     */
+    public abstract void committed(final Notification committed, final AddressingProperties addressingProperties,
+        final ArjunaContext arjunaContext) ;
+
+    /**
+     * A SOAP fault response.
+     * @param soapFault The SOAP fault.
+     * @param addressingProperties The addressing context.
+     * @param arjunaContext The arjuna context.
+     */
+    public abstract void soapFault(final SoapFault soapFault, final AddressingProperties addressingProperties,
+        final ArjunaContext arjunaContext) ;
+}

Added: labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices11/wsat/processors/CompletionInitiatorProcessor.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices11/wsat/processors/CompletionInitiatorProcessor.java	                        (rev 0)
+++ labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices11/wsat/processors/CompletionInitiatorProcessor.java	2008-01-25 17:18:13 UTC (rev 18124)
@@ -0,0 +1,89 @@
+package com.arjuna.webservices11.wsat.processors;
+
+import com.arjuna.webservices11.wsarj.processor.BaseNotificationProcessor;
+import com.arjuna.webservices11.wsarj.ArjunaContext;
+import com.arjuna.webservices11.wsat.processors.CompletionInitiatorCallback;
+import com.arjuna.webservices.base.processors.Callback;
+import com.arjuna.webservices.SoapFault;
+import org.oasis_open.docs.ws_tx.wsat._2006._06.Notification;
+
+import javax.xml.ws.addressing.AddressingProperties;
+
+/**
+ * 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 addressingProperties The addressing context.
+     * @param arjunaContext The arjuna context.
+     */
+    public void handleAborted(final Notification aborted, final AddressingProperties addressingProperties,
+        final ArjunaContext arjunaContext)
+    {
+        handleCallbacks(new CallbackExecutorAdapter() {
+            public void execute(final Callback callback) {
+                ((CompletionInitiatorCallback)callback).aborted(aborted, addressingProperties, arjunaContext) ;
+            }
+        }, getIDs(addressingProperties, arjunaContext)) ;
+    }
+
+    /**
+     * Handle a committed response.
+     * @param committed The committed notification.
+     * @param addressingProperties The addressing context.
+     * @param arjunaContext The arjuna context.
+     */
+    public void handleCommitted(final Notification committed, final AddressingProperties addressingProperties,
+        final ArjunaContext arjunaContext)
+    {
+        handleCallbacks(new CallbackExecutorAdapter() {
+            public void execute(final Callback callback) {
+                ((CompletionInitiatorCallback)callback).committed(committed, addressingProperties, arjunaContext) ;
+            }
+        }, getIDs(addressingProperties, arjunaContext)) ;
+    }
+
+    /**
+     * Handle a SOAP fault response.
+     * @param soapFault The SOAP fault.
+     * @param addressingProperties The addressing context.
+     * @param arjunaContext The arjuna context.
+     */
+    public void handleSoapFault(final SoapFault soapFault, final AddressingProperties addressingProperties,
+        final ArjunaContext arjunaContext)
+    {
+        handleCallbacks(new CallbackExecutorAdapter() {
+            public void execute(final Callback callback) {
+                ((CompletionInitiatorCallback)callback).soapFault(soapFault, addressingProperties, arjunaContext) ;
+            }
+        }, getIDs(addressingProperties, 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) ;
+    }
+}

Added: labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices11/wsat/processors/CoordinatorProcessor.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices11/wsat/processors/CoordinatorProcessor.java	                        (rev 0)
+++ labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices11/wsat/processors/CoordinatorProcessor.java	2008-01-25 17:18:13 UTC (rev 18124)
@@ -0,0 +1,100 @@
+package com.arjuna.webservices11.wsat.processors;
+
+import com.arjuna.webservices11.wsat.CoordinatorInboundEvents;
+import com.arjuna.webservices11.wsarj.ArjunaContext;
+import com.arjuna.webservices.SoapFault;
+
+import javax.xml.ws.addressing.AddressingProperties;
+
+import org.oasis_open.docs.ws_tx.wsat._2006._06.Notification;
+
+/**
+ * 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 addressingProperties The addressing context.
+     * @param arjunaContext The arjuna context.
+     */
+    public abstract void aborted(final Notification aborted, final AddressingProperties addressingProperties,
+        final ArjunaContext arjunaContext) ;
+
+    /**
+     * Committed.
+     * @param committed The committed notification.
+     * @param addressingProperties The addressing context.
+     * @param arjunaContext The arjuna context.
+     */
+    public abstract void committed(final Notification committed, final AddressingProperties addressingProperties,
+        final ArjunaContext arjunaContext) ;
+
+    /**
+     * Prepared.
+     * @param prepared The prepared notification.
+     * @param addressingProperties The addressing context.
+     * @param arjunaContext The arjuna context.
+     */
+    public abstract void prepared(final Notification prepared, final AddressingProperties addressingProperties,
+        final ArjunaContext arjunaContext) ;
+
+    /**
+     * Read only.
+     * @param readOnly The read only notification.
+     * @param addressingProperties The addressing context.
+     * @param arjunaContext The arjuna context.
+     */
+    public abstract void readOnly(final Notification readOnly, final AddressingProperties addressingProperties,
+        final ArjunaContext 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 AddressingProperties addressingContext,
+        final ArjunaContext arjunaContext) ;
+}

Added: labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices11/wsat/processors/ParticipantProcessor.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices11/wsat/processors/ParticipantProcessor.java	                        (rev 0)
+++ labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices11/wsat/processors/ParticipantProcessor.java	2008-01-25 17:18:13 UTC (rev 18124)
@@ -0,0 +1,91 @@
+package com.arjuna.webservices11.wsat.processors;
+
+import com.arjuna.webservices11.wsat.ParticipantInboundEvents;
+import com.arjuna.webservices11.wsarj.ArjunaContext;
+import com.arjuna.webservices.SoapFault;
+
+import javax.xml.ws.addressing.AddressingProperties;
+
+import org.oasis_open.docs.ws_tx.wsat._2006._06.Notification;
+
+/**
+ * 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 addressingProperties The addressing context.
+     * @param arjunaContext The arjuna context.
+     */
+    public abstract void commit(final Notification commit, final AddressingProperties addressingProperties,
+        final ArjunaContext arjunaContext) ;
+
+    /**
+     * Prepare.
+     * @param prepare The prepare notification.
+     * @param addressingProperties The addressing context.
+     * @param arjunaContext The arjuna context.
+     */
+    public abstract void prepare(final Notification prepare, final AddressingProperties addressingProperties,
+        final ArjunaContext arjunaContext) ;
+
+    /**
+     * Rollback.
+     * @param rollback The rollback notification.
+     * @param addressingProperties The addressing context.
+     * @param arjunaContext The arjuna context.
+     */
+    public abstract void rollback(final Notification rollback, final AddressingProperties addressingProperties,
+        final ArjunaContext arjunaContext) ;
+
+    /**
+     * SOAP Fault.
+     * @param soapFault The SOAP fault notification.
+     * @param addressingProperties The addressing context.
+     * @param arjunaContext The arjuna context.
+     */
+    public abstract void soapFault(final SoapFault soapFault, final AddressingProperties addressingProperties,
+        final ArjunaContext arjunaContext) ;
+}

Added: labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices11/wsba/BusinessActivityConstants.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices11/wsba/BusinessActivityConstants.java	                        (rev 0)
+++ labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices11/wsba/BusinessActivityConstants.java	2008-01-25 17:18:13 UTC (rev 18124)
@@ -0,0 +1,362 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. 
+ * 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.webservices11.wsba;
+
+import javax.xml.namespace.QName;
+
+/**
+ * Interface containing WS-BusinessActivity constants.
+ */
+public interface BusinessActivityConstants
+{
+    /**
+     * 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 WSBA Participant Completion Cordinator Service Name.
+     */
+    public String PARTICIPANT_COMPLETION_COORDINATOR_SERVICE_NAME = "BusinessAgreementWithParticipantCompletionCoordinatorService";
+    /**
+     * The WSBA Participant Completion Cordinator Service QName.
+     */
+    public QName PARTICIPANT_COMPLETION_COORDINATOR_SERVICE_QNAME = new QName(WSBA_NAMESPACE, PARTICIPANT_COMPLETION_COORDINATOR_SERVICE_NAME, WSBA_PREFIX);
+    /**
+     * The WSBA Participant Completion Cordinator Port Name.
+     */
+    public String PARTICIPANT_COMPLETION_COORDINATOR_PORT_NAME = "BusinessAgreementWithParticipantCompletionCoordinatorPortType";
+    /**
+     * The WSBA Participant Completion Cordinator Port QName.
+     */
+    public QName PARTICIPANT_COMPLETION_COORDINATOR_PORT_QNAME = new QName(WSBA_NAMESPACE, PARTICIPANT_COMPLETION_COORDINATOR_PORT_NAME, WSBA_PREFIX);
+
+    /**
+     * The WSBA Participant Completion Participant Service Name.
+     */
+    public String PARTICIPANT_COMPLETION_PARTICIPANT_SERVICE_NAME = "BusinessAgreementWithParticipantCompletionParticipantService";
+    /**
+     * The WSBA Participant Completion Participant Service QName.
+     */
+    public QName PARTICIPANT_COMPLETION_PARTICIPANT_SERVICE_QNAME = new QName(WSBA_NAMESPACE, PARTICIPANT_COMPLETION_PARTICIPANT_SERVICE_NAME, WSBA_PREFIX);
+    /**
+     * The WSBA Participant Completion Participant Port Name.
+     */
+    public String PARTICIPANT_COMPLETION_PARTICIPANT_PORT_NAME = "BusinessAgreementWithParticipantCompletionParticipantPortType";
+    /**
+     * The WSBA Participant Completion Participant Port QName.
+     */
+    public QName PARTICIPANT_COMPLETION_PARTICIPANT_PORT_QNAME = new QName(WSBA_NAMESPACE, PARTICIPANT_COMPLETION_PARTICIPANT_PORT_NAME, WSBA_PREFIX);
+
+    /**
+     * The WSBA Coordinator Completion Coordinator Service Name.
+     */
+    public String COORDINATOR_COMPLETION_COORDINATOR_SERVICE_NAME = "BusinessAgreementWithCoordinatorCompletionCoordinatorService";
+    /**
+     * The WSBA Coordinator Completion Coordinator Service QName.
+     */
+    public QName COORDINATOR_COMPLETION_COORDINATOR_SERVICE_QNAME = new QName(WSBA_NAMESPACE, COORDINATOR_COMPLETION_COORDINATOR_SERVICE_NAME, WSBA_PREFIX);
+    /**
+     * The WSBA Coordinator Completion Coordinator Port Name.
+     */
+    public String COORDINATOR_COMPLETION_COORDINATOR_PORT_NAME = "BusinessAgreementWithCoordinatorCompletionCoordinatorPortType";
+    /**
+     * The WSBA Coordinator Completion Coordinator Port QName.
+     */
+    public QName COORDINATOR_COMPLETION_COORDINATOR_PORT_QNAME = new QName(WSBA_NAMESPACE, COORDINATOR_COMPLETION_COORDINATOR_PORT_NAME, WSBA_PREFIX);
+
+    /**
+     * The WSBA Coordinator Completion Participant Service Name.
+     */
+    public String COORDINATOR_COMPLETION_PARTICIPANT_SERVICE_NAME = "BusinessAgreementWithCoordinatorCompletionParticipantService";
+    /**
+     * The WSBA Coordinator Completion Participant Service QName.
+     */
+    public QName COORDINATOR_COMPLETION_PARTICIPANT_SERVICE_QNAME = new QName(WSBA_NAMESPACE, COORDINATOR_COMPLETION_PARTICIPANT_SERVICE_NAME, WSBA_PREFIX);
+    /**
+     * The WSBA Cordinator Completion Participant Port Name.
+     */
+    public String COORDINATOR_COMPLETION_PARTICIPANT_PORT_NAME = "BusinessAgreementWithCoordinatorCompletionParticipantPortType";
+    /**
+     * The WSBA Cordinator Completion Participant Port QName.
+     */
+    public QName COORDINATOR_COMPLETION_PARTICIPANT_PORT_QNAME = new QName(WSBA_NAMESPACE, COORDINATOR_COMPLETION_PARTICIPANT_PORT_NAME, WSBA_PREFIX);
+
+    /* extra ops for 1.1. protocol*/
+
+    /**
+     * 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 ;
+
+    /**
+     * 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) ;
+    /**
+     * 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 Fault element.
+     */
+    public String WSBA_ELEMENT_FAULT = "Fault" ;
+    /**
+     * The Fault QName.
+     */
+    public QName WSBA_ELEMENT_FAULT_QNAME = new QName(WSBA_NAMESPACE, WSBA_ELEMENT_FAULT, WSBA_PREFIX) ;
+    /**
+     * The Fault Action.
+     */
+    public String WSBA_ACTION_FAULT = WSBA_NAMESPACE + "/" + WSBA_ELEMENT_FAULT ;
+    /**
+     * 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 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 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 ;
+    /**
+     * 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 State Action.
+     */
+    public String WSBA_ACTION_STATE = WSBA_NAMESPACE + "/" + WSBA_ELEMENT_STATE ;
+    /**
+     * 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 InconsistentInternalState error code.
+     */
+    public String WSBA_ERROR_CODE_INCONSISTENT_INTERNAL_STATE = "InconsistentInternalState" ;
+    /**
+     * The InconsistentInternalState error code QName.
+     */
+    public QName WSBA_ERROR_CODE_INCONSISTENT_INTERNAL_STATE_QNAME = new QName(WSBA_NAMESPACE, WSBA_ERROR_CODE_INCONSISTENT_INTERNAL_STATE, WSBA_PREFIX) ;
+
+    /**
+     * 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" ;
+}
\ No newline at end of file

Added: labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices11/wsba/CoordinatorCompletionCoordinatorInboundEvents.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices11/wsba/CoordinatorCompletionCoordinatorInboundEvents.java	                        (rev 0)
+++ labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices11/wsba/CoordinatorCompletionCoordinatorInboundEvents.java	2008-01-25 17:18:13 UTC (rev 18124)
@@ -0,0 +1,119 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. 
+ * 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.webservices11.wsba;
+
+import com.arjuna.webservices.SoapFault;
+import com.arjuna.webservices11.wsarj.ArjunaContext;
+import org.oasis_open.docs.ws_tx.wsba._2006._06.NotificationType;
+import org.oasis_open.docs.ws_tx.wsba._2006._06.ExceptionType;
+import org.oasis_open.docs.ws_tx.wsba._2006._06.StatusType;
+
+import javax.xml.ws.addressing.AddressingProperties;
+
+
+/**
+ * The Participant events.
+ */
+public interface CoordinatorCompletionCoordinatorInboundEvents
+{
+    /**
+     * Handle the cancelled event.
+     * @param cancelled The cancelled notification.
+     * @param addressingProperties The addressing context.
+     * @param arjunaContext The arjuna context.
+     */
+    public void cancelled(final NotificationType cancelled, final AddressingProperties addressingProperties, final ArjunaContext arjunaContext) ;
+
+    /**
+     * Handle the closed event.
+     * @param closed The closed notification.
+     * @param addressingProperties The addressing context.
+     * @param arjunaContext The arjuna context.
+     */
+    public void closed(final NotificationType closed, final AddressingProperties addressingProperties, final ArjunaContext arjunaContext) ;
+
+    /**
+     * Handle the compensated event.
+     * @param compensated The compensated notification.
+     * @param addressingProperties The addressing context.
+     * @param arjunaContext The arjuna context.
+     */
+    public void compensated(final NotificationType compensated, final AddressingProperties addressingProperties, final ArjunaContext arjunaContext) ;
+
+    /**
+     * Handle the completed event.
+     * @param completed The completed notification.
+     * @param addressingProperties The addressing context.
+     * @param arjunaContext The arjuna context.
+     */
+    public void completed(final NotificationType completed, final AddressingProperties addressingProperties,
+        final ArjunaContext arjunaContext) ;
+
+    /**
+     * Handle the exit event.
+     * @param exit The exit notification.
+     * @param addressingProperties The addressing context.
+     * @param arjunaContext The arjuna context.
+     */
+    public void exit(final NotificationType exit, final AddressingProperties addressingProperties, final ArjunaContext arjunaContext) ;
+
+    /**
+     * Handle the fail event.
+     * @param fail The fail exception.
+     * @param addressingProperties The addressing context.
+     * @param arjunaContext The arjuna context.
+     */
+    public void fail(final ExceptionType fail, final AddressingProperties addressingProperties,
+        final ArjunaContext arjunaContext) ;
+
+    /**
+     * Handle the cannotComplete event.
+     * @param cannotComplete The cannotComplete notification.
+     * @param addressingProperties The addressing context.
+     * @param arjunaContext The arjuna context.
+     */
+    public void cannotComplete(final NotificationType cannotComplete, final AddressingProperties addressingProperties,
+        final ArjunaContext arjunaContext) ;
+
+    /**
+     * Handle the getStatus event.
+     * @param getStatus The getStatus notification.
+     * @param addressingProperties The addressing context.
+     * @param arjunaContext The arjuna context.
+     */
+    public void getStatus(final NotificationType getStatus, final AddressingProperties addressingProperties, final ArjunaContext arjunaContext) ;
+
+    /**
+     * Handle the status event.
+     * @param status The status.
+     * @param addressingProperties The addressing context.
+     * @param arjunaContext The arjuna context.
+     */
+    public void status(final StatusType status, final AddressingProperties addressingProperties, final ArjunaContext arjunaContext) ;
+
+    /**
+     * Handle the soap fault event.
+     * @param soapFault The soap fault.
+     * @param addressingProperties The addressing context.
+     * @param arjunaContext The arjuna context.
+     */
+    public void soapFault(final SoapFault soapFault, final AddressingProperties addressingProperties, final ArjunaContext arjunaContext) ;
+}
\ No newline at end of file

Added: labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices11/wsba/CoordinatorCompletionParticipantInboundEvents.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices11/wsba/CoordinatorCompletionParticipantInboundEvents.java	                        (rev 0)
+++ labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices11/wsba/CoordinatorCompletionParticipantInboundEvents.java	2008-01-25 17:18:13 UTC (rev 18124)
@@ -0,0 +1,115 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. 
+ * 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.webservices11.wsba;
+
+import com.arjuna.webservices.SoapFault;
+import com.arjuna.webservices11.wsarj.ArjunaContext;
+
+import javax.xml.ws.addressing.AddressingProperties;
+import org.oasis_open.docs.ws_tx.wsba._2006._06.NotificationType;
+import org.oasis_open.docs.ws_tx.wsba._2006._06.StatusType;
+
+
+/**
+ * The Participant events.
+ */
+public interface CoordinatorCompletionParticipantInboundEvents
+{
+    /**
+     * Handle the cancel event.
+     * @param cancel The cancel notification.
+     * @param addressingProperties The addressing context.
+     * @param arjunaContext The arjuna context.
+     */
+    public void cancel(final NotificationType cancel, final AddressingProperties addressingProperties, final ArjunaContext arjunaContext) ;
+
+    /**
+     * Handle the close event.
+     * @param close The close notification.
+     * @param addressingProperties The addressing context.
+     * @param arjunaContext The arjuna context.
+     */
+    public void close(final NotificationType close, final AddressingProperties addressingProperties, final ArjunaContext arjunaContext) ;
+
+    /**
+     * Handle the compensate event.
+     * @param compensate The compensate notification.
+     * @param addressingProperties The addressing context.
+     * @param arjunaContext The arjuna context.
+     */
+    public void compensate(final NotificationType compensate, final AddressingProperties addressingProperties, final ArjunaContext arjunaContext) ;
+
+    /**
+     * Handle the complete event.
+     * @param complete The complete notification.
+     * @param addressingProperties The addressing context.
+     * @param arjunaContext The arjuna context.
+     */
+    public void complete(final NotificationType complete, final AddressingProperties addressingProperties, final ArjunaContext arjunaContext) ;
+
+    /**
+     * Handle the exited event.
+     * @param exited The exited notification.
+     * @param addressingProperties The addressing context.
+     * @param arjunaContext The arjuna context.
+     */
+    public void exited(final NotificationType exited, final AddressingProperties addressingProperties, final ArjunaContext arjunaContext) ;
+
+    /**
+     * Handle the failed event.
+     * @param failed The failed notification.
+     * @param addressingProperties The addressing context.
+     * @param arjunaContext The arjuna context.
+     */
+    public void failed(final NotificationType failed, final AddressingProperties addressingProperties, final ArjunaContext arjunaContext) ;
+
+    /**
+     * Handle the not completed event.
+     * @param notCompleted The not completed notification.
+     * @param addressingProperties The addressing context.
+     * @param arjunaContext The arjuna context.
+     */
+    public void notCompleted(final NotificationType notCompleted, final AddressingProperties addressingProperties, final ArjunaContext arjunaContext) ;
+
+    /**
+     * Handle the getStatus event.
+     * @param getStatus The getStatus notification.
+     * @param addressingProperties The addressing context.
+     * @param arjunaContext The arjuna context.
+     */
+    public void getStatus(final NotificationType getStatus, final AddressingProperties addressingProperties, final ArjunaContext arjunaContext) ;
+
+    /**
+     * Handle the status event.
+     * @param status The status type.
+     * @param addressingProperties The addressing context.
+     * @param arjunaContext The arjuna context.
+     */
+    public void status(final StatusType status, final AddressingProperties addressingProperties, final ArjunaContext arjunaContext) ;
+
+    /**
+     * Handle the soap fault event.
+     * @param soapFault The soap fault.
+     * @param addressingProperties The addressing context.
+     * @param arjunaContext The arjuna context.
+     */
+    public void soapFault(final SoapFault soapFault, final AddressingProperties addressingProperties, final ArjunaContext arjunaContext) ;
+}
\ No newline at end of file

Added: labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices11/wsba/ParticipantCompletionCoordinatorInboundEvents.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices11/wsba/ParticipantCompletionCoordinatorInboundEvents.java	                        (rev 0)
+++ labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices11/wsba/ParticipantCompletionCoordinatorInboundEvents.java	2008-01-25 17:18:13 UTC (rev 18124)
@@ -0,0 +1,119 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. 
+ * 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.webservices11.wsba;
+
+import com.arjuna.webservices.SoapFault;
+import com.arjuna.webservices11.wsarj.ArjunaContext;
+import org.oasis_open.docs.ws_tx.wsba._2006._06.NotificationType;
+import org.oasis_open.docs.ws_tx.wsba._2006._06.ExceptionType;
+import org.oasis_open.docs.ws_tx.wsba._2006._06.StatusType;
+
+import javax.xml.ws.addressing.AddressingProperties;
+
+
+/**
+ * The Participant events.
+ */
+public interface ParticipantCompletionCoordinatorInboundEvents
+{
+    /**
+     * Handle the cancelled event.
+     * @param cancelled The cancelled notification.
+     * @param addressingProperties The addressing context.
+     * @param arjunaContext The arjuna context.
+     */
+    public void cancelled(final NotificationType cancelled, final AddressingProperties addressingProperties, final ArjunaContext arjunaContext) ;
+
+    /**
+     * Handle the closed event.
+     * @param closed The closed notification.
+     * @param addressingProperties The addressing context.
+     * @param arjunaContext The arjuna context.
+     */
+    public void closed(final NotificationType closed, final AddressingProperties addressingProperties, final ArjunaContext arjunaContext) ;
+
+    /**
+     * Handle the compensated event.
+     * @param compensated The compensated notification.
+     * @param addressingProperties The addressing context.
+     * @param arjunaContext The arjuna context.
+     */
+    public void compensated(final NotificationType compensated, final AddressingProperties addressingProperties, final ArjunaContext arjunaContext) ;
+
+    /**
+     * Handle the completed event.
+     * @param completed The completed notification.
+     * @param addressingProperties The addressing context.
+     * @param arjunaContext The arjuna context.
+     */
+    public void completed(final NotificationType completed, final AddressingProperties addressingProperties,
+        final ArjunaContext arjunaContext) ;
+
+    /**
+     * Handle the exit event.
+     * @param exit The exit notification.
+     * @param addressingProperties The addressing context.
+     * @param arjunaContext The arjuna context.
+     */
+    public void exit(final NotificationType exit, final AddressingProperties addressingProperties, final ArjunaContext arjunaContext) ;
+
+    /**
+     * Handle the fail event.
+     * @param fail The fail exception.
+     * @param addressingProperties The addressing context.
+     * @param arjunaContext The arjuna context.
+     */
+    public void fail(final ExceptionType fail, final AddressingProperties addressingProperties,
+        final ArjunaContext arjunaContext) ;
+
+    /**
+     * Handle the cannotComplete event.
+     * @param cannotComplete The cannotComplete notification.
+     * @param addressingProperties The addressing context.
+     * @param arjunaContext The arjuna context.
+     */
+    public void cannotComplete(final NotificationType cannotComplete, final AddressingProperties addressingProperties,
+        final ArjunaContext arjunaContext) ;
+
+    /**
+     * Handle the getStatus event.
+     * @param getStatus The getStatus notification.
+     * @param addressingProperties The addressing context.
+     * @param arjunaContext The arjuna context.
+     */
+    public void getStatus(final NotificationType getStatus, final AddressingProperties addressingProperties, final ArjunaContext arjunaContext) ;
+
+    /**
+     * Handle the status event.
+     * @param status The status.
+     * @param addressingProperties The addressing context.
+     * @param arjunaContext The arjuna context.
+     */
+    public void status(final StatusType status, final AddressingProperties addressingProperties, final ArjunaContext arjunaContext) ;
+
+    /**
+     * Handle the soap fault event.
+     * @param soapFault The soap fault.
+     * @param addressingProperties The addressing context.
+     * @param arjunaContext The arjuna context.
+     */
+    public void soapFault(final SoapFault soapFault, final AddressingProperties addressingProperties, final ArjunaContext arjunaContext) ;
+}
\ No newline at end of file

Added: labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices11/wsba/ParticipantCompletionParticipantInboundEvents.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices11/wsba/ParticipantCompletionParticipantInboundEvents.java	                        (rev 0)
+++ labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices11/wsba/ParticipantCompletionParticipantInboundEvents.java	2008-01-25 17:18:13 UTC (rev 18124)
@@ -0,0 +1,107 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. 
+ * 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.webservices11.wsba;
+
+import com.arjuna.webservices.SoapFault;
+import com.arjuna.webservices11.wsarj.ArjunaContext;
+import org.oasis_open.docs.ws_tx.wsba._2006._06.NotificationType;
+import org.oasis_open.docs.ws_tx.wsba._2006._06.StatusType;
+
+import javax.xml.ws.addressing.AddressingProperties;
+
+
+/**
+ * The Participant events.
+ */
+public interface ParticipantCompletionParticipantInboundEvents
+{
+    /**
+     * Handle the cancel event.
+     * @param cancel The cancel notification.
+     * @param addressingProperties The addressing context.
+     * @param arjunaContext The arjuna context.
+     */
+    public void cancel(final NotificationType cancel, final AddressingProperties addressingProperties, final ArjunaContext arjunaContext) ;
+
+    /**
+     * Handle the close event.
+     * @param close The close notification.
+     * @param addressingProperties The addressing context.
+     * @param arjunaContext The arjuna context.
+     */
+    public void close(final NotificationType close, final AddressingProperties addressingProperties, final ArjunaContext arjunaContext) ;
+
+    /**
+     * Handle the compensate event.
+     * @param compensate The compensate notification.
+     * @param addressingProperties The addressing context.
+     * @param arjunaContext The arjuna context.
+     */
+    public void compensate(final NotificationType compensate, final AddressingProperties addressingProperties, final ArjunaContext arjunaContext) ;
+
+    /**
+     * Handle the exited event.
+     * @param exited The exited notification.
+     * @param addressingProperties The addressing context.
+     * @param arjunaContext The arjuna context.
+     */
+    public void exited(final NotificationType exited, final AddressingProperties addressingProperties, final ArjunaContext arjunaContext) ;
+
+    /**
+     * Handle the failed event.
+     * @param failed The failed notification.
+     * @param addressingProperties The addressing context.
+     * @param arjunaContext The arjuna context.
+     */
+    public void failed(final NotificationType failed, final AddressingProperties addressingProperties, final ArjunaContext arjunaContext) ;
+
+    /**
+     * Handle the not completed event.
+     * @param notCompleted The not completed notification.
+     * @param addressingProperties The addressing context.
+     * @param arjunaContext The arjuna context.
+     */
+    public void notCompleted(final NotificationType notCompleted, final AddressingProperties addressingProperties, final ArjunaContext arjunaContext) ;
+
+    /**
+     * Handle the getStatus event.
+     * @param getStatus The getStatus notification.
+     * @param addressingProperties The addressing context.
+     * @param arjunaContext The arjuna context.
+     */
+    public void getStatus(final NotificationType getStatus, final AddressingProperties addressingProperties, final ArjunaContext arjunaContext) ;
+
+    /**
+     * Handle the status event.
+     * @param status The status type.
+     * @param addressingProperties The addressing context.
+     * @param arjunaContext The arjuna context.
+     */
+    public void status(final StatusType status, final AddressingProperties addressingProperties, final ArjunaContext arjunaContext) ;
+
+    /**
+     * Handle the soap fault event.
+     * @param soapFault The soap fault.
+     * @param addressingProperties The addressing context.
+     * @param arjunaContext The arjuna context.
+     */
+    public void soapFault(final SoapFault soapFault, final AddressingProperties addressingProperties, final ArjunaContext arjunaContext) ;
+}
\ No newline at end of file

Added: labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices11/wsba/State.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices11/wsba/State.java	                        (rev 0)
+++ labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices11/wsba/State.java	2008-01-25 17:18:13 UTC (rev 18124)
@@ -0,0 +1,209 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. 
+ * 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.webservices11.wsba;
+
+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;
+import com.arjuna.webservices11.wsba.BusinessActivityConstants;
+
+/*
+ * <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 value 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 com.arjuna.webservices.util.InvalidEnumerationException if the value is not valid.
+     */
+    protected Enumerated resolveEnum(final Object value)
+        throws InvalidEnumerationException
+    {
+        return toState11((QName)value) ;
+    }
+
+    /**
+     * Return the enumeration for the specified value.
+     * @param name The name.
+     * @return The enumeration.
+     * @throws com.arjuna.webservices.util.InvalidEnumerationException if the name is not valid.
+     */
+    public static State toState11(final String name)
+        throws InvalidEnumerationException
+    {
+        return toState11(getQualifiedName(name)) ;
+    }
+
+    /**
+     * Return the enumeration for the specified value.
+     * @param qName The qName value.
+     * @return The enumeration.
+     * @throws com.arjuna.webservices.util.InvalidEnumerationException if the value is not valid.
+     * @message com.arjuna.webservices.wsba.State11_1 [com.arjuna.webservices.wsba.State11_1] - Invalid state enumeration: {0}
+     */
+    public static State toState11(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.wsba.State11_1") ;
+            final String message = MessageFormat.format(pattern, new Object[] {qName}) ;
+            throw new InvalidEnumerationException(message) ;
+        }
+        return (State)state ;
+    }
+
+    /**
+     * Get the qualified name.
+     * @param name 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) ;
+    }
+}
\ No newline at end of file

Added: labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices11/wsba/client/CoordinatorCompletionCoordinatorClient.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices11/wsba/client/CoordinatorCompletionCoordinatorClient.java	                        (rev 0)
+++ labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices11/wsba/client/CoordinatorCompletionCoordinatorClient.java	2008-01-25 17:18:13 UTC (rev 18124)
@@ -0,0 +1,308 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. 
+ * 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.webservices11.wsba.client;
+
+import com.arjuna.webservices11.wsba.BusinessActivityConstants;
+import com.arjuna.webservices.SoapFault;
+import com.arjuna.webservices11.wsba.client.WSBAClient;
+import com.arjuna.webservices11.wsarj.InstanceIdentifier;
+import com.arjuna.webservices11.ServiceRegistry;
+import org.oasis_open.docs.ws_tx.wsba._2006._06.BusinessAgreementWithCoordinatorCompletionCoordinatorPortType;
+import org.oasis_open.docs.ws_tx.wsba._2006._06.ExceptionType;
+import org.oasis_open.docs.ws_tx.wsba._2006._06.NotificationType;
+import org.oasis_open.docs.ws_tx.wsba._2006._06.StatusType;
+
+import javax.xml.namespace.QName;
+import javax.xml.ws.addressing.AddressingBuilder;
+import javax.xml.ws.addressing.AddressingProperties;
+import javax.xml.ws.addressing.AttributedURI;
+import javax.xml.ws.wsaddressing.W3CEndpointReference;
+import java.io.IOException;
+import java.net.URISyntaxException;
+
+/**
+ * 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 AttributedURI completedAction = null;
+    /**
+     * The fault action.
+     */
+    private AttributedURI failAction = null;
+    /**
+     * The compensated action.
+     */
+    private AttributedURI compensatedAction = null;
+    /**
+     * The closed action.
+     */
+    private AttributedURI closedAction = null;
+    /**
+     * The cancelled action.
+     */
+    private AttributedURI cancelledAction = null;
+    /**
+     * The exit action.
+     */
+    private AttributedURI cannotCompleteAction = null;
+    /**
+     * The exit action.
+     */
+    private AttributedURI exitAction = null;
+    /**
+     * The get status action.
+     */
+    private AttributedURI getStatusAction = null;
+    /**
+     * The status action.
+     */
+    private AttributedURI statusAction = null;
+
+    /**
+     * The coordinator completion participant URI for replies.
+     */
+    private AttributedURI coordinatorCompletionParticipant = null;
+
+    /**
+     * Construct the participant completion coordinator client.
+     */
+    private CoordinatorCompletionCoordinatorClient()
+    {
+        final AddressingBuilder builder = AddressingBuilder.getAddressingBuilder();
+        try {
+            completedAction = builder.newURI(BusinessActivityConstants.WSBA_ACTION_COMPLETED);
+            failAction = builder.newURI(BusinessActivityConstants.WSBA_ACTION_FAIL);
+            compensatedAction = builder.newURI(BusinessActivityConstants.WSBA_ACTION_COMPENSATED);
+            closedAction = builder.newURI(BusinessActivityConstants.WSBA_ACTION_CLOSED);
+            cancelledAction = builder.newURI(BusinessActivityConstants.WSBA_ACTION_CANCELLED);
+            exitAction = builder.newURI(BusinessActivityConstants.WSBA_ACTION_EXIT);
+            cannotCompleteAction = builder.newURI(BusinessActivityConstants.WSBA_ACTION_CANNOT_COMPLETE);
+            getStatusAction = builder.newURI(BusinessActivityConstants.WSBA_ACTION_GET_STATUS);
+            statusAction = builder.newURI(BusinessActivityConstants.WSBA_ACTION_STATUS);
+        } catch (URISyntaxException use) {
+            // TODO - log fault and throw exception
+        }
+        //final HandlerRegistry handlerRegistry = new HandlerRegistry() ;
+
+        // Add WS-Addressing
+        //AddressingPolicy.register(handlerRegistry) ;
+        // Add client policies
+        //ClientPolicy.register(handlerRegistry) ;
+
+        final String coordinatorCompletionParticipantURI =
+            ServiceRegistry.getRegistry().getServiceURI(BusinessActivityConstants.COORDINATOR_COMPLETION_PARTICIPANT_SERVICE_NAME) ;
+        try {
+            coordinatorCompletionParticipant = builder.newURI(coordinatorCompletionParticipantURI) ;
+        } catch (URISyntaxException use) {
+            // TODO - log fault and throw exception
+        }
+    }
+
+    /**
+     * Send a completed request.
+     * @param addressingProperties addressing context initialised with to and message ID.
+     * @param identifier The identifier of the initiator.
+     * @throws com.arjuna.webservices.SoapFault For any errors.
+     * @throws java.io.IOException for any transport errors.
+     */
+    public void sendCompleted(W3CEndpointReference endpoint, final AddressingProperties addressingProperties, final InstanceIdentifier identifier)
+        throws SoapFault, IOException
+    {
+        BusinessAgreementWithCoordinatorCompletionCoordinatorPortType port;
+        port = getPort(endpoint, addressingProperties, completedAction);
+        NotificationType completed = new NotificationType();
+
+        port.completedOperation(completed);
+    }
+
+    /**
+     * Send a fail request.
+     * @param addressingProperties addressing context initialised with to and message ID.
+     * @param identifier The identifier of the initiator.
+     * @throws com.arjuna.webservices.SoapFault For any errors.
+     * @throws java.io.IOException for any transport errors.
+     */
+    public void sendFail(W3CEndpointReference endpoint, final AddressingProperties addressingProperties, final InstanceIdentifier identifier,
+        final QName exceptionIdentifier)
+        throws SoapFault, IOException
+    {
+        BusinessAgreementWithCoordinatorCompletionCoordinatorPortType port;
+        port = getPort(endpoint, addressingProperties, failAction);
+        ExceptionType fail = new ExceptionType();
+        fail.setExceptionIdentifier(exceptionIdentifier);
+
+        port.failOperation(fail);
+    }
+
+    /**
+     * Send a compensated request.
+     * @param addressingProperties addressing context initialised with to and message ID.
+     * @param identifier The identifier of the initiator.
+     * @throws com.arjuna.webservices.SoapFault For any errors.
+     * @throws java.io.IOException for any transport errors.
+     */
+    public void sendCompensated(W3CEndpointReference endpoint, final AddressingProperties addressingProperties, final InstanceIdentifier identifier)
+        throws SoapFault, IOException
+    {
+        BusinessAgreementWithCoordinatorCompletionCoordinatorPortType port;
+        port = getPort(endpoint, addressingProperties, compensatedAction);
+        NotificationType compensated = new NotificationType();
+
+        port.compensatedOperation(compensated);
+    }
+
+    /**
+     * Send a closed request.
+     * @param addressingProperties addressing context initialised with to and message ID.
+     * @param identifier The identifier of the initiator.
+     * @throws com.arjuna.webservices.SoapFault For any errors.
+     * @throws java.io.IOException for any transport errors.
+     */
+    public void sendClosed(W3CEndpointReference endpoint, final AddressingProperties addressingProperties, final InstanceIdentifier identifier)
+        throws SoapFault, IOException
+    {
+        BusinessAgreementWithCoordinatorCompletionCoordinatorPortType port;
+        port = getPort(endpoint, addressingProperties, closedAction);
+        NotificationType closed = new NotificationType();
+
+        port.closedOperation(closed);
+    }
+
+    /**
+     * Send a cancelled request.
+     * @param addressingProperties addressing context initialised with to and message ID.
+     * @param identifier The identifier of the initiator.
+     * @throws com.arjuna.webservices.SoapFault For any errors.
+     * @throws java.io.IOException for any transport errors.
+     */
+    public void sendCancelled(W3CEndpointReference endpoint, final AddressingProperties addressingProperties, final InstanceIdentifier identifier)
+        throws SoapFault, IOException
+    {
+        BusinessAgreementWithCoordinatorCompletionCoordinatorPortType port;
+        port = getPort(endpoint, addressingProperties, cancelledAction);
+        NotificationType camcelled = new NotificationType();
+
+        port.canceledOperation(camcelled);
+    }
+
+    /**
+     * Send an exit request.
+     * @param addressingProperties addressing context initialised with to and message ID.
+     * @param identifier The identifier of the initiator.
+     * @throws com.arjuna.webservices.SoapFault For any errors.
+     * @throws java.io.IOException for any transport errors.
+     */
+    public void sendExit(W3CEndpointReference endpoint, final AddressingProperties addressingProperties, final InstanceIdentifier identifier)
+        throws SoapFault, IOException
+    {
+        BusinessAgreementWithCoordinatorCompletionCoordinatorPortType port;
+        port = getPort(endpoint, addressingProperties, exitAction);
+        NotificationType exited = new NotificationType();
+
+        port.exitOperation(exited);
+    }
+
+    /**
+     * Send a cannot complete request.
+     * @param addressingProperties addressing context initialised with to and message ID.
+     * @param identifier The identifier of the initiator.
+     * @throws com.arjuna.webservices.SoapFault For any errors.
+     * @throws java.io.IOException for any transport errors.
+     */
+    public void sendCannotComplete(W3CEndpointReference endpoint, final AddressingProperties addressingProperties, final InstanceIdentifier identifier)
+        throws SoapFault, IOException
+    {
+        BusinessAgreementWithCoordinatorCompletionCoordinatorPortType port;
+        port = getPort(endpoint, addressingProperties, cannotCompleteAction);
+        NotificationType cannotComplete = new NotificationType();
+
+        port.cannotComplete(cannotComplete);
+    }
+
+    /**
+     * Send a get status request.
+     * @param addressingProperties addressing context initialised with to and message ID.
+     * @param identifier The identifier of the initiator.
+     * @throws com.arjuna.webservices.SoapFault For any errors.
+     * @throws java.io.IOException for any transport errors.
+     */
+    public void sendGetStatus(W3CEndpointReference endpoint, final AddressingProperties addressingProperties, final InstanceIdentifier identifier)
+        throws SoapFault, IOException
+    {
+        BusinessAgreementWithCoordinatorCompletionCoordinatorPortType port;
+        port = getPort(endpoint, addressingProperties, getStatusAction);
+        NotificationType getStatus = new NotificationType();
+
+        port.getStatusOperation(getStatus);
+    }
+
+    /**
+     * Send a status request.
+     * @param addressingProperties addressing context initialised with to and message ID.
+     * @param identifier The identifier of the initiator.
+     * @throws com.arjuna.webservices.SoapFault For any errors.
+     * @throws java.io.IOException for any transport errors.
+     */
+    public void sendStatus(W3CEndpointReference endpoint, final AddressingProperties addressingProperties, final InstanceIdentifier identifier,
+        final QName state)
+        throws SoapFault, IOException
+    {
+        BusinessAgreementWithCoordinatorCompletionCoordinatorPortType port;
+        port = getPort(endpoint, addressingProperties, statusAction);
+        StatusType status = new StatusType();
+        status.setState(state);
+
+        port.statusOperation(status);
+    }
+
+    /**
+     * Get the Completion Coordinator client singleton.
+     * @return The Completion Coordinator client singleton.
+     */
+    public static CoordinatorCompletionCoordinatorClient getClient()
+    {
+        return CLIENT ;
+    }
+
+    /**
+     * obtain a port from the participant endpoint configured with the instance identifier handler and the supplied
+     * addressing properties supplemented with the given action
+     * @param participant
+     * @param addressingProperties
+     * @param action
+     * @return
+     */
+    private BusinessAgreementWithCoordinatorCompletionCoordinatorPortType
+    getPort(final W3CEndpointReference participant, final AddressingProperties addressingProperties, final AttributedURI action)
+    {
+        return WSBAClient.getCoordinatorCompletionCoordinatorPort(participant, action, addressingProperties);
+    }
+}
\ No newline at end of file

Added: labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices11/wsba/client/CoordinatorCompletionParticipantClient.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices11/wsba/client/CoordinatorCompletionParticipantClient.java	                        (rev 0)
+++ labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices11/wsba/client/CoordinatorCompletionParticipantClient.java	2008-01-25 17:18:13 UTC (rev 18124)
@@ -0,0 +1,305 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. 
+ * 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.webservices11.wsba.client;
+
+import com.arjuna.webservices11.wsba.BusinessActivityConstants;
+import com.arjuna.webservices.SoapFault;
+import com.arjuna.webservices11.wsba.client.WSBAClient;
+import com.arjuna.webservices11.wsarj.InstanceIdentifier;
+import com.arjuna.webservices11.ServiceRegistry;
+import org.oasis_open.docs.ws_tx.wsba._2006._06.BusinessAgreementWithCoordinatorCompletionParticipantPortType;
+import org.oasis_open.docs.ws_tx.wsba._2006._06.NotificationType;
+import org.oasis_open.docs.ws_tx.wsba._2006._06.StatusType;
+
+import javax.xml.namespace.QName;
+import javax.xml.ws.addressing.AddressingBuilder;
+import javax.xml.ws.addressing.AddressingProperties;
+import javax.xml.ws.addressing.AttributedURI;
+import javax.xml.ws.wsaddressing.W3CEndpointReference;
+import java.io.IOException;
+import java.net.URISyntaxException;
+
+/**
+ * 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 AttributedURI completeAction = null;
+    /**
+     * The close action.
+     */
+    private AttributedURI closeAction = null;
+    /**
+     * The cancel action.
+     */
+    private AttributedURI cancelAction = null;
+    /**
+     * The compensat action.
+     */
+    private AttributedURI compensateAction = null;
+    /**
+     * The faulted action.
+     */
+    private AttributedURI failedAction = null;
+    /**
+     * The exited action.
+     */
+    private AttributedURI exitedAction = null;
+    /**
+     * The not completed action.
+     */
+    private AttributedURI notCompletedAction = null;
+    /**
+     * The get status action.
+     */
+    private AttributedURI getStatusAction = null;
+    /**
+     * The status action.
+     */
+    private AttributedURI statusAction = null;
+
+    /**
+     * The coordinator completion coordinator URI for replies.
+     */
+    private AttributedURI coordinatorCompletionCoordinator = null;
+
+    /**
+     * Construct the participant completion coordinator client.
+     */
+    private CoordinatorCompletionParticipantClient()
+    {
+        final AddressingBuilder builder = AddressingBuilder.getAddressingBuilder();
+        try {
+            completeAction = builder.newURI(BusinessActivityConstants.WSBA_ACTION_COMPLETE);
+            closeAction = builder.newURI(BusinessActivityConstants.WSBA_ACTION_CLOSE);
+            cancelAction = builder.newURI(BusinessActivityConstants.WSBA_ACTION_CANCEL);
+            compensateAction = builder.newURI(BusinessActivityConstants.WSBA_ACTION_COMPENSATE);
+            failedAction = builder.newURI(BusinessActivityConstants.WSBA_ACTION_FAILED);
+            exitedAction = builder.newURI(BusinessActivityConstants.WSBA_ACTION_EXITED);
+            notCompletedAction = builder.newURI(BusinessActivityConstants.WSBA_ACTION_NOT_COMPLETED);
+            getStatusAction = builder.newURI(BusinessActivityConstants.WSBA_ACTION_GET_STATUS);
+            statusAction = builder.newURI(BusinessActivityConstants.WSBA_ACTION_STATUS);
+        } catch (URISyntaxException use) {
+            // TODO - log fault and throw exception
+        }
+        // final HandlerRegistry handlerRegistry = new HandlerRegistry() ;
+
+        // Add WS-Addressing
+        // AddressingPolicy.register(handlerRegistry) ;
+        // Add client policies
+        // ClientPolicy.register(handlerRegistry) ;
+
+        final String coordinatorCompletionCoordinatorURI =
+            ServiceRegistry.getRegistry().getServiceURI(BusinessActivityConstants.COORDINATOR_COMPLETION_COORDINATOR_SERVICE_NAME) ;
+        try {
+            coordinatorCompletionCoordinator = builder.newURI(coordinatorCompletionCoordinatorURI) ;
+        } catch (URISyntaxException use) {
+            // TODO - log fault and throw exception
+        }
+    }
+
+    /**
+     * Send a complete request.
+     * @param addressingProperties addressing context initialised with to and message ID.
+     * @param identifier The identifier of the initiator.
+     * @throws com.arjuna.webservices.SoapFault For any errors.
+     * @throws java.io.IOException for any transport errors.
+     */
+    public void sendComplete(W3CEndpointReference endpoint, final AddressingProperties addressingProperties, final InstanceIdentifier identifier)
+        throws SoapFault, IOException
+    {
+        BusinessAgreementWithCoordinatorCompletionParticipantPortType port;
+        port = getPort(endpoint, addressingProperties, completeAction);
+        NotificationType complete = new NotificationType();
+
+        port.completeOperation(complete);
+    }
+
+    /**
+     * Send a close request.
+     * @param addressingProperties addressing context initialised with to and message ID.
+     * @param identifier The identifier of the initiator.
+     * @throws com.arjuna.webservices.SoapFault For any errors.
+     * @throws java.io.IOException for any transport errors.
+     */
+    public void sendClose(W3CEndpointReference endpoint, final AddressingProperties addressingProperties, final InstanceIdentifier identifier)
+        throws SoapFault, IOException
+    {
+        BusinessAgreementWithCoordinatorCompletionParticipantPortType port;
+        port = getPort(endpoint, addressingProperties, closeAction);
+        NotificationType close = new NotificationType();
+
+        port.closeOperation(close);
+    }
+
+    /**
+     * Send a cancel request.
+     * @param addressingProperties addressing context initialised with to and message ID.
+     * @param identifier The identifier of the initiator.
+     * @throws com.arjuna.webservices.SoapFault For any errors.
+     * @throws java.io.IOException for any transport errors.
+     */
+    public void sendCancel(W3CEndpointReference endpoint, final AddressingProperties addressingProperties, final InstanceIdentifier identifier)
+        throws SoapFault, IOException
+    {
+        BusinessAgreementWithCoordinatorCompletionParticipantPortType port;
+        port = getPort(endpoint, addressingProperties, cancelAction);
+        NotificationType cancel = new NotificationType();
+
+        port.cancelOperation(cancel);
+    }
+
+    /**
+     * Send a compensate request.
+     * @param addressingProperties addressing context initialised with to and message ID.
+     * @param identifier The identifier of the initiator.
+     * @throws com.arjuna.webservices.SoapFault For any errors.
+     * @throws java.io.IOException for any transport errors.
+     */
+    public void sendCompensate(W3CEndpointReference endpoint, final AddressingProperties addressingProperties, final InstanceIdentifier identifier)
+        throws SoapFault, IOException
+    {
+        BusinessAgreementWithCoordinatorCompletionParticipantPortType port;
+        port = getPort(endpoint, addressingProperties, compensateAction);
+        NotificationType compensate = new NotificationType();
+
+        port.compensateOperation(compensate);
+    }
+
+    /**
+     * Send a failed request.
+     * @param addressingProperties addressing context initialised with to and message ID.
+     * @param identifier The identifier of the initiator.
+     * @throws com.arjuna.webservices.SoapFault For any errors.
+     * @throws java.io.IOException for any transport errors.
+     */
+    public void sendFailed(W3CEndpointReference endpoint, final AddressingProperties addressingProperties, final InstanceIdentifier identifier)
+        throws SoapFault, IOException
+    {
+        BusinessAgreementWithCoordinatorCompletionParticipantPortType port;
+        port = getPort(endpoint, addressingProperties, failedAction);
+        NotificationType failed = new NotificationType();
+
+        port.failedOperation(failed);
+    }
+
+    /**
+     * Send an exited request.
+     * @param addressingProperties addressing context initialised with to and message ID.
+     * @param identifier The identifier of the initiator.
+     * @throws com.arjuna.webservices.SoapFault For any errors.
+     * @throws java.io.IOException for any transport errors.
+     */
+    public void sendExited(W3CEndpointReference endpoint, final AddressingProperties addressingProperties, final InstanceIdentifier identifier)
+        throws SoapFault, IOException
+    {
+        BusinessAgreementWithCoordinatorCompletionParticipantPortType port;
+        port = getPort(endpoint, addressingProperties, exitedAction);
+        NotificationType exit = new NotificationType();
+
+        port.exitedOperation(exit);
+    }
+
+    /**
+     * Send an exited request.
+     * @param addressingProperties addressing context initialised with to and message ID.
+     * @param identifier The identifier of the initiator.
+     * @throws com.arjuna.webservices.SoapFault For any errors.
+     * @throws java.io.IOException for any transport errors.
+     */
+    public void sendNotCompleted(W3CEndpointReference endpoint, final AddressingProperties addressingProperties, final InstanceIdentifier identifier)
+        throws SoapFault, IOException
+    {
+        BusinessAgreementWithCoordinatorCompletionParticipantPortType port;
+        port = getPort(endpoint, addressingProperties, notCompletedAction);
+        NotificationType notCompleted = new NotificationType();
+
+        port.notCompleted(notCompleted);
+    }
+
+    /**
+     * Send a get status request.
+     * @param addressingProperties addressing context initialised with to and message ID.
+     * @param identifier The identifier of the initiator.
+     * @throws com.arjuna.webservices.SoapFault For any errors.
+     * @throws java.io.IOException for any transport errors.
+     */
+    public void sendGetStatus(W3CEndpointReference endpoint, final AddressingProperties addressingProperties, final InstanceIdentifier identifier)
+        throws SoapFault, IOException
+    {
+        BusinessAgreementWithCoordinatorCompletionParticipantPortType port;
+        port = getPort(endpoint, addressingProperties, getStatusAction);
+        NotificationType getStatus = new NotificationType();
+
+        port.getStatusOperation(getStatus);
+    }
+
+    /**
+     * Send a status request.
+     * @param addressingProperties addressing context initialised with to and message ID.
+     * @param identifier The identifier of the initiator.
+     * @throws com.arjuna.webservices.SoapFault For any errors.
+     * @throws java.io.IOException for any transport errors.
+     */
+    public void sendStatus(W3CEndpointReference endpoint, final AddressingProperties addressingProperties, final InstanceIdentifier identifier,
+        final QName state)
+        throws SoapFault, IOException
+    {
+        BusinessAgreementWithCoordinatorCompletionParticipantPortType port;
+        port = getPort(endpoint, addressingProperties, statusAction);
+        StatusType status = new StatusType();
+        status.setState(state);
+
+        port.statusOperation(status);
+    }
+
+    /**
+     * Get the Completion Coordinator client singleton.
+     * @return The Completion Coordinator client singleton.
+     */
+    public static CoordinatorCompletionParticipantClient getClient()
+    {
+        return CLIENT;
+    }
+
+    /**
+     * obtain a port from the participant endpoint configured with the instance identifier handler and the supplied
+     * addressing properties supplemented with the given action
+     * @param participant
+     * @param addressingProperties
+     * @param action
+     * @return
+     */
+    private BusinessAgreementWithCoordinatorCompletionParticipantPortType
+    getPort(final W3CEndpointReference participant, final AddressingProperties addressingProperties, final AttributedURI action)
+    {
+        return WSBAClient.getCoordinatorCompletionParticipantPort(participant, action, addressingProperties);
+    }
+}
\ No newline at end of file

Added: labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices11/wsba/client/ParticipantCompletionCoordinatorClient.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices11/wsba/client/ParticipantCompletionCoordinatorClient.java	                        (rev 0)
+++ labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices11/wsba/client/ParticipantCompletionCoordinatorClient.java	2008-01-25 17:18:13 UTC (rev 18124)
@@ -0,0 +1,308 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. 
+ * 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.webservices11.wsba.client;
+
+import com.arjuna.webservices11.wsba.BusinessActivityConstants;
+import com.arjuna.webservices.SoapFault;
+import com.arjuna.webservices11.wsba.client.WSBAClient;
+import com.arjuna.webservices11.wsarj.InstanceIdentifier;
+import com.arjuna.webservices11.ServiceRegistry;
+import org.oasis_open.docs.ws_tx.wsba._2006._06.BusinessAgreementWithParticipantCompletionCoordinatorPortType;
+import org.oasis_open.docs.ws_tx.wsba._2006._06.ExceptionType;
+import org.oasis_open.docs.ws_tx.wsba._2006._06.NotificationType;
+import org.oasis_open.docs.ws_tx.wsba._2006._06.StatusType;
+
+import javax.xml.namespace.QName;
+import javax.xml.ws.addressing.AddressingBuilder;
+import javax.xml.ws.addressing.AddressingProperties;
+import javax.xml.ws.addressing.AttributedURI;
+import javax.xml.ws.wsaddressing.W3CEndpointReference;
+import java.io.IOException;
+import java.net.URISyntaxException;
+
+/**
+ * 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 AttributedURI completedAction = null;
+    /**
+     * The fault action.
+     */
+    private AttributedURI failAction = null;
+    /**
+     * The compensated action.
+     */
+    private AttributedURI compensatedAction = null;
+    /**
+     * The closed action.
+     */
+    private AttributedURI closedAction = null;
+    /**
+     * The cancelled action.
+     */
+    private AttributedURI cancelledAction = null;
+    /**
+     * The exit action.
+     */
+    private AttributedURI exitAction = null;
+    /**
+     * The cannot complete action.
+     */
+    private AttributedURI cannotCompleteAction = null;
+    /**
+     * The get status action.
+     */
+    private AttributedURI getStatusAction = null;
+    /**
+     * The status action.
+     */
+    private AttributedURI statusAction = null;
+
+    /**
+     * The participant completion participant URI for replies.
+     */
+    private AttributedURI participantCompletionParticipant = null;
+
+    /**
+     * Construct the participant completion coordinator client.
+     */
+    private ParticipantCompletionCoordinatorClient()
+    {
+        final AddressingBuilder builder = AddressingBuilder.getAddressingBuilder();
+        try {
+            completedAction = builder.newURI(BusinessActivityConstants.WSBA_ACTION_COMPLETED);
+            failAction = builder.newURI(BusinessActivityConstants.WSBA_ACTION_FAIL);
+            compensatedAction = builder.newURI(BusinessActivityConstants.WSBA_ACTION_COMPENSATED);
+            closedAction = builder.newURI(BusinessActivityConstants.WSBA_ACTION_CLOSED);
+            cancelledAction = builder.newURI(BusinessActivityConstants.WSBA_ACTION_CANCELLED);
+            exitAction = builder.newURI(BusinessActivityConstants.WSBA_ACTION_EXIT);
+            cannotCompleteAction = builder.newURI(BusinessActivityConstants.WSBA_ACTION_CANNOT_COMPLETE);
+            getStatusAction = builder.newURI(BusinessActivityConstants.WSBA_ACTION_GET_STATUS);
+            statusAction = builder.newURI(BusinessActivityConstants.WSBA_ACTION_STATUS);
+        } catch (URISyntaxException use) {
+            // TODO - log fault and throw exception
+        }
+        // final HandlerRegistry handlerRegistry = new HandlerRegistry() ;
+
+        // Add WS-Addressing
+        // AddressingPolicy.register(handlerRegistry) ;
+        // Add client policies
+        // ClientPolicy.register(handlerRegistry) ;
+
+        final String participantCompletionParticipantURI =
+            ServiceRegistry.getRegistry().getServiceURI(BusinessActivityConstants.PARTICIPANT_COMPLETION_PARTICIPANT_SERVICE_NAME) ;
+        try {
+            participantCompletionParticipant = builder.newURI(participantCompletionParticipantURI) ;
+        } catch (URISyntaxException use) {
+            // TODO - log fault and throw exception
+        }
+    }
+
+    /**
+     * Send a completed request.
+     * @param addressingProperties addressing context initialised with to and message ID.
+     * @param identifier The identifier of the initiator.
+     * @throws com.arjuna.webservices.SoapFault For any errors.
+     * @throws java.io.IOException for any transport errors.
+     */
+    public void sendCompleted(W3CEndpointReference endpoint, final AddressingProperties addressingProperties, final InstanceIdentifier identifier)
+        throws SoapFault, IOException
+    {
+        BusinessAgreementWithParticipantCompletionCoordinatorPortType port;
+        port = getPort(endpoint, addressingProperties, completedAction);
+        NotificationType completed = new NotificationType();
+
+        port.completedOperation(completed);
+    }
+
+    /**
+     * Send a fault request.
+     * @param addressingProperties addressing context initialised with to and message ID.
+     * @param identifier The identifier of the initiator.
+     * @throws com.arjuna.webservices.SoapFault For any errors.
+     * @throws java.io.IOException for any transport errors.
+     */
+    public void sendFail(W3CEndpointReference endpoint, final AddressingProperties addressingProperties, final InstanceIdentifier identifier,
+        final QName exceptionIdentifier)
+        throws SoapFault, IOException
+    {
+        BusinessAgreementWithParticipantCompletionCoordinatorPortType port;
+        port = getPort(endpoint, addressingProperties, failAction);
+        ExceptionType fail = new ExceptionType();
+        fail.setExceptionIdentifier(exceptionIdentifier);
+
+        port.failOperation(fail);
+    }
+
+    /**
+     * Send a compensated request.
+     * @param addressingProperties addressing context initialised with to and message ID.
+     * @param identifier The identifier of the initiator.
+     * @throws com.arjuna.webservices.SoapFault For any errors.
+     * @throws java.io.IOException for any transport errors.
+     */
+    public void sendCompensated(W3CEndpointReference endpoint, final AddressingProperties addressingProperties, final InstanceIdentifier identifier)
+        throws SoapFault, IOException
+    {
+        BusinessAgreementWithParticipantCompletionCoordinatorPortType port;
+        port = getPort(endpoint, addressingProperties, compensatedAction);
+        NotificationType compensated = new NotificationType();
+
+        port.compensatedOperation(compensated);
+    }
+
+    /**
+     * Send a closed request.
+     * @param addressingProperties addressing context initialised with to and message ID.
+     * @param identifier The identifier of the initiator.
+     * @throws com.arjuna.webservices.SoapFault For any errors.
+     * @throws java.io.IOException for any transport errors.
+     */
+    public void sendClosed(W3CEndpointReference endpoint, final AddressingProperties addressingProperties, final InstanceIdentifier identifier)
+        throws SoapFault, IOException
+    {
+        BusinessAgreementWithParticipantCompletionCoordinatorPortType port;
+        port = getPort(endpoint, addressingProperties, closedAction);
+        NotificationType closed = new NotificationType();
+
+        port.closedOperation(closed);
+    }
+
+    /**
+     * Send a cancelled request.
+     * @param addressingProperties addressing context initialised with to and message ID.
+     * @param identifier The identifier of the initiator.
+     * @throws com.arjuna.webservices.SoapFault For any errors.
+     * @throws java.io.IOException for any transport errors.
+     */
+    public void sendCancelled(W3CEndpointReference endpoint, final AddressingProperties addressingProperties, final InstanceIdentifier identifier)
+        throws SoapFault, IOException
+    {
+        BusinessAgreementWithParticipantCompletionCoordinatorPortType port;
+        port = getPort(endpoint, addressingProperties, cancelledAction);
+        NotificationType cancelled = new NotificationType();
+
+        port.canceledOperation(cancelled);
+    }
+
+    /**
+     * Send an exit request.
+     * @param addressingProperties addressing context initialised with to and message ID.
+     * @param identifier The identifier of the initiator.
+     * @throws com.arjuna.webservices.SoapFault For any errors.
+     * @throws java.io.IOException for any transport errors.
+     */
+    public void sendExit(W3CEndpointReference endpoint, final AddressingProperties addressingProperties, final InstanceIdentifier identifier)
+        throws SoapFault, IOException
+    {
+        BusinessAgreementWithParticipantCompletionCoordinatorPortType port;
+        port = getPort(endpoint, addressingProperties, exitAction);
+        NotificationType exit = new NotificationType();
+
+        port.exitOperation(exit);
+    }
+
+    /**
+     * Send a cannot complete request.
+     * @param addressingProperties addressing context initialised with to and message ID.
+     * @param identifier The identifier of the initiator.
+     * @throws com.arjuna.webservices.SoapFault For any errors.
+     * @throws java.io.IOException for any transport errors.
+     */
+    public void sendCannotComplete(W3CEndpointReference endpoint, final AddressingProperties addressingProperties, final InstanceIdentifier identifier)
+        throws SoapFault, IOException
+    {
+        BusinessAgreementWithParticipantCompletionCoordinatorPortType port;
+        port = getPort(endpoint, addressingProperties, cannotCompleteAction);
+        NotificationType cannotComplete = new NotificationType();
+
+        port.cannotComplete(cannotComplete);
+    }
+
+    /**
+     * Send a get status request.
+     * @param addressingProperties addressing context initialised with to and message ID.
+     * @param identifier The identifier of the initiator.
+     * @throws com.arjuna.webservices.SoapFault For any errors.
+     * @throws java.io.IOException for any transport errors.
+     */
+    public void sendGetStatus(W3CEndpointReference endpoint, final AddressingProperties addressingProperties, final InstanceIdentifier identifier)
+        throws SoapFault, IOException
+    {
+        BusinessAgreementWithParticipantCompletionCoordinatorPortType port;
+        port = getPort(endpoint, addressingProperties, getStatusAction);
+        NotificationType getStatus = new NotificationType();
+
+        port.getStatusOperation(getStatus);
+    }
+
+    /**
+     * Send a status request.
+     * @param addressingProperties addressing context initialised with to and message ID.
+     * @param identifier The identifier of the initiator.
+     * @throws com.arjuna.webservices.SoapFault For any errors.
+     * @throws java.io.IOException for any transport errors.
+     */
+    public void sendStatus(W3CEndpointReference endpoint, final AddressingProperties addressingProperties, final InstanceIdentifier identifier,
+        final QName state)
+        throws SoapFault, IOException
+    {
+        BusinessAgreementWithParticipantCompletionCoordinatorPortType port;
+        port = getPort(endpoint, addressingProperties, statusAction);
+        StatusType status = new StatusType();
+        status.setState(state);
+
+        port.statusOperation(status);
+    }
+
+    /**
+     * Get the Completion Coordinator client singleton.
+     * @return The Completion Coordinator client singleton.
+     */
+    public static ParticipantCompletionCoordinatorClient getClient()
+    {
+        return CLIENT;
+    }
+
+    /**
+     * obtain a port from the participant endpoint configured with the instance identifier handler and the supplied
+     * addressing properties supplemented with the given action
+     * @param participant
+     * @param addressingProperties
+     * @param action
+     * @return
+     */
+    private BusinessAgreementWithParticipantCompletionCoordinatorPortType
+    getPort(final W3CEndpointReference participant, final AddressingProperties addressingProperties, final AttributedURI action)
+    {
+        return WSBAClient.getParticipantCompletionCoordinatorPort(participant, action, addressingProperties);
+    }
+}
\ No newline at end of file

Added: labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices11/wsba/client/ParticipantCompletionParticipantClient.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices11/wsba/client/ParticipantCompletionParticipantClient.java	                        (rev 0)
+++ labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices11/wsba/client/ParticipantCompletionParticipantClient.java	2008-01-25 17:18:13 UTC (rev 18124)
@@ -0,0 +1,283 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. 
+ * 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.webservices11.wsba.client;
+
+import com.arjuna.webservices11.wsba.BusinessActivityConstants;
+import com.arjuna.webservices.SoapFault;
+import com.arjuna.webservices11.wsba.client.WSBAClient;
+import com.arjuna.webservices11.wsarj.InstanceIdentifier;
+import com.arjuna.webservices11.ServiceRegistry;
+import org.oasis_open.docs.ws_tx.wsba._2006._06.BusinessAgreementWithParticipantCompletionParticipantPortType;
+import org.oasis_open.docs.ws_tx.wsba._2006._06.NotificationType;
+import org.oasis_open.docs.ws_tx.wsba._2006._06.StatusType;
+
+import javax.xml.namespace.QName;
+import javax.xml.ws.addressing.AddressingBuilder;
+import javax.xml.ws.addressing.AddressingProperties;
+import javax.xml.ws.addressing.AttributedURI;
+import javax.xml.ws.wsaddressing.W3CEndpointReference;
+import java.io.IOException;
+import java.net.URISyntaxException;
+
+/**
+ * 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 AttributedURI closeAction = null;
+    /**
+     * The cancel action.
+     */
+    private AttributedURI cancelAction = null;
+    /**
+     * The compensat action.
+     */
+    private AttributedURI compensateAction = null;
+    /**
+     * The failed action.
+     */
+    private AttributedURI failedAction = null;
+    /**
+     * The exited action.
+     */
+    private AttributedURI exitedAction = null;
+    /**
+     * The not completed action.
+     */
+    private AttributedURI notCompletedAction = null;
+    /**
+     * The get status action.
+     */
+    private AttributedURI getStatusAction = null;
+    /**
+     * The status action.
+     */
+    private AttributedURI statusAction = null;
+
+    /**
+     * The participant completion coordinator URI for replies.
+     */
+    private AttributedURI participantCompletionCoordinator = null;
+
+    /**
+     * Construct the participant completion coordinator client.
+     */
+    private ParticipantCompletionParticipantClient()
+    {
+        final AddressingBuilder builder = AddressingBuilder.getAddressingBuilder();
+        try {
+            closeAction = builder.newURI(BusinessActivityConstants.WSBA_ACTION_CLOSE);
+            cancelAction = builder.newURI(BusinessActivityConstants.WSBA_ACTION_CANCEL);
+            compensateAction = builder.newURI(BusinessActivityConstants.WSBA_ACTION_COMPENSATE);
+            failedAction = builder.newURI(BusinessActivityConstants.WSBA_ACTION_FAILED);
+            exitedAction = builder.newURI(BusinessActivityConstants.WSBA_ACTION_EXITED);
+            notCompletedAction = builder.newURI(BusinessActivityConstants.WSBA_ACTION_NOT_COMPLETED);
+            getStatusAction = builder.newURI(BusinessActivityConstants.WSBA_ACTION_GET_STATUS);
+            statusAction = builder.newURI(BusinessActivityConstants.WSBA_ACTION_STATUS);
+        } catch (URISyntaxException use) {
+            // TODO - log fault and throw exception
+        }
+        // final HandlerRegistry handlerRegistry = new HandlerRegistry() ;
+
+        // Add WS-Addressing
+        // AddressingPolicy.register(handlerRegistry) ;
+        // Add client policies
+        // ClientPolicy.register(handlerRegistry) ;
+
+        final String participantCompletionCoordinatorURI =
+            ServiceRegistry.getRegistry().getServiceURI(BusinessActivityConstants.PARTICIPANT_COMPLETION_COORDINATOR_SERVICE_NAME) ;
+        try {
+            participantCompletionCoordinator = builder.newURI(participantCompletionCoordinatorURI) ;
+        } catch (URISyntaxException use) {
+            // TODO - log fault and throw exception
+        }
+    }
+
+    /**
+     * Send a close request.
+     * @param addressingProperties addressing context initialised with to and message ID.
+     * @param identifier The identifier of the initiator.
+     * @throws com.arjuna.webservices.SoapFault For any errors.
+     * @throws java.io.IOException for any transport errors.
+     */
+    public void sendClose(W3CEndpointReference endpoint, final AddressingProperties addressingProperties, final InstanceIdentifier identifier)
+        throws SoapFault, IOException
+    {
+        BusinessAgreementWithParticipantCompletionParticipantPortType port;
+        port = getPort(endpoint, addressingProperties, closeAction);
+        NotificationType close = new NotificationType();
+
+        port.closeOperation(close);
+    }
+
+    /**
+     * Send a cancel request.
+     * @param addressingProperties addressing context initialised with to and message ID.
+     * @param identifier The identifier of the initiator.
+     * @throws com.arjuna.webservices.SoapFault For any errors.
+     * @throws java.io.IOException for any transport errors.
+     */
+    public void sendCancel(W3CEndpointReference endpoint, final AddressingProperties addressingProperties, final InstanceIdentifier identifier)
+        throws SoapFault, IOException
+    {
+        BusinessAgreementWithParticipantCompletionParticipantPortType port;
+        port = getPort(endpoint, addressingProperties, cancelAction);
+        NotificationType cancel = new NotificationType();
+
+        port.cancelOperation(cancel);
+    }
+
+    /**
+     * Send a compensate request.
+     * @param addressingProperties addressing context initialised with to and message ID.
+     * @param identifier The identifier of the initiator.
+     * @throws com.arjuna.webservices.SoapFault For any errors.
+     * @throws java.io.IOException for any transport errors.
+     */
+    public void sendCompensate(W3CEndpointReference endpoint, final AddressingProperties addressingProperties, final InstanceIdentifier identifier)
+        throws SoapFault, IOException
+    {
+        BusinessAgreementWithParticipantCompletionParticipantPortType port;
+        port = getPort(endpoint, addressingProperties, compensateAction);
+        NotificationType compensate = new NotificationType();
+
+        port.compensateOperation(compensate);
+    }
+
+    /**
+     * Send a failed request.
+     * @param addressingProperties addressing context initialised with to and message ID.
+     * @param identifier The identifier of the initiator.
+     * @throws com.arjuna.webservices.SoapFault For any errors.
+     * @throws java.io.IOException for any transport errors.
+     */
+    public void sendFailed(W3CEndpointReference endpoint, final AddressingProperties addressingProperties, final InstanceIdentifier identifier)
+        throws SoapFault, IOException
+    {
+        BusinessAgreementWithParticipantCompletionParticipantPortType port;
+        port = getPort(endpoint, addressingProperties, failedAction);
+        NotificationType failed = new NotificationType();
+
+        port.failedOperation(failed);
+    }
+
+    /**
+     * Send an exited request.
+     * @param addressingProperties addressing context initialised with to and message ID.
+     * @param identifier The identifier of the initiator.
+     * @throws com.arjuna.webservices.SoapFault For any errors.
+     * @throws java.io.IOException for any transport errors.
+     */
+    public void sendExited(W3CEndpointReference endpoint, final AddressingProperties addressingProperties, final InstanceIdentifier identifier)
+        throws SoapFault, IOException
+    {
+        BusinessAgreementWithParticipantCompletionParticipantPortType port;
+        port = getPort(endpoint, addressingProperties, exitedAction);
+        NotificationType exited = new NotificationType();
+
+        port.exitedOperation(exited);
+    }
+
+    /**
+     * Send a not completed request.
+     * @param addressingProperties addressing context initialised with to and message ID.
+     * @param identifier The identifier of the initiator.
+     * @throws com.arjuna.webservices.SoapFault For any errors.
+     * @throws java.io.IOException for any transport errors.
+     */
+    public void sendNotCompleted(W3CEndpointReference endpoint, final AddressingProperties addressingProperties, final InstanceIdentifier identifier)
+        throws SoapFault, IOException
+    {
+        BusinessAgreementWithParticipantCompletionParticipantPortType port;
+        port = getPort(endpoint, addressingProperties, notCompletedAction);
+        NotificationType notCompleted = new NotificationType();
+
+        port.notCompleted(notCompleted);
+    }
+
+    /**
+     * Send a get status request.
+     * @param addressingProperties addressing context initialised with to and message ID.
+     * @param identifier The identifier of the initiator.
+     * @throws com.arjuna.webservices.SoapFault For any errors.
+     * @throws java.io.IOException for any transport errors.
+     */
+    public void sendGetStatus(W3CEndpointReference endpoint, final AddressingProperties addressingProperties, final InstanceIdentifier identifier)
+        throws SoapFault, IOException
+    {
+        BusinessAgreementWithParticipantCompletionParticipantPortType port;
+        port = getPort(endpoint, addressingProperties, getStatusAction);
+        NotificationType getStatus = new NotificationType();
+
+        port.getStatusOperation(getStatus);
+    }
+
+    /**
+     * Send a status request.
+     * @param addressingProperties addressing context initialised with to and message ID.
+     * @param identifier The identifier of the initiator.
+     * @throws com.arjuna.webservices.SoapFault For any errors.
+     * @throws java.io.IOException for any transport errors.
+     */
+    public void sendStatus(W3CEndpointReference endpoint, final AddressingProperties addressingProperties, final InstanceIdentifier identifier,
+        final QName state)
+        throws SoapFault, IOException
+    {
+        BusinessAgreementWithParticipantCompletionParticipantPortType port;
+        port = getPort(endpoint, addressingProperties, statusAction);
+        StatusType status = new StatusType();
+        status.setState(state);
+
+        port.statusOperation(status);
+    }
+
+   /**
+     * Get the Completion Coordinator client singleton.
+     * @return The Completion Coordinator client singleton.
+     */
+    public static ParticipantCompletionParticipantClient getClient()
+    {
+        return CLIENT;
+    }
+
+    /**
+     * obtain a port from the participant endpoint configured with the instance identifier handler and the supplied
+     * addressing properties supplemented with the given action
+     * @param participant
+     * @param addressingProperties
+     * @param action
+     * @return
+     */
+    private BusinessAgreementWithParticipantCompletionParticipantPortType
+    getPort(final W3CEndpointReference participant, final AddressingProperties addressingProperties, final AttributedURI action)
+    {
+        return WSBAClient.getParticipantCompletionParticipantPort(participant, action, addressingProperties);
+    }
+}
\ No newline at end of file

Added: labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices11/wsba/client/WSBAClient.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices11/wsba/client/WSBAClient.java	                        (rev 0)
+++ labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices11/wsba/client/WSBAClient.java	2008-01-25 17:18:13 UTC (rev 18124)
@@ -0,0 +1,236 @@
+package com.arjuna.webservices11.wsba.client;
+
+import com.arjuna.webservices11.wsarj.handler.InstanceIdentifierHandler;
+import org.oasis_open.docs.ws_tx.wsba._2006._06.*;
+import org.jboss.ws.extensions.addressing.jaxws.WSAddressingClientHandler;
+
+import javax.xml.ws.BindingProvider;
+import javax.xml.ws.addressing.AddressingBuilder;
+import javax.xml.ws.addressing.AddressingProperties;
+import javax.xml.ws.addressing.AttributedURI;
+import javax.xml.ws.addressing.JAXWSAConstants;
+import javax.xml.ws.handler.Handler;
+import javax.xml.ws.soap.AddressingFeature;
+import javax.xml.ws.wsaddressing.W3CEndpointReference;
+import java.net.URISyntaxException;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * Created by IntelliJ IDEA.
+ * User: adinn
+ * Date: Oct 7, 2007
+ * Time: 3:14:28 PM
+ * To change this template use File | Settings | File Templates.
+ */
+public class WSBAClient
+{
+    // TODO -- do we really need a thread local here or can we just use one service?
+    /**
+     *  thread local which maintains a per thread participant completion coordinator service instance
+     */
+    private static ThreadLocal<BusinessAgreementWithParticipantCompletionCoordinatorService> participantCompletionCoordinatorService = new ThreadLocal<BusinessAgreementWithParticipantCompletionCoordinatorService>();
+
+    /**
+     *  thread local which maintains a per thread participant completion participant service instance
+     */
+    private static ThreadLocal<BusinessAgreementWithParticipantCompletionParticipantService> participantCompletionParticipantService = new ThreadLocal<BusinessAgreementWithParticipantCompletionParticipantService>();
+
+    /**
+     *  thread local which maintains a per thread coordinator completion coordinator service instance
+     */
+    private static ThreadLocal<BusinessAgreementWithCoordinatorCompletionCoordinatorService> coordinatorCompletionCoordinatorService = new ThreadLocal<BusinessAgreementWithCoordinatorCompletionCoordinatorService>();
+
+    /**
+     *  thread local which maintains a per thread coordinator completion participant service instance
+     */
+    private static ThreadLocal<BusinessAgreementWithCoordinatorCompletionParticipantService> coordinatorCompletionParticipantService = new ThreadLocal<BusinessAgreementWithCoordinatorCompletionParticipantService>();
+
+    /**
+     *  builder used to construct addressing info for calls
+     */
+    private static AddressingBuilder builder = AddressingBuilder.getAddressingBuilder();
+
+    /**
+     * fetch a participant completion coordinator service unique to the current thread
+     * @return
+     */
+    private static synchronized BusinessAgreementWithParticipantCompletionCoordinatorService getParticipantCompletionCoordinatorService()
+    {
+        if (participantCompletionCoordinatorService.get() == null) {
+            participantCompletionCoordinatorService.set(new BusinessAgreementWithParticipantCompletionCoordinatorService());
+        }
+        return participantCompletionCoordinatorService.get();
+    }
+
+    /**
+     * fetch a participant completion participant service unique to the current thread
+     * @return
+     */
+    private static synchronized BusinessAgreementWithParticipantCompletionParticipantService getParticipantCompletionParticipantService()
+    {
+        if (participantCompletionParticipantService.get() == null) {
+            participantCompletionParticipantService.set(new BusinessAgreementWithParticipantCompletionParticipantService());
+        }
+        return participantCompletionParticipantService.get();
+    }
+
+    /**
+     * fetch a coordinator completion coordinator service unique to the current thread
+     * @return
+     */
+    private static synchronized BusinessAgreementWithCoordinatorCompletionCoordinatorService getCoordinatorCompletionCoordinatorService()
+    {
+        if (coordinatorCompletionCoordinatorService.get() == null) {
+            coordinatorCompletionCoordinatorService.set(new BusinessAgreementWithCoordinatorCompletionCoordinatorService());
+        }
+        return coordinatorCompletionCoordinatorService.get();
+    }
+
+    /**
+     * fetch a coordinator completion participant service unique to the current thread
+     * @return
+     */
+    private static synchronized BusinessAgreementWithCoordinatorCompletionParticipantService getCoordinatorCompletionParticipantService()
+    {
+        if (coordinatorCompletionParticipantService.get() == null) {
+            coordinatorCompletionParticipantService.set(new BusinessAgreementWithCoordinatorCompletionParticipantService());
+        }
+        return coordinatorCompletionParticipantService.get();
+    }
+
+    public static BusinessAgreementWithParticipantCompletionCoordinatorPortType getParticipantCompletionCoordinatorPort(W3CEndpointReference endpointReference,
+                                                         AttributedURI action,
+                                                         AddressingProperties addressingProperties)
+    {
+        BusinessAgreementWithParticipantCompletionCoordinatorService service = getParticipantCompletionCoordinatorService();
+        BusinessAgreementWithParticipantCompletionCoordinatorPortType port = service.getPort(endpointReference, BusinessAgreementWithParticipantCompletionCoordinatorPortType.class, new AddressingFeature(true, true));
+        BindingProvider bindingProvider = (BindingProvider)port;
+        /*
+         * we need to configure an instance identifier handler for this port to pass the tx context either
+         * outgoing or returning. We also have to add the the WSAdressing client handler to ensure that the
+         * addressing properties are encoded into the SOAP message
+         */
+        List<Handler> customHandlerChain = new ArrayList<Handler>();
+        customHandlerChain.add(new InstanceIdentifierHandler());
+        customHandlerChain.add(new WSAddressingClientHandler());
+		bindingProvider.getBinding().setHandlerChain(customHandlerChain);
+        // the address will have been pulled out of the endpoint by getPort but we still have to set it in the
+        // addressing properties along with the action and message id
+        Map<String, Object> requestContext = bindingProvider.getRequestContext();
+        String address = (String)requestContext.get(BindingProvider.ENDPOINT_ADDRESS_PROPERTY);
+        try {
+            addressingProperties.setTo(builder.newURI(address));
+        } catch (URISyntaxException use) {
+            // TODO -- log unexpected error here
+        }
+        addressingProperties.setAction(action);
+        requestContext.put(JAXWSAConstants.CLIENT_ADDRESSING_PROPERTIES, addressingProperties);
+	    // jbossws should do this for us . . .
+	    requestContext.put(JAXWSAConstants.CLIENT_ADDRESSING_PROPERTIES_OUTBOUND, addressingProperties);
+
+        return port;
+    }
+
+    // don't think we ever need this as we get a registration port from the endpoint ref returned by
+    // the activation port request
+    public static BusinessAgreementWithParticipantCompletionParticipantPortType getParticipantCompletionParticipantPort(W3CEndpointReference endpointReference,
+                                                         AttributedURI action,
+                                                         AddressingProperties addressingProperties)
+    {
+        BusinessAgreementWithParticipantCompletionParticipantService service = getParticipantCompletionParticipantService();
+        BusinessAgreementWithParticipantCompletionParticipantPortType port = service.getPort(endpointReference, BusinessAgreementWithParticipantCompletionParticipantPortType.class, new AddressingFeature(true, true));
+        BindingProvider bindingProvider = (BindingProvider)port;
+        /*
+         * we need to configure an instance identifier handler for this port to pass the tx context either
+         * outgoing or returning. We also have to add the the WSAdressing client handler to ensure that the
+         * addressing properties are encoded into the SOAP message
+         */
+        List<Handler> customHandlerChain = new ArrayList<Handler>();
+        customHandlerChain.add(new InstanceIdentifierHandler());
+        customHandlerChain.add(new WSAddressingClientHandler());
+		bindingProvider.getBinding().setHandlerChain(customHandlerChain);
+        // the address will have been pulled out of the endpoint by getPort but we still have to set it in the
+        // addressing properties along with the action and message id
+        Map<String, Object> requestContext = bindingProvider.getRequestContext();
+        String address = (String)requestContext.get(BindingProvider.ENDPOINT_ADDRESS_PROPERTY);
+        try {
+            addressingProperties.setTo(builder.newURI(address));
+        } catch (URISyntaxException use) {
+            // TODO -- log unexpected error here
+        }
+        addressingProperties.setAction(action);
+        requestContext.put(JAXWSAConstants.CLIENT_ADDRESSING_PROPERTIES, addressingProperties);
+	    // jbossws should do this for us . . .
+	    requestContext.put(JAXWSAConstants.CLIENT_ADDRESSING_PROPERTIES_OUTBOUND, addressingProperties);
+
+        return port;
+    }
+
+    public static BusinessAgreementWithCoordinatorCompletionCoordinatorPortType getCoordinatorCompletionCoordinatorPort(W3CEndpointReference endpointReference,
+                                                                             AttributedURI action,
+                                                                             AddressingProperties addressingProperties)
+    {
+        BusinessAgreementWithCoordinatorCompletionCoordinatorService service = getCoordinatorCompletionCoordinatorService();
+        BusinessAgreementWithCoordinatorCompletionCoordinatorPortType port = service.getPort(endpointReference, BusinessAgreementWithCoordinatorCompletionCoordinatorPortType.class, new AddressingFeature(true, true));
+        BindingProvider bindingProvider = (BindingProvider)port;
+        /*
+         * we need to configure an instance identifier handler for this port to pass the tx context either
+         * outgoing or returning. We also have to add the the WSAdressing client handler to ensure that the
+         * addressing properties are encoded into the SOAP message
+         */
+        List<Handler> customHandlerChain = new ArrayList<Handler>();
+        customHandlerChain.add(new InstanceIdentifierHandler());
+        customHandlerChain.add(new WSAddressingClientHandler());
+		bindingProvider.getBinding().setHandlerChain(customHandlerChain);
+        // the address will have been pulled out of the endpoint by getPort but we still have to set it in the
+        // addressing properties along with the action and message id
+        Map<String, Object> requestContext = bindingProvider.getRequestContext();
+        String address = (String)requestContext.get(BindingProvider.ENDPOINT_ADDRESS_PROPERTY);
+        try {
+            addressingProperties.setTo(builder.newURI(address));
+        } catch (URISyntaxException use) {
+            // TODO -- log unexpected error here
+        }
+        addressingProperties.setAction(action);
+        requestContext.put(JAXWSAConstants.CLIENT_ADDRESSING_PROPERTIES, addressingProperties);
+	    // jbossws should do this for us . . .
+	    requestContext.put(JAXWSAConstants.CLIENT_ADDRESSING_PROPERTIES_OUTBOUND, addressingProperties);
+
+        return port;
+    }
+
+    public static BusinessAgreementWithCoordinatorCompletionParticipantPortType getCoordinatorCompletionParticipantPort(W3CEndpointReference endpointReference,
+                                                                         AttributedURI action,
+                                                                         AddressingProperties addressingProperties)
+    {
+        BusinessAgreementWithCoordinatorCompletionParticipantService service = getCoordinatorCompletionParticipantService();
+        BusinessAgreementWithCoordinatorCompletionParticipantPortType port = service.getPort(endpointReference, BusinessAgreementWithCoordinatorCompletionParticipantPortType.class, new AddressingFeature(true, true));
+        BindingProvider bindingProvider = (BindingProvider)port;
+        /*
+         * we need to configure an instance identifier handler for this port to pass the tx context either
+         * outgoing or returning. We also have to add the the WSAdressing client handler to ensure that the
+         * addressing properties are encoded into the SOAP message
+         */
+        List<Handler> customHandlerChain = new ArrayList<Handler>();
+        customHandlerChain.add(new InstanceIdentifierHandler());
+        customHandlerChain.add(new WSAddressingClientHandler());
+		bindingProvider.getBinding().setHandlerChain(customHandlerChain);
+        // the address will have been pulled out of the endpoint by getPort but we still have to set it in the
+        // addressing properties along with the action and message id
+        Map<String, Object> requestContext = bindingProvider.getRequestContext();
+        String address = (String)requestContext.get(BindingProvider.ENDPOINT_ADDRESS_PROPERTY);
+        try {
+            addressingProperties.setTo(builder.newURI(address));
+        } catch (URISyntaxException use) {
+            // TODO -- log unexpected error here
+        }
+        addressingProperties.setAction(action);
+        requestContext.put(JAXWSAConstants.CLIENT_ADDRESSING_PROPERTIES, addressingProperties);
+	    // jbossws should do this for us . . .
+	    requestContext.put(JAXWSAConstants.CLIENT_ADDRESSING_PROPERTIES_OUTBOUND, addressingProperties);
+
+        return port;
+    }
+}
\ No newline at end of file

Added: labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices11/wsba/processors/CoordinatorCompletionCoordinatorProcessor.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices11/wsba/processors/CoordinatorCompletionCoordinatorProcessor.java	                        (rev 0)
+++ labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices11/wsba/processors/CoordinatorCompletionCoordinatorProcessor.java	2008-01-25 17:18:13 UTC (rev 18124)
@@ -0,0 +1,160 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. 
+ * 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.webservices11.wsba.processors;
+
+import com.arjuna.webservices.SoapFault;
+import com.arjuna.webservices11.wsarj.ArjunaContext;
+import com.arjuna.webservices11.wsba.CoordinatorCompletionCoordinatorInboundEvents;
+import org.oasis_open.docs.ws_tx.wsba._2006._06.ExceptionType;
+import org.oasis_open.docs.ws_tx.wsba._2006._06.NotificationType;
+import org.oasis_open.docs.ws_tx.wsba._2006._06.StatusType;
+
+import javax.xml.ws.addressing.AddressingProperties;
+
+
+/**
+ * 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 coordinator 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 addressingProperties The addressing context.
+     * @param arjunaContext The arjuna context.
+     */
+    public abstract void cancelled(final NotificationType cancelled, final AddressingProperties addressingProperties, final ArjunaContext arjunaContext) ;
+
+    /**
+     * Closed.
+     * @param closed The closed notification.
+     * @param addressingProperties The addressing context.
+     * @param arjunaContext The arjuna context.
+     */
+    public abstract void closed(final NotificationType closed, final AddressingProperties addressingProperties, final ArjunaContext arjunaContext) ;
+
+    /**
+     * Compensated.
+     * @param compensated The compensated notification.
+     * @param addressingProperties The addressing context.
+     * @param arjunaContext The arjuna context.
+     */
+    public abstract void compensated(final NotificationType compensated, final AddressingProperties addressingProperties, final ArjunaContext arjunaContext) ;
+
+    /**
+     * Fail.
+     * @param fail The fail exception.
+     * @param addressingProperties The addressing context.
+     * @param arjunaContext The arjuna context.
+     */
+    public abstract void fail(final ExceptionType fail, final AddressingProperties addressingProperties, final ArjunaContext arjunaContext) ;
+
+    /**
+     * Completed.
+     * @param completed The completed notification.
+     * @param addressingProperties The addressing context.
+     * @param arjunaContext The arjuna context.
+     */
+    public abstract void completed(final NotificationType completed, final AddressingProperties addressingProperties,
+        final ArjunaContext arjunaContext) ;
+
+    /**
+     * Exit.
+     * @param exit The exit notification.
+     * @param addressingProperties The addressing context.
+     * @param arjunaContext The arjuna context.
+     */
+    public abstract void exit(final NotificationType exit, final AddressingProperties addressingProperties, final ArjunaContext arjunaContext) ;
+
+    /**
+     * Cannot complete.
+     * @param cannotComplete The cannot complete notification.
+     * @param addressingProperties The addressing context.
+     * @param arjunaContext The arjuna context.
+     */
+    public abstract void cannotComplete(final NotificationType cannotComplete, final AddressingProperties addressingProperties,
+        final ArjunaContext arjunaContext) ;
+
+    /**
+     * Get Status.
+     * @param getStatus The get status notification.
+     * @param addressingProperties The addressing context.
+     * @param arjunaContext The arjuna context.
+     */
+    public abstract void getStatus(final NotificationType getStatus, final AddressingProperties addressingProperties, final ArjunaContext arjunaContext) ;
+
+    /**
+     * Status.
+     * @param status The status.
+     * @param addressingProperties The addressing context.
+     * @param arjunaContext The arjuna context.
+     */
+    public abstract void status(final StatusType status, final AddressingProperties addressingProperties, final ArjunaContext arjunaContext) ;
+
+    /**
+     * SOAP fault.
+     * @param soapFault The SOAP fault.
+     * @param addressingProperties The addressing context.
+     * @param arjunaContext The arjuna context.
+     */
+    public abstract void soapFault(final SoapFault soapFault, final AddressingProperties addressingProperties,
+        final ArjunaContext arjunaContext) ;
+}
\ No newline at end of file

Added: labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices11/wsba/processors/CoordinatorCompletionParticipantProcessor.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices11/wsba/processors/CoordinatorCompletionParticipantProcessor.java	                        (rev 0)
+++ labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices11/wsba/processors/CoordinatorCompletionParticipantProcessor.java	2008-01-25 17:18:13 UTC (rev 18124)
@@ -0,0 +1,157 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. 
+ * 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.webservices11.wsba.processors;
+
+import com.arjuna.webservices.SoapFault;
+import com.arjuna.webservices11.wsarj.ArjunaContext;
+import com.arjuna.webservices11.wsba.CoordinatorCompletionParticipantInboundEvents;
+import org.oasis_open.docs.ws_tx.wsba._2006._06.NotificationType;
+import org.oasis_open.docs.ws_tx.wsba._2006._06.StatusType;
+
+import javax.xml.ws.addressing.AddressingProperties;
+
+
+/**
+ * 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 addressingProperties The addressing context.
+     * @param arjunaContext The arjuna context.
+     */
+    public abstract void cancel(final NotificationType cancel, final AddressingProperties addressingProperties, final ArjunaContext arjunaContext) ;
+
+    /**
+     * Close.
+     * @param close The close notification.
+     * @param addressingProperties The addressing context.
+     * @param arjunaContext The arjuna context.
+     */
+    public abstract void close(final NotificationType close, final AddressingProperties addressingProperties, final ArjunaContext arjunaContext) ;
+
+    /**
+     * Compensate.
+     * @param compensate The compensate notification.
+     * @param addressingProperties The addressing context.
+     * @param arjunaContext The arjuna context.
+     */
+    public abstract void compensate(final NotificationType compensate, final AddressingProperties addressingProperties, final ArjunaContext arjunaContext) ;
+
+    /**
+     * Complete.
+     * @param complete The complete notification.
+     * @param addressingProperties The addressing context.
+     * @param arjunaContext The arjuna context.
+     */
+    public abstract void complete(final NotificationType complete, final AddressingProperties addressingProperties, final ArjunaContext arjunaContext) ;
+
+    /**
+     * Exited.
+     * @param exited The exited notification.
+     * @param addressingProperties The addressing context.
+     * @param arjunaContext The arjuna context.
+     */
+    public abstract void exited(final NotificationType exited, final AddressingProperties addressingProperties, final ArjunaContext arjunaContext) ;
+
+    /**
+     * Not Completed.
+     * @param notCompleted The not completed notification.
+     * @param addressingProperties The addressing context.
+     * @param arjunaContext The arjuna context.
+     */
+    public abstract void notCompleted(final NotificationType notCompleted, final AddressingProperties addressingProperties, final ArjunaContext arjunaContext) ;
+
+    /**
+     * Failed.
+     * @param failed The failed notification.
+     * @param addressingProperties The addressing context.
+     * @param arjunaContext The arjuna context.
+     */
+    public abstract void failed(final NotificationType failed, final AddressingProperties addressingProperties, final ArjunaContext arjunaContext) ;
+
+    /**
+     * Get Status.
+     * @param getStatus The get status notification.
+     * @param addressingProperties The addressing context.
+     * @param arjunaContext The arjuna context.
+     */
+    public abstract void getStatus(final NotificationType getStatus, final AddressingProperties addressingProperties, final ArjunaContext arjunaContext) ;
+
+    /**
+     * Status.
+     * @param status The status.
+     * @param addressingProperties The addressing context.
+     * @param arjunaContext The arjuna context.
+     */
+    public abstract void status(final StatusType status, final AddressingProperties addressingProperties, final ArjunaContext arjunaContext) ;
+
+    /**
+     * SOAP fault.
+     * @param soapFault The SOAP fault.
+     * @param addressingProperties The addressing context.
+     * @param arjunaContext The arjuna context.
+     */
+    public abstract void soapFault(final SoapFault soapFault, final AddressingProperties addressingProperties,
+        final ArjunaContext arjunaContext) ;
+}
\ No newline at end of file

Added: labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices11/wsba/processors/ParticipantCompletionCoordinatorProcessor.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices11/wsba/processors/ParticipantCompletionCoordinatorProcessor.java	                        (rev 0)
+++ labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices11/wsba/processors/ParticipantCompletionCoordinatorProcessor.java	2008-01-25 17:18:13 UTC (rev 18124)
@@ -0,0 +1,160 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. 
+ * 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.webservices11.wsba.processors;
+
+import com.arjuna.webservices.SoapFault;
+import com.arjuna.webservices11.wsarj.ArjunaContext;
+import com.arjuna.webservices11.wsba.ParticipantCompletionCoordinatorInboundEvents;
+import org.oasis_open.docs.ws_tx.wsba._2006._06.ExceptionType;
+import org.oasis_open.docs.ws_tx.wsba._2006._06.NotificationType;
+import org.oasis_open.docs.ws_tx.wsba._2006._06.StatusType;
+
+import javax.xml.ws.addressing.AddressingProperties;
+
+
+/**
+ * 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 coordinator 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 addressingProperties The addressing context.
+     * @param arjunaContext The arjuna context.
+     */
+    public abstract void cancelled(final NotificationType cancelled, final AddressingProperties addressingProperties, final ArjunaContext arjunaContext) ;
+
+    /**
+     * Closed.
+     * @param closed The closed notification.
+     * @param addressingProperties The addressing context.
+     * @param arjunaContext The arjuna context.
+     */
+    public abstract void closed(final NotificationType closed, final AddressingProperties addressingProperties, final ArjunaContext arjunaContext) ;
+
+    /**
+     * Compensated.
+     * @param compensated The compensated notification.
+     * @param addressingProperties The addressing context.
+     * @param arjunaContext The arjuna context.
+     */
+    public abstract void compensated(final NotificationType compensated, final AddressingProperties addressingProperties, final ArjunaContext arjunaContext) ;
+
+    /**
+     * Completed.
+     * @param completed The completed notification.
+     * @param addressingProperties The addressing context.
+     * @param arjunaContext The arjuna context.
+     */
+    public abstract void completed(final NotificationType completed, final AddressingProperties addressingProperties,
+        final ArjunaContext arjunaContext) ;
+
+    /**
+     * Completed.
+     * @param cannotComplete The cannot complete notification.
+     * @param addressingProperties The addressing context.
+     * @param arjunaContext The arjuna context.
+     */
+    public abstract void cannotComplete(final NotificationType cannotComplete, final AddressingProperties addressingProperties, final ArjunaContext arjunaContext);
+
+    /**
+     * Exit.
+     * @param exit The exit notification.
+     * @param addressingProperties The addressing context.
+     * @param arjunaContext The arjuna context.
+     */
+    public abstract void exit(final NotificationType exit, final AddressingProperties addressingProperties, final ArjunaContext arjunaContext) ;
+
+    /**
+     * Fault.
+     * @param fail The fault exception.
+     * @param addressingProperties The addressing context.
+     * @param arjunaContext The arjuna context.
+     */
+    public abstract void fail(final ExceptionType fail, final AddressingProperties addressingProperties,
+        final ArjunaContext arjunaContext) ;
+
+    /**
+     * Get Status.
+     * @param getStatus The get status notification.
+     * @param addressingProperties The addressing context.
+     * @param arjunaContext The arjuna context.
+     */
+    public abstract void getStatus(final NotificationType getStatus, final AddressingProperties addressingProperties, final ArjunaContext arjunaContext) ;
+
+    /**
+     * Status.
+     * @param status The status.
+     * @param addressingProperties The addressing context.
+     * @param arjunaContext The arjuna context.
+     */
+    public abstract void status(final StatusType status, final AddressingProperties addressingProperties, final ArjunaContext arjunaContext) ;
+
+    /**
+     * SOAP fault.
+     * @param soapFault The SOAP fault.
+     * @param addressingProperties The addressing context.
+     * @param arjunaContext The arjuna context.
+     */
+    public abstract void soapFault(final SoapFault soapFault, final AddressingProperties addressingProperties,
+        final ArjunaContext arjunaContext) ;
+}
\ No newline at end of file

Added: labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices11/wsba/processors/ParticipantCompletionParticipantProcessor.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices11/wsba/processors/ParticipantCompletionParticipantProcessor.java	                        (rev 0)
+++ labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/webservices11/wsba/processors/ParticipantCompletionParticipantProcessor.java	2008-01-25 17:18:13 UTC (rev 18124)
@@ -0,0 +1,148 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. 
+ * 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.webservices11.wsba.processors;
+
+import com.arjuna.webservices.SoapFault;
+import com.arjuna.webservices11.wsarj.ArjunaContext;
+import com.arjuna.webservices11.wsba.ParticipantCompletionParticipantInboundEvents;
+import org.oasis_open.docs.ws_tx.wsba._2006._06.NotificationType;
+import org.oasis_open.docs.ws_tx.wsba._2006._06.StatusType;
+
+import javax.xml.ws.addressing.AddressingProperties;
+
+/**
+ * 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 addressingProperties The addressing context.
+     * @param arjunaContext The arjuna context.
+     */
+    public abstract void cancel(final NotificationType cancel, final AddressingProperties addressingProperties, final ArjunaContext arjunaContext) ;
+
+    /**
+     * Close.
+     * @param close The close notification.
+     * @param addressingProperties The addressing context.
+     * @param arjunaContext The arjuna context.
+     */
+    public abstract void close(final NotificationType close, final AddressingProperties addressingProperties, final ArjunaContext arjunaContext) ;
+
+    /**
+     * Compensate.
+     * @param compensate The compensate notification.
+     * @param addressingProperties The addressing context.
+     * @param arjunaContext The arjuna context.
+     */
+    public abstract void compensate(final NotificationType compensate, final AddressingProperties addressingProperties, final ArjunaContext arjunaContext) ;
+
+    /**
+     * Exited.
+     * @param exited The exited notification.
+     * @param addressingProperties The addressing context.
+     * @param arjunaContext The arjuna context.
+     */
+    public abstract void exited(final NotificationType exited, final AddressingProperties addressingProperties, final ArjunaContext arjunaContext) ;
+
+    /**
+     * Not Completed.
+     * @param notCompleted The not completed notification.
+     * @param addressingProperties The addressing context.
+     * @param arjunaContext The arjuna context.
+     */
+    public abstract void notCompleted(final NotificationType notCompleted, final AddressingProperties addressingProperties, final ArjunaContext arjunaContext) ;
+
+    /**
+     * Faulted.
+     * @param failed The failed notification.
+     * @param addressingProperties The addressing context.
+     * @param arjunaContext The arjuna context.
+     */
+    public abstract void failed(final NotificationType failed, final AddressingProperties addressingProperties, final ArjunaContext arjunaContext) ;
+
+    /**
+     * Get Status.
+     * @param getStatus The get status notification.
+     * @param addressingProperties The addressing context.
+     * @param arjunaContext The arjuna context.
+     */
+    public abstract void getStatus(final NotificationType getStatus, final AddressingProperties addressingProperties, final ArjunaContext arjunaContext) ;
+
+    /**
+     * Status.
+     * @param status The status.
+     * @param addressingProperties The addressing context.
+     * @param arjunaContext The arjuna context.
+     */
+    public abstract void status(final StatusType status, final AddressingProperties addressingProperties, final ArjunaContext arjunaContext) ;
+
+    /**
+     * SOAP fault.
+     * @param soapFault The SOAP fault.
+     * @param addressingProperties The addressing context.
+     * @param arjunaContext The arjuna context.
+     */
+    public abstract void soapFault(final SoapFault soapFault, final AddressingProperties addressingProperties,
+        final ArjunaContext arjunaContext) ;
+}
\ No newline at end of file

Deleted: labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/wst/BAParticipantManagerWS.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/wst/BAParticipantManagerWS.java	2008-01-25 17:05:33 UTC (rev 18123)
+++ labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/wst/BAParticipantManagerWS.java	2008-01-25 17:18:13 UTC (rev 18124)
@@ -1,79 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. 
- * 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 BAParticipantManagerWS
-{
-
-    /**
-     * 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;
-
-    /**
-     * Cannot complete.
-     */
-
-    public void cannotComplete () throws WrongStateException, UnknownTransactionException, SystemException;
-
-    /**
-     * Fault.
-     */
-
-    public void fail (final QName exceptionIdentifier) throws SystemException;
-}
\ No newline at end of file

Deleted: labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/wst/BusinessActivityTerminatorWS.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/wst/BusinessActivityTerminatorWS.java	2008-01-25 17:05:33 UTC (rev 18123)
+++ labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/wst/BusinessActivityTerminatorWS.java	2008-01-25 17:18:13 UTC (rev 18124)
@@ -1,47 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. 
- * 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: BusinessActivityTerminator.java,v 1.4 2004/09/09 08:48:32 kconner Exp $
- */
-
-package com.arjuna.wst;
-
-import javax.xml.ws.wsaddressing.W3CEndpointReference;
-
-/**
- * Not in the 1.1 specification. Supposed to use participant interface.
- */
-
-public interface BusinessActivityTerminatorWS extends BusinessActivityTerminator
-{
-    /**
-     * return either the terminator or participant endpoint depending upon what type of terminator strub this is
-     * @return
-     */
-    public W3CEndpointReference getEndpoint() ;
-}
\ No newline at end of file

Deleted: labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/wst/CompletionCoordinatorParticipantWS.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/wst/CompletionCoordinatorParticipantWS.java	2008-01-25 17:05:33 UTC (rev 18123)
+++ labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/wst/CompletionCoordinatorParticipantWS.java	2008-01-25 17:18:13 UTC (rev 18124)
@@ -1,11 +0,0 @@
-package com.arjuna.wst;
-
-import javax.xml.ws.wsaddressing.W3CEndpointReference;
-
-/**
- */
-
-public interface CompletionCoordinatorParticipantWS extends CompletionCoordinatorParticipant
-{
-    public W3CEndpointReference getParticipant();
-}

Deleted: labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/wst/messaging/CompletionCoordinatorProcessorWSImpl.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/wst/messaging/CompletionCoordinatorProcessorWSImpl.java	2008-01-25 17:05:33 UTC (rev 18123)
+++ labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/wst/messaging/CompletionCoordinatorProcessorWSImpl.java	2008-01-25 17:18:13 UTC (rev 18124)
@@ -1,221 +0,0 @@
-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.wsaddrws.AddressingHelper;
-import com.arjuna.webservices.wsarj.ArjunaContextWS;
-import com.arjuna.webservices.wsarj.InstanceIdentifierWS;
-import com.arjuna.webservices.wsarjtx.ArjunaTXConstants;
-import com.arjuna.webservices.wsat.client.CompletionInitiatorClientWS;
-import com.arjuna.webservices.wsat.processors.CompletionCoordinatorProcessorWS;
-import com.arjuna.wsc.messaging.MessageId;
-import com.arjuna.wsc.messaging.MessageIdWS;
-import com.arjuna.wst.CompletionCoordinatorParticipantWS;
-import com.arjuna.wst.SystemException;
-import com.arjuna.wst.TransactionRolledBackException;
-import com.arjuna.wst.UnknownTransactionException;
-import org.oasis_open.docs.ws_tx.wsat._2006._06.Notification;
-
-import javax.xml.ws.addressing.AddressingProperties;
-import java.text.MessageFormat;
-
-/**
- * The Completion Coordinator processor.
- * @author kevin
- * @message com.arjuna.wst.messaging.CompletionCoordinatorProcessorWSImpl_1 [com.arjuna.wst.messaging.CompletionCoordinatorProcessorWSImpl_1] - Unknown transaction
- * @message com.arjuna.wst.messaging.CompletionCoordinatorProcessorWSImpl_2 [com.arjuna.wst.messaging.CompletionCoordinatorProcessorWSImpl_2] - Unknown error: {0}
- * @message com.arjuna.wst.messaging.CompletionCoordinatorProcessorWSImpl_3 [com.arjuna.wst.messaging.CompletionCoordinatorProcessorWSImpl_3] - Unexpected exception thrown from commit:
- * @message com.arjuna.wst.messaging.CompletionCoordinatorProcessorWSImpl_4 [com.arjuna.wst.messaging.CompletionCoordinatorProcessorWSImpl_4] - Commit called on unknown participant: {0}
- * @message com.arjuna.wst.messaging.CompletionCoordinatorProcessorWSImpl_5 [com.arjuna.wst.messaging.CompletionCoordinatorProcessorWSImpl_5] - Unknown participant
- * @message com.arjuna.wst.messaging.CompletionCoordinatorProcessorWSImpl_6 [com.arjuna.wst.messaging.CompletionCoordinatorProcessorWSImpl_6] - Unknown transaction
- * @message com.arjuna.wst.messaging.CompletionCoordinatorProcessorWSImpl_7 [com.arjuna.wst.messaging.CompletionCoordinatorProcessorWSImpl_7] - Unknown error: {0}
- * @message com.arjuna.wst.messaging.CompletionCoordinatorProcessorWSImpl_8 [com.arjuna.wst.messaging.CompletionCoordinatorProcessorWSImpl_8] - Unexpected exception thrown from rollback:
- * @message com.arjuna.wst.messaging.CompletionCoordinatorProcessorWSImpl_9 [com.arjuna.wst.messaging.CompletionCoordinatorProcessorWSImpl_9] - Rollback called on unknown participant: {0}
- * @message com.arjuna.wst.messaging.CompletionCoordinatorProcessorWSImpl_10 [com.arjuna.wst.messaging.CompletionCoordinatorProcessorWSImpl_10] - Unknown participant
- */
-public class CompletionCoordinatorProcessorWSImpl extends CompletionCoordinatorProcessorWS
-{
-    /**
-     * 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 CompletionCoordinatorParticipantWS participant, final String identifier)
-    {
-        activatedObjectProcessor.activateObject(participant, identifier) ;
-    }
-
-    /**
-     * Deactivate the participant.
-     * @param participant The participant.
-     */
-    public void deactivateParticipant(final CompletionCoordinatorParticipantWS 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 CompletionCoordinatorParticipantWS getParticipant(final InstanceIdentifierWS instanceIdentifier)
-    {
-        final String identifier = (instanceIdentifier != null ? instanceIdentifier.getInstanceIdentifier() : null) ;
-        return (CompletionCoordinatorParticipantWS)activatedObjectProcessor.getObject(identifier) ;
-    }
-
-    /**
-     * Commit.
-     * @param commit The commit notification.
-     * @param addressingProperties The addressing context.
-     * @param arjunaContext The arjuna context.
-     */
-    public void commit(final Notification commit, final AddressingProperties addressingProperties,
-        final ArjunaContextWS arjunaContext)
-    {
-        final InstanceIdentifierWS instanceIdentifier = arjunaContext.getInstanceIdentifier() ;
-        final CompletionCoordinatorParticipantWS participant = getParticipant(instanceIdentifier) ;
-
-        try
-        {
-            if (participant != null)
-            {
-                final String messageId = MessageIdWS.getMessageId() ;
-                try
-                {
-                    participant.commit() ;
-                }
-                catch (final TransactionRolledBackException trbe)
-                {
-                    final AddressingProperties responseAddressingContext =
-                        AddressingHelper.createResponseContext(addressingProperties, messageId) ;
-                    CompletionInitiatorClientWS.getClient().sendAborted(participant.getParticipant(), responseAddressingContext, instanceIdentifier) ;
-                    return ;
-                }
-                catch (final UnknownTransactionException ute)
-                {
-                    final AddressingProperties faultAddressingContext = AddressingHelper.createFaultContext(addressingProperties, messageId) ;
-                    final SoapFault soapFault = new SoapFault(SoapFaultType.FAULT_SENDER, ArjunaTXConstants.UNKNOWNTRANSACTION_ERROR_CODE_QNAME,
-                        WSTLogger.log_mesg.getString("com.arjuna.wst.messaging.CompletionCoordinatorProcessorWSImpl_1")) ;
-                    CompletionInitiatorClientWS.getClient().sendSoapFault(participant.getParticipant(), faultAddressingContext, soapFault, instanceIdentifier) ;
-                    return ;
-                }
-                catch (final SystemException se)
-                {
-                    final AddressingProperties faultAddressingContext = AddressingHelper.createFaultContext(addressingProperties, messageId) ;
-                    final String pattern = WSTLogger.log_mesg.getString("com.arjuna.wst.messaging.CompletionCoordinatorProcessorWSImpl_2") ;
-                    final String message = MessageFormat.format(pattern, new Object[] {se}) ;
-                    final SoapFault soapFault = new SoapFault(SoapFaultType.FAULT_SENDER, ArjunaTXConstants.UNKNOWNERROR_ERROR_CODE_QNAME, message) ;
-                    CompletionInitiatorClientWS.getClient().sendSoapFault(participant.getParticipant(), faultAddressingContext, soapFault, instanceIdentifier) ;
-                    return ;
-                }
-                catch (final Throwable th)
-                {
-                    if (WSTLogger.arjLoggerI18N.isDebugEnabled())
-                    {
-                        WSTLogger.arjLoggerI18N.debug("com.arjuna.wst.messaging.CompletionCoordinatorProcessorWSImpl_3", th) ;
-                    }
-                    final AddressingProperties faultAddressingContext = AddressingHelper.createFaultContext(addressingProperties, MessageIdWS.getMessageId()) ;
-                    final SoapFault soapFault = new SoapFault(th) ;
-                    CompletionInitiatorClientWS.getClient().sendSoapFault(participant.getParticipant(), faultAddressingContext, soapFault, instanceIdentifier) ;
-                    return ;
-                }
-                final AddressingProperties responseAddressingContext = AddressingHelper.createResponseContext(addressingProperties, messageId) ;
-                CompletionInitiatorClientWS.getClient().sendCommitted(participant.getParticipant(), responseAddressingContext, instanceIdentifier) ;
-            }
-            else
-            {
-                if (WSTLogger.arjLoggerI18N.isDebugEnabled())
-                {
-                    WSTLogger.arjLoggerI18N.debug("com.arjuna.wst.messaging.CompletionCoordinatorProcessorWSImpl_4", new Object[] {instanceIdentifier}) ;
-                }
-                final AddressingProperties faultAddressingContext = AddressingHelper.createFaultContext(addressingProperties, MessageIdWS.getMessageId()) ;
-                final SoapFault soapFault = new SoapFault(SoapFaultType.FAULT_SENDER, ArjunaTXConstants.UNKNOWNTRANSACTION_ERROR_CODE_QNAME,
-                        WSTLogger.log_mesg.getString("com.arjuna.wst.messaging.CompletionCoordinatorProcessorWSImpl_5")) ;
-                CompletionInitiatorClientWS.getClient().sendSoapFault(participant.getParticipant(), faultAddressingContext, soapFault, instanceIdentifier) ;
-            }
-        }
-        catch (Throwable throwable)
-        {
-            throwable.printStackTrace(System.err);
-        }
-    }
-
-    /**
-     * Rollback.
-     * @param rollback The rollback notification.
-     * @param addressingProperties The addressing context.
-     * @param arjunaContext The arjuna context.
-     */
-    public void rollback(final Notification rollback, final AddressingProperties addressingProperties,
-        final ArjunaContextWS arjunaContext)
-    {
-        final InstanceIdentifierWS instanceIdentifier = arjunaContext.getInstanceIdentifier() ;
-        final CompletionCoordinatorParticipantWS participant = getParticipant(instanceIdentifier) ;
-
-        try
-        {
-            if (participant != null)
-            {
-                final String messageId = MessageIdWS.getMessageId() ;
-                try
-                {
-                    participant.rollback() ;
-                }
-                catch (final UnknownTransactionException ute)
-                {
-                    final AddressingProperties faultAddressingContext = AddressingHelper.createFaultContext(addressingProperties, messageId) ;
-                    final SoapFault soapFault = new SoapFault(SoapFaultType.FAULT_SENDER, ArjunaTXConstants.UNKNOWNTRANSACTION_ERROR_CODE_QNAME,
-                        WSTLogger.log_mesg.getString("com.arjuna.wst.messaging.CompletionCoordinatorProcessorWSImpl_6")) ;
-                    CompletionInitiatorClientWS.getClient().sendSoapFault(participant.getParticipant(), faultAddressingContext, soapFault, instanceIdentifier) ;
-                    return ;
-                }
-                catch (SystemException systemException)
-                {
-                    final AddressingProperties faultAddressingContext = AddressingHelper.createFaultContext(addressingProperties, messageId) ;
-                    final String pattern = WSTLogger.log_mesg.getString("com.arjuna.wst.messaging.CompletionCoordinatorProcessorWSImpl_7") ;
-                    final String message = MessageFormat.format(pattern, new Object[] {systemException}) ;
-                    final SoapFault soapFault = new SoapFault(SoapFaultType.FAULT_SENDER, ArjunaTXConstants.UNKNOWNERROR_ERROR_CODE_QNAME, message) ;
-                    CompletionInitiatorClientWS.getClient().sendSoapFault(participant.getParticipant(), faultAddressingContext, soapFault, instanceIdentifier) ;
-                    return ;
-                }
-                catch (final Throwable th)
-                {
-                    if (WSTLogger.arjLoggerI18N.isDebugEnabled())
-                    {
-                        WSTLogger.arjLoggerI18N.debug("com.arjuna.wst.messaging.CompletionCoordinatorProcessorWSImpl_8", th) ;
-                    }
-                    final AddressingProperties faultAddressingContext = AddressingHelper.createFaultContext(addressingProperties, MessageIdWS.getMessageId()) ;
-                    final SoapFault soapFault = new SoapFault(th) ;
-                    CompletionInitiatorClientWS.getClient().sendSoapFault(participant.getParticipant(), faultAddressingContext, soapFault, instanceIdentifier) ;
-                    return ;
-                }
-                final AddressingProperties responseAddressingContext = AddressingHelper.createResponseContext(addressingProperties, messageId) ;
-                CompletionInitiatorClientWS.getClient().sendAborted(participant.getParticipant(), responseAddressingContext, instanceIdentifier) ;
-            }
-            else
-            {
-                if (WSTLogger.arjLoggerI18N.isDebugEnabled())
-                {
-                    WSTLogger.arjLoggerI18N.debug("com.arjuna.wst.messaging.CompletionCoordinatorProcessorWSImpl_9", new Object[] {instanceIdentifier}) ;
-                }
-                final AddressingProperties faultAddressingContext = AddressingHelper.createFaultContext(addressingProperties, MessageIdWS.getMessageId()) ;
-                final SoapFault soapFault = new SoapFault(SoapFaultType.FAULT_SENDER, ArjunaTXConstants.UNKNOWNTRANSACTION_ERROR_CODE_QNAME,
-                    WSTLogger.log_mesg.getString("com.arjuna.wst.messaging.CompletionCoordinatorProcessorWSImpl_10")) ;
-                CompletionInitiatorClientWS.getClient().sendSoapFault(participant.getParticipant(), faultAddressingContext, soapFault, instanceIdentifier) ;
-            }
-        }
-        catch (Throwable throwable)
-        {
-            throwable.printStackTrace(System.err);
-        }
-    }
-}

Deleted: labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/wst/messaging/CoordinatorCompletionCoordinatorProcessorWSImpl.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/wst/messaging/CoordinatorCompletionCoordinatorProcessorWSImpl.java	2008-01-25 17:05:33 UTC (rev 18123)
+++ labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/wst/messaging/CoordinatorCompletionCoordinatorProcessorWSImpl.java	2008-01-25 17:18:13 UTC (rev 18124)
@@ -1,484 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags.
- * 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.wsaddrws.AddressingHelper;
-import com.arjuna.webservices.wsarj.ArjunaContextWS;
-import com.arjuna.webservices.wsarj.InstanceIdentifierWS;
-import com.arjuna.webservices.wsba.CoordinatorCompletionCoordinatorInboundEventsWS;
-import com.arjuna.webservices.wsba.processors.CoordinatorCompletionCoordinatorProcessorWS;
-import com.arjuna.wsc.messaging.MessageIdWS;
-import org.oasis_open.docs.ws_tx.wsba._2006._06.ExceptionType;
-import org.oasis_open.docs.ws_tx.wsba._2006._06.NotificationType;
-import org.oasis_open.docs.ws_tx.wsba._2006._06.StatusType;
-
-import javax.xml.ws.addressing.AddressingProperties;
-
-
-/**
- * The Coordinator Completion Coordinator processor.
- * @author kevin
- */
-public class CoordinatorCompletionCoordinatorProcessorWSImpl extends CoordinatorCompletionCoordinatorProcessorWS
-{
-    /**
-     * 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 CoordinatorCompletionCoordinatorInboundEventsWS coordinator, final String identifier)
-    {
-        activatedObjectProcessor.activateObject(coordinator, identifier) ;
-    }
-
-    /**
-     * Deactivate the coordinator.
-     * @param coordinator The coordinator.
-     */
-    public void deactivateCoordinator(final CoordinatorCompletionCoordinatorInboundEventsWS 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 CoordinatorCompletionCoordinatorInboundEventsWS getCoordinator(final InstanceIdentifierWS instanceIdentifier)
-    {
-        final String identifier = (instanceIdentifier != null ? instanceIdentifier.getInstanceIdentifier() : null) ;
-        return (CoordinatorCompletionCoordinatorInboundEventsWS)activatedObjectProcessor.getObject(identifier) ;
-    }
-
-    /**
-     * Cancelled.
-     * @param cancelled The canceled notification.
-     * @param addressingProperties The addressing context.
-     * @param arjunaContext The arjuna context.
-     *
-     * @message com.arjuna.wst.messaging.CoordinatorCompletionCoordinatorProcessorWSImpl.canceled_1 [com.arjuna.wst.messaging.CoordinatorCompletionCoordinatorProcessorWSImpl.cancelled_1] - Unexpected exception thrown from cancelled:
-     * @message com.arjuna.wst.messaging.CoordinatorCompletionCoordinatorProcessorWSImpl.canceled_2 [com.arjuna.wst.messaging.CoordinatorCompletionCoordinatorProcessorWSImpl.cancelled_2] - Cancelled called on unknown coordinator: {0}
-     */
-    public void cancelled(final NotificationType cancelled, final AddressingProperties addressingProperties, final ArjunaContextWS arjunaContext)
-    {
-        final InstanceIdentifierWS instanceIdentifier = arjunaContext.getInstanceIdentifier() ;
-        final CoordinatorCompletionCoordinatorInboundEventsWS coordinator = getCoordinator(instanceIdentifier) ;
-
-        if (coordinator != null)
-        {
-            try
-            {
-                coordinator.cancelled(cancelled, addressingProperties, arjunaContext) ;
-            }
-            catch (final Throwable th)
-            {
-                if (WSTLogger.arjLoggerI18N.isDebugEnabled())
-                {
-                    WSTLogger.arjLoggerI18N.debug("com.arjuna.wst.messaging.CoordinatorCompletionCoordinatorProcessorWSImpl.canceled_1", th) ;
-                }
-            }
-        }
-        else if (WSTLogger.arjLoggerI18N.isDebugEnabled())
-        {
-            WSTLogger.arjLoggerI18N.debug("com.arjuna.wst.messaging.CoordinatorCompletionCoordinatorProcessorWSImpl.canceled_2", new Object[] {instanceIdentifier}) ;
-        }
-    }
-
-    /**
-     * Closed.
-     * @param closed The closed notification.
-     * @param addressingProperties The addressing context.
-     * @param arjunaContext The arjuna context.
-     *
-     * @message com.arjuna.wst.messaging.CoordinatorCompletionCoordinatorProcessorWSImpl.closed_1 [com.arjuna.wst.messaging.CoordinatorCompletionCoordinatorProcessorWSImpl.closed_1] - Unexpected exception thrown from closed:
-     * @message com.arjuna.wst.messaging.CoordinatorCompletionCoordinatorProcessorWSImpl.closed_2 [com.arjuna.wst.messaging.CoordinatorCompletionCoordinatorProcessorWSImpl.closed_2] - Closed called on unknown coordinator: {0}
-     */
-    public void closed(final NotificationType closed, final AddressingProperties addressingProperties, final ArjunaContextWS arjunaContext)
-    {
-        final InstanceIdentifierWS instanceIdentifier = arjunaContext.getInstanceIdentifier() ;
-        final CoordinatorCompletionCoordinatorInboundEventsWS coordinator = getCoordinator(instanceIdentifier) ;
-
-        if (coordinator != null)
-        {
-            try
-            {
-                coordinator.closed(closed, addressingProperties, arjunaContext) ;
-            }
-            catch (final Throwable th)
-            {
-                if (WSTLogger.arjLoggerI18N.isDebugEnabled())
-                {
-                    WSTLogger.arjLoggerI18N.debug("com.arjuna.wst.messaging.CoordinatorCompletionCoordinatorProcessorWSImpl.closed_1", th) ;
-                }
-            }
-        }
-        else if (WSTLogger.arjLoggerI18N.isDebugEnabled())
-        {
-            WSTLogger.arjLoggerI18N.debug("com.arjuna.wst.messaging.CoordinatorCompletionCoordinatorProcessorWSImpl.closed_2", new Object[] {instanceIdentifier}) ;
-        }
-    }
-
-    /**
-     * Compensated.
-     * @param compensated The compensated notification.
-     * @param addressingProperties The addressing context.
-     * @param arjunaContext The arjuna context.
-     *
-     * @message com.arjuna.wst.messaging.CoordinatorCompletionCoordinatorProcessorWSImpl.compensated_1 [com.arjuna.wst.messaging.CoordinatorCompletionCoordinatorProcessorWSImpl.compensated_1] - Unexpected exception thrown from compensated:
-     * @message com.arjuna.wst.messaging.CoordinatorCompletionCoordinatorProcessorWSImpl.compensated_2 [com.arjuna.wst.messaging.CoordinatorCompletionCoordinatorProcessorWSImpl.compensated_2] - Compensated called on unknown coordinator: {0}
-     */
-    public void compensated(final NotificationType compensated, final AddressingProperties addressingProperties, final ArjunaContextWS arjunaContext)
-    {
-        final InstanceIdentifierWS instanceIdentifier = arjunaContext.getInstanceIdentifier() ;
-        final CoordinatorCompletionCoordinatorInboundEventsWS coordinator = getCoordinator(instanceIdentifier) ;
-
-        if (coordinator != null)
-        {
-            try
-            {
-                coordinator.compensated(compensated, addressingProperties, arjunaContext) ;
-            }
-            catch (final Throwable th)
-            {
-                if (WSTLogger.arjLoggerI18N.isDebugEnabled())
-                {
-                    WSTLogger.arjLoggerI18N.debug("com.arjuna.wst.messaging.CoordinatorCompletionCoordinatorProcessorWSImpl.compensated_1", th) ;
-                }
-            }
-        }
-        else if (WSTLogger.arjLoggerI18N.isDebugEnabled())
-        {
-            WSTLogger.arjLoggerI18N.debug("com.arjuna.wst.messaging.CoordinatorCompletionCoordinatorProcessorWSImpl.compensated_2", new Object[] {instanceIdentifier}) ;
-        }
-    }
-
-    /**
-      * Fail.
-      * @param fail The fail exceptionnotification.
-      * @param addressingProperties The addressing context.
-      * @param arjunaContext The arjuna context.
-      *
-      * @message com.arjuna.wst.messaging.CoordinatorCompletionCoordinatorProcessorWSImpl.fail_1 [com.arjuna.wst.messaging.CoordinatorCompletionCoordinatorProcessorWSImpl.fail_1] - Unexpected exception thrown from compensated:
-      * @message com.arjuna.wst.messaging.CoordinatorCompletionCoordinatorProcessorWSImpl.fail_2 [com.arjuna.wst.messaging.CoordinatorCompletionCoordinatorProcessorWSImpl.fail_2] - Compensated called on unknown coordinator: {0}
-      */
-     public void fail(final ExceptionType fail, final AddressingProperties addressingProperties, final ArjunaContextWS arjunaContext)
-     {
-         final InstanceIdentifierWS instanceIdentifier = arjunaContext.getInstanceIdentifier() ;
-         final CoordinatorCompletionCoordinatorInboundEventsWS coordinator = getCoordinator(instanceIdentifier) ;
-
-         if (coordinator != null)
-         {
-             try
-             {
-                 coordinator.fail(fail, addressingProperties, arjunaContext) ;
-             }
-             catch (final Throwable th)
-             {
-                 if (WSTLogger.arjLoggerI18N.isDebugEnabled())
-                 {
-                     WSTLogger.arjLoggerI18N.debug("com.arjuna.wst.messaging.CoordinatorCompletionCoordinatorProcessorWSImpl.fail_1", th) ;
-                 }
-             }
-         }
-         else if (WSTLogger.arjLoggerI18N.isDebugEnabled())
-         {
-             WSTLogger.arjLoggerI18N.debug("com.arjuna.wst.messaging.CoordinatorCompletionCoordinatorProcessorWSImpl.fail_2", new Object[] {instanceIdentifier}) ;
-         }
-     }
-    
-    /**
-     * Completed.
-     * @param completed The completed notification.
-     * @param addressingProperties The addressing context.
-     * @param arjunaContext The arjuna context.
-     *
-     * @message com.arjuna.wst.messaging.CoordinatorCompletionCoordinatorProcessorWSImpl.completed_1 [com.arjuna.wst.messaging.CoordinatorCompletionCoordinatorProcessorWSImpl.completed_1] - Unexpected exception thrown from completed:
-     * @message com.arjuna.wst.messaging.CoordinatorCompletionCoordinatorProcessorWSImpl.completed_2 [com.arjuna.wst.messaging.CoordinatorCompletionCoordinatorProcessorWSImpl.completed_2] - Completed called on unknown coordinator: {0}
-     */
-    public void completed(final NotificationType completed, final AddressingProperties addressingProperties,
-        final ArjunaContextWS arjunaContext)
-    {
-        final InstanceIdentifierWS instanceIdentifier = arjunaContext.getInstanceIdentifier() ;
-        final CoordinatorCompletionCoordinatorInboundEventsWS coordinator = getCoordinator(instanceIdentifier) ;
-
-        if (coordinator != null)
-        {
-            try
-            {
-                coordinator.completed(completed, addressingProperties, arjunaContext) ;
-            }
-            catch (final Throwable th)
-            {
-                if (WSTLogger.arjLoggerI18N.isDebugEnabled())
-                {
-                    WSTLogger.arjLoggerI18N.debug("com.arjuna.wst.messaging.CoordinatorCompletionCoordinatorProcessorWSImpl.completed_1", th) ;
-                }
-            }
-        }
-        else if (WSTLogger.arjLoggerI18N.isDebugEnabled())
-        {
-            WSTLogger.arjLoggerI18N.debug("com.arjuna.wst.messaging.CoordinatorCompletionCoordinatorProcessorWSImpl.completed_2", new Object[] {instanceIdentifier}) ;
-        }
-    }
-
-    /**
-     * Exit.
-     * @param exit The exit notification.
-     * @param addressingProperties The addressing context.
-     * @param arjunaContext The arjuna context.
-     *
-     * @message com.arjuna.wst.messaging.CoordinatorCompletionCoordinatorProcessorWSImpl.exit_1 [com.arjuna.wst.messaging.CoordinatorCompletionCoordinatorProcessorWSImpl.exit_1] - Unexpected exception thrown from exit:
-     * @message com.arjuna.wst.messaging.CoordinatorCompletionCoordinatorProcessorWSImpl.exit_2 [com.arjuna.wst.messaging.CoordinatorCompletionCoordinatorProcessorWSImpl.exit_2] - Exit called on unknown coordinator: {0}
-     */
-    public void exit(final NotificationType exit, final AddressingProperties addressingProperties, final ArjunaContextWS arjunaContext)
-    {
-        final InstanceIdentifierWS instanceIdentifier = arjunaContext.getInstanceIdentifier() ;
-        final CoordinatorCompletionCoordinatorInboundEventsWS coordinator = getCoordinator(instanceIdentifier) ;
-
-        if (coordinator != null)
-        {
-            try
-            {
-                coordinator.exit(exit, addressingProperties, arjunaContext) ;
-            }
-            catch (final Throwable th)
-            {
-                if (WSTLogger.arjLoggerI18N.isDebugEnabled())
-                {
-                    WSTLogger.arjLoggerI18N.debug("com.arjuna.wst.messaging.CoordinatorCompletionCoordinatorProcessorWSImpl.exit_1", th) ;
-                }
-            }
-        }
-        else
-        {
-            if (WSTLogger.arjLoggerI18N.isDebugEnabled())
-            {
-                WSTLogger.arjLoggerI18N.debug("com.arjuna.wst.messaging.CoordinatorCompletionCoordinatorProcessorWSImpl.exit_2", new Object[] {instanceIdentifier}) ;
-            }
-            sendExited(addressingProperties, arjunaContext) ;
-        }
-    }
-
-    /**
-     * FaulCannot completet.
-     * @param cannotComplete The cannot complete notification.
-     * @param addressingProperties The addressing context.
-     * @param arjunaContext The arjuna context.
-     *
-     * @message com.arjuna.wst.messaging.CoordinatorCompletionCoordinatorProcessorWSImpl.cannotComplete_1 [com.arjuna.wst.messaging.CoordinatorCompletionCoordinatorProcessorWSImpl.cannotComplete_1] - Unexpected exception thrown from fault:
-     * @message com.arjuna.wst.messaging.CoordinatorCompletionCoordinatorProcessorWSImpl.cannotComplete_2 [com.arjuna.wst.messaging.CoordinatorCompletionCoordinatorProcessorWSImpl.cannotComplete_2] - Fault called on unknown coordinator: {0}
-     */
-    public void cannotComplete(final NotificationType cannotComplete, final AddressingProperties addressingProperties,
-        final ArjunaContextWS arjunaContext)
-    {
-        final InstanceIdentifierWS instanceIdentifier = arjunaContext.getInstanceIdentifier() ;
-        final CoordinatorCompletionCoordinatorInboundEventsWS coordinator = getCoordinator(instanceIdentifier) ;
-
-        if (coordinator != null)
-        {
-            try
-            {
-                coordinator.cannotComplete(cannotComplete, addressingProperties, arjunaContext); ;
-            }
-            catch (final Throwable th)
-            {
-                if (WSTLogger.arjLoggerI18N.isDebugEnabled())
-                {
-                    WSTLogger.arjLoggerI18N.debug("com.arjuna.wst.messaging.CoordinatorCompletionCoordinatorProcessorWSImpl.cannotComplete_1", th) ;
-                }
-            }
-        }
-        else
-        {
-            if (WSTLogger.arjLoggerI18N.isDebugEnabled())
-            {
-                WSTLogger.arjLoggerI18N.debug("com.arjuna.wst.messaging.CoordinatorCompletionCoordinatorProcessorWSImpl.cannotComplete_2", new Object[] {instanceIdentifier}) ;
-            }
-            sendFailed(addressingProperties, arjunaContext) ;
-        }
-    }
-
-    /**
-     * Get Status.
-     * @param getStatus The get status notification.
-     * @param addressingProperties The addressing context.
-     * @param arjunaContext The arjuna context.
-     *
-     * @message com.arjuna.wst.messaging.CoordinatorCompletionCoordinatorProcessorWSImpl.getStatus_1 [com.arjuna.wst.messaging.CoordinatorCompletionCoordinatorProcessorWSImpl.getStatus_1] - Unexpected exception thrown from getStatus:
-     * @message com.arjuna.wst.messaging.CoordinatorCompletionCoordinatorProcessorWSImpl.getStatus_2 [com.arjuna.wst.messaging.CoordinatorCompletionCoordinatorProcessorWSImpl.getStatus_2] - GetStatus called on unknown coordinator: {0}
-     */
-    public void getStatus(final NotificationType getStatus, final AddressingProperties addressingProperties, final ArjunaContextWS arjunaContext)
-    {
-        final InstanceIdentifierWS instanceIdentifier = arjunaContext.getInstanceIdentifier() ;
-        final CoordinatorCompletionCoordinatorInboundEventsWS coordinator = getCoordinator(instanceIdentifier) ;
-
-        if (coordinator != null)
-        {
-            try
-            {
-                coordinator.getStatus(getStatus, addressingProperties, arjunaContext) ;
-            }
-            catch (final Throwable th)
-            {
-                if (WSTLogger.arjLoggerI18N.isDebugEnabled())
-                {
-                    WSTLogger.arjLoggerI18N.debug("com.arjuna.wst.messaging.CoordinatorCompletionCoordinatorProcessorWSImpl.getStatus_1", th) ;
-                }
-            }
-        }
-        else if (WSTLogger.arjLoggerI18N.isDebugEnabled())
-        {
-            WSTLogger.arjLoggerI18N.debug("com.arjuna.wst.messaging.CoordinatorCompletionCoordinatorProcessorWSImpl.getStatus_2", new Object[] {instanceIdentifier}) ;
-        }
-    }
-
-    /**
-     * Status.
-     * @param status The status.
-     * @param addressingProperties The addressing context.
-     * @param arjunaContext The arjuna context.
-     *
-     * @message com.arjuna.wst.messaging.CoordinatorCompletionCoordinatorProcessorWSImpl.status_1 [com.arjuna.wst.messaging.CoordinatorCompletionCoordinatorProcessorWSImpl.status_1] - Unexpected exception thrown from status:
-     * @message com.arjuna.wst.messaging.CoordinatorCompletionCoordinatorProcessorWSImpl.status_2 [com.arjuna.wst.messaging.CoordinatorCompletionCoordinatorProcessorWSImpl.status_2] - Status called on unknown coordinator: {0}
-     */
-    public void status(final StatusType status, final AddressingProperties addressingProperties, final ArjunaContextWS arjunaContext)
-    {
-        final InstanceIdentifierWS instanceIdentifier = arjunaContext.getInstanceIdentifier() ;
-        final CoordinatorCompletionCoordinatorInboundEventsWS coordinator = getCoordinator(instanceIdentifier) ;
-
-        if (coordinator != null)
-        {
-            try
-            {
-                coordinator.status(status, addressingProperties, arjunaContext) ;
-            }
-            catch (final Throwable th)
-            {
-                if (WSTLogger.arjLoggerI18N.isDebugEnabled())
-                {
-                    WSTLogger.arjLoggerI18N.debug("com.arjuna.wst.messaging.CoordinatorCompletionCoordinatorProcessorWSImpl.status_1", th) ;
-                }
-            }
-        }
-        else if (WSTLogger.arjLoggerI18N.isDebugEnabled())
-        {
-            WSTLogger.arjLoggerI18N.debug("com.arjuna.wst.messaging.CoordinatorCompletionCoordinatorProcessorWSImpl.status_2", new Object[] {instanceIdentifier}) ;
-        }
-    }
-
-    /**
-     * SOAP fault.
-     * @param soapFault The SOAP fault.
-     * @param addressingProperties The addressing context.
-     * @param arjunaContext The arjuna context.
-     *
-     * @message com.arjuna.wst.messaging.CoordinatorCompletionCoordinatorProcessorWSImpl.soapFault_1 [com.arjuna.wst.messaging.CoordinatorCompletionCoordinatorProcessorWSImpl.soapFault_1] - Unexpected exception thrown from soapFault:
-     * @message com.arjuna.wst.messaging.CoordinatorCompletionCoordinatorProcessorWSImpl.soapFault_2 [com.arjuna.wst.messaging.CoordinatorCompletionCoordinatorProcessorWSImpl.soapFault_2] - SoapFault called on unknown coordinator: {0}
-     */
-    public void soapFault(final SoapFault soapFault, final AddressingProperties addressingProperties,
-        final ArjunaContextWS arjunaContext)
-    {
-        final InstanceIdentifierWS instanceIdentifier = arjunaContext.getInstanceIdentifier() ;
-        final CoordinatorCompletionCoordinatorInboundEventsWS coordinator = getCoordinator(instanceIdentifier) ;
-
-        if (coordinator != null)
-        {
-            try
-            {
-                coordinator.soapFault(soapFault, addressingProperties, arjunaContext) ;
-            }
-            catch (final Throwable th)
-            {
-                if (WSTLogger.arjLoggerI18N.isDebugEnabled())
-                {
-                    WSTLogger.arjLoggerI18N.debug("com.arjuna.wst.messaging.CoordinatorCompletionCoordinatorProcessorWSImpl.soapFault_1", th) ;
-                }
-            }
-        }
-        else if (WSTLogger.arjLoggerI18N.isDebugEnabled())
-        {
-            WSTLogger.arjLoggerI18N.debug("com.arjuna.wst.messaging.CoordinatorCompletionCoordinatorProcessorWSImpl.soapFault_2", new Object[] {instanceIdentifier}) ;
-        }
-    }
-
-    /**
-     * Send an exited message.
-     *
-     * @param addressingProperties The addressing context.
-     * @param arjunaContext The arjuna context.
-     *
-     * @message com.arjuna.wst.messaging.CoordinatorCompletionCoordinatorProcessorWSImpl.sendExited_1 [com.arjuna.wst.messaging.CoordinatorCompletionCoordinatorProcessorWSImpl.sendExited_1] - Unexpected exception while sending Exited
-     */
-    private void sendExited(final AddressingProperties addressingProperties, final ArjunaContextWS arjunaContext)
-    {
-        // KEV add check for recovery
-        final String messageId = MessageIdWS.getMessageId() ;
-        final AddressingProperties responseAddressingContext = AddressingHelper.createNotificationContext(messageId) ;
-        try
-        {
-            // TODO cannot do this without an endpoint so we have to log an error message!
-            // CoordinatorCompletionParticipantClientWS.getClient().sendExited(responseAddressingContext, arjunaContext.getInstanceIdentifier()) ;
-        }
-        catch (final Throwable th)
-        {
-            if (WSTLogger.arjLoggerI18N.isDebugEnabled())
-            {
-                WSTLogger.arjLoggerI18N.debug("com.arjuna.wst.messaging.CoordinatorCompletionCoordinatorProcessorWSImpl.sendExited_1", th) ;
-            }
-        }
-    }
-
-    /**
-     * Send a faulted message.
-     *
-     * @param addressingProperties The addressing context.
-     * @param arjunaContext The arjuna context.
-     *
-     * @message com.arjuna.wst.messaging.CoordinatorCompletionCoordinatorProcessorWSImpl.sendFailed_1 [com.arjuna.wst.messaging.CoordinatorCompletionCoordinatorProcessorWSImpl.sendFailed_1] - Unexpected exception while sending Faulted
-     */
-    private void sendFailed(final AddressingProperties addressingProperties, final ArjunaContextWS arjunaContext)
-    {
-        // KEV add check for recovery
-        final String messageId = MessageIdWS.getMessageId() ;
-        final AddressingProperties responseAddressingContext = AddressingHelper.createNotificationContext(messageId) ;
-        try
-        {
-            // TODO cannot do this without an endpoint so we have to log an error message!
-            // CoordinatorCompletionParticipantClientWS.getClient().sendFailed(responseAddressingContext, arjunaContext.getInstanceIdentifier()) ;
-        }
-        catch (final Throwable th)
-        {
-            if (WSTLogger.arjLoggerI18N.isDebugEnabled())
-            {
-                WSTLogger.arjLoggerI18N.debug("com.arjuna.wst.messaging.CoordinatorCompletionCoordinatorProcessorWSImpl.sendFailed_1", th) ;
-            }
-        }
-    }
-}
\ No newline at end of file

Deleted: labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/wst/messaging/CoordinatorCompletionParticipantProcessorWSImpl.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/wst/messaging/CoordinatorCompletionParticipantProcessorWSImpl.java	2008-01-25 17:05:33 UTC (rev 18123)
+++ labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/wst/messaging/CoordinatorCompletionParticipantProcessorWSImpl.java	2008-01-25 17:18:13 UTC (rev 18124)
@@ -1,550 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. 
- * 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.wsaddrws.AddressingHelper;
-import com.arjuna.webservices.wsarj.ArjunaContextWS;
-import com.arjuna.webservices.wsarj.InstanceIdentifierWS;
-import com.arjuna.webservices.wsba.CoordinatorCompletionParticipantInboundEventsWS;
-import com.arjuna.webservices.wsba.processors.CoordinatorCompletionParticipantProcessorWS;
-import com.arjuna.wsc.messaging.MessageId;
-import com.arjuna.wsc.messaging.MessageIdWS;
-import org.oasis_open.docs.ws_tx.wsba._2006._06.NotificationType;
-import org.oasis_open.docs.ws_tx.wsba._2006._06.StatusType;
-
-import javax.xml.ws.addressing.AddressingProperties;
-
-
-/**
- * The Coordinator Completion Participant processor.
- * @author kevin
- */
-public class CoordinatorCompletionParticipantProcessorWSImpl extends CoordinatorCompletionParticipantProcessorWS
-{
-    /**
-     * 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 CoordinatorCompletionParticipantInboundEventsWS participant, final String identifier)
-    {
-        activatedObjectProcessor.activateObject(participant, identifier) ;
-    }
-
-    /**
-     * Deactivate the participant.
-     * @param participant The participant.
-     */
-    public void deactivateParticipant(final CoordinatorCompletionParticipantInboundEventsWS 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 CoordinatorCompletionParticipantInboundEventsWS getParticipant(final InstanceIdentifierWS instanceIdentifier)
-    {
-        final String identifier = (instanceIdentifier != null ? instanceIdentifier.getInstanceIdentifier() : null) ;
-        return (CoordinatorCompletionParticipantInboundEventsWS)activatedObjectProcessor.getObject(identifier) ;
-    }
-
-    /**
-     * Cancel.
-     * @param cancel The cancel notification.
-     * @param addressingProperties The addressing context.
-     * @param arjunaContext The arjuna context.
-     *
-     * @message com.arjuna.wst.messaging.CoordinatorCompletionParticipantProcessorWSImpl.cancel_1 [com.arjuna.wst.messaging.CoordinatorCompletionParticipantProcessorWSImpl.cancel_1] - Unexpected exception thrown from cancel:
-     * @message com.arjuna.wst.messaging.CoordinatorCompletionParticipantProcessorWSImpl.cancel_2 [com.arjuna.wst.messaging.CoordinatorCompletionParticipantProcessorWSImpl.cancel_2] - Cancel called on unknown participant: {0}
-     */
-    public void cancel(final NotificationType cancel, final AddressingProperties addressingProperties, final ArjunaContextWS arjunaContext)
-    {
-        final InstanceIdentifierWS instanceIdentifier = arjunaContext.getInstanceIdentifier() ;
-        final CoordinatorCompletionParticipantInboundEventsWS participant = getParticipant(instanceIdentifier) ;
-
-        if (participant != null)
-        {
-            try
-            {
-                participant.cancel(cancel, addressingProperties, arjunaContext) ;
-            }
-            catch (final Throwable th)
-            {
-                if (WSTLogger.arjLoggerI18N.isDebugEnabled())
-                {
-                    WSTLogger.arjLoggerI18N.debug("com.arjuna.wst.messaging.CoordinatorCompletionParticipantProcessorWSImpl.cancel_1", th) ;
-                }
-            }
-        }
-        else
-        {
-            if (WSTLogger.arjLoggerI18N.isDebugEnabled())
-            {
-                WSTLogger.arjLoggerI18N.debug("com.arjuna.wst.messaging.CoordinatorCompletionParticipantProcessorWSImpl.cancel_2", new Object[] {instanceIdentifier}) ;
-            }
-            // TODO - cannot do this as we don't have an endpoint
-            // sendCancelled(addressingProperties, arjunaContext) ;
-        }
-    }
-
-    /**
-     * Close.
-     * @param close The close notification.
-     * @param addressingProperties The addressing context.
-     * @param arjunaContext The arjuna context.
-     *
-     * @message com.arjuna.wst.messaging.CoordinatorCompletionParticipantProcessorWSImpl.close_1 [com.arjuna.wst.messaging.CoordinatorCompletionParticipantProcessorWSImpl.close_1] - Unexpected exception thrown from close:
-     * @message com.arjuna.wst.messaging.CoordinatorCompletionParticipantProcessorWSImpl.close_2 [com.arjuna.wst.messaging.CoordinatorCompletionParticipantProcessorWSImpl.close_2] - Close called on unknown participant: {0}
-     */
-    public void close(final NotificationType close, final AddressingProperties addressingProperties, final ArjunaContextWS arjunaContext)
-    {
-        final InstanceIdentifierWS instanceIdentifier = arjunaContext.getInstanceIdentifier() ;
-        final CoordinatorCompletionParticipantInboundEventsWS participant = getParticipant(instanceIdentifier) ;
-
-        if (participant != null)
-        {
-            try
-            {
-                participant.close(close, addressingProperties, arjunaContext) ;
-            }
-            catch (final Throwable th)
-            {
-                if (WSTLogger.arjLoggerI18N.isDebugEnabled())
-                {
-                    WSTLogger.arjLoggerI18N.debug("com.arjuna.wst.messaging.CoordinatorCompletionParticipantProcessorWSImpl.close_1", th) ;
-                }
-            }
-        }
-        else
-        {
-            if (WSTLogger.arjLoggerI18N.isDebugEnabled())
-            {
-                WSTLogger.arjLoggerI18N.debug("com.arjuna.wst.messaging.CoordinatorCompletionParticipantProcessorWSImpl.close_2", new Object[] {instanceIdentifier}) ;
-            }
-            // TODO - cannot do this as we don't have an endpoint
-            // sendClosed(addressingProperties, arjunaContext) ;
-        }
-    }
-
-    /**
-     * Compensate.
-     * @param compensate The compensate notification.
-     * @param addressingProperties The addressing context.
-     * @param arjunaContext The arjuna context.
-     *
-     * @message com.arjuna.wst.messaging.CoordinatorCompletionParticipantProcessorWSImpl.compensate_1 [com.arjuna.wst.messaging.CoordinatorCompletionParticipantProcessorWSImpl.compensate_1] - Unexpected exception thrown from compensate:
-     * @message com.arjuna.wst.messaging.CoordinatorCompletionParticipantProcessorWSImpl.compensate_2 [com.arjuna.wst.messaging.CoordinatorCompletionParticipantProcessorWSImpl.compensate_2] - Compensate called on unknown participant: {0}
-     */
-    public void compensate(final NotificationType compensate, final AddressingProperties addressingProperties, final ArjunaContextWS arjunaContext)
-    {
-        final InstanceIdentifierWS instanceIdentifier = arjunaContext.getInstanceIdentifier() ;
-        final CoordinatorCompletionParticipantInboundEventsWS participant = getParticipant(instanceIdentifier) ;
-
-        if (participant != null)
-        {
-            try
-            {
-                participant.compensate(compensate, addressingProperties, arjunaContext) ;
-            }
-            catch (final Throwable th)
-            {
-                if (WSTLogger.arjLoggerI18N.isDebugEnabled())
-                {
-                    WSTLogger.arjLoggerI18N.debug("com.arjuna.wst.messaging.CoordinatorCompletionParticipantProcessorWSImpl.compensate_1", th) ;
-                }
-            }
-        }
-        else
-        {
-            if (WSTLogger.arjLoggerI18N.isDebugEnabled())
-            {
-                WSTLogger.arjLoggerI18N.debug("com.arjuna.wst.messaging.CoordinatorCompletionParticipantProcessorWSImpl.compensate_2", new Object[] {instanceIdentifier}) ;
-            }
-            // TODO - cannot do this as we don't have an endpoint
-            // sendCompensated(addressingProperties, arjunaContext) ;
-        }
-    }
-
-    /**
-     * Complete.
-     * @param complete The complete notification.
-     * @param addressingProperties The addressing context.
-     * @param arjunaContext The arjuna context.
-     *
-     * @message com.arjuna.wst.messaging.CoordinatorCompletionParticipantProcessorWSImpl.complete_1 [com.arjuna.wst.messaging.CoordinatorCompletionParticipantProcessorWSImpl.complete_1] - Unexpected exception thrown from complete:
-     * @message com.arjuna.wst.messaging.CoordinatorCompletionParticipantProcessorWSImpl.complete_2 [com.arjuna.wst.messaging.CoordinatorCompletionParticipantProcessorWSImpl.complete_2] - Complete called on unknown participant: {0}
-     * @message com.arjuna.wst.messaging.CoordinatorCompletionParticipantProcessorWSImpl.complete_3 [com.arjuna.wst.messaging.CoordinatorCompletionParticipantProcessorWSImpl.complete_3] - Complete called on unknown participant
-     */
-    public void complete(final NotificationType complete, final AddressingProperties addressingProperties, final ArjunaContextWS arjunaContext)
-    {
-        final InstanceIdentifierWS instanceIdentifier = arjunaContext.getInstanceIdentifier() ;
-        final CoordinatorCompletionParticipantInboundEventsWS participant = getParticipant(instanceIdentifier) ;
-
-        if (participant != null)
-        {
-            try
-            {
-                participant.complete(complete, addressingProperties, arjunaContext) ;
-            }
-            catch (final Throwable th)
-            {
-                if (WSTLogger.arjLoggerI18N.isDebugEnabled())
-                {
-                    WSTLogger.arjLoggerI18N.debug("com.arjuna.wst.messaging.CoordinatorCompletionParticipantProcessorWSImpl.complete_1", th) ;
-                }
-            }
-        }
-        else
-        {
-            if (WSTLogger.arjLoggerI18N.isDebugEnabled())
-            {
-                WSTLogger.arjLoggerI18N.debug("com.arjuna.wst.messaging.CoordinatorCompletionParticipantProcessorWSImpl.complete_2", new Object[] {instanceIdentifier}) ;
-            }
-            // TODO - cannot do this as we don't have an endpoint
-            // sendFault(addressingProperties, arjunaContext, WSTLogger.log_mesg.getString("com.arjuna.wst.messaging.CoordinatorCompletionParticipantProcessorWSImpl.complete_3")) ;
-        }
-    }
-
-    /**
-     * Exited.
-     * @param exited The exited notification.
-     * @param addressingProperties The addressing context.
-     * @param arjunaContext The arjuna context.
-     *
-     * @message com.arjuna.wst.messaging.CoordinatorCompletionParticipantProcessorWSImpl.exited_1 [com.arjuna.wst.messaging.CoordinatorCompletionParticipantProcessorWSImpl.exited_1] - Unexpected exception thrown from exited:
-     * @message com.arjuna.wst.messaging.CoordinatorCompletionParticipantProcessorWSImpl.exited_2 [com.arjuna.wst.messaging.CoordinatorCompletionParticipantProcessorWSImpl.exited_2] - Exited called on unknown participant: {0}
-     */
-    public void exited(final NotificationType exited, final AddressingProperties addressingProperties, final ArjunaContextWS arjunaContext)
-    {
-        final InstanceIdentifierWS instanceIdentifier = arjunaContext.getInstanceIdentifier() ;
-        final CoordinatorCompletionParticipantInboundEventsWS participant = getParticipant(instanceIdentifier) ;
-
-        if (participant != null)
-        {
-            try
-            {
-                participant.exited(exited, addressingProperties, arjunaContext) ;
-            }
-            catch (final Throwable th)
-            {
-                if (WSTLogger.arjLoggerI18N.isDebugEnabled())
-                {
-                    WSTLogger.arjLoggerI18N.debug("com.arjuna.wst.messaging.CoordinatorCompletionParticipantProcessorWSImpl.exited_1", th) ;
-                }
-            }
-        }
-        else if (WSTLogger.arjLoggerI18N.isDebugEnabled())
-        {
-            WSTLogger.arjLoggerI18N.debug("com.arjuna.wst.messaging.CoordinatorCompletionParticipantProcessorWSImpl.exited_2", new Object[] {instanceIdentifier}) ;
-        }
-    }
-
-    /**
-     * Not Completed.
-     * @param notCompleted The not completed notification.
-     * @param addressingProperties The addressing context.
-     * @param arjunaContext The arjuna context.
-     *
-     * @message com.arjuna.wst.messaging.CoordinatorCompletionParticipantProcessorWSImpl.notCompleted_1 [com.arjuna.wst.messaging.CoordinatorCompletionParticipantProcessorWSImpl.notCompleted_1] - Unexpected exception thrown from notCompleted:
-     * @message com.arjuna.wst.messaging.CoordinatorCompletionParticipantProcessorWSImpl.notCompleted_2 [com.arjuna.wst.messaging.CoordinatorCompletionParticipantProcessorWSImpl.notCompleted_2] - NotCompleted called on unknown participant: {0}
-     */
-    public void notCompleted(final NotificationType notCompleted, final AddressingProperties addressingProperties, final ArjunaContextWS arjunaContext)
-    {
-        final InstanceIdentifierWS instanceIdentifier = arjunaContext.getInstanceIdentifier() ;
-        final CoordinatorCompletionParticipantInboundEventsWS participant = getParticipant(instanceIdentifier) ;
-
-        if (participant != null)
-        {
-            try
-            {
-                participant.notCompleted(notCompleted, addressingProperties, arjunaContext) ;
-            }
-            catch (final Throwable th)
-            {
-                if (WSTLogger.arjLoggerI18N.isDebugEnabled())
-                {
-                    WSTLogger.arjLoggerI18N.debug("com.arjuna.wst.messaging.CoordinatorCompletionParticipantProcessorWSImpl.notCompleted_1", th) ;
-                }
-            }
-        }
-        else if (WSTLogger.arjLoggerI18N.isDebugEnabled())
-        {
-            WSTLogger.arjLoggerI18N.debug("com.arjuna.wst.messaging.CoordinatorCompletionParticipantProcessorWSImpl.notCompleted_2", new Object[] {instanceIdentifier}) ;
-        }
-    }
-
-    /**
-     * Failed.
-     * @param failed The failed notification.
-     * @param addressingProperties The addressing context.
-     * @param arjunaContext The arjuna context.
-     *
-     * @message com.arjuna.wst.messaging.CoordinatorCompletionParticipantProcessorWSImpl.failed_1 [com.arjuna.wst.messaging.CoordinatorCompletionParticipantProcessorWSImpl.failed_1] - Unexpected exception thrown from failed:
-     * @message com.arjuna.wst.messaging.CoordinatorCompletionParticipantProcessorWSImpl.failed_2 [com.arjuna.wst.messaging.CoordinatorCompletionParticipantProcessorWSImpl.failed_2] - Failed called on unknown participant: {0}
-     */
-    public void failed(final NotificationType failed, final AddressingProperties addressingProperties, final ArjunaContextWS arjunaContext)
-    {
-        final InstanceIdentifierWS instanceIdentifier = arjunaContext.getInstanceIdentifier() ;
-        final CoordinatorCompletionParticipantInboundEventsWS participant = getParticipant(instanceIdentifier) ;
-
-        if (participant != null)
-        {
-            try
-            {
-                participant.failed(failed, addressingProperties, arjunaContext) ;
-            }
-            catch (final Throwable th)
-            {
-                if (WSTLogger.arjLoggerI18N.isDebugEnabled())
-                {
-                    WSTLogger.arjLoggerI18N.debug("com.arjuna.wst.messaging.CoordinatorCompletionParticipantProcessorWSImpl.faulted_1", th) ;
-                }
-            }
-        }
-        else if (WSTLogger.arjLoggerI18N.isDebugEnabled())
-        {
-            WSTLogger.arjLoggerI18N.debug("com.arjuna.wst.messaging.CoordinatorCompletionParticipantProcessorWSImpl.faulted_2", new Object[] {instanceIdentifier}) ;
-        }
-    }
-
-    /**
-     * Get Status.
-     * @param getStatus The get status notification.
-     * @param addressingProperties The addressing context.
-     * @param arjunaContext The arjuna context.
-     *
-     * @message com.arjuna.wst.messaging.CoordinatorCompletionParticipantProcessorWSImpl.getStatus_1 [com.arjuna.wst.messaging.CoordinatorCompletionParticipantProcessorWSImpl.getStatus_1] - Unexpected exception thrown from getStatus:
-     * @message com.arjuna.wst.messaging.CoordinatorCompletionParticipantProcessorWSImpl.getStatus_2 [com.arjuna.wst.messaging.CoordinatorCompletionParticipantProcessorWSImpl.getStatus_2] - GetStatus called on unknown participant: {0}
-     */
-    public void getStatus(final NotificationType getStatus, final AddressingProperties addressingProperties, final ArjunaContextWS arjunaContext)
-    {
-        final InstanceIdentifierWS instanceIdentifier = arjunaContext.getInstanceIdentifier() ;
-        final CoordinatorCompletionParticipantInboundEventsWS participant = getParticipant(instanceIdentifier) ;
-
-        if (participant != null)
-        {
-            try
-            {
-                participant.getStatus(getStatus, addressingProperties, arjunaContext) ;
-            }
-            catch (final Throwable th)
-            {
-                if (WSTLogger.arjLoggerI18N.isDebugEnabled())
-                {
-                    WSTLogger.arjLoggerI18N.debug("com.arjuna.wst.messaging.CoordinatorCompletionParticipantProcessorWSImpl.getStatus_1", th) ;
-                }
-            }
-        }
-        else if (WSTLogger.arjLoggerI18N.isDebugEnabled())
-        {
-            WSTLogger.arjLoggerI18N.debug("com.arjuna.wst.messaging.CoordinatorCompletionParticipantProcessorWSImpl.getStatus_2", new Object[] {instanceIdentifier}) ;
-        }
-    }
-
-    /**
-     * Status.
-     * @param status The status.
-     * @param addressingProperties The addressing context.
-     * @param arjunaContext The arjuna context.
-     *
-     * @message com.arjuna.wst.messaging.CoordinatorCompletionParticipantProcessorWSImpl.status_1 [com.arjuna.wst.messaging.CoordinatorCompletionParticipantProcessorWSImpl.status_1] - Unexpected exception thrown from status:
-     * @message com.arjuna.wst.messaging.CoordinatorCompletionParticipantProcessorWSImpl.status_2 [com.arjuna.wst.messaging.CoordinatorCompletionParticipantProcessorWSImpl.status_2] - Status called on unknown participant: {0}
-     */
-    public void status(final StatusType status, final AddressingProperties addressingProperties, final ArjunaContextWS arjunaContext)
-    {
-        final InstanceIdentifierWS instanceIdentifier = arjunaContext.getInstanceIdentifier() ;
-        final CoordinatorCompletionParticipantInboundEventsWS participant = getParticipant(instanceIdentifier) ;
-
-        if (participant != null)
-        {
-            try
-            {
-                participant.status(status, addressingProperties, arjunaContext) ;
-            }
-            catch (final Throwable th)
-            {
-                if (WSTLogger.arjLoggerI18N.isDebugEnabled())
-                {
-                    WSTLogger.arjLoggerI18N.debug("com.arjuna.wst.messaging.CoordinatorCompletionParticipantProcessorWSImpl.status_1", th) ;
-                }
-            }
-        }
-        else if (WSTLogger.arjLoggerI18N.isDebugEnabled())
-        {
-            WSTLogger.arjLoggerI18N.debug("com.arjuna.wst.messaging.CoordinatorCompletionParticipantProcessorWSImpl.status_2", new Object[] {instanceIdentifier}) ;
-        }
-    }
-
-    /**
-     * SOAP Fault.
-     * @param fault The SOAP fault notification.
-     * @param addressingProperties The addressing context.
-     * @param arjunaContext The arjuna context.
-     *
-     * @message com.arjuna.wst.messaging.CoordinatorCompletionParticipantProcessorWSImpl.soapFault_1 [com.arjuna.wst.messaging.CoordinatorCompletionParticipantProcessorWSImpl.soapFault_1] - Unexpected exception thrown from soapFault:
-     * @message com.arjuna.wst.messaging.CoordinatorCompletionParticipantProcessorWSImpl.soapFault_2 [com.arjuna.wst.messaging.CoordinatorCompletionParticipantProcessorWSImpl.soapFault_2] - SoapFault called on unknown participant: {0}
-     */
-    public void soapFault(final SoapFault fault, final AddressingProperties addressingProperties,
-        final ArjunaContextWS arjunaContext)
-    {
-        final InstanceIdentifierWS instanceIdentifier = arjunaContext.getInstanceIdentifier() ;
-        final CoordinatorCompletionParticipantInboundEventsWS participant = getParticipant(instanceIdentifier) ;
-
-        if (participant != null)
-        {
-            try
-            {
-                participant.soapFault(fault, addressingProperties, arjunaContext) ;
-            }
-            catch (final Throwable th)
-            {
-                if (WSTLogger.arjLoggerI18N.isDebugEnabled())
-                {
-                    WSTLogger.arjLoggerI18N.debug("com.arjuna.wst.messaging.CoordinatorCompletionParticipantProcessorWSImpl.soapFault_1", th) ;
-                }
-            }
-        }
-        else if (WSTLogger.arjLoggerI18N.isDebugEnabled())
-        {
-            WSTLogger.arjLoggerI18N.debug("com.arjuna.wst.messaging.CoordinatorCompletionParticipantProcessorWSImpl.soapFault_2", new Object[] {instanceIdentifier}) ;
-        }
-    }
-
-    /**
-     * Send a cancelled message.
-     *
-     * @param addressingProperties The addressing context.
-     * @param arjunaContext The arjuna context.
-     *
-     * @message com.arjuna.wst.messaging.CoordinatorCompletionCoordinatorProcessorWSImpl.sendCancelled_1 [com.arjuna.wst.messaging.CoordinatorCompletionCoordinatorProcessorWSImpl.sendCancelled_1] - Unexpected exception while sending Cancelled
-     */
-    private void sendCancelled(final AddressingProperties addressingProperties, final ArjunaContextWS arjunaContext)
-    {
-        // KEV add check for recovery
-        final String messageId = MessageId.getMessageId() ;
-        final AddressingProperties responseAddressingProperties = AddressingHelper.createNotificationContext(messageId) ;
-        try
-        {
-            // TODO - have to just log an error as we cannot do this without a client endpoint
-            // CoordinatorCompletionCoordinatorClientWS.getClient().sendCancelled(responseAddressingProperties, arjunaContext.getInstanceIdentifier()) ;
-        }
-        catch (final Throwable th)
-        {
-            if (WSTLogger.arjLoggerI18N.isDebugEnabled())
-            {
-                WSTLogger.arjLoggerI18N.debug("com.arjuna.wst.messaging.CoordinatorCompletionCoordinatorProcessorWSImpl.sendCancelled_1", th) ;
-            }
-        }
-    }
-
-    /**
-     * Send a closed message.
-     *
-     * @param addressingProperties The addressing context.
-     * @param arjunaContext The arjuna context.
-     *
-     * @message com.arjuna.wst.messaging.CoordinatorCompletionCoordinatorProcessorWSImpl.sendClosed_1 [com.arjuna.wst.messaging.CoordinatorCompletionCoordinatorProcessorWSImpl.sendClosed_1] - Unexpected exception while sending Closed
-     */
-    private void sendClosed(final AddressingProperties addressingProperties, final ArjunaContextWS arjunaContext)
-    {
-        // KEV add check for recovery
-        final String messageId = MessageIdWS.getMessageId() ;
-        final AddressingProperties responseAddressingProperties = AddressingHelper.createNotificationContext(messageId) ;
-        try
-        {
-            // TODO - have to just log an error as we cannot do this without a client endpoint
-            // CoordinatorCompletionCoordinatorClientWS.getClient().sendClosed(responseAddressingProperties, arjunaContext.getInstanceIdentifier()) ;
-        }
-        catch (final Throwable th)
-        {
-            if (WSTLogger.arjLoggerI18N.isDebugEnabled())
-            {
-                WSTLogger.arjLoggerI18N.debug("com.arjuna.wst.messaging.CoordinatorCompletionCoordinatorProcessorWSImpl.sendClosed_1", th) ;
-            }
-        }
-    }
-
-    /**
-     * Send a compensated message.
-     *
-     * @param addressingProperties The addressing context.
-     * @param arjunaContext The arjuna context.
-     *
-     * @message com.arjuna.wst.messaging.CoordinatorCompletionCoordinatorProcessorWSImpl.sendCompensated_1 [com.arjuna.wst.messaging.CoordinatorCompletionCoordinatorProcessorWSImpl.sendCompensated_1] - Unexpected exception while sending Compensated
-     */
-    private void sendCompensated(final AddressingProperties addressingProperties, final ArjunaContextWS arjunaContext)
-    {
-        // KEV add check for recovery
-        final String messageId = MessageIdWS.getMessageId() ;
-        final AddressingProperties responseAddressingProperties = AddressingHelper.createNotificationContext(messageId) ;
-        try
-        {
-            // TODO - have to just log an error as we cannot do this without a client endpoint
-            // CoordinatorCompletionCoordinatorClientWS.getClient().sendCompensated(responseAddressingProperties, arjunaContext.getInstanceIdentifier()) ;
-        }
-        catch (final Throwable th)
-        {
-            if (WSTLogger.arjLoggerI18N.isDebugEnabled())
-            {
-                WSTLogger.arjLoggerI18N.debug("com.arjuna.wst.messaging.CoordinatorCompletionCoordinatorProcessorWSImpl.sendCompensated_1", th) ;
-            }
-        }
-    }
-
-    /**
-     * Send a fault message.
-     *
-     * @param addressingProperties The addressing context.
-     * @param arjunaContext The arjuna context.
-     * @param exceptionIdentifier The exception identifier.
-     *
-     * @message com.arjuna.wst.messaging.CoordinatorCompletionCoordinatorProcessorWSImpl.sendFault_1 [com.arjuna.wst.messaging.CoordinatorCompletionCoordinatorProcessorWSImpl.sendFault_1] - Unexpected exception while sending Fail
-     */
-    private void sendFault(final AddressingProperties addressingProperties, final ArjunaContextWS arjunaContext, final String exceptionIdentifier)
-    {
-        // KEV add check for recovery
-        final String messageId = MessageIdWS.getMessageId() ;
-        final AddressingProperties responseAddressingProperties = AddressingHelper.createNotificationContext(messageId) ;
-        try
-        {
-            // TODO - have to just log an error as we cannot do this without a client endpoint
-            // CoordinatorCompletionCoordinatorClientWS.getClient().sendFault(responseAddressingProperties, arjunaContext.getInstanceIdentifier(), exceptionIdentifier) ;
-        }
-        catch (final Throwable th)
-        {
-            if (WSTLogger.arjLoggerI18N.isDebugEnabled())
-            {
-                WSTLogger.arjLoggerI18N.debug("com.arjuna.wst.messaging.CoordinatorCompletionCoordinatorProcessorWSImpl.sendFault_1", th) ;
-            }
-        }
-    }
-}
\ No newline at end of file

Deleted: labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/wst/messaging/CoordinatorProcessorWSImpl.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/wst/messaging/CoordinatorProcessorWSImpl.java	2008-01-25 17:05:33 UTC (rev 18123)
+++ labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/wst/messaging/CoordinatorProcessorWSImpl.java	2008-01-25 17:18:13 UTC (rev 18124)
@@ -1,320 +0,0 @@
-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.wsaddrws.AddressingHelper;
-import com.arjuna.webservices.wsarj.ArjunaContextWS;
-import com.arjuna.webservices.wsarj.InstanceIdentifierWS;
-import com.arjuna.webservices.wsat.CoordinatorInboundEventsWS;
-import com.arjuna.webservices.wsat.processors.CoordinatorProcessorWS;
-import com.arjuna.wsc.messaging.MessageId;
-import com.arjuna.wsc.messaging.MessageIdWS;
-import org.oasis_open.docs.ws_tx.wsat._2006._06.Notification;
-
-import javax.xml.ws.addressing.AddressingProperties;
-
-/**
- * The Coordinator processor.
- * @author kevin
- */
-public class CoordinatorProcessorWSImpl extends CoordinatorProcessorWS
-{
-    /**
-     * 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 CoordinatorInboundEventsWS coordinator, final String identifier)
-    {
-        activatedObjectProcessor.activateObject(coordinator, identifier) ;
-    }
-
-    /**
-     * Deactivate the coordinator.
-     * @param coordinator The coordinator.
-     */
-    public void deactivateCoordinator(final CoordinatorInboundEventsWS 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 CoordinatorInboundEventsWS getCoordinator(final InstanceIdentifierWS instanceIdentifier)
-    {
-        final String identifier = (instanceIdentifier != null ? instanceIdentifier.getInstanceIdentifier() : null) ;
-        return (CoordinatorInboundEventsWS)activatedObjectProcessor.getObject(identifier) ;
-    }
-
-    /**
-     * Aborted.
-     * @param aborted The aborted notification.
-     * @param addressingProperties The addressing context.
-     * @param arjunaContext The arjuna context.
-     *
-     * @message com.arjuna.wst.messaging.CoordinatorProcessorWSImpl.aborted_1 [com.arjuna.wst.messaging.CoordinatorProcessorWSImpl.aborted_1] - Unexpected exception thrown from aborted:
-     * @message com.arjuna.wst.messaging.CoordinatorProcessorWSImpl.aborted_2 [com.arjuna.wst.messaging.CoordinatorProcessorWSImpl.aborted_2] - Aborted called on unknown coordinator: {0}
-     */
-    public void aborted(final Notification aborted, final AddressingProperties addressingProperties,
-        final ArjunaContextWS arjunaContext)
-    {
-        final InstanceIdentifierWS instanceIdentifier = arjunaContext.getInstanceIdentifier() ;
-        final CoordinatorInboundEventsWS coordinator = getCoordinator(instanceIdentifier) ;
-
-        if (coordinator != null)
-        {
-            try
-            {
-                coordinator.aborted(aborted, addressingProperties, arjunaContext) ;
-            }
-            catch (final Throwable th)
-            {
-                if (WSTLogger.arjLoggerI18N.isWarnEnabled())
-                {
-                    WSTLogger.arjLoggerI18N.warn("com.arjuna.wst.messaging.CoordinatorProcessorWSImpl.aborted_1", th) ;
-                }
-            }
-        }
-        else if (WSTLogger.arjLoggerI18N.isWarnEnabled())
-        {
-            WSTLogger.arjLoggerI18N.warn("com.arjuna.wst.messaging.CoordinatorProcessorWSImpl.aborted_2", new Object[] {instanceIdentifier}) ;
-        }
-    }
-
-    /**
-     * Committed.
-     * @param committed The committed notification.
-     * @param addressingProperties The addressing context.
-     * @param arjunaContext The arjuna context.
-     *
-     * @message com.arjuna.wst.messaging.CoordinatorProcessorWSImpl.committed_1 [com.arjuna.wst.messaging.CoordinatorProcessorWSImpl.committed_1] - Unexpected exception thrown from committed:
-     * @message com.arjuna.wst.messaging.CoordinatorProcessorWSImpl.committed_2 [com.arjuna.wst.messaging.CoordinatorProcessorWSImpl.committed_2] - Committed called on unknown coordinator: {0}
-     */
-    public void committed(final Notification committed, final AddressingProperties addressingProperties,
-        final ArjunaContextWS arjunaContext)
-    {
-        final InstanceIdentifierWS instanceIdentifier = arjunaContext.getInstanceIdentifier() ;
-        final CoordinatorInboundEventsWS coordinator = getCoordinator(instanceIdentifier) ;
-
-        if (coordinator != null)
-        {
-            try
-            {
-                coordinator.committed(committed, addressingProperties, arjunaContext) ;
-            }
-            catch (final Throwable th)
-            {
-                if (WSTLogger.arjLoggerI18N.isWarnEnabled())
-                {
-                    WSTLogger.arjLoggerI18N.warn("com.arjuna.wst.messaging.CoordinatorProcessorWSImpl.committed_1", th) ;
-                }
-            }
-        }
-        else if (WSTLogger.arjLoggerI18N.isWarnEnabled())
-        {
-            WSTLogger.arjLoggerI18N.warn("com.arjuna.wst.messaging.CoordinatorProcessorWSImpl.committed_2", new Object[] {instanceIdentifier}) ;
-        }
-    }
-
-    /**
-     * Prepared.
-     * @param prepared The prepared notification.
-     * @param addressingProperties The addressing context.
-     * @param arjunaContext The arjuna context.
-     *
-     * @message com.arjuna.wst.messaging.CoordinatorProcessorWSImpl.prepared_1 [com.arjuna.wst.messaging.CoordinatorProcessorWSImpl.prepared_1] - Unexpected exception thrown from prepared:
-     * @message com.arjuna.wst.messaging.CoordinatorProcessorWSImpl.prepared_2 [com.arjuna.wst.messaging.CoordinatorProcessorWSImpl.prepared_2] - Prepared called on unknown coordinator: {0}
-     */
-    public void prepared(final Notification prepared, final AddressingProperties addressingProperties,
-        final ArjunaContextWS arjunaContext)
-    {
-        final InstanceIdentifierWS instanceIdentifier = arjunaContext.getInstanceIdentifier() ;
-        final CoordinatorInboundEventsWS coordinator = getCoordinator(instanceIdentifier) ;
-
-        if (coordinator != null)
-        {
-            try
-            {
-                coordinator.prepared(prepared, addressingProperties, arjunaContext) ;
-            }
-            catch (final Throwable th)
-            {
-                if (WSTLogger.arjLoggerI18N.isWarnEnabled())
-                {
-                    WSTLogger.arjLoggerI18N.warn("com.arjuna.wst.messaging.CoordinatorProcessorWSImpl.prepared_1", th) ;
-                }
-            }
-        }
-        else
-        {
-            if (WSTLogger.arjLoggerI18N.isWarnEnabled())
-            {
-                WSTLogger.arjLoggerI18N.warn("com.arjuna.wst.messaging.CoordinatorProcessorWSImpl.prepared_2", new Object[] {instanceIdentifier}) ;
-            }
-
-            final String identifierValue = instanceIdentifier.getInstanceIdentifier() ;
-            if ((identifierValue != null) && (identifierValue.length() > 0) && (identifierValue.charAt(0) == 'D'))
-            {
-        	    sendRollback(addressingProperties, arjunaContext) ;
-            }
-            else
-            {
-                sendInvalidState(addressingProperties, arjunaContext) ;
-            }
-        }
-    }
-
-    /**
-     * Read only.
-     * @param readOnly The read only notification.
-     * @param addressingProperties The addressing context.
-     * @param arjunaContext The arjuna context.
-     *
-     * @message com.arjuna.wst.messaging.CoordinatorProcessorWSImpl.readOnly_1 [com.arjuna.wst.messaging.CoordinatorProcessorWSImpl.readOnly_1] - Unexpected exception thrown from readOnly:
-     * @message com.arjuna.wst.messaging.CoordinatorProcessorWSImpl.readOnly_2 [com.arjuna.wst.messaging.CoordinatorProcessorWSImpl.readOnly_2] - ReadOnly called on unknown coordinator: {0}
-     */
-    public void readOnly(final Notification readOnly, final AddressingProperties addressingProperties,
-        final ArjunaContextWS arjunaContext)
-    {
-        final InstanceIdentifierWS instanceIdentifier = arjunaContext.getInstanceIdentifier() ;
-        final CoordinatorInboundEventsWS coordinator = getCoordinator(instanceIdentifier) ;
-
-        if (coordinator != null)
-        {
-            try
-            {
-                coordinator.readOnly(readOnly, addressingProperties, arjunaContext) ;
-            }
-            catch (final Throwable th)
-            {
-                if (WSTLogger.arjLoggerI18N.isWarnEnabled())
-                {
-                    WSTLogger.arjLoggerI18N.warn("com.arjuna.wst.messaging.CoordinatorProcessorWSImpl.readOnly_1", th) ;
-                }
-            }
-        }
-        else if (WSTLogger.arjLoggerI18N.isWarnEnabled())
-        {
-            WSTLogger.arjLoggerI18N.warn("com.arjuna.wst.messaging.CoordinatorProcessorWSImpl.readOnly_2", new Object[] {instanceIdentifier}) ;
-        }
-    }
-
-    /**
-     * SOAP Fault.
-     * @param fault The SOAP fault notification.
-     * @param addressingProperties The addressing context.
-     * @param arjunaContext The arjuna context.
-     *
-     * @message com.arjuna.wst.messaging.CoordinatorProcessorWSImpl.soapFault_1 [com.arjuna.wst.messaging.CoordinatorProcessorWSImpl.soapFault_1] - Unexpected exception thrown from soapFault:
-     * @message com.arjuna.wst.messaging.CoordinatorProcessorWSImpl.soapFault_2 [com.arjuna.wst.messaging.CoordinatorProcessorWSImpl.soapFault_2] - SoapFault called on unknown coordinator: {0}
-     */
-    public void soapFault(final SoapFault fault, final AddressingProperties addressingProperties,
-        final ArjunaContextWS arjunaContext)
-    {
-        final InstanceIdentifierWS instanceIdentifier = arjunaContext.getInstanceIdentifier() ;
-        final CoordinatorInboundEventsWS coordinator = getCoordinator(instanceIdentifier) ;
-
-        if (coordinator != null)
-        {
-            try
-            {
-                coordinator.soapFault(fault, addressingProperties, arjunaContext) ;
-            }
-            catch (final Throwable th)
-            {
-                if (WSTLogger.arjLoggerI18N.isWarnEnabled())
-                {
-                    WSTLogger.arjLoggerI18N.warn("com.arjuna.wst.messaging.CoordinatorProcessorWSImpl.soapFault_1", th) ;
-                }
-            }
-        }
-        else
-        {
-            if (WSTLogger.arjLoggerI18N.isWarnEnabled())
-            {
-                WSTLogger.arjLoggerI18N.warn("com.arjuna.wst.messaging.CoordinatorProcessorWSImpl.soapFault_2", new Object[] {instanceIdentifier}) ;
-            }
-        }
-    }
-
-    /**
-     * Send an unknown transaction fault.
-     *
-     * @param addressingProperties The addressing context.
-     * @param arjunaContext The arjuna context.
-     *
-     * @message com.arjuna.wst.messaging.CoordinatorProcessorWSImpl.sendInvalidState_1 [com.arjuna.wst.messaging.CoordinatorProcessorWSImpl.sendInvalidState_1] - Unknown Transaction.
-     * @message com.arjuna.wst.messaging.CoordinatorProcessorWSImpl.sendInvalidState_2 [com.arjuna.wst.messaging.CoordinatorProcessorWSImpl.sendInvalidState_2] - Unexpecting exception while sending InvalidState
-     */
-    private void sendInvalidState(final AddressingProperties addressingProperties, final ArjunaContextWS arjunaContext)
-    {
-        // KEV add check for recovery
-        final String responseMessageId = MessageIdWS.getMessageId() ;
-        final AddressingProperties responseAddressingContext = AddressingHelper.createNotificationContext(responseMessageId) ;
-        final InstanceIdentifierWS instanceIdentifier = arjunaContext.getInstanceIdentifier() ;
-
-        /*
-         * TODO - fix this. cannot send invalid state fault as we have no participant end point!
-
-        final AttributedURI requestMessageId = addressingProperties.getMessageID() ;
-        if (requestMessageId != null)
-        {
-            AddressingBuilder builder = AddressingBuilder.getAddressingBuilder();
-            Relationship relatesToValue = builder.newRelationship(requestMessageId.getURI());
-            Relationship[] relatesToSet = { relatesToValue };
-            responseAddressingContext.setRelatesTo(relatesToSet);
-        }
-
-        try {
-            final String message = WSTLogger.log_mesg.getString("com.arjuna.wst.messaging.CoordinatorProcessorWSImpl.sendInvalidState_1") ;
-            final SoapFault soapFault = new SoapFault(SoapFaultType.FAULT_SENDER, CoordinationConstantsWS.WSCOOR_ERROR_CODE_INVALID_STATE_QNAME, message) ;
-            ParticipantClientWS.getClient().sendSoapFault(responseAddressingContext, soapFault, instanceIdentifier) ;
-        } catch (final Throwable th) {
-            if (WSTLogger.arjLoggerI18N.isDebugEnabled())
-            {
-                WSTLogger.arjLoggerI18N.debug("com.arjuna.wst.messaging.CoordinatorProcessorWSImpl.sendInvalidState_2", th) ;
-            }
-        }
-        */
-    }
-
-    /**
-     * Send a rollback message.
-     *
-     * @param addressingProperties The addressing context.
-     * @param arjunaContext The arjuna context.
-     *
-     * @message com.arjuna.wst.messaging.CoordinatorProcessorWSImpl.sendRollback_1 [com.arjuna.wst.messaging.CoordinatorProcessorWSImpl.sendRollback_1] - Unexpected exception while sending Rollback
-     */
-    private void sendRollback(final AddressingProperties addressingProperties, final ArjunaContextWS arjunaContext)
-    {
-        // KEV add check for recovery
-        final String messageId = MessageIdWS.getMessageId() ;
-        final AddressingProperties responseAddressingContext = AddressingHelper.createNotificationContext(messageId) ;
-        final InstanceIdentifierWS instanceIdentifier = arjunaContext.getInstanceIdentifier() ;
-        /*
-         * TODO - fix this. cannot send rollback as we have no participant end point!
-
-        try
-        {
-            ParticipantClientWS.getClient().sendRollback(responseAddressingContext, instanceIdentifier) ;
-        }
-        catch (final Throwable th)
-        {
-            if (WSTLogger.arjLoggerI18N.isDebugEnabled())
-            {
-                WSTLogger.arjLoggerI18N.debug("com.arjuna.wst.messaging.CoordinatorProcessorWSImpl.sendRollback_1", th) ;
-            }
-        }
-        */
-    }
-}

Deleted: labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/wst/messaging/ParticipantCompletionCoordinatorProcessorWSImpl.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/wst/messaging/ParticipantCompletionCoordinatorProcessorWSImpl.java	2008-01-25 17:05:33 UTC (rev 18123)
+++ labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/wst/messaging/ParticipantCompletionCoordinatorProcessorWSImpl.java	2008-01-25 17:18:13 UTC (rev 18124)
@@ -1,485 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags.
- * 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.wsaddrws.AddressingHelper;
-import com.arjuna.webservices.wsarj.ArjunaContextWS;
-import com.arjuna.webservices.wsarj.InstanceIdentifierWS;
-import com.arjuna.webservices.wsba.ParticipantCompletionCoordinatorInboundEventsWS;
-import com.arjuna.webservices.wsba.processors.ParticipantCompletionCoordinatorProcessorWS;
-import com.arjuna.wsc.messaging.MessageIdWS;
-import org.oasis_open.docs.ws_tx.wsba._2006._06.ExceptionType;
-import org.oasis_open.docs.ws_tx.wsba._2006._06.NotificationType;
-import org.oasis_open.docs.ws_tx.wsba._2006._06.StatusType;
-
-import javax.xml.ws.addressing.AddressingProperties;
-
-
-/**
- * The Participant Completion Coordinator processor.
- * @author kevin
- */
-public class ParticipantCompletionCoordinatorProcessorWSImpl extends ParticipantCompletionCoordinatorProcessorWS
-{
-    /**
-     * 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 ParticipantCompletionCoordinatorInboundEventsWS coordinator, final String identifier)
-    {
-        activatedObjectProcessor.activateObject(coordinator, identifier) ;
-    }
-
-    /**
-     * Deactivate the coordinator.
-     * @param coordinator The coordinator.
-     */
-    public void deactivateCoordinator(final ParticipantCompletionCoordinatorInboundEventsWS 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 ParticipantCompletionCoordinatorInboundEventsWS getCoordinator(final InstanceIdentifierWS instanceIdentifier)
-    {
-        final String identifier = (instanceIdentifier != null ? instanceIdentifier.getInstanceIdentifier() : null) ;
-        return (ParticipantCompletionCoordinatorInboundEventsWS)activatedObjectProcessor.getObject(identifier) ;
-    }
-
-    /**
-     * Cancelled.
-     * @param cancelled The cancelled notification.
-     * @param addressingProperties The addressing context.
-     * @param arjunaContext The arjuna context.
-     *
-     * @message com.arjuna.wst.messaging.ParticipantCompletionCoordinatorProcessorWSImpl.cancelled_1 [com.arjuna.wst.messaging.ParticipantCompletionCoordinatorProcessorWSImpl.cancelled_1] - Unexpected exception thrown from cancelled:
-     * @message com.arjuna.wst.messaging.ParticipantCompletionCoordinatorProcessorWSImpl.cancelled_2 [com.arjuna.wst.messaging.ParticipantCompletionCoordinatorProcessorWSImpl.cancelled_2] - Cancelled called on unknown coordinator: {0}
-     */
-    public void cancelled(final NotificationType cancelled, final AddressingProperties addressingProperties, final ArjunaContextWS arjunaContext)
-    {
-        final InstanceIdentifierWS instanceIdentifier = arjunaContext.getInstanceIdentifier() ;
-        final ParticipantCompletionCoordinatorInboundEventsWS coordinator = getCoordinator(instanceIdentifier) ;
-
-        if (coordinator != null)
-        {
-            try
-            {
-                coordinator.cancelled(cancelled, addressingProperties, arjunaContext) ;
-            }
-            catch (final Throwable th)
-            {
-                if (WSTLogger.arjLoggerI18N.isDebugEnabled())
-                {
-                    WSTLogger.arjLoggerI18N.debug("com.arjuna.wst.messaging.ParticipantCompletionCoordinatorProcessorWSImpl.cancelled_1", th) ;
-                }
-            }
-        }
-        else if (WSTLogger.arjLoggerI18N.isDebugEnabled())
-        {
-            WSTLogger.arjLoggerI18N.debug("com.arjuna.wst.messaging.ParticipantCompletionCoordinatorProcessorWSImpl.cancelled_2", new Object[] {instanceIdentifier}) ;
-        }
-    }
-
-    /**
-     * Closed.
-     * @param closed The closed notification.
-     * @param addressingProperties The addressing context.
-     * @param arjunaContext The arjuna context.
-     *
-     * @message com.arjuna.wst.messaging.ParticipantCompletionCoordinatorProcessorWSImpl.closed_1 [com.arjuna.wst.messaging.ParticipantCompletionCoordinatorProcessorWSImpl.closed_1] - Unexpected exception thrown from closed:
-     * @message com.arjuna.wst.messaging.ParticipantCompletionCoordinatorProcessorWSImpl.closed_2 [com.arjuna.wst.messaging.ParticipantCompletionCoordinatorProcessorWSImpl.closed_2] - Closed called on unknown coordinator: {0}
-     */
-    public void closed(final NotificationType closed, final AddressingProperties addressingProperties, final ArjunaContextWS arjunaContext)
-    {
-        final InstanceIdentifierWS instanceIdentifier = arjunaContext.getInstanceIdentifier() ;
-        final ParticipantCompletionCoordinatorInboundEventsWS coordinator = getCoordinator(instanceIdentifier) ;
-
-        if (coordinator != null)
-        {
-            try
-            {
-                coordinator.closed(closed, addressingProperties, arjunaContext) ;
-            }
-            catch (final Throwable th)
-            {
-                if (WSTLogger.arjLoggerI18N.isDebugEnabled())
-                {
-                    WSTLogger.arjLoggerI18N.debug("com.arjuna.wst.messaging.ParticipantCompletionCoordinatorProcessorWSImpl.closed_1", th) ;
-                }
-            }
-        }
-        else if (WSTLogger.arjLoggerI18N.isDebugEnabled())
-        {
-            WSTLogger.arjLoggerI18N.debug("com.arjuna.wst.messaging.ParticipantCompletionCoordinatorProcessorWSImpl.closed_2", new Object[] {instanceIdentifier}) ;
-        }
-    }
-
-    /**
-     * Compensated.
-     * @param compensated The compensated notification.
-     * @param addressingProperties The addressing context.
-     * @param arjunaContext The arjuna context.
-     *
-     * @message com.arjuna.wst.messaging.ParticipantCompletionCoordinatorProcessorWSImpl.compensated_1 [com.arjuna.wst.messaging.ParticipantCompletionCoordinatorProcessorWSImpl.compensated_1] - Unexpected exception thrown from compensated:
-     * @message com.arjuna.wst.messaging.ParticipantCompletionCoordinatorProcessorWSImpl.compensated_2 [com.arjuna.wst.messaging.ParticipantCompletionCoordinatorProcessorWSImpl.compensated_2] - Compensated called on unknown coordinator: {0}
-     */
-    public void compensated(final NotificationType compensated, final AddressingProperties addressingProperties, final ArjunaContextWS arjunaContext)
-    {
-        final InstanceIdentifierWS instanceIdentifier = arjunaContext.getInstanceIdentifier() ;
-        final ParticipantCompletionCoordinatorInboundEventsWS coordinator = getCoordinator(instanceIdentifier) ;
-
-        if (coordinator != null)
-        {
-            try
-            {
-                coordinator.compensated(compensated, addressingProperties, arjunaContext) ;
-            }
-            catch (final Throwable th)
-            {
-                if (WSTLogger.arjLoggerI18N.isDebugEnabled())
-                {
-                    WSTLogger.arjLoggerI18N.debug("com.arjuna.wst.messaging.ParticipantCompletionCoordinatorProcessorWSImpl.compensated_1", th) ;
-                }
-            }
-        }
-        else if (WSTLogger.arjLoggerI18N.isDebugEnabled())
-        {
-            WSTLogger.arjLoggerI18N.debug("com.arjuna.wst.messaging.ParticipantCompletionCoordinatorProcessorWSImpl.compensated_2", new Object[] {instanceIdentifier}) ;
-        }
-    }
-
-    /**
-     * Completed.
-     * @param completed The completed notification.
-     * @param addressingProperties The addressing context.
-     * @param arjunaContext The arjuna context.
-     *
-     * @message com.arjuna.wst.messaging.ParticipantCompletionCoordinatorProcessorWSImpl.completed_1 [com.arjuna.wst.messaging.ParticipantCompletionCoordinatorProcessorWSImpl.completed_1] - Unexpected exception thrown from completed:
-     * @message com.arjuna.wst.messaging.ParticipantCompletionCoordinatorProcessorWSImpl.completed_2 [com.arjuna.wst.messaging.ParticipantCompletionCoordinatorProcessorWSImpl.completed_2] - Completed called on unknown coordinator: {0}
-     */
-    public void completed(final NotificationType completed, final AddressingProperties addressingProperties,
-        final ArjunaContextWS arjunaContext)
-    {
-        final InstanceIdentifierWS instanceIdentifier = arjunaContext.getInstanceIdentifier() ;
-        final ParticipantCompletionCoordinatorInboundEventsWS coordinator = getCoordinator(instanceIdentifier) ;
-
-        if (coordinator != null)
-        {
-            try
-            {
-                coordinator.completed(completed, addressingProperties, arjunaContext) ;
-            }
-            catch (final Throwable th)
-            {
-                if (WSTLogger.arjLoggerI18N.isDebugEnabled())
-                {
-                    WSTLogger.arjLoggerI18N.debug("com.arjuna.wst.messaging.ParticipantCompletionCoordinatorProcessorWSImpl.completed_1", th) ;
-                }
-            }
-        }
-        else if (WSTLogger.arjLoggerI18N.isDebugEnabled())
-        {
-            WSTLogger.arjLoggerI18N.debug("com.arjuna.wst.messaging.ParticipantCompletionCoordinatorProcessorWSImpl.completed_2", new Object[] {instanceIdentifier}) ;
-        }
-    }
-
-    /**
-     * Completed.
-     * @param cannotComplete The cannot complete notification.
-     * @param addressingProperties The addressing context.
-     * @param arjunaContext The arjuna context.
-     *
-     * @message com.arjuna.wst.messaging.ParticipantCompletionCoordinatorProcessorWSImpl.cannotComplete_1 [com.arjuna.wst.messaging.ParticipantCompletionCoordinatorProcessorWSImpl.cannotComplete_1] - Unexpected exception thrown from cannot complete:
-     * @message com.arjuna.wst.messaging.ParticipantCompletionCoordinatorProcessorWSImpl.cannotComplete_2 [com.arjuna.wst.messaging.ParticipantCompletionCoordinatorProcessorWSImpl.cannotComplete_2] - Cannot complete called on unknown coordinator: {0}
-     */
-    public void cannotComplete(final NotificationType cannotComplete, final AddressingProperties addressingProperties,
-        final ArjunaContextWS arjunaContext)
-    {
-        final InstanceIdentifierWS instanceIdentifier = arjunaContext.getInstanceIdentifier() ;
-        final ParticipantCompletionCoordinatorInboundEventsWS coordinator = getCoordinator(instanceIdentifier) ;
-
-        if (coordinator != null)
-        {
-            try
-            {
-                coordinator.cannotComplete(cannotComplete, addressingProperties, arjunaContext) ;
-            }
-            catch (final Throwable th)
-            {
-                if (WSTLogger.arjLoggerI18N.isDebugEnabled())
-                {
-                    WSTLogger.arjLoggerI18N.debug("com.arjuna.wst.messaging.ParticipantCompletionCoordinatorProcessorWSImpl.completed_1", th) ;
-                }
-            }
-        }
-        else if (WSTLogger.arjLoggerI18N.isDebugEnabled())
-        {
-            WSTLogger.arjLoggerI18N.debug("com.arjuna.wst.messaging.ParticipantCompletionCoordinatorProcessorWSImpl.completed_2", new Object[] {instanceIdentifier}) ;
-        }
-    }
-
-    /**
-     * Exit.
-     * @param exit The exit notification.
-     * @param addressingProperties The addressing context.
-     * @param arjunaContext The arjuna context.
-     *
-     * @message com.arjuna.wst.messaging.ParticipantCompletionCoordinatorProcessorWSImpl.exit_1 [com.arjuna.wst.messaging.ParticipantCompletionCoordinatorProcessorWSImpl.exit_1] - Unexpected exception thrown from exit:
-     * @message com.arjuna.wst.messaging.ParticipantCompletionCoordinatorProcessorWSImpl.exit_2 [com.arjuna.wst.messaging.ParticipantCompletionCoordinatorProcessorWSImpl.exit_2] - Exit called on unknown coordinator: {0}
-     */
-    public void exit(final NotificationType exit, final AddressingProperties addressingProperties, final ArjunaContextWS arjunaContext)
-    {
-        final InstanceIdentifierWS instanceIdentifier = arjunaContext.getInstanceIdentifier() ;
-        final ParticipantCompletionCoordinatorInboundEventsWS coordinator = getCoordinator(instanceIdentifier) ;
-
-        if (coordinator != null)
-        {
-            try
-            {
-                coordinator.exit(exit, addressingProperties, arjunaContext) ;
-            }
-            catch (final Throwable th)
-            {
-                if (WSTLogger.arjLoggerI18N.isDebugEnabled())
-                {
-                    WSTLogger.arjLoggerI18N.debug("com.arjuna.wst.messaging.ParticipantCompletionCoordinatorProcessorWSImpl.exit_1", th) ;
-                }
-            }
-        }
-        else
-        {
-            if (WSTLogger.arjLoggerI18N.isDebugEnabled())
-            {
-                WSTLogger.arjLoggerI18N.debug("com.arjuna.wst.messaging.ParticipantCompletionCoordinatorProcessorWSImpl.exit_2", new Object[] {instanceIdentifier}) ;
-            }
-            sendExited(addressingProperties, arjunaContext) ;
-        }
-    }
-
-    /**
-     * Fault.
-     * @param fail The fault notification.
-     * @param addressingProperties The addressing context.
-     * @param arjunaContext The arjuna context.
-     *
-     * @message com.arjuna.wst.messaging.ParticipantCompletionCoordinatorProcessorWSImpl.fault_1 [com.arjuna.wst.messaging.ParticipantCompletionCoordinatorProcessorWSImpl.fault_1] - Unexpected exception thrown from fault:
-     * @message com.arjuna.wst.messaging.ParticipantCompletionCoordinatorProcessorWSImpl.fault_2 [com.arjuna.wst.messaging.ParticipantCompletionCoordinatorProcessorWSImpl.fault_2] - Fault called on unknown coordinator: {0}
-     */
-    public void fail(final ExceptionType fail, final AddressingProperties addressingProperties,
-        final ArjunaContextWS arjunaContext)
-    {
-        final InstanceIdentifierWS instanceIdentifier = arjunaContext.getInstanceIdentifier() ;
-        final ParticipantCompletionCoordinatorInboundEventsWS coordinator = getCoordinator(instanceIdentifier) ;
-
-        if (coordinator != null)
-        {
-            try
-            {
-                coordinator.fail(fail, addressingProperties, arjunaContext) ;
-            }
-            catch (final Throwable th)
-            {
-                if (WSTLogger.arjLoggerI18N.isDebugEnabled())
-                {
-                    WSTLogger.arjLoggerI18N.debug("com.arjuna.wst.messaging.ParticipantCompletionCoordinatorProcessorWSImpl.fault_1", th) ;
-                }
-            }
-        }
-        else
-        {
-            if (WSTLogger.arjLoggerI18N.isDebugEnabled())
-            {
-                WSTLogger.arjLoggerI18N.debug("com.arjuna.wst.messaging.ParticipantCompletionCoordinatorProcessorWSImpl.fault_2", new Object[] {instanceIdentifier}) ;
-            }
-            sendFailed(addressingProperties, arjunaContext) ;
-        }
-    }
-
-    /**
-     * Get Status.
-     * @param getStatus The get status notification.
-     * @param addressingProperties The addressing context.
-     * @param arjunaContext The arjuna context.
-     *
-     * @message com.arjuna.wst.messaging.ParticipantCompletionCoordinatorProcessorWSImpl.getStatus_1 [com.arjuna.wst.messaging.ParticipantCompletionCoordinatorProcessorWSImpl.getStatus_1] - Unexpected exception thrown from getStatus:
-     * @message com.arjuna.wst.messaging.ParticipantCompletionCoordinatorProcessorWSImpl.getStatus_2 [com.arjuna.wst.messaging.ParticipantCompletionCoordinatorProcessorWSImpl.getStatus_2] - GetStatus called on unknown coordinator: {0}
-     */
-    public void getStatus(final NotificationType getStatus, final AddressingProperties addressingProperties, final ArjunaContextWS arjunaContext)
-    {
-        final InstanceIdentifierWS instanceIdentifier = arjunaContext.getInstanceIdentifier() ;
-        final ParticipantCompletionCoordinatorInboundEventsWS coordinator = getCoordinator(instanceIdentifier) ;
-
-        if (coordinator != null)
-        {
-            try
-            {
-                coordinator.getStatus(getStatus, addressingProperties, arjunaContext) ;
-            }
-            catch (final Throwable th)
-            {
-                if (WSTLogger.arjLoggerI18N.isDebugEnabled())
-                {
-                    WSTLogger.arjLoggerI18N.debug("com.arjuna.wst.messaging.ParticipantCompletionCoordinatorProcessorWSImpl.getStatus_1", th) ;
-                }
-            }
-        }
-        else if (WSTLogger.arjLoggerI18N.isDebugEnabled())
-        {
-            WSTLogger.arjLoggerI18N.debug("com.arjuna.wst.messaging.ParticipantCompletionCoordinatorProcessorWSImpl.getStatus_2", new Object[] {instanceIdentifier}) ;
-        }
-    }
-
-    /**
-     * Status.
-     * @param status The status.
-     * @param addressingProperties The addressing context.
-     * @param arjunaContext The arjuna context.
-     *
-     * @message com.arjuna.wst.messaging.ParticipantCompletionCoordinatorProcessorWSImpl.status_1 [com.arjuna.wst.messaging.ParticipantCompletionCoordinatorProcessorWSImpl.status_1] - Unexpected exception thrown from status:
-     * @message com.arjuna.wst.messaging.ParticipantCompletionCoordinatorProcessorWSImpl.status_2 [com.arjuna.wst.messaging.ParticipantCompletionCoordinatorProcessorWSImpl.status_2] - Status called on unknown coordinator: {0}
-     */
-    public void status(final StatusType status, final AddressingProperties addressingProperties, final ArjunaContextWS arjunaContext)
-    {
-        final InstanceIdentifierWS instanceIdentifier = arjunaContext.getInstanceIdentifier() ;
-        final ParticipantCompletionCoordinatorInboundEventsWS coordinator = getCoordinator(instanceIdentifier) ;
-
-        if (coordinator != null)
-        {
-            try
-            {
-                coordinator.status(status, addressingProperties, arjunaContext) ;
-            }
-            catch (final Throwable th)
-            {
-                if (WSTLogger.arjLoggerI18N.isDebugEnabled())
-                {
-                    WSTLogger.arjLoggerI18N.debug("com.arjuna.wst.messaging.ParticipantCompletionCoordinatorProcessorWSImpl.status_1", th) ;
-                }
-            }
-        }
-        else if (WSTLogger.arjLoggerI18N.isDebugEnabled())
-        {
-            WSTLogger.arjLoggerI18N.debug("com.arjuna.wst.messaging.ParticipantCompletionCoordinatorProcessorWSImpl.status_2", new Object[] {instanceIdentifier}) ;
-        }
-    }
-
-    /**
-     * SOAP fault.
-     * @param soapFault The SOAP fault.
-     * @param addressingProperties The addressing context.
-     * @param arjunaContext The arjuna context.
-     *
-     * @message com.arjuna.wst.messaging.ParticipantCompletionCoordinatorProcessorWSImpl.soapFault_1 [com.arjuna.wst.messaging.ParticipantCompletionCoordinatorProcessorWSImpl.soapFault_1] - Unexpected exception thrown from soapFault:
-     * @message com.arjuna.wst.messaging.ParticipantCompletionCoordinatorProcessorWSImpl.soapFault_2 [com.arjuna.wst.messaging.ParticipantCompletionCoordinatorProcessorWSImpl.soapFault_2] - SoapFault called on unknown coordinator: {0}
-     */
-    public void soapFault(final SoapFault soapFault, final AddressingProperties addressingProperties,
-        final ArjunaContextWS arjunaContext)
-    {
-        final InstanceIdentifierWS instanceIdentifier = arjunaContext.getInstanceIdentifier() ;
-        final ParticipantCompletionCoordinatorInboundEventsWS coordinator = getCoordinator(instanceIdentifier) ;
-
-        if (coordinator != null)
-        {
-            try
-            {
-                coordinator.soapFault(soapFault, addressingProperties, arjunaContext) ;
-            }
-            catch (final Throwable th)
-            {
-                if (WSTLogger.arjLoggerI18N.isDebugEnabled())
-                {
-                    WSTLogger.arjLoggerI18N.debug("com.arjuna.wst.messaging.ParticipantCompletionCoordinatorProcessorWSImpl.soapFault_1", th) ;
-                }
-            }
-        }
-        else if (WSTLogger.arjLoggerI18N.isDebugEnabled())
-        {
-            WSTLogger.arjLoggerI18N.debug("com.arjuna.wst.messaging.ParticipantCompletionCoordinatorProcessorWSImpl.soapFault_2", new Object[] {instanceIdentifier}) ;
-        }
-    }
-
-    /**
-     * Send an exited message.
-     *
-     * @param addressingProperties The addressing context.
-     * @param arjunaContext The arjuna context.
-     *
-     * @message com.arjuna.wst.messaging.ParticipantCompletionCoordinatorProcessorWSImpl.sendExited_1 [com.arjuna.wst.messaging.ParticipantCompletionCoordinatorProcessorWSImpl.sendExited_1] - Unexpected exception while sending Exited
-     */
-    private void sendExited(final AddressingProperties addressingProperties, final ArjunaContextWS arjunaContext)
-    {
-        // KEV add check for recovery
-        final String messageId = MessageIdWS.getMessageId() ;
-        final AddressingProperties responseAddressingProperties = AddressingHelper.createNotificationContext(messageId) ;
-        try
-        {
-            // cannot do this without a coordinator endpoint and that is the only way it gets called
-            // ParticipantCompletionParticipantClientWS.getClient().sendExited(responseAddressingProperties, arjunaContext.getInstanceIdentifier()) ;
-        }
-        catch (final Throwable th)
-        {
-            if (WSTLogger.arjLoggerI18N.isDebugEnabled())
-            {
-                WSTLogger.arjLoggerI18N.debug("com.arjuna.wst.messaging.ParticipantCompletionCoordinatorProcessorWSImpl.sendExited_1", th) ;
-            }
-        }
-    }
-
-    /**
-     * Send a faulted message.
-     *
-     * @param addressingProperties The addressing context.
-     * @param arjunaContext The arjuna context.
-     *
-     * @message com.arjuna.wst.messaging.ParticipantCompletionCoordinatorProcessorWSImpl.sendFaulted_1 [com.arjuna.wst.messaging.ParticipantCompletionCoordinatorProcessorWSImpl.sendFaulted_1] - Unexpected exception while sending Faulted
-     */
-    private void sendFailed(final AddressingProperties addressingProperties, final ArjunaContextWS arjunaContext)
-    {
-        // KEV add check for recovery
-        final String messageId = MessageIdWS.getMessageId() ;
-        final AddressingProperties responseAddressingProperties = AddressingHelper.createNotificationContext(  messageId) ;
-        try
-        {
-            // cannot do this without a coordinator endpoint and that is the only way it gets called
-            // ParticipantCompletionParticipantClientWS.getClient().sendFaulted(responseAddressingProperties, arjunaContext.getInstanceIdentifier()) ;
-        }
-        catch (final Throwable th)
-        {
-            if (WSTLogger.arjLoggerI18N.isDebugEnabled())
-            {
-                WSTLogger.arjLoggerI18N.debug("com.arjuna.wst.messaging.ParticipantCompletionCoordinatorProcessorWSImpl.sendFailed_1", th) ;
-            }
-        }
-    }
-}
\ No newline at end of file

Deleted: labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/wst/messaging/ParticipantCompletionParticipantProcessorWSImpl.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/wst/messaging/ParticipantCompletionParticipantProcessorWSImpl.java	2008-01-25 17:05:33 UTC (rev 18123)
+++ labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/wst/messaging/ParticipantCompletionParticipantProcessorWSImpl.java	2008-01-25 17:18:13 UTC (rev 18124)
@@ -1,479 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. 
- * 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.wsaddrws.AddressingHelper;
-import com.arjuna.webservices.wsarj.ArjunaContextWS;
-import com.arjuna.webservices.wsarj.InstanceIdentifierWS;
-import com.arjuna.webservices.wsba.ParticipantCompletionParticipantInboundEventsWS;
-import com.arjuna.webservices.wsba.processors.ParticipantCompletionParticipantProcessorWS;
-import com.arjuna.wsc.messaging.MessageId;
-import com.arjuna.wsc.messaging.MessageIdWS;
-import org.oasis_open.docs.ws_tx.wsba._2006._06.NotificationType;
-import org.oasis_open.docs.ws_tx.wsba._2006._06.StatusType;
-
-import javax.xml.ws.addressing.AddressingProperties;
-
-
-/**
- * The Participant Completion Participant processor.
- * @author kevin
- */
-public class ParticipantCompletionParticipantProcessorWSImpl extends ParticipantCompletionParticipantProcessorWS
-{
-    /**
-     * 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 ParticipantCompletionParticipantInboundEventsWS participant, final String identifier)
-    {
-        activatedObjectProcessor.activateObject(participant, identifier) ;
-    }
-
-    /**
-     * Deactivate the participant.
-     * @param participant The participant.
-     */
-    public void deactivateParticipant(final ParticipantCompletionParticipantInboundEventsWS 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 ParticipantCompletionParticipantInboundEventsWS getParticipant(final InstanceIdentifierWS instanceIdentifier)
-    {
-        final String identifier = (instanceIdentifier != null ? instanceIdentifier.getInstanceIdentifier() : null) ;
-        return (ParticipantCompletionParticipantInboundEventsWS)activatedObjectProcessor.getObject(identifier) ;
-    }
-
-    /**
-     * Cancel.
-     * @param cancel The cancel notification.
-     * @param addressingProperties The addressing context.
-     * @param arjunaContext The arjuna context.
-     *
-     * @message com.arjuna.wst.messaging.ParticipantCompletionParticipantProcessorWSImpl.cancel_1 [com.arjuna.wst.messaging.ParticipantCompletionParticipantProcessorWSImpl.cancel_1] - Unexpected exception thrown from cancel:
-     * @message com.arjuna.wst.messaging.ParticipantCompletionParticipantProcessorWSImpl.cancel_2 [com.arjuna.wst.messaging.ParticipantCompletionParticipantProcessorWSImpl.cancel_2] - Cancel called on unknown participant: {0}
-     */
-    public void cancel(final NotificationType cancel, final AddressingProperties addressingProperties, final ArjunaContextWS arjunaContext)
-    {
-        final InstanceIdentifierWS  instanceIdentifier = arjunaContext.getInstanceIdentifier() ;
-        final ParticipantCompletionParticipantInboundEventsWS participant = getParticipant(instanceIdentifier) ;
-
-        if (participant != null)
-        {
-            try
-            {
-                participant.cancel(cancel, addressingProperties, arjunaContext) ;
-            }
-            catch (final Throwable th)
-            {
-                if (WSTLogger.arjLoggerI18N.isDebugEnabled())
-                {
-                    WSTLogger.arjLoggerI18N.debug("com.arjuna.wst.messaging.ParticipantCompletionParticipantProcessorWSImpl.cancel_1", th) ;
-                }
-            }
-        }
-        else
-        {
-            if (WSTLogger.arjLoggerI18N.isDebugEnabled())
-            {
-                WSTLogger.arjLoggerI18N.debug("com.arjuna.wst.messaging.ParticipantCompletionParticipantProcessorWSImpl.cancel_2", new Object[] {instanceIdentifier}) ;
-            }
-            sendCancelled(addressingProperties, arjunaContext) ;
-        }
-    }
-
-    /**
-     * Close.
-     * @param close The close notification.
-     * @param addressingProperties The addressing context.
-     * @param arjunaContext The arjuna context.
-     *
-     * @message com.arjuna.wst.messaging.ParticipantCompletionParticipantProcessorWSImpl.close_1 [com.arjuna.wst.messaging.ParticipantCompletionParticipantProcessorWSImpl.close_1] - Unexpected exception thrown from close:
-     * @message com.arjuna.wst.messaging.ParticipantCompletionParticipantProcessorWSImpl.close_2 [com.arjuna.wst.messaging.ParticipantCompletionParticipantProcessorWSImpl.close_2] - Close called on unknown participant: {0}
-     */
-    public void close(final NotificationType close, final AddressingProperties addressingProperties, final ArjunaContextWS arjunaContext)
-    {
-        final InstanceIdentifierWS  instanceIdentifier = arjunaContext.getInstanceIdentifier() ;
-        final ParticipantCompletionParticipantInboundEventsWS participant = getParticipant(instanceIdentifier) ;
-
-        if (participant != null)
-        {
-            try
-            {
-                participant.close(close, addressingProperties, arjunaContext) ;
-            }
-            catch (final Throwable th)
-            {
-                if (WSTLogger.arjLoggerI18N.isDebugEnabled())
-                {
-                    WSTLogger.arjLoggerI18N.debug("com.arjuna.wst.messaging.ParticipantCompletionParticipantProcessorWSImpl.close_1", th) ;
-                }
-            }
-        }
-        else
-        {
-            if (WSTLogger.arjLoggerI18N.isDebugEnabled())
-            {
-                WSTLogger.arjLoggerI18N.debug("com.arjuna.wst.messaging.ParticipantCompletionParticipantProcessorWSImpl.close_2", new Object[] {instanceIdentifier}) ;
-            }
-            sendClosed(addressingProperties, arjunaContext) ;
-        }
-    }
-
-    /**
-     * Compensate.
-     * @param compensate The compensate notification.
-     * @param addressingProperties The addressing context.
-     * @param arjunaContext The arjuna context.
-     *
-     * @message com.arjuna.wst.messaging.ParticipantCompletionParticipantProcessorWSImpl.compensate_1 [com.arjuna.wst.messaging.ParticipantCompletionParticipantProcessorWSImpl.compensate_1] - Unexpected exception thrown from compensate:
-     * @message com.arjuna.wst.messaging.ParticipantCompletionParticipantProcessorWSImpl.compensate_2 [com.arjuna.wst.messaging.ParticipantCompletionParticipantProcessorWSImpl.compensate_2] - Compensate called on unknown participant: {0}
-     */
-    public void compensate(final NotificationType compensate, final AddressingProperties addressingProperties, final ArjunaContextWS arjunaContext)
-    {
-        final InstanceIdentifierWS  instanceIdentifier = arjunaContext.getInstanceIdentifier() ;
-        final ParticipantCompletionParticipantInboundEventsWS participant = getParticipant(instanceIdentifier) ;
-
-        if (participant != null)
-        {
-            try
-            {
-                participant.compensate(compensate, addressingProperties, arjunaContext) ;
-            }
-            catch (final Throwable th)
-            {
-                if (WSTLogger.arjLoggerI18N.isDebugEnabled())
-                {
-                    WSTLogger.arjLoggerI18N.debug("com.arjuna.wst.messaging.ParticipantCompletionParticipantProcessorWSImpl.compensate_1", th) ;
-                }
-            }
-        }
-        else
-        {
-            if (WSTLogger.arjLoggerI18N.isDebugEnabled())
-            {
-                WSTLogger.arjLoggerI18N.debug("com.arjuna.wst.messaging.ParticipantCompletionParticipantProcessorWSImpl.compensate_2", new Object[] {instanceIdentifier}) ;
-            }
-            sendCompensated(addressingProperties, arjunaContext) ;
-        }
-    }
-
-    /**
-     * Exited.
-     * @param exited The exited notification.
-     * @param addressingProperties The addressing context.
-     * @param arjunaContext The arjuna context.
-     *
-     * @message com.arjuna.wst.messaging.ParticipantCompletionParticipantProcessorWSImpl.exited_1 [com.arjuna.wst.messaging.ParticipantCompletionParticipantProcessorWSImpl.exited_1] - Unexpected exception thrown from exited:
-     * @message com.arjuna.wst.messaging.ParticipantCompletionParticipantProcessorWSImpl.exited_2 [com.arjuna.wst.messaging.ParticipantCompletionParticipantProcessorWSImpl.exited_2] - Exited called on unknown participant: {0}
-     */
-    public void exited(final NotificationType exited, final AddressingProperties addressingProperties, final ArjunaContextWS arjunaContext)
-    {
-        final InstanceIdentifierWS  instanceIdentifier = arjunaContext.getInstanceIdentifier() ;
-        final ParticipantCompletionParticipantInboundEventsWS participant = getParticipant(instanceIdentifier) ;
-
-        if (participant != null)
-        {
-            try
-            {
-                participant.exited(exited, addressingProperties, arjunaContext) ;
-            }
-            catch (final Throwable th)
-            {
-                if (WSTLogger.arjLoggerI18N.isDebugEnabled())
-                {
-                    WSTLogger.arjLoggerI18N.debug("com.arjuna.wst.messaging.ParticipantCompletionParticipantProcessorWSImpl.exited_1", th) ;
-                }
-            }
-        }
-        else if (WSTLogger.arjLoggerI18N.isDebugEnabled())
-        {
-            WSTLogger.arjLoggerI18N.debug("com.arjuna.wst.messaging.ParticipantCompletionParticipantProcessorWSImpl.exited_2", new Object[] {instanceIdentifier}) ;
-        }
-    }
-
-    /**
-     * Not Completed.
-     * @param notCompleted The not completed notification.
-     * @param addressingProperties The addressing context.
-     * @param arjunaContext The arjuna context.
-     *
-     * @message com.arjuna.wst.messaging.ParticipantCompletionParticipantProcessorWSImpl.notCompleted_1 [com.arjuna.wst.messaging.ParticipantCompletionParticipantProcessorWSImpl.notCompleted_1] - Unexpected exception thrown from notCompleted:
-     * @message com.arjuna.wst.messaging.ParticipantCompletionParticipantProcessorWSImpl.notCompleted_2 [com.arjuna.wst.messaging.ParticipantCompletionParticipantProcessorWSImpl.notCompleted_2] - Exited called on unknown participant: {0}
-     */
-    public void notCompleted(final NotificationType notCompleted, final AddressingProperties addressingProperties, final ArjunaContextWS arjunaContext)
-    {
-        final InstanceIdentifierWS  instanceIdentifier = arjunaContext.getInstanceIdentifier() ;
-        final ParticipantCompletionParticipantInboundEventsWS participant = getParticipant(instanceIdentifier) ;
-
-        if (participant != null)
-        {
-            try
-            {
-                participant.notCompleted(notCompleted, addressingProperties, arjunaContext) ;
-            }
-            catch (final Throwable th)
-            {
-                if (WSTLogger.arjLoggerI18N.isDebugEnabled())
-                {
-                    WSTLogger.arjLoggerI18N.debug("com.arjuna.wst.messaging.ParticipantCompletionParticipantProcessorWSImpl.notCompleted_1", th) ;
-                }
-            }
-        }
-        else if (WSTLogger.arjLoggerI18N.isDebugEnabled())
-        {
-            WSTLogger.arjLoggerI18N.debug("com.arjuna.wst.messaging.ParticipantCompletionParticipantProcessorWSImpl.notCompleted_2", new Object[] {instanceIdentifier}) ;
-        }
-    }
-
-    /**
-     * Failed.
-     * @param failed The failed notification.
-     * @param addressingProperties The addressing context.
-     * @param arjunaContext The arjuna context.
-     *
-     * @message com.arjuna.wst.messaging.ParticipantCompletionParticipantProcessorWSImpl.failed_1 [com.arjuna.wst.messaging.ParticipantCompletionParticipantProcessorWSImpl.failed_1] - Unexpected exception thrown from failed:
-     * @message com.arjuna.wst.messaging.ParticipantCompletionParticipantProcessorWSImpl.failed_2 [com.arjuna.wst.messaging.ParticipantCompletionParticipantProcessorWSImpl.failed_2] - Failed called on unknown participant: {0}
-     */
-    public void failed(final NotificationType failed, final AddressingProperties addressingProperties, final ArjunaContextWS arjunaContext)
-    {
-        final InstanceIdentifierWS  instanceIdentifier = arjunaContext.getInstanceIdentifier() ;
-        final ParticipantCompletionParticipantInboundEventsWS participant = getParticipant(instanceIdentifier) ;
-
-        if (participant != null)
-        {
-            try
-            {
-                participant.failed(failed, addressingProperties, arjunaContext) ;
-            }
-            catch (final Throwable th)
-            {
-                if (WSTLogger.arjLoggerI18N.isDebugEnabled())
-                {
-                    WSTLogger.arjLoggerI18N.debug("com.arjuna.wst.messaging.ParticipantCompletionParticipantProcessorWSImpl.failed_1", th) ;
-                }
-            }
-        }
-        else if (WSTLogger.arjLoggerI18N.isDebugEnabled())
-        {
-            WSTLogger.arjLoggerI18N.debug("com.arjuna.wst.messaging.ParticipantCompletionParticipantProcessorWSImpl.failed_2", new Object[] {instanceIdentifier}) ;
-        }
-    }
-
-    /**
-     * Get Status.
-     * @param getStatus The get status notification.
-     * @param addressingProperties The addressing context.
-     * @param arjunaContext The arjuna context.
-     *
-     * @message com.arjuna.wst.messaging.ParticipantCompletionParticipantProcessorWSImpl.getStatus_1 [com.arjuna.wst.messaging.ParticipantCompletionParticipantProcessorWSImpl.getStatus_1] - Unexpected exception thrown from getStatus:
-     * @message com.arjuna.wst.messaging.ParticipantCompletionParticipantProcessorWSImpl.getStatus_2 [com.arjuna.wst.messaging.ParticipantCompletionParticipantProcessorWSImpl.getStatus_2] - Complete called on unknown participant: {0}
-     */
-    public void getStatus(final NotificationType getStatus, final AddressingProperties addressingProperties, final ArjunaContextWS arjunaContext)
-    {
-        final InstanceIdentifierWS  instanceIdentifier = arjunaContext.getInstanceIdentifier() ;
-        final ParticipantCompletionParticipantInboundEventsWS participant = getParticipant(instanceIdentifier) ;
-
-        if (participant != null)
-        {
-            try
-            {
-                participant.getStatus(getStatus, addressingProperties, arjunaContext) ;
-            }
-            catch (final Throwable th)
-            {
-                if (WSTLogger.arjLoggerI18N.isDebugEnabled())
-                {
-                    WSTLogger.arjLoggerI18N.debug("com.arjuna.wst.messaging.ParticipantCompletionParticipantProcessorWSImpl.getStatus_1", th) ;
-                }
-            }
-        }
-        else if (WSTLogger.arjLoggerI18N.isDebugEnabled())
-        {
-            WSTLogger.arjLoggerI18N.debug("com.arjuna.wst.messaging.ParticipantCompletionParticipantProcessorWSImpl.getStatus_2", new Object[] {instanceIdentifier}) ;
-        }
-    }
-
-    /**
-     * Status.
-     * @param status The status type.
-     * @param addressingProperties The addressing context.
-     * @param arjunaContext The arjuna context.
-     *
-     * @message com.arjuna.wst.messaging.ParticipantCompletionParticipantProcessorWSImpl.status_1 [com.arjuna.wst.messaging.ParticipantCompletionParticipantProcessorWSImpl.status_1] - Unexpected exception thrown from status:
-     * @message com.arjuna.wst.messaging.ParticipantCompletionParticipantProcessorWSImpl.status_2 [com.arjuna.wst.messaging.ParticipantCompletionParticipantProcessorWSImpl.status_2] - Status called on unknown participant: {0}
-     */
-    public void status(final StatusType status, final AddressingProperties addressingProperties, final ArjunaContextWS arjunaContext)
-    {
-        final InstanceIdentifierWS  instanceIdentifier = arjunaContext.getInstanceIdentifier() ;
-        final ParticipantCompletionParticipantInboundEventsWS participant = getParticipant(instanceIdentifier) ;
-
-        if (participant != null)
-        {
-            try
-            {
-                participant.status(status, addressingProperties, arjunaContext) ;
-            }
-            catch (final Throwable th)
-            {
-                if (WSTLogger.arjLoggerI18N.isDebugEnabled())
-                {
-                    WSTLogger.arjLoggerI18N.debug("com.arjuna.wst.messaging.ParticipantCompletionParticipantProcessorWSImpl.status_1", th) ;
-                }
-            }
-        }
-        else if (WSTLogger.arjLoggerI18N.isDebugEnabled())
-        {
-            WSTLogger.arjLoggerI18N.debug("com.arjuna.wst.messaging.ParticipantCompletionParticipantProcessorWSImpl.status_2", new Object[] {instanceIdentifier}) ;
-        }
-    }
-
-    /**
-     * SOAP Fault.
-     * @param fault The SOAP fault notification.
-     * @param addressingProperties The addressing context.
-     * @param arjunaContext The arjuna context.
-     *
-     * @message com.arjuna.wst.messaging.ParticipantCompletionParticipantProcessorWSImpl.soapFault_1 [com.arjuna.wst.messaging.ParticipantCompletionParticipantProcessorWSImpl.soapFault_1] - Unexpected exception thrown from soapFault:
-     * @message com.arjuna.wst.messaging.ParticipantCompletionParticipantProcessorWSImpl.soapFault_2 [com.arjuna.wst.messaging.ParticipantCompletionParticipantProcessorWSImpl.soapFault_2] - SoapFault called on unknown participant: {0}
-     */
-    public void soapFault(final SoapFault fault, final AddressingProperties addressingProperties,
-        final ArjunaContextWS arjunaContext)
-    {
-        final InstanceIdentifierWS  instanceIdentifier = arjunaContext.getInstanceIdentifier() ;
-        final ParticipantCompletionParticipantInboundEventsWS participant = getParticipant(instanceIdentifier) ;
-
-        if (participant != null)
-        {
-            try
-            {
-                participant.soapFault(fault, addressingProperties, arjunaContext) ;
-            }
-            catch (final Throwable th)
-            {
-                if (WSTLogger.arjLoggerI18N.isDebugEnabled())
-                {
-                    WSTLogger.arjLoggerI18N.debug("com.arjuna.wst.messaging.ParticipantCompletionParticipantProcessorWSImpl.soapFault_1", th) ;
-                }
-            }
-        }
-        else if (WSTLogger.arjLoggerI18N.isDebugEnabled())
-        {
-            WSTLogger.arjLoggerI18N.debug("com.arjuna.wst.messaging.ParticipantCompletionParticipantProcessorWSImpl.soapFault_2", new Object[] {instanceIdentifier}) ;
-        }
-    }
-
-    /**
-     * Send a cancelled message.
-     *
-     * @param addressingProperties The addressing context.
-     * @param arjunaContext The arjuna context.
-     *
-     * @message com.arjuna.wst.messaging.ParticipantCompletionParticipantProcessorWSImpl.sendCancelled_1 [com.arjuna.wst.messaging.ParticipantCompletionParticipantProcessorWSImpl.sendCancelled_1] - Unexpected exception while sending Cancelled
-     */
-    private void sendCancelled(final AddressingProperties addressingProperties, final ArjunaContextWS arjunaContext)
-    {
-        // KEV add check for recovery
-        final String messageId = MessageIdWS.getMessageId() ;
-        final AddressingProperties responseAddressingProperties = AddressingHelper.createNotificationContext(messageId) ;
-        try
-        {
-            // TODO - cannot do this without a coordinator endpoint and this only gets called when we don't have one
-            // ParticipantCompletionCoordinatorClientWS.getClient().sendCancelled(responseAddressingProperties, arjunaContext.getInstanceIdentifier()) ;
-        }
-        catch (final Throwable th)
-        {
-            if (WSTLogger.arjLoggerI18N.isDebugEnabled())
-            {
-                WSTLogger.arjLoggerI18N.debug("com.arjuna.wst.messaging.ParticipantCompletionParticipantProcessorWSImpl.sendCancelled_1", th) ;
-            }
-        }
-    }
-
-    /**
-     * Send a closed message.
-     *
-     * @param addressingProperties The addressing context.
-     * @param arjunaContext The arjuna context.
-     *
-     * @message com.arjuna.wst.messaging.ParticipantCompletionParticipantProcessorWSImpl.sendClosed_1 [com.arjuna.wst.messaging.ParticipantCompletionParticipantProcessorWSImpl.sendClosed_1] - Unexpected exception while sending Closed
-     */
-    private void sendClosed(final AddressingProperties addressingProperties, final ArjunaContextWS arjunaContext)
-    {
-        // KEV add check for recovery
-        final String messageId = MessageIdWS.getMessageId() ;
-        final AddressingProperties responseAddressingProperties = AddressingHelper.createNotificationContext(messageId) ;
-        try
-        {
-            // TODO - cannot do this without a coordinator endpoint and this only gets called when we don't have one
-            // ParticipantCompletionCoordinatorClientWS.getClient().sendClosed(responseAddressingProperties, arjunaContext.getInstanceIdentifier()) ;
-        }
-        catch (final Throwable th)
-        {
-            if (WSTLogger.arjLoggerI18N.isDebugEnabled())
-            {
-                WSTLogger.arjLoggerI18N.debug("com.arjuna.wst.messaging.ParticipantCompletionParticipantProcessorWSImpl.sendClosed_1", th) ;
-            }
-        }
-    }
-
-    /**
-     * Send a compensated message.
-     *
-     * @param addressingProperties The addressing context.
-     * @param arjunaContext The arjuna context.
-     *
-     * @message com.arjuna.wst.messaging.ParticipantCompletionParticipantProcessorWSImpl.sendCompensated_1 [com.arjuna.wst.messaging.ParticipantCompletionParticipantProcessorWSImpl.sendCompensated_1] - Unexpected exception while sending Compensated
-     */
-    private void sendCompensated(final AddressingProperties addressingProperties, final ArjunaContextWS arjunaContext)
-    {
-        // KEV add check for recovery
-        final String messageId = MessageIdWS.getMessageId() ;
-        final AddressingProperties responseAddressingProperties = AddressingHelper.createNotificationContext(messageId) ;
-        try
-        {
-            // TODO - cannot do this without a coordinator endpoint and this only gets called when we don't have one
-            // ParticipantCompletionCoordinatorClientWS.getClient().sendCompensated(responseAddressingProperties, arjunaContext.getInstanceIdentifier()) ;
-        }
-        catch (final Throwable th)
-        {
-            if (WSTLogger.arjLoggerI18N.isDebugEnabled())
-            {
-                WSTLogger.arjLoggerI18N.debug("com.arjuna.wst.messaging.ParticipantCompletionParticipantProcessorWSImpl.sendCompensated_1", th) ;
-            }
-        }
-    }
-}
\ No newline at end of file

Deleted: labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/wst/messaging/ParticipantProcessorWSImpl.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/wst/messaging/ParticipantProcessorWSImpl.java	2008-01-25 17:05:33 UTC (rev 18123)
+++ labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/wst/messaging/ParticipantProcessorWSImpl.java	2008-01-25 17:18:13 UTC (rev 18124)
@@ -1,271 +0,0 @@
-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.wsaddrws.AddressingHelper;
-import com.arjuna.webservices.wsarj.ArjunaContextWS;
-import com.arjuna.webservices.wsarj.InstanceIdentifierWS;
-import com.arjuna.webservices.wsat.ParticipantInboundEventsWS;
-import com.arjuna.webservices.wsat.processors.ParticipantProcessorWS;
-import com.arjuna.wsc.messaging.MessageIdWS;
-import org.oasis_open.docs.ws_tx.wsat._2006._06.Notification;
-
-import javax.xml.ws.addressing.AddressingProperties;
-
-/**
- * The Participant processor.
- * @author kevin
- */
-public class ParticipantProcessorWSImpl extends ParticipantProcessorWS
-{
-    /**
-     * 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 ParticipantInboundEventsWS participant, final String identifier)
-    {
-        activatedObjectProcessor.activateObject(participant, identifier) ;
-    }
-
-    /**
-     * Deactivate the participant.
-     * @param participant The participant.
-     */
-    public void deactivateParticipant(final ParticipantInboundEventsWS 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 ParticipantInboundEventsWS getParticipant(final InstanceIdentifierWS instanceIdentifier)
-    {
-        final String identifier = (instanceIdentifier != null ? instanceIdentifier.getInstanceIdentifier() : null) ;
-        return (ParticipantInboundEventsWS)activatedObjectProcessor.getObject(identifier) ;
-    }
-
-    /**
-     * Commit.
-     * @param commit The commit notification.
-     * @param addressingProperties The addressing context.
-     * @param arjunaContext The arjuna context.
-     *
-     * @message com.arjuna.wst.messaging.ParticipantProcessorWSImpl.commit_1 [com.arjuna.wst.messaging.ParticipantProcessorWSImpl.commit_1] - Unexpected exception thrown from commit:
-     * @message com.arjuna.wst.messaging.ParticipantProcessorWSImpl.commit_2 [com.arjuna.wst.messaging.ParticipantProcessorWSImpl.commit_2] - Commit called on unknown participant: {0}
-     */
-    public void commit(final Notification commit, final AddressingProperties addressingProperties,
-        final ArjunaContextWS arjunaContext)
-    {
-        final InstanceIdentifierWS instanceIdentifier = arjunaContext.getInstanceIdentifier() ;
-        final ParticipantInboundEventsWS participant = getParticipant(instanceIdentifier) ;
-
-        if (participant != null)
-        {
-            try
-            {
-                participant.commit(commit, addressingProperties, arjunaContext) ;
-            }
-            catch (final Throwable th)
-            {
-                if (WSTLogger.arjLoggerI18N.isWarnEnabled())
-                {
-                    WSTLogger.arjLoggerI18N.warn("com.arjuna.wst.messaging.ParticipantProcessorWSImpl.commit_1", th) ;
-                }
-            }
-        }
-        else
-        {
-            if (WSTLogger.arjLoggerI18N.isWarnEnabled())
-            {
-                WSTLogger.arjLoggerI18N.warn("com.arjuna.wst.messaging.ParticipantProcessorWSImpl.commit_2", new Object[] {instanceIdentifier}) ;
-            }
-            sendCommitted(addressingProperties, arjunaContext) ;
-        }
-    }
-
-    /**
-     * Prepare.
-     * @param prepare The prepare notification.
-     * @param addressingProperties The addressing context.
-     * @param arjunaContext The arjuna context.
-     *
-     * @message com.arjuna.wst.messaging.ParticipantProcessorWSImpl.prepare_1 [com.arjuna.wst.messaging.ParticipantProcessorWSImpl.prepare_1] - Unexpected exception thrown from prepare:
-     * @message com.arjuna.wst.messaging.ParticipantProcessorWSImpl.prepare_2 [com.arjuna.wst.messaging.ParticipantProcessorWSImpl.prepare_2] - Prepare called on unknown participant: {0}
-     */
-    public void prepare(final Notification prepare, final AddressingProperties addressingProperties,
-        final ArjunaContextWS arjunaContext)
-    {
-        final InstanceIdentifierWS instanceIdentifier = arjunaContext.getInstanceIdentifier() ;
-        final ParticipantInboundEventsWS participant = getParticipant(instanceIdentifier) ;
-
-        if (participant != null)
-        {
-            try
-            {
-                participant.prepare(prepare, addressingProperties, arjunaContext) ;
-            }
-            catch (final Throwable th)
-            {
-                if (WSTLogger.arjLoggerI18N.isWarnEnabled())
-                {
-                    WSTLogger.arjLoggerI18N.warn("com.arjuna.wst.messaging.ParticipantProcessorWSImpl.prepare_1", th) ;
-                }
-            }
-        }
-        else
-        {
-            if (WSTLogger.arjLoggerI18N.isWarnEnabled())
-            {
-                WSTLogger.arjLoggerI18N.warn("com.arjuna.wst.messaging.ParticipantProcessorWSImpl.prepare_2", new Object[] {instanceIdentifier}) ;
-            }
-            sendAborted(addressingProperties, arjunaContext) ;
-        }
-    }
-
-    /**
-     * Rollback.
-     * @param rollback The rollback notification.
-     * @param addressingProperties The addressing context.
-     * @param arjunaContext The arjuna context.
-     *
-     * @message com.arjuna.wst.messaging.ParticipantProcessorWSImpl.rollback_1 [com.arjuna.wst.messaging.ParticipantProcessorWSImpl.rollback_1] - Unexpected exception thrown from rollback:
-     * @message com.arjuna.wst.messaging.ParticipantProcessorWSImpl.rollback_2 [com.arjuna.wst.messaging.ParticipantProcessorWSImpl.rollback_2] - Rollback called on unknown participant: {0}
-     */
-    public void rollback(final Notification rollback, final AddressingProperties addressingProperties,
-        final ArjunaContextWS arjunaContext)
-    {
-        final InstanceIdentifierWS instanceIdentifier = arjunaContext.getInstanceIdentifier() ;
-        final ParticipantInboundEventsWS participant = getParticipant(instanceIdentifier) ;
-
-        if (participant != null)
-        {
-            try
-            {
-                participant.rollback(rollback, addressingProperties, arjunaContext) ;
-            }
-            catch (final Throwable th)
-            {
-                if (WSTLogger.arjLoggerI18N.isWarnEnabled())
-                {
-                    WSTLogger.arjLoggerI18N.warn("com.arjuna.wst.messaging.ParticipantProcessorWSImpl.rollback_1", th) ;
-                }
-            }
-        }
-        else
-        {
-            if (WSTLogger.arjLoggerI18N.isWarnEnabled())
-            {
-                WSTLogger.arjLoggerI18N.warn("com.arjuna.wst.messaging.ParticipantProcessorWSImpl.rollback_2", new Object[] {instanceIdentifier}) ;
-            }
-            sendAborted(addressingProperties, arjunaContext) ;
-        }
-    }
-
-    /**
-     * SOAP Fault.
-     * @param fault The SOAP fault notification.
-     * @param addressingProperties The addressing context.
-     * @param arjunaContext The arjuna context.
-     *
-     * @message com.arjuna.wst.messaging.ParticipantProcessorWSImpl.soapFault_1 [com.arjuna.wst.messaging.ParticipantProcessorWSImpl.soapFault_1] - Unexpected exception thrown from soapFault:
-     * @message com.arjuna.wst.messaging.ParticipantProcessorWSImpl.soapFault_2 [com.arjuna.wst.messaging.ParticipantProcessorWSImpl.soapFault_2] - SoapFault called on unknown participant: {0}
-     */
-    public void soapFault(final SoapFault fault, final AddressingProperties addressingProperties,
-        final ArjunaContextWS arjunaContext)
-    {
-        final InstanceIdentifierWS instanceIdentifier = arjunaContext.getInstanceIdentifier() ;
-        final ParticipantInboundEventsWS participant = getParticipant(instanceIdentifier) ;
-
-        if (participant != null)
-        {
-            try
-            {
-                participant.soapFault(fault, addressingProperties, arjunaContext) ;
-            }
-            catch (final Throwable th)
-            {
-                if (WSTLogger.arjLoggerI18N.isWarnEnabled())
-                {
-                    WSTLogger.arjLoggerI18N.warn("com.arjuna.wst.messaging.ParticipantProcessorWSImpl.soapFault_1", th) ;
-                }
-            }
-        }
-        else
-        {
-            if (WSTLogger.arjLoggerI18N.isWarnEnabled())
-            {
-                WSTLogger.arjLoggerI18N.warn("com.arjuna.wst.messaging.ParticipantProcessorWSImpl.soapFault_2", new Object[] {instanceIdentifier}) ;
-            }
-        }
-    }
-
-    /**
-     * Send a committed message.
-     *
-     * @param addressingProperties The addressing context.
-     * @param arjunaContext The arjuna context.
-     *
-     * @message com.arjuna.wst.messaging.ParticipantProcessorWSImpl.sendCommitted_1 [com.arjuna.wst.messaging.ParticipantProcessorWSImpl.sendCommitted_1] - Unexpected exception while sending Committed
-     */
-    private void sendCommitted(final AddressingProperties addressingProperties, final ArjunaContextWS arjunaContext)
-    {
-        // KEV add check for recovery
-        final String messageId = MessageIdWS.getMessageId() ;
-        final AddressingProperties responseAddressingProperties = AddressingHelper.createResponseContext(addressingProperties, messageId) ;
-        final InstanceIdentifierWS instanceIdentifier = arjunaContext.getInstanceIdentifier() ;
-        /*
-         * TODO - fix this. participant is null and we cannto send a message without an endpoint
-        try
-        {
-            CoordinatorClientWS.getClient().sendCommitted(responseAddressingProperties, instanceIdentifier) ;
-        }
-        catch (final Throwable th)
-        {
-            if (WSTLogger.arjLoggerI18N.isDebugEnabled())
-            {
-                WSTLogger.arjLoggerI18N.debug("com.arjuna.wst.messaging.ParticipantProcessorWSImpl.sendCommitted_1", th) ;
-            }
-        }
-        */
-    }
-
-    /**
-     * Send an aborted message.
-     *
-     * @param addressingProperties The addressing context.
-     * @param arjunaContext The arjuna context.
-     *
-     * @message com.arjuna.wst.messaging.ParticipantProcessorWSImpl.sendAborted_1 [com.arjuna.wst.messaging.ParticipantProcessorWSImpl.sendAborted_1] - Unexpected exception while sending Aborted
-     */
-    private void sendAborted(final AddressingProperties addressingProperties, final ArjunaContextWS arjunaContext)
-    {
-        // KEV add check for recovery
-        final String messageId = MessageIdWS.getMessageId() ;
-        final AddressingProperties responseAddressingProperties = AddressingHelper.createResponseContext(addressingProperties, messageId) ;
-        final InstanceIdentifierWS instanceIdentifier = arjunaContext.getInstanceIdentifier() ;
-        /*
-         * TODO - fix this. participant is null and we cannto send a message without an endpoint
-        try
-        {
-            CoordinatorClientWS.getClient().sendAborted(responseAddressingProperties, instanceIdentifier) ;
-        }
-        catch (final Throwable th)
-        {
-            if (WSTLogger.arjLoggerI18N.isDebugEnabled())
-            {
-                WSTLogger.arjLoggerI18N.debug("com.arjuna.wst.messaging.ParticipantProcessorWSImpl.sendAborted_1", th) ;
-            }
-        }
-        */
-    }
-}

Deleted: labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/wst/messaging/TerminationCoordinatorProcessorWSImpl.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/wst/messaging/TerminationCoordinatorProcessorWSImpl.java	2008-01-25 17:05:33 UTC (rev 18123)
+++ labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/wst/messaging/TerminationCoordinatorProcessorWSImpl.java	2008-01-25 17:18:13 UTC (rev 18124)
@@ -1,341 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. 
- * 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.schemas.ws._2005._10.wsarjtx.NotificationType;
-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.wsaddrws.AddressingHelper;
-import com.arjuna.webservices.wsarj.ArjunaContextWS;
-import com.arjuna.webservices.wsarj.InstanceIdentifierWS;
-import com.arjuna.webservices.wsarjtx.ArjunaTXConstants;
-import com.arjuna.webservices.wsarjtx.client.TerminationParticipantClientWS;
-import com.arjuna.webservices.wsarjtx.processors.TerminationCoordinatorProcessorWS;
-import com.arjuna.wsc.messaging.MessageId;
-import com.arjuna.wsc.messaging.MessageIdWS;
-import com.arjuna.wst.*;
-
-import javax.xml.ws.addressing.AddressingProperties;
-import javax.xml.ws.wsaddressing.W3CEndpointReference;
-import java.text.MessageFormat;
-
-/**
- * The Terminator Participant processor.
- * @author kevin
- *
- * @message com.arjuna.wst.messaging.TerminationCoordinatorProcessorWSImpl_1 [com.arjuna.wst.messaging.TerminationCoordinatorProcessorWSImpl_1] - Unknown transaction
- * @message com.arjuna.wst.messaging.TerminationCoordinatorProcessorWSImpl_2 [com.arjuna.wst.messaging.TerminationCoordinatorProcessorWSImpl_2] - Unknown error: {0}
- * @message com.arjuna.wst.messaging.TerminationCoordinatorProcessorWSImpl_3 [com.arjuna.wst.messaging.TerminationCoordinatorProcessorWSImpl_3] - Unexpected exception thrown from cancel:
- * @message com.arjuna.wst.messaging.TerminationCoordinatorProcessorWSImpl_4 [com.arjuna.wst.messaging.TerminationCoordinatorProcessorWSImpl_4] - Cancel called on unknown participant: {0}
- * @message com.arjuna.wst.messaging.TerminationCoordinatorProcessorWSImpl_5 [com.arjuna.wst.messaging.TerminationCoordinatorProcessorWSImpl_5] - Unknown participant
- * @message com.arjuna.wst.messaging.TerminationCoordinatorProcessorWSImpl_6 [com.arjuna.wst.messaging.TerminationCoordinatorProcessorWSImpl_6] - Unknown transaction
- * @message com.arjuna.wst.messaging.TerminationCoordinatorProcessorWSImpl_7 [com.arjuna.wst.messaging.TerminationCoordinatorProcessorWSImpl_7] - Transaction rolled back
- * @message com.arjuna.wst.messaging.TerminationCoordinatorProcessorWSImpl_8 [com.arjuna.wst.messaging.TerminationCoordinatorProcessorWSImpl_8] - Unknown error: {0}
- * @message com.arjuna.wst.messaging.TerminationCoordinatorProcessorWSImpl_9 [com.arjuna.wst.messaging.TerminationCoordinatorProcessorWSImpl_9] - Unexpected exception thrown from close:
- * @message com.arjuna.wst.messaging.TerminationCoordinatorProcessorWSImpl_10 [com.arjuna.wst.messaging.TerminationCoordinatorProcessorWSImpl_10] - Close called on unknown participant: {0}
- * @message com.arjuna.wst.messaging.TerminationCoordinatorProcessorWSImpl_11 [com.arjuna.wst.messaging.TerminationCoordinatorProcessorWSImpl_11] - Unknown participant
- * @message com.arjuna.wst.messaging.TerminationCoordinatorProcessorWSImpl_12 [com.arjuna.wst.messaging.TerminationCoordinatorProcessorWSImpl_12] - Unknown transaction
- * @message com.arjuna.wst.messaging.TerminationCoordinatorProcessorWSImpl_13 [com.arjuna.wst.messaging.TerminationCoordinatorProcessorWSImpl_13] - Unknown error: {0}
- * @message com.arjuna.wst.messaging.TerminationCoordinatorProcessorWSImpl_14 [com.arjuna.wst.messaging.TerminationCoordinatorProcessorWSImpl_14] - Unexpected exception thrown from complete:
- * @message com.arjuna.wst.messaging.TerminationCoordinatorProcessorWSImpl_15 [com.arjuna.wst.messaging.TerminationCoordinatorProcessorWSImpl_15] - Complete called on unknown participant: {0}
- * @message com.arjuna.wst.messaging.TerminationCoordinatorProcessorWSImpl_16 [com.arjuna.wst.messaging.TerminationCoordinatorProcessorWSImpl_16] - Unknown participant
- */
-public class TerminationCoordinatorProcessorWSImpl extends TerminationCoordinatorProcessorWS
-{
-    /**
-     * 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 BusinessActivityTerminatorWS participant, final String identifier)
-    {
-        activatedObjectProcessor.activateObject(participant, identifier) ;
-    }
-
-    /**
-     * Deactivate the participant.
-     * @param participant The participant.
-     */
-    public void deactivateParticipant(final BusinessActivityTerminatorWS participant)
-    {
-        activatedObjectProcessor.deactivateObject(participant) ;
-    }
-
-   /**
-     * Get the participant with the specified identifier.
-     * @param instanceIdentifier The participant identifier.
-     * @return The participant or null if not known.
-     */
-    public BusinessActivityTerminatorWS getParticipant(final InstanceIdentifierWS instanceIdentifier)
-    {
-        final String identifier = (instanceIdentifier != null ? instanceIdentifier.getInstanceIdentifier() : null) ;
-        return (BusinessActivityTerminatorWS)activatedObjectProcessor.getObject(identifier) ;
-    }
-
-    /**
-     * Cancel.
-     * @param cancel The cancel notification.
-     * @param addressingProperties The addressing context.
-     * @param arjunaContext The arjuna context.
-     */
-    public void cancel(final NotificationType cancel, final AddressingProperties addressingProperties,
-        final ArjunaContextWS arjunaContext)
-    {
-        final InstanceIdentifierWS instanceIdentifier = arjunaContext.getInstanceIdentifier() ;
-        final BusinessActivityTerminatorWS participant = getParticipant(instanceIdentifier) ;
-
-        try
-        {
-            if (participant != null)
-            {
-                W3CEndpointReference endpoint = participant.getEndpoint();
-
-                final String messageId = MessageIdWS.getMessageId() ;
-                try
-                {
-                    participant.cancel() ;
-                }
-                catch (final FaultedException fe)
-                {
-                    final AddressingProperties responseAddressingProperties =
-                        AddressingHelper.createNotificationContext(messageId) ;
-                    TerminationParticipantClientWS.getClient().sendFaulted(endpoint, responseAddressingProperties, instanceIdentifier) ;
-                }
-                catch (final UnknownTransactionException ute)
-                {
-                    final AddressingProperties faultAddressingProperties = AddressingHelper.createNotificationContext(messageId) ;
-                    final SoapFault soapFault = new SoapFault(SoapFaultType.FAULT_SENDER, ArjunaTXConstants.UNKNOWNTRANSACTION_ERROR_CODE_QNAME,
-                        WSTLogger.log_mesg.getString("com.arjuna.wst.messaging.TerminationCoordinatorProcessorWSImpl_1")) ;
-                    TerminationParticipantClientWS.getClient().sendSoapFault(endpoint, faultAddressingProperties, soapFault, instanceIdentifier) ;
-                    return ;
-                }
-                catch (final SystemException se)
-                {
-                    final AddressingProperties faultAddressingProperties = AddressingHelper.createNotificationContext(messageId) ;
-                    final String pattern = WSTLogger.log_mesg.getString("com.arjuna.wst.messaging.TerminationCoordinatorProcessorWSImpl_2") ;
-                    final String message = MessageFormat.format(pattern, new Object[] {se}) ;
-                    final SoapFault soapFault = new SoapFault(SoapFaultType.FAULT_SENDER, ArjunaTXConstants.UNKNOWNERROR_ERROR_CODE_QNAME, message) ;
-                    TerminationParticipantClientWS.getClient().sendSoapFault(endpoint, faultAddressingProperties, soapFault, instanceIdentifier) ;
-                    return ;
-                }
-                catch (final Throwable th)
-                {
-                    if (WSTLogger.arjLoggerI18N.isDebugEnabled())
-                    {
-                        WSTLogger.arjLoggerI18N.debug("com.arjuna.wst.messaging.TerminationCoordinatorProcessorWSImpl_3", th) ;
-                    }
-                    final AddressingProperties faultAddressingProperties = AddressingHelper.createNotificationContext(MessageIdWS.getMessageId()) ;
-                    final SoapFault soapFault = new SoapFault(th) ;
-                    TerminationParticipantClientWS.getClient().sendSoapFault(endpoint, faultAddressingProperties, soapFault, instanceIdentifier) ;
-                    return ;
-                }
-                final AddressingProperties responseAddressingProperties =
-                    AddressingHelper.createNotificationContext(messageId) ;
-                TerminationParticipantClientWS.getClient().sendCancelled(endpoint, responseAddressingProperties, instanceIdentifier) ;
-            }
-            else
-            {
-                if (WSTLogger.arjLoggerI18N.isDebugEnabled())
-                {
-                    WSTLogger.arjLoggerI18N.debug("com.arjuna.wst.messaging.TerminationCoordinatorProcessorWSImpl_4", new Object[] {instanceIdentifier}) ;
-                }
-                // cannot do this without an endpoint
-                //final AddressingProperties faultAddressingProperties = AddressingHelper.createNotificationContext(MessageId.getMessageId()) ;
-                // final SoapFault soapFault = new SoapFault(SoapFaultType.FAULT_SENDER, ArjunaTXConstants.UNKNOWNTRANSACTION_ERROR_CODE_QNAME,
-                //     WSTLogger.log_mesg.getString("com.arjuna.wst.messaging.TerminationCoordinatorProcessorWSImpl_5")) ;
-                // TerminationParticipantClientWS.getClient().sendSoapFault(endpoint, faultAddressingProperties, soapFault, instanceIdentifier) ;
-            }
-        }
-        catch (Throwable throwable)
-        {
-            throwable.printStackTrace(System.err);
-        }
-    }
-
-    /**
-     * Close.
-     * @param close The close notification.
-     * @param addressingProperties The addressing context.
-     * @param arjunaContext The arjuna context.
-     */
-    public void close(final NotificationType close, final AddressingProperties addressingProperties,
-        final ArjunaContextWS arjunaContext)
-    {
-        final InstanceIdentifierWS instanceIdentifier = arjunaContext.getInstanceIdentifier() ;
-        final BusinessActivityTerminatorWS participant = getParticipant(instanceIdentifier) ;
-
-        try
-        {
-            if (participant != null)
-            {
-                W3CEndpointReference endpoint = participant.getEndpoint();
-
-                final String messageId = MessageIdWS.getMessageId() ;
-                try
-                {
-                    participant.close() ;
-                }
-                catch (final UnknownTransactionException ute)
-                {
-                    final AddressingProperties faultAddressingProperties = AddressingHelper.createFaultContext(addressingProperties, messageId) ;
-                    final SoapFault soapFault = new SoapFault(SoapFaultType.FAULT_SENDER, ArjunaTXConstants.UNKNOWNTRANSACTION_ERROR_CODE_QNAME,
-                        WSTLogger.log_mesg.getString("com.arjuna.wst.messaging.TerminationCoordinatorProcessorWSImpl_6")) ;
-                    TerminationParticipantClientWS.getClient().sendSoapFault(endpoint, faultAddressingProperties, soapFault, instanceIdentifier) ;
-                    return ;
-                }
-                catch (final TransactionRolledBackException trbe)
-                {
-                    final AddressingProperties faultAddressingProperties = AddressingHelper.createFaultContext(addressingProperties, messageId) ;
-                    final SoapFault soapFault = new SoapFault(SoapFaultType.FAULT_SENDER, ArjunaTXConstants.TRANSACTIONROLLEDBACK_ERROR_CODE_QNAME,
-                        WSTLogger.log_mesg.getString("com.arjuna.wst.messaging.TerminationCoordinatorProcessorWSImpl_7")) ;
-                    TerminationParticipantClientWS.getClient().sendSoapFault(endpoint, faultAddressingProperties, soapFault, instanceIdentifier) ;
-                    return ;
-                }
-                catch (final SystemException se)
-                {
-                    final AddressingProperties faultAddressingProperties = AddressingHelper.createFaultContext(addressingProperties, messageId) ;
-                    final String pattern = WSTLogger.log_mesg.getString("com.arjuna.wst.messaging.TerminationCoordinatorProcessorWSImpl_8") ;
-                    final String message = MessageFormat.format(pattern, new Object[] {se}) ;
-                    final SoapFault soapFault = new SoapFault(SoapFaultType.FAULT_SENDER, ArjunaTXConstants.UNKNOWNERROR_ERROR_CODE_QNAME, message) ;
-                    TerminationParticipantClientWS.getClient().sendSoapFault(endpoint, faultAddressingProperties, soapFault, instanceIdentifier) ;
-                    return ;
-                }
-                catch (final Throwable th)
-                {
-                    if (WSTLogger.arjLoggerI18N.isDebugEnabled())
-                    {
-                        WSTLogger.arjLoggerI18N.debug("com.arjuna.wst.messaging.TerminationCoordinatorProcessorWSImpl_9", th) ;
-                    }
-                    final AddressingProperties faultAddressingProperties = AddressingHelper.createFaultContext(addressingProperties, MessageIdWS.getMessageId()) ;
-                    final SoapFault soapFault = new SoapFault(th) ;
-                    TerminationParticipantClientWS.getClient().sendSoapFault(endpoint, faultAddressingProperties, soapFault, instanceIdentifier) ;
-                    return ;
-                }
-                final AddressingProperties responseAddressingProperties =
-                    AddressingHelper.createResponseContext(addressingProperties, messageId) ;
-                TerminationParticipantClientWS.getClient().sendClosed(endpoint, responseAddressingProperties, instanceIdentifier) ;
-            }
-            else
-            {
-                if (WSTLogger.arjLoggerI18N.isDebugEnabled())
-                {
-                    WSTLogger.arjLoggerI18N.debug("com.arjuna.wst.messaging.TerminationCoordinatorProcessorWSImpl_10", new Object[] {instanceIdentifier}) ;
-                }
-                // cannot do this without an endpoint
-                // final AddressingProperties faultAddressingProperties = AddressingHelper.createNotificationContext(MessageId.getMessageId()) ;
-                // final SoapFault soapFault = new SoapFault(SoapFaultType.FAULT_SENDER, ArjunaTXConstants.UNKNOWNTRANSACTION_ERROR_CODE_QNAME,
-                //     WSTLogger.log_mesg.getString("com.arjuna.wst.messaging.TerminationCoordinatorProcessorWSImpl_11")) ;
-                // TerminationParticipantClientWS.getClient().sendSoapFault(endpoint, faultAddressingProperties, soapFault, instanceIdentifier) ;
-            }
-        }
-        catch (Throwable throwable)
-        {
-            throwable.printStackTrace(System.err);
-        }
-    }
-
-    /**
-     * Complete.
-     * @param complete The complete notification.
-     * @param addressingProperties The addressing context.
-     * @param arjunaContext The arjuna context.
-     */
-    public void complete(final NotificationType complete, final AddressingProperties addressingProperties,
-        final ArjunaContextWS arjunaContext)
-    {
-        final InstanceIdentifierWS instanceIdentifier = arjunaContext.getInstanceIdentifier() ;
-        final BusinessActivityTerminatorWS participant = getParticipant(instanceIdentifier) ;
-
-        try
-        {
-            if (participant != null)
-            {
-                W3CEndpointReference endpoint = participant.getEndpoint();
-
-                final String messageId = MessageIdWS.getMessageId() ;
-                try
-                {
-                    participant.complete() ;
-                }
-                catch (final FaultedException fe)
-                {
-                    final AddressingProperties responseAddressingProperties =
-                        AddressingHelper.createNotificationContext(messageId) ;
-                    TerminationParticipantClientWS.getClient().sendFaulted(endpoint, responseAddressingProperties, instanceIdentifier) ;
-                }
-                catch (final UnknownTransactionException ute)
-                {
-                    final AddressingProperties faultAddressingProperties = AddressingHelper.createNotificationContext(messageId) ;
-                    final SoapFault soapFault = new SoapFault(SoapFaultType.FAULT_SENDER, ArjunaTXConstants.UNKNOWNTRANSACTION_ERROR_CODE_QNAME,
-                        WSTLogger.log_mesg.getString("com.arjuna.wst.messaging.TerminationCoordinatorProcessorWSImpl_12")) ;
-                    TerminationParticipantClientWS.getClient().sendSoapFault(endpoint, faultAddressingProperties, soapFault, instanceIdentifier) ;
-                    return ;
-                }
-                catch (final SystemException se)
-                {
-                    final AddressingProperties faultAddressingProperties = AddressingHelper.createNotificationContext(messageId) ;
-                    final String pattern = WSTLogger.log_mesg.getString("com.arjuna.wst.messaging.TerminationCoordinatorProcessorWSImpl_13") ;
-                    final String message = MessageFormat.format(pattern, new Object[] {se}) ;
-                    final SoapFault soapFault = new SoapFault(SoapFaultType.FAULT_SENDER, ArjunaTXConstants.UNKNOWNERROR_ERROR_CODE_QNAME, message) ;
-                    TerminationParticipantClientWS.getClient().sendSoapFault(endpoint, faultAddressingProperties, soapFault, instanceIdentifier) ;
-                    return ;
-                }
-                catch (final Throwable th)
-                {
-                    if (WSTLogger.arjLoggerI18N.isDebugEnabled())
-                    {
-                        WSTLogger.arjLoggerI18N.debug("com.arjuna.wst.messaging.TerminationCoordinatorProcessorWSImpl_14", th) ;
-                    }
-                    final AddressingProperties faultAddressingProperties = AddressingHelper.createNotificationContext(MessageIdWS.getMessageId()) ;
-                    final SoapFault soapFault = new SoapFault(th) ;
-                    TerminationParticipantClientWS.getClient().sendSoapFault(endpoint, faultAddressingProperties, soapFault, instanceIdentifier) ;
-                    return ;
-                }
-                final AddressingProperties responseAddressingProperties =
-                    AddressingHelper.createNotificationContext(messageId) ;
-                TerminationParticipantClientWS.getClient().sendCompleted(endpoint, responseAddressingProperties, instanceIdentifier) ;
-            }
-            else
-            {
-                if (WSTLogger.arjLoggerI18N.isDebugEnabled())
-                {
-                    WSTLogger.arjLoggerI18N.debug("com.arjuna.wst.messaging.TerminationCoordinatorProcessorWSImpl_15", new Object[] {instanceIdentifier}) ;
-                }
-                // cannot do this without an endpoint
-                // final AddressingProperties faultAddressingProperties = AddressingHelper.createNotificationContext(MessageId.getMessageId()) ;
-                // final SoapFault soapFault = new SoapFault(SoapFaultType.FAULT_SENDER, ArjunaTXConstants.UNKNOWNTRANSACTION_ERROR_CODE_QNAME,
-                //     WSTLogger.log_mesg.getString("com.arjuna.wst.messaging.TerminationCoordinatorProcessorWSImpl_16")) ;
-                // TerminationParticipantClientWS.getClient().sendSoapFault(endpoint, faultAddressingProperties, soapFault, instanceIdentifier) ;
-            }
-        }
-        catch (Throwable throwable)
-        {
-            throwable.printStackTrace(System.err);
-        }
-    }
-}
\ No newline at end of file

Deleted: labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/wst/messaging/deploy/TransactionWSInitialisation.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/wst/messaging/deploy/TransactionWSInitialisation.java	2008-01-25 17:05:33 UTC (rev 18123)
+++ labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/wst/messaging/deploy/TransactionWSInitialisation.java	2008-01-25 17:18:13 UTC (rev 18124)
@@ -1,73 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. 
- * 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 com.arjuna.common.util.SharedTimer;
-import com.arjuna.services.framework.startup.Sequencer;
-import com.arjuna.webservices.wsarjtx.processors.TerminationCoordinatorProcessorWS;
-import com.arjuna.webservices.wsat.processors.CompletionCoordinatorProcessorWS;
-import com.arjuna.webservices.wsat.processors.CoordinatorProcessorWS;
-import com.arjuna.webservices.wsat.processors.ParticipantProcessorWS;
-import com.arjuna.webservices.wsba.processors.CoordinatorCompletionCoordinatorProcessorWS;
-import com.arjuna.webservices.wsba.processors.CoordinatorCompletionParticipantProcessorWS;
-import com.arjuna.webservices.wsba.processors.ParticipantCompletionCoordinatorProcessorWS;
-import com.arjuna.webservices.wsba.processors.ParticipantCompletionParticipantProcessorWS;
-import com.arjuna.wst.messaging.*;
-
-import javax.servlet.ServletContextEvent;
-import javax.servlet.ServletContextListener;
-
-/**
- * Initialise the transaction services.
- * @author kevin
- */
-public class TransactionWSInitialisation implements ServletContextListener
-{
-    /**
-     * The context has been initialized.
-     * @param servletContextEvent The servlet context event.
-     */
-    public void contextInitialized(final ServletContextEvent servletContextEvent)
-    {
-        Sequencer.Callback callback = new Sequencer.Callback(Sequencer.SEQUENCE_WSCOOR11, Sequencer.WEBAPP_WST11) {
-           public void run() {
-               CompletionCoordinatorProcessorWS.setProcessor(new CompletionCoordinatorProcessorWSImpl()) ;
-               ParticipantProcessorWS.setProcessor(new ParticipantProcessorWSImpl()) ;
-               CoordinatorProcessorWS.setProcessor(new CoordinatorProcessorWSImpl()) ;
-               TerminationCoordinatorProcessorWS.setProcessor(new TerminationCoordinatorProcessorWSImpl()) ;
-               CoordinatorCompletionParticipantProcessorWS.setProcessor(new CoordinatorCompletionParticipantProcessorWSImpl()) ;
-               ParticipantCompletionParticipantProcessorWS.setProcessor(new ParticipantCompletionParticipantProcessorWSImpl()) ;
-               CoordinatorCompletionCoordinatorProcessorWS.setProcessor(new CoordinatorCompletionCoordinatorProcessorWSImpl()) ;
-               ParticipantCompletionCoordinatorProcessorWS.setProcessor(new ParticipantCompletionCoordinatorProcessorWSImpl()) ;
-           }
-        };
-        // this is the last WST callback to be initialised so close the list
-        Sequencer.close(Sequencer.SEQUENCE_WSCOOR11, Sequencer.WEBAPP_WST11);
-    }
-
-    /**
-     * The context is about to be destroyed.
-     * @param servletContextEvent The servlet context event.
-     */
-    public void contextDestroyed(final ServletContextEvent servletContextEvent)
-    {
-    }
-}
\ No newline at end of file

Deleted: labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/wst/messaging/engines/CoordinatorCompletionCoordinatorEngineWS.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/wst/messaging/engines/CoordinatorCompletionCoordinatorEngineWS.java	2008-01-25 17:05:33 UTC (rev 18123)
+++ labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/wst/messaging/engines/CoordinatorCompletionCoordinatorEngineWS.java	2008-01-25 17:18:13 UTC (rev 18124)
@@ -1,980 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. 
- * 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 com.arjuna.webservices.SoapFault;
-import com.arjuna.webservices.logging.WSTLogger;
-import com.arjuna.webservices.util.TransportTimer;
-import com.arjuna.webservices.wsaddrws.AddressingHelper;
-import com.arjuna.webservices.wsarj.ArjunaContextWS;
-import com.arjuna.webservices.wsarj.InstanceIdentifierWS;
-import com.arjuna.webservices.wsba.CoordinatorCompletionCoordinatorInboundEventsWS;
-import com.arjuna.webservices.wsba.StateWS;
-import com.arjuna.webservices.wsba.client.CoordinatorCompletionParticipantClientWS;
-import com.arjuna.webservices.wsba.processors.CoordinatorCompletionCoordinatorProcessorWS;
-import com.arjuna.wsc.messaging.MessageIdWS;
-import com.arjuna.wst.BAParticipantManagerWS;
-import org.oasis_open.docs.ws_tx.wsba._2006._06.ExceptionType;
-import org.oasis_open.docs.ws_tx.wsba._2006._06.NotificationType;
-import org.oasis_open.docs.ws_tx.wsba._2006._06.StatusType;
-
-import javax.xml.namespace.QName;
-import javax.xml.ws.addressing.AddressingProperties;
-import javax.xml.ws.wsaddressing.W3CEndpointReference;
-
-/**
- * The coordinator completion coordinator state engine
- * @author kevin
- */
-public class CoordinatorCompletionCoordinatorEngineWS implements CoordinatorCompletionCoordinatorInboundEventsWS
-{
-    /**
-     * The coordinator id.
-     */
-    private final String id ;
-    /**
-     * The instance identifier.
-     */
-    private final InstanceIdentifierWS instanceIdentifier ;
-    /**
-     * The participant endpoint reference.
-     */
-    private final W3CEndpointReference participant ;
-    /**
-     * The associated coordinator
-     */
-    private BAParticipantManagerWS coordinator ;
-    /**
-     * The current state.
-     */
-    private StateWS state;
-
-    /**
-     * Construct the initial engine for the coordinator.
-     * @param id The coordinator id.
-     * @param participant The participant endpoint reference.
-     */
-    public CoordinatorCompletionCoordinatorEngineWS(final String id, final W3CEndpointReference participant)
-    {
-        this(id, participant, StateWS.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 CoordinatorCompletionCoordinatorEngineWS(final String id, final W3CEndpointReference participant,
-        final StateWS state)
-    {
-        this.id = id ;
-        this.instanceIdentifier = new InstanceIdentifierWS(id) ;
-        this.participant = participant ;
-        this.state = state ;
-    }
-
-    /**
-     * Set the coordinator and register
-     * @param coordinator
-     */
-    public void setCoordinator(final BAParticipantManagerWS coordinator)
-    {
-        this.coordinator = coordinator ;
-        CoordinatorCompletionCoordinatorProcessorWS.getProcessor().activateCoordinator(this, id) ;
-    }
-
-    /**
-     * Handle the cancelled event.
-     * @param cancelled The cancelled notification.
-     * @param addressingProperties The addressing context.
-     * @param arjunaContext The arjuna 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 AddressingProperties addressingProperties, final ArjunaContextWS arjunaContext)
-    {
-        final StateWS current ;
-        synchronized(this)
-        {
-            current = state ;
-            if ((current == StateWS.STATE_CANCELING) || (current == StateWS.STATE_CANCELING_ACTIVE) ||
-                (current == StateWS.STATE_CANCELING_COMPLETING))
-            {
-                ended() ;
-            }
-        }
-    }
-
-    /**
-     * Handle the closed event.
-     * @param closed The closed notification.
-     * @param addressingProperties The addressing context.
-     * @param arjunaContext The arjuna 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 AddressingProperties addressingProperties, final ArjunaContextWS arjunaContext)
-    {
-        final StateWS current ;
-        synchronized(this)
-        {
-            current = state ;
-            if (current == StateWS.STATE_CLOSING)
-            {
-                ended() ;
-            }
-        }
-    }
-
-    /**
-     * Handle the compensated event.
-     * @param compensated The compensated notification.
-     * @param addressingProperties The addressing context.
-     * @param arjunaContext The arjuna 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 AddressingProperties addressingProperties, final ArjunaContextWS arjunaContext)
-    {
-        final StateWS current ;
-        synchronized(this)
-        {
-            current = state ;
-            if (current == StateWS.STATE_COMPENSATING)
-            {
-                ended() ;
-            }
-        }
-    }
-
-    /**
-     * Handle the completed event.
-     * @param completed The completed notification.
-     * @param addressingProperties The addressing context.
-     * @param arjunaContext The arjuna 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 completed(final NotificationType completed, final AddressingProperties addressingProperties,
-        final ArjunaContextWS arjunaContext)
-    {
-        final StateWS current ;
-        synchronized(this)
-        {
-            current = state ;
-            if ((current == StateWS.STATE_CANCELING_COMPLETING) || (current == StateWS.STATE_COMPLETING))
-            {
-                changeState(StateWS.STATE_COMPLETED) ;
-            }
-            else if (current == StateWS.STATE_ACTIVE)
-            {
-        	ended() ;
-            }
-        }
-
-        if (current == StateWS.STATE_CLOSING)
-        {
-            sendClose() ;
-        }
-        else if (current == StateWS.STATE_COMPENSATING)
-        {
-            sendCompensate() ;
-        }
-        else if (current == StateWS.STATE_ACTIVE)
-        {
-            // TODO - we cannot send a fault here
-            // sendInvalidStateFault() ;
-        }
-    }
-
-    /**
-     * Handle the exit event.
-     * @param exit The exit notification.
-     * @param addressingProperties The addressing context.
-     * @param arjunaContext The arjuna context.
-     *
-     * Active -> Exiting
-     * Canceling -> Exiting
-     * Canceling-Active -> Exiting
-     * Canceling-Completing -> Exiting
-     * Completing -> Exiting
-     * Completed -> Completed (invalid state)
-     * Closing -> Closing (invalid state)
-     * Compensating -> Compensating (invalid state)
-     * Faulting -> Faulting (invalid state)
-     * Faulting-Active -> Faulting (invalid state)
-     * Faulting-Compensating -> Faulting (invalid state)
-     * Exiting -> Exiting
-     * Ended -> Ended (resend Exited)
-     */
-    public void exit(final NotificationType exit, final AddressingProperties addressingProperties, final ArjunaContextWS arjunaContext)
-    {
-        final StateWS current ;
-        synchronized(this)
-        {
-            current = state ;
-            if ((current == StateWS.STATE_ACTIVE) || (current == StateWS.STATE_CANCELING_ACTIVE) ||
-        	(current == StateWS.STATE_CANCELING_COMPLETING) || (current == StateWS.STATE_COMPLETING))
-            {
-                changeState(StateWS.STATE_EXITING) ;
-            }
-        }
-
-        if ((current == StateWS.STATE_ACTIVE) || (current == StateWS.STATE_CANCELING_ACTIVE) ||
-            (current == StateWS.STATE_CANCELING_COMPLETING) || (current == StateWS.STATE_COMPLETING))
-        {
-            executeExit() ;
-        }
-        else if (current == StateWS.STATE_ENDED)
-        {
-            sendExited() ;
-        }
-    }
-
-    /**
-     * Handle the fail event.
-     * @param fail The fail exception.
-     * @param addressingProperties The addressing context.
-     * @param arjunaContext The arjuna 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 AddressingProperties addressingProperties,
-        final ArjunaContextWS arjunaContext)
-    {
-        final StateWS current ;
-        synchronized(this)
-        {
-            current = state ;
-            if (current == StateWS.STATE_ACTIVE)
-            {
-                changeState(StateWS.STATE_FAILING_ACTIVE) ;
-            }
-            else if ((current == StateWS.STATE_CANCELING_ACTIVE) || (current == StateWS.STATE_CANCELING_COMPLETING))
-            {
-                changeState(StateWS.STATE_FAILING_CANCELING) ;
-            }
-            else if (current == StateWS.STATE_COMPLETING)
-            {
-                changeState(StateWS.STATE_FAILING_COMPLETING) ;
-            }
-            else if (current == StateWS.STATE_COMPENSATING)
-            {
-                changeState(StateWS.STATE_FAILING_COMPENSATING) ;
-            }
-        }
-
-        if (current == StateWS.STATE_ACTIVE)
-        {
-            executeFail(fail.getExceptionIdentifier()) ;
-        }
-        else if ((current == StateWS.STATE_CANCELING_ACTIVE) || (current == StateWS.STATE_CANCELING_COMPLETING) ||
-        	 (current == StateWS.STATE_COMPLETING) || (current == StateWS.STATE_COMPENSATING))
-        {
-            sendFailed() ;
-            ended() ;
-        }
-        else if (current == StateWS.STATE_ENDED)
-        {
-            sendFailed() ;
-        }
-    }
-
-    /**
-     * Handle the cannot complete event.
-     * @param cannotComplete The cannotComplete exception.
-     * @param addressingProperties The addressing context.
-     * @param arjunaContext The arjuna 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 AddressingProperties addressingProperties,
-        final ArjunaContextWS arjunaContext)
-    {
-        final StateWS current ;
-        synchronized(this)
-        {
-            current = state ;
-            if ((current == StateWS.STATE_ACTIVE) || (current == StateWS.STATE_CANCELING_ACTIVE) ||
-        	(current == StateWS.STATE_CANCELING_COMPLETING) || (current == StateWS.STATE_COMPLETING))
-            {
-                changeState(StateWS.STATE_NOT_COMPLETING) ;
-            }
-        }
-
-        if ((current == StateWS.STATE_ACTIVE) || (current == StateWS.STATE_CANCELING_ACTIVE) ||
-            (current == StateWS.STATE_CANCELING_COMPLETING) || (current == StateWS.STATE_COMPLETING))
-        {
-            executeCannotComplete() ;
-        }
-        else if (current == StateWS.STATE_ENDED)
-        {
-            sendNotCompleted() ;
-        }
-    }
-
-    /**
-     * Handle the getStatus event.
-     * @param getStatus The getStatus notification.
-     * @param addressingProperties The addressing context.
-     * @param arjunaContext The arjuna context.
-     */
-    public void getStatus(final NotificationType getStatus, final AddressingProperties addressingProperties, final ArjunaContextWS arjunaContext)
-    {
-        final StateWS current ;
-        synchronized(this)
-        {
-            current = state ;
-        }
-        sendStatus(current) ;
-    }
-
-    /**
-     * Handle the status event.
-     * @param status The status.
-     * @param addressingProperties The addressing context.
-     * @param arjunaContext The arjuna context.
-     */
-    public void status(final StatusType status, final AddressingProperties addressingProperties, final ArjunaContextWS arjunaContext)
-    {
-        // KEV - implement
-    }
-
-    /**
-     * Handle the get status event.
-     * @return The state.
-     */
-    public synchronized StateWS 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 StateWS cancel()
-    {
-        final StateWS current ;
-        synchronized(this)
-        {
-            current = state ;
-            if (current == StateWS.STATE_ACTIVE)
-            {
-                changeState(StateWS.STATE_CANCELING_ACTIVE) ;
-            }
-            else if (current == StateWS.STATE_COMPLETING)
-            {
-                changeState(StateWS.STATE_CANCELING_COMPLETING) ;
-            }
-        }
-
-        if (current == StateWS.STATE_ACTIVE)
-        {
-            sendCancel() ;
-            return waitForState(StateWS.STATE_CANCELING_ACTIVE, TransportTimer.getTransportTimeout()) ;
-        }
-        else if (current == StateWS.STATE_COMPLETING)
-        {
-            sendCancel() ;
-            return waitForState(StateWS.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 StateWS compensate()
-    {
-        final StateWS current ;
-        synchronized(this)
-        {
-            current = state ;
-            if (current == StateWS.STATE_COMPLETED)
-            {
-                changeState(StateWS.STATE_COMPENSATING) ;
-            }
-        }
-
-        if (current == StateWS.STATE_COMPLETED)
-        {
-            sendCompensate() ;
-            return waitForState(StateWS.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 StateWS complete()
-    {
-        final StateWS current ;
-        synchronized(this)
-        {
-            current = state ;
-            if (current == StateWS.STATE_ACTIVE)
-            {
-                changeState(StateWS.STATE_COMPLETING) ;
-            }
-        }
-
-        if (current == StateWS.STATE_ACTIVE)
-        {
-            sendComplete() ;
-            return waitForState(StateWS.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 StateWS close()
-    {
-        final StateWS current ;
-        synchronized(this)
-        {
-            current = state ;
-            if (current == StateWS.STATE_COMPLETED)
-            {
-                changeState(StateWS.STATE_CLOSING) ;
-            }
-        }
-
-        if (current == StateWS.STATE_COMPLETED)
-        {
-            sendClose() ;
-            return waitForState(StateWS.STATE_CLOSING, TransportTimer.getTransportTimeout()) ;
-        }
-        return current ;
-    }
-
-    /**
-     * Handle the soap fault event.
-     * @param soapFault The soap fault.
-     * @param addressingProperties The addressing context.
-     * @param arjunaContext The arjuna context.
-     */
-    public void soapFault(final SoapFault soapFault, final AddressingProperties addressingProperties, final ArjunaContextWS arjunaContext)
-    {
-        ended() ;
-        try
-        {
-            coordinator.fail(soapFault.getSubcode()) ;
-        }
-        catch (final Throwable th) {} // ignore
-    }
-
-    /**
-     * Send the close message.
-     *
-     * @message com.arjuna.wst.messaging.engines.CoordinatorCompletionCoordinatorEngineWS.sendClose_1 [com.arjuna.wst.messaging.engines.CoordinatorCompletionCoordinatorEngineWS.sendClose_1] - Unexpected exception while sending Close
-     */
-    private void sendClose()
-    {
-        final AddressingProperties addressingProperties = createContext() ;
-        try
-        {
-            CoordinatorCompletionParticipantClientWS.getClient().sendClose(participant, addressingProperties, instanceIdentifier) ;
-        }
-        catch (final Throwable th)
-        {
-            if (WSTLogger.arjLoggerI18N.isDebugEnabled())
-            {
-                WSTLogger.arjLoggerI18N.debug("com.arjuna.wst.messaging.engines.CoordinatorCompletionCoordinatorEngineWS.sendClose_1", th) ;
-            }
-        }
-    }
-
-    /**
-     * Send the compensate message.
-     *
-     * @message com.arjuna.wst.messaging.engines.CoordinatorCompletionCoordinatorEngineWS.sendCompensate_1 [com.arjuna.wst.messaging.engines.CoordinatorCompletionCoordinatorEngineWS.sendCompensate_1] - Unexpected exception while sending Compensate
-     */
-    private void sendCompensate()
-    {
-        final AddressingProperties addressingProperties = createContext() ;
-        try
-        {
-            CoordinatorCompletionParticipantClientWS.getClient().sendCompensate(participant, addressingProperties, instanceIdentifier) ;
-        }
-        catch (final Throwable th)
-        {
-            if (WSTLogger.arjLoggerI18N.isDebugEnabled())
-            {
-                WSTLogger.arjLoggerI18N.debug("com.arjuna.wst.messaging.engines.CoordinatorCompletionCoordinatorEngineWS.sendCompensate_1", th) ;
-            }
-        }
-    }
-
-    /**
-     * Send the complete message.
-     *
-     * @message com.arjuna.wst.messaging.engines.CoordinatorCompletionCoordinatorEngineWS.sendComplete_1 [com.arjuna.wst.messaging.engines.CoordinatorCompletionCoordinatorEngineWS.sendComplete_1] - Unexpected exception while sending Complete
-     */
-    private void sendComplete()
-    {
-        final AddressingProperties addressingProperties = createContext() ;
-        try
-        {
-            CoordinatorCompletionParticipantClientWS.getClient().sendComplete(participant, addressingProperties, instanceIdentifier) ;
-        }
-        catch (final Throwable th)
-        {
-            if (WSTLogger.arjLoggerI18N.isDebugEnabled())
-            {
-                WSTLogger.arjLoggerI18N.debug("com.arjuna.wst.messaging.engines.CoordinatorCompletionCoordinatorEngineWS.sendComplete_1", th) ;
-            }
-        }
-    }
-
-    /**
-     * Send the cancel message.
-     *
-     * @message com.arjuna.wst.messaging.engines.CoordinatorCompletionCoordinatorEngineWS.sendCancel_1 [com.arjuna.wst.messaging.engines.CoordinatorCompletionCoordinatorEngineWS.sendCancel_1] - Unexpected exception while sending Cancel
-     */
-    private void sendCancel()
-    {
-        final AddressingProperties addressingProperties = createContext() ;
-        try
-        {
-            CoordinatorCompletionParticipantClientWS.getClient().sendCancel(participant, addressingProperties, instanceIdentifier) ;
-        }
-        catch (final Throwable th)
-        {
-            if (WSTLogger.arjLoggerI18N.isDebugEnabled())
-            {
-                WSTLogger.arjLoggerI18N.debug("com.arjuna.wst.messaging.engines.CoordinatorCompletionCoordinatorEngineWS.sendCancel_1", th) ;
-            }
-        }
-    }
-
-    /**
-     * Send the exited message.
-     *
-     * @message com.arjuna.wst.messaging.engines.CoordinatorCompletionCoordinatorEngineWS.sendExited_1 [com.arjuna.wst.messaging.engines.CoordinatorCompletionCoordinatorEngineWS.sendExited_1] - Unexpected exception while sending Exited
-     */
-    private void sendExited()
-    {
-        final AddressingProperties addressingProperties = createContext() ;
-        try
-        {
-            CoordinatorCompletionParticipantClientWS.getClient().sendExited(participant, addressingProperties, instanceIdentifier) ;
-        }
-        catch (final Throwable th)
-        {
-            if (WSTLogger.arjLoggerI18N.isDebugEnabled())
-            {
-                WSTLogger.arjLoggerI18N.debug("com.arjuna.wst.messaging.engines.CoordinatorCompletionCoordinatorEngineWS.sendExited_1", th) ;
-            }
-        }
-    }
-
-    /**
-     * Send the failed message.
-     *
-     * @message com.arjuna.wst.messaging.engines.CoordinatorCompletionCoordinatorEngineWS.sendFailed_1 [com.arjuna.wst.messaging.engines.CoordinatorCompletionCoordinatorEngineWS.sendFailed_1] - Unexpected exception while sending Faulted
-     */
-    private void sendFailed()
-    {
-        final AddressingProperties addressingProperties = createContext() ;
-        try
-        {
-            CoordinatorCompletionParticipantClientWS.getClient().sendFailed(participant, addressingProperties, instanceIdentifier) ;
-        }
-        catch (final Throwable th)
-        {
-            if (WSTLogger.arjLoggerI18N.isDebugEnabled())
-            {
-                WSTLogger.arjLoggerI18N.debug("com.arjuna.wst.messaging.engines.CoordinatorCompletionCoordinatorEngineWS.sendFailed_1", th) ;
-            }
-        }
-    }
-
-    /**
-     * Send the not completed message.
-     *
-     * @message com.arjuna.wst.messaging.engines.CoordinatorCompletionCoordinatorEngineWS.sendNotCompleted_1 [com.arjuna.wst.messaging.engines.CoordinatorCompletionCoordinatorEngineWS.sendNotCompleted_1] - Unexpected exception while sending NotCompleted
-     */
-    private void sendNotCompleted()
-    {
-        final AddressingProperties addressingProperties = createContext() ;
-        try
-        {
-            CoordinatorCompletionParticipantClientWS.getClient().sendNotCompleted(participant, addressingProperties, instanceIdentifier) ;
-        }
-        catch (final Throwable th)
-        {
-            if (WSTLogger.arjLoggerI18N.isDebugEnabled())
-            {
-                WSTLogger.arjLoggerI18N.debug("com.arjuna.wst.messaging.engines.CoordinatorCompletionCoordinatorEngineWS.sendNotCompleted_1", th) ;
-            }
-        }
-    }
-    /**
-     * Send the status message.
-     * @param state The state.
-     *
-     * @message com.arjuna.wst.messaging.engines.CoordinatorCompletionCoordinatorEngineWS.sendStatus_1 [com.arjuna.wst.messaging.engines.CoordinatorCompletionCoordinatorEngineWS.sendStatus_1] - Unexpected exception while sending Status
-     */
-    private void sendStatus(final StateWS state)
-    {
-        final AddressingProperties addressingProperties = createContext() ;
-        try
-        {
-            CoordinatorCompletionParticipantClientWS.getClient().sendStatus(participant, addressingProperties, instanceIdentifier, state.getValue()) ;
-        }
-        catch (final Throwable th)
-        {
-            if (WSTLogger.arjLoggerI18N.isDebugEnabled())
-            {
-                WSTLogger.arjLoggerI18N.debug("com.arjuna.wst.messaging.engines.CoordinatorCompletionCoordinatorEngineWS.sendStatus_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 W3CEndpointReference getParticipant()
-    {
-        return participant ;
-    }
-
-    /**
-     * Get the associated coordinator.
-     * @return The associated coordinator.
-     */
-    public BAParticipantManagerWS getCoordinator()
-    {
-        return coordinator ;
-    }
-
-    /**
-     * Change the state and notify any listeners.
-     * @param state The new state.
-     */
-    private synchronized void changeState(final StateWS 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 StateWS waitForState(final StateWS 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.CoordinatorCompletionCoordinatorEngineWS.executeCompleted_1 [com.arjuna.wst.messaging.engines.CoordinatorCompletionCoordinatorEngineWS.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.CoordinatorCompletionCoordinatorEngineWS.executeCompleted_1", th) ;
-            }
-        }
-    }
-
-    /**
-     * Execute the exit transition.
-     *
-     * @message com.arjuna.wst.messaging.engines.CoordinatorCompletionCoordinatorEngineWS.executeExit_1 [com.arjuna.wst.messaging.engines.CoordinatorCompletionCoordinatorEngineWS.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.CoordinatorCompletionCoordinatorEngineWS.executeExit_1", th) ;
-            }
-            return ;
-        }
-        sendExited() ;
-        ended() ;
-    }
-
-    /**
-     * Executing the fail transition.
-     *
-     * @throws com.arjuna.webservices.SoapFault for SOAP errors.
-     * @throws java.io.IOException for transport errors.
-     *
-     * @message com.arjuna.wst.messaging.engines.CoordinatorCompletionCoordinatorEngineWS.executeFail_1 [com.arjuna.wst.messaging.engines.CoordinatorCompletionCoordinatorEngineWS.executeFail_1] - Unexpected exception from coordinator fail
-     */
-    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.CoordinatorCompletionCoordinatorEngineWS.executeFail_1", th) ;
-            }
-            return ;
-        }
-        sendFailed() ;
-        ended() ;
-    }
-
-    /**
-     * Executing the cannot complete transition.
-     *
-     * @throws com.arjuna.webservices.SoapFault for SOAP errors.
-     * @throws java.io.IOException for transport errors.
-     *
-     * @message com.arjuna.wst.messaging.engines.CoordinatorCompletionCoordinatorEngineWS.executeCannotComplete_1 [com.arjuna.wst.messaging.engines.CoordinatorCompletionCoordinatorEngineWS.executeCannotComplete_1] - Unexpected exception from coordinator cannotComplete
-     */
-    private void executeCannotComplete()
-    {
-        try
-        {
-            coordinator.cannotComplete() ;
-        }
-        catch (final Throwable th)
-        {
-            if (WSTLogger.arjLoggerI18N.isDebugEnabled())
-            {
-                WSTLogger.arjLoggerI18N.debug("com.arjuna.wst.messaging.engines.CoordinatorCompletionCoordinatorEngineWS.executeCannotComplete_1", th) ;
-            }
-            return ;
-        }
-        sendNotCompleted() ;
-        ended() ;
-    }
-
-    /**
-     * End the current coordinator.
-     */
-    private void ended()
-    {
-        changeState(StateWS.STATE_ENDED) ;
-        CoordinatorCompletionCoordinatorProcessorWS.getProcessor().deactivateCoordinator(this) ;
-    }
-
-    /**
-     * Create a context for the outgoing message.
-     * @return The addressing context.
-     */
-    private AddressingProperties createContext()
-    {
-        final String messageId = MessageIdWS.getMessageId() ;
-        return AddressingHelper.createNotificationContext(messageId) ;
-    }
-}
\ No newline at end of file

Deleted: labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/wst/messaging/engines/CoordinatorCompletionParticipantEngineWS.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/wst/messaging/engines/CoordinatorCompletionParticipantEngineWS.java	2008-01-25 17:05:33 UTC (rev 18123)
+++ labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/wst/messaging/engines/CoordinatorCompletionParticipantEngineWS.java	2008-01-25 17:18:13 UTC (rev 18124)
@@ -1,1074 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. 
- * 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 com.arjuna.webservices.SoapFault;
-import com.arjuna.webservices.logging.WSTLogger;
-import com.arjuna.webservices.util.TransportTimer;
-import com.arjuna.webservices.wsaddrws.AddressingHelper;
-import com.arjuna.webservices.wsarj.ArjunaContextWS;
-import com.arjuna.webservices.wsarj.InstanceIdentifierWS;
-import com.arjuna.webservices.wsarjtx.ArjunaTXConstants;
-import com.arjuna.webservices.wsba.CoordinatorCompletionParticipantInboundEventsWS;
-import com.arjuna.webservices.wsba.StateWS;
-import com.arjuna.webservices.wsba.client.CoordinatorCompletionCoordinatorClientWS;
-import com.arjuna.webservices.wsba.processors.CoordinatorCompletionParticipantProcessorWS;
-import com.arjuna.wsc.messaging.MessageIdWS;
-import com.arjuna.wst.BusinessAgreementWithCoordinatorCompletionParticipant;
-import com.arjuna.wst.FaultedException;
-import org.oasis_open.docs.ws_tx.wsba._2006._06.NotificationType;
-import org.oasis_open.docs.ws_tx.wsba._2006._06.StatusType;
-
-import javax.xml.namespace.QName;
-import javax.xml.ws.addressing.AddressingProperties;
-import javax.xml.ws.wsaddressing.W3CEndpointReference;
-import java.util.TimerTask;
-
-/**
- * The coordinator completion participant state engine
- * @author kevin
- */
-public class CoordinatorCompletionParticipantEngineWS implements CoordinatorCompletionParticipantInboundEventsWS
-{
-    /**
-     * The participant id.
-     */
-    private final String id ;
-    /**
-     * The instance identifier.
-     */
-    private final InstanceIdentifierWS instanceIdentifier ;
-    /**
-     * The coordinator endpoint reference.
-     */
-    private final W3CEndpointReference coordinator ;
-    /**
-     * The associated participant
-     */
-    private final BusinessAgreementWithCoordinatorCompletionParticipant participant ;
-    /**
-     * The current state.
-     */
-    private StateWS 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 CoordinatorCompletionParticipantEngineWS(final String id, final W3CEndpointReference coordinator,
-        final BusinessAgreementWithCoordinatorCompletionParticipant participant)
-    {
-        this(id, coordinator, participant, StateWS.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 CoordinatorCompletionParticipantEngineWS(final String id, final W3CEndpointReference coordinator,
-        final BusinessAgreementWithCoordinatorCompletionParticipant participant, final StateWS state)
-    {
-        this.id = id ;
-        this.instanceIdentifier = new InstanceIdentifierWS(id) ;
-        this.coordinator = coordinator ;
-        this.participant = participant ;
-        this.state = state ;
-    }
-
-    /**
-     * Handle the cancel event.
-     * @param cancel The cancel notification.
-     * @param addressingProperties The addressing context.
-     * @param arjunaContext The arjuna 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 AddressingProperties addressingProperties, final ArjunaContextWS arjunaContext)
-    {
-        final StateWS current ;
-        synchronized(this)
-        {
-            current = state ;
-            if ((current == StateWS.STATE_ACTIVE) || (current == StateWS.STATE_COMPLETING))
-            {
-                changeState(StateWS.STATE_CANCELING) ;
-            }
-        }
-
-        if ((current == StateWS.STATE_ACTIVE) || (current == StateWS.STATE_COMPLETING))
-        {
-            executeCancel() ;
-        }
-        else if (current == StateWS.STATE_COMPLETED)
-        {
-            sendCompleted() ;
-        }
-        else if ((current == StateWS.STATE_FAILING_ACTIVE) || (current == StateWS.STATE_FAILING_CANCELING) ||
-        	 (current == StateWS.STATE_FAILING_COMPLETING))
-        {
-            sendFail(current.getValue()) ;
-        }
-        else if (current == StateWS.STATE_NOT_COMPLETING)
-        {
-            sendCannotComplete() ;
-        }
-        else if (current == StateWS.STATE_EXITING)
-        {
-            sendExit() ;
-        }
-        else if (current == StateWS.STATE_ENDED)
-        {
-            sendCancelled() ;
-        }
-    }
-
-    /**
-     * Handle the close event.
-     * @param close The close notification.
-     * @param addressingProperties The addressing context.
-     * @param arjunaContext The arjuna 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 AddressingProperties addressingProperties, final ArjunaContextWS arjunaContext)
-    {
-        final StateWS current ;
-        synchronized(this)
-        {
-            current = state ;
-            if (current == StateWS.STATE_COMPLETED)
-            {
-                changeState(StateWS.STATE_CLOSING) ;
-            }
-        }
-
-        if (current == StateWS.STATE_COMPLETED)
-        {
-            if (timerTask != null)
-            {
-                timerTask.cancel() ;
-            }
-            executeClose() ;
-        }
-        else if (current == StateWS.STATE_ENDED)
-        {
-            sendClosed() ;
-        }
-    }
-
-    /**
-     * Handle the compensate event.
-     * @param compensate The compensate notification.
-     * @param addressingProperties The addressing context.
-     * @param arjunaContext The arjuna 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 AddressingProperties addressingProperties, final ArjunaContextWS arjunaContext)
-    {
-        final StateWS current ;
-        synchronized(this)
-        {
-            current = state ;
-            if (current == StateWS.STATE_COMPLETED)
-            {
-                changeState(StateWS.STATE_COMPENSATING) ;
-            }
-        }
-
-        if (current == StateWS.STATE_COMPLETED)
-        {
-            if (timerTask != null)
-            {
-                timerTask.cancel() ;
-            }
-            executeCompensate() ;
-        }
-        else if (current == StateWS.STATE_FAILING_COMPENSATING)
-        {
-            sendFail(current.getValue()) ;
-        }
-        else if (current == StateWS.STATE_ENDED)
-        {
-            sendCompensated() ;
-        }
-    }
-
-    /**
-     * Handle the complete event.
-     * @param complete The complete notification.
-     * @param addressingProperties The addressing context.
-     * @param arjunaContext The arjuna 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 AddressingProperties addressingProperties, final ArjunaContextWS arjunaContext)
-    {
-        final StateWS current ;
-        synchronized(this)
-        {
-            current = state ;
-            if (current == StateWS.STATE_ACTIVE)
-            {
-                changeState(StateWS.STATE_COMPLETING) ;
-            }
-        }
-
-        if (current == StateWS.STATE_ACTIVE)
-        {
-            executeComplete() ;
-        }
-        else if (current == StateWS.STATE_COMPLETED)
-        {
-            sendCompleted() ;
-        }
-        else if ((current == StateWS.STATE_FAILING_ACTIVE) || (current == StateWS.STATE_FAILING_CANCELING) ||
-        	 (current == StateWS.STATE_FAILING_COMPLETING) || (current == StateWS.STATE_ENDED))
-        {
-            sendFail(current.getValue()) ;
-        }
-        else if (current == StateWS.STATE_NOT_COMPLETING)
-        {
-            sendCannotComplete() ;
-        }
-        else if (current == StateWS.STATE_EXITING)
-        {
-            sendExit() ;
-        }
-    }
-
-    /**
-     * Handle the exited event.
-     * @param exited The exited notification.
-     * @param addressingProperties The addressing context.
-     * @param arjunaContext The arjuna 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 AddressingProperties addressingProperties, final ArjunaContextWS arjunaContext)
-    {
-        final StateWS current ;
-        synchronized(this)
-        {
-            current = state ;
-            if (current == StateWS.STATE_EXITING)
-            {
-                ended() ;
-            }
-        }
-    }
-
-    /**
-     * Handle the failed event.
-     * @param failed The failed notification.
-     * @param addressingProperties The addressing context.
-     * @param arjunaContext The arjuna 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 AddressingProperties addressingProperties, final ArjunaContextWS arjunaContext)
-    {
-        final StateWS current ;
-        synchronized(this)
-        {
-            current = state ;
-            if ((current == StateWS.STATE_FAILING_ACTIVE) || (current == StateWS.STATE_FAILING_CANCELING) ||
-                (current == StateWS.STATE_FAILING_COMPLETING) || (current == StateWS.STATE_FAILING_COMPENSATING))
-            {
-                ended() ;
-            }
-        }
-    }
-
-    /**
-     * Handle the not completed event.
-     * @param notCompleted The not completed notification.
-     * @param addressingProperties The addressing context.
-     * @param arjunaContext The arjuna 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 AddressingProperties addressingProperties, final ArjunaContextWS arjunaContext)
-    {
-        final StateWS current ;
-        synchronized(this)
-        {
-            current = state ;
-            if (current == StateWS.STATE_NOT_COMPLETING)
-            {
-        	ended() ;
-            }
-        }
-    }
-
-    /**
-     * Handle the getStatus event.
-     * @param getStatus The getStatus notification.
-     * @param addressingProperties The addressing context.
-     * @param arjunaContext The arjuna context.
-     *
-     * @message com.arjuna.wst.messaging.engines.CoordinatorCompletionParticipantEngineWS.getStatus_1 [com.arjuna.wst.messaging.engines.CoordinatorCompletionParticipantEngineWS.getStatus_1] - Unknown error: {0}
-     */
-    public void getStatus(final NotificationType getStatus, final AddressingProperties addressingProperties, final ArjunaContextWS arjunaContext)
-    {
-	final StateWS current ;
-	synchronized(this)
-	{
-	    current = state ;
-	}
-	sendStatus(current) ;
-    }
-
-    /**
-     * Handle the status event.
-     * @param status The status type.
-     * @param addressingProperties The addressing context.
-     * @param arjunaContext The arjuna context.
-     */
-    public void status(final StatusType status, final AddressingProperties addressingProperties, final ArjunaContextWS arjunaContext)
-    {
-        // KEV - implement
-    }
-
-    /**
-     * Handle the soap fault event.
-     * @param soapFault The soap fault.
-     * @param addressingProperties The addressing context.
-     * @param arjunaContext The arjuna context.
-     */
-    public void soapFault(final SoapFault soapFault, final AddressingProperties addressingProperties, final ArjunaContextWS arjunaContext)
-    {
-	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 StateWS completed()
-    {
-        final StateWS current ;
-        synchronized(this)
-        {
-            current = state ;
-            if (current == StateWS.STATE_COMPLETING)
-            {
-                changeState(StateWS.STATE_COMPLETED) ;
-            }
-        }
-
-        if ((current == StateWS.STATE_COMPLETING) || (current == StateWS.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 StateWS exit()
-    {
-        final StateWS current ;
-        synchronized (this)
-        {
-            current = state ;
-            if ((current == StateWS.STATE_ACTIVE) || (current == StateWS.STATE_COMPLETING))
-            {
-                changeState(StateWS.STATE_EXITING) ;
-            }
-        }
-
-        if ((current == StateWS.STATE_ACTIVE) || (current == StateWS.STATE_COMPLETING) ||
-            (current == StateWS.STATE_EXITING))
-        {
-            sendExit() ;
-            return waitForState(StateWS.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 StateWS fail(final QName exceptionIdentifier)
-    {
-        final StateWS current ;
-        synchronized (this)
-        {
-            current = state ;
-            if (current == StateWS.STATE_ACTIVE)
-            {
-                changeState(StateWS.STATE_FAILING_ACTIVE) ;
-            }
-            else if (current == StateWS.STATE_CANCELING)
-            {
-        	changeState(StateWS.STATE_FAILING_CANCELING) ;
-            }
-            else if (current == StateWS.STATE_COMPLETING)
-            {
-        	changeState(StateWS.STATE_FAILING_COMPLETING) ;
-            }
-            else if (current == StateWS.STATE_COMPENSATING)
-            {
-                changeState(StateWS.STATE_FAILING_COMPENSATING) ;
-            }
-        }
-
-        if (current == StateWS.STATE_ACTIVE)
-        {
-            sendFail(exceptionIdentifier) ;
-            return waitForState(StateWS.STATE_FAILING_ACTIVE, TransportTimer.getTransportTimeout()) ;
-        }
-        else if (current == StateWS.STATE_CANCELING)
-        {
-            sendFail(exceptionIdentifier) ;
-            return waitForState(StateWS.STATE_FAILING_CANCELING, TransportTimer.getTransportTimeout()) ;
-        }
-        else if (current == StateWS.STATE_COMPLETING)
-        {
-            sendFail(exceptionIdentifier) ;
-            return waitForState(StateWS.STATE_FAILING_COMPLETING, TransportTimer.getTransportTimeout()) ;
-        }
-        else if (current == StateWS.STATE_COMPENSATING)
-        {
-            sendFail(exceptionIdentifier) ;
-            return waitForState(StateWS.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 StateWS cannotComplete()
-    {
-        final StateWS current ;
-        synchronized (this)
-        {
-            current = state ;
-            if ((current == StateWS.STATE_ACTIVE) || (current == StateWS.STATE_COMPLETING))
-            {
-                changeState(StateWS.STATE_NOT_COMPLETING) ;
-            }
-        }
-
-        if ((current == StateWS.STATE_ACTIVE) || (current == StateWS.STATE_COMPLETING) ||
-            (current == StateWS.STATE_NOT_COMPLETING))
-        {
-            sendCannotComplete() ;
-            return waitForState(StateWS.STATE_NOT_COMPLETING, TransportTimer.getTransportTimeout()) ;
-        }
-        return current ;
-    }
-
-    /**
-     * Handle the comms timeout event.
-     *
-     * Completed -> Completed (resend Completed)
-     */
-    private void commsTimeout()
-    {
-        final StateWS current ;
-        synchronized(this)
-        {
-            current = state ;
-        }
-
-        if (current == StateWS.STATE_COMPLETED)
-        {
-            sendCompleted() ;
-        }
-    }
-
-    /**
-     * Send the exit message.
-     *
-     * @message com.arjuna.wst.messaging.engines.CoordinatorCompletionParticipantEngineWS.sendExit_1 [com.arjuna.wst.messaging.engines.CoordinatorCompletionParticipantEngineWS.sendExit_1] - Unexpected exception while sending Exit
-     */
-    private void sendExit()
-    {
-        final AddressingProperties addressingProperties = createContext() ;
-        try
-        {
-            CoordinatorCompletionCoordinatorClientWS.getClient().sendExit(coordinator, addressingProperties, instanceIdentifier) ;
-        }
-        catch (final Throwable th)
-        {
-            if (WSTLogger.arjLoggerI18N.isDebugEnabled())
-            {
-                WSTLogger.arjLoggerI18N.debug("com.arjuna.wst.messaging.engines.CoordinatorCompletionParticipantEngineWS.sendExit_1", th) ;
-            }
-        }
-    }
-
-    /**
-     * Send the completed message.
-     *
-     * @message com.arjuna.wst.messaging.engines.CoordinatorCompletionParticipantEngineWS.sendCompleted_1 [com.arjuna.wst.messaging.engines.CoordinatorCompletionParticipantEngineWS.sendCompleted_1] - Unexpected exception while sending Completed
-     */
-    private void sendCompleted()
-    {
-        final AddressingProperties addressingProperties = createContext() ;
-        try
-        {
-            CoordinatorCompletionCoordinatorClientWS.getClient().sendCompleted(coordinator, addressingProperties, instanceIdentifier) ;
-        }
-        catch (final Throwable th)
-        {
-            if (WSTLogger.arjLoggerI18N.isDebugEnabled())
-            {
-                WSTLogger.arjLoggerI18N.debug("com.arjuna.wst.messaging.engines.CoordinatorCompletionParticipantEngineWS.sendCompleted_1", th) ;
-            }
-        }
-
-        initiateTimer() ;
-    }
-
-    /**
-     * Send the fail message.
-     * @param message The fail message.
-     *
-     * @message com.arjuna.wst.messaging.engines.CoordinatorCompletionParticipantEngineWS.sendFail_1 [com.arjuna.wst.messaging.engines.CoordinatorCompletionParticipantEngineWS.sendFail_1] - Unexpected exception while sending Fail
-     */
-    private void sendFail(final QName message)
-    {
-        final AddressingProperties addressingProperties = createContext() ;
-        try
-        {
-            CoordinatorCompletionCoordinatorClientWS.getClient().sendFail(coordinator, addressingProperties, instanceIdentifier, message) ;
-        }
-        catch (final Throwable th)
-        {
-            if (WSTLogger.arjLoggerI18N.isDebugEnabled())
-            {
-                WSTLogger.arjLoggerI18N.debug("com.arjuna.wst.messaging.engines.CoordinatorCompletionParticipantEngineWS.sendFail_1", th) ;
-            }
-        }
-    }
-
-    /**
-     * Send the cancelled message.
-     *
-     * @message com.arjuna.wst.messaging.engines.CoordinatorCompletionParticipantEngineWS.sendCancelled_1 [com.arjuna.wst.messaging.engines.CoordinatorCompletionParticipantEngineWS.sendCancelled_1] - Unexpected exception while sending Cancelled
-     */
-    private void sendCancelled()
-    {
-        final AddressingProperties addressingProperties = createContext() ;
-        try
-        {
-            CoordinatorCompletionCoordinatorClientWS.getClient().sendCancelled(coordinator, addressingProperties, instanceIdentifier) ;
-        }
-        catch (final Throwable th)
-        {
-            if (WSTLogger.arjLoggerI18N.isDebugEnabled())
-            {
-                WSTLogger.arjLoggerI18N.debug("com.arjuna.wst.messaging.engines.CoordinatorCompletionParticipantEngineWS.sendCancelled_1", th) ;
-            }
-        }
-    }
-
-    /**
-     * Send the closed message.
-     *
-     * @message com.arjuna.wst.messaging.engines.CoordinatorCompletionParticipantEngineWS.sendClosed_1 [com.arjuna.wst.messaging.engines.CoordinatorCompletionParticipantEngineWS.sendClosed_1] - Unexpected exception while sending Closed
-     */
-    private void sendClosed()
-    {
-        final AddressingProperties addressingProperties = createContext() ;
-        try
-        {
-            CoordinatorCompletionCoordinatorClientWS.getClient().sendClosed(coordinator, addressingProperties, instanceIdentifier) ;
-        }
-        catch (final Throwable th)
-        {
-            if (WSTLogger.arjLoggerI18N.isDebugEnabled())
-            {
-                WSTLogger.arjLoggerI18N.debug("com.arjuna.wst.messaging.engines.CoordinatorCompletionParticipantEngineWS.sendClosed_1", th) ;
-            }
-        }
-    }
-
-    /**
-     * Send the compensated message.
-     *
-     * @message com.arjuna.wst.messaging.engines.CoordinatorCompletionParticipantEngineWS.sendCompensated_1 [com.arjuna.wst.messaging.engines.CoordinatorCompletionParticipantEngineWS.sendCompensated_1] - Unexpected exception while sending Compensated
-     */
-    private void sendCompensated()
-    {
-        final AddressingProperties addressingProperties = createContext() ;
-        try
-        {
-            CoordinatorCompletionCoordinatorClientWS.getClient().sendCompensated(coordinator, addressingProperties, instanceIdentifier) ;
-        }
-        catch (final Throwable th)
-        {
-            if (WSTLogger.arjLoggerI18N.isDebugEnabled())
-            {
-                WSTLogger.arjLoggerI18N.debug("com.arjuna.wst.messaging.engines.CoordinatorCompletionParticipantEngineWS.sendCompensated_1", th) ;
-            }
-        }
-    }
-
-    /**
-     * Send the status message.
-     * @param state The state.
-     *
-     * @message com.arjuna.wst.messaging.engines.CoordinatorCompletionParticipantEngineWS.sendStatus_1 [com.arjuna.wst.messaging.engines.CoordinatorCompletionParticipantEngineWS.sendStatus_1] - Unexpected exception while sending Status
-     */
-    private void sendStatus(final StateWS state)
-    {
-        final AddressingProperties addressingProperties = createContext() ;
-        try
-        {
-            CoordinatorCompletionCoordinatorClientWS.getClient().sendStatus(coordinator, addressingProperties, instanceIdentifier, state.getValue()) ;
-        }
-        catch (final Throwable th)
-        {
-            if (WSTLogger.arjLoggerI18N.isDebugEnabled())
-            {
-                WSTLogger.arjLoggerI18N.debug("com.arjuna.wst.messaging.engines.CoordinatorCompletionParticipantEngineWS.sendStatus_1", th) ;
-            }
-        }
-    }
-
-    /**
-     * Send the cannot complete message.
-     *
-     * @message com.arjuna.wst.messaging.engines.CoordinatorCompletionParticipantEngineWS.sendCannotComplete_1 [com.arjuna.wst.messaging.engines.CoordinatorCompletionParticipantEngineWS.sendCannotComplete_1] - Unexpected exception while sending CannotComplete
-     */
-    private void sendCannotComplete()
-    {
-        final AddressingProperties addressingProperties = createContext() ;
-        try
-        {
-            CoordinatorCompletionCoordinatorClientWS.getClient().sendCannotComplete(coordinator, addressingProperties, instanceIdentifier) ;
-        }
-        catch (final Throwable th)
-        {
-            if (WSTLogger.arjLoggerI18N.isDebugEnabled())
-            {
-                WSTLogger.arjLoggerI18N.debug("com.arjuna.wst.messaging.engines.CoordinatorCompletionParticipantEngineWS.sendCannotComplete_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 W3CEndpointReference 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 StateWS 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 StateWS waitForState(final StateWS 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.CoordinatorCompletionParticipantEngineWS.executeCancel_1 [com.arjuna.wst.messaging.engines.CoordinatorCompletionParticipantEngineWS.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.CoordinatorCompletionParticipantEngineWS.executeCancel_1", th) ;
-            }
-            return ;
-        }
-        sendCancelled() ;
-        ended() ;
-    }
-
-    /**
-     * Execute the close transition.
-     *
-     * @message com.arjuna.wst.messaging.engines.CoordinatorCompletionParticipantEngineWS.executeClose_1 [com.arjuna.wst.messaging.engines.CoordinatorCompletionParticipantEngineWS.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.CoordinatorCompletionParticipantEngineWS.executeClose_1", th) ;
-            }
-            return ;
-        }
-        sendClosed() ;
-        ended() ;
-    }
-
-    /**
-     * Execute the compensate transition.
-     *
-     * @message com.arjuna.wst.messaging.engines.CoordinatorCompletionParticipantEngineWS.executeCompensate_1 [com.arjuna.wst.messaging.engines.CoordinatorCompletionParticipantEngineWS.executeCompensate_1] - Unexpected exception from participant compensate
-     */
-    private void executeCompensate()
-    {
-        try
-        {
-            participant.compensate() ;
-        }
-        catch (final FaultedException fe)
-        {
-            fail(ArjunaTXConstants.WSARJTX_ELEMENT_FAULTED_QNAME) ;
-        }
-        catch (final Throwable th)
-        {
-            final StateWS current ;
-            synchronized (this)
-            {
-                current = state ;
-                if (current == StateWS.STATE_COMPENSATING)
-                {
-                    changeState(StateWS.STATE_COMPLETED) ;
-                }
-            }
-            if (current == StateWS.STATE_COMPENSATING)
-            {
-                initiateTimer() ;
-            }
-
-            if (WSTLogger.arjLoggerI18N.isDebugEnabled())
-            {
-                WSTLogger.arjLoggerI18N.debug("com.arjuna.wst.messaging.engines.CoordinatorCompletionParticipantEngineWS.executeCompensate_1", th) ;
-            }
-            return ;
-        }
-
-        final StateWS current ;
-        synchronized (this)
-        {
-            current = state ;
-            if (current == StateWS.STATE_COMPENSATING)
-            {
-                ended() ;
-            }
-        }
-        if (current == StateWS.STATE_COMPENSATING)
-        {
-            sendCompensated() ;
-        }
-    }
-
-    /**
-     * Execute the complete transition.
-     *
-     * @message com.arjuna.wst.messaging.engines.CoordinatorCompletionParticipantEngineWS.executeComplete_1 [com.arjuna.wst.messaging.engines.CoordinatorCompletionParticipantEngineWS.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.CoordinatorCompletionParticipantEngineWS.executeComplete_1", th) ;
-            }
-            return ;
-        }
-
-        final StateWS current ;
-        synchronized (this)
-        {
-            current = state ;
-            if (current == StateWS.STATE_COMPLETING)
-            {
-                changeState(StateWS.STATE_COMPLETED) ;
-            }
-        }
-        if (current == StateWS.STATE_COMPLETING)
-        {
-            sendCompleted() ;
-        }
-    }
-
-    /**
-     * End the current participant.
-     */
-    private void ended()
-    {
-	changeState(StateWS.STATE_ENDED) ;
-        CoordinatorCompletionParticipantProcessorWS.getProcessor().deactivateParticipant(this) ;
-    }
-    
-    /**
-     * Initiate the timer.
-     */
-    private synchronized void initiateTimer()
-    {
-        if (timerTask != null)
-        {
-            timerTask.cancel() ;
-        }
-
-        if (state == StateWS.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 AddressingProperties createContext()
-    {
-        final String messageId = MessageIdWS.getMessageId() ;
-        return AddressingHelper.createNotificationContext(messageId) ;
-    }
-}
\ No newline at end of file

Deleted: labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/wst/messaging/engines/CoordinatorEngineWS.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/wst/messaging/engines/CoordinatorEngineWS.java	2008-01-25 17:05:33 UTC (rev 18123)
+++ labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/wst/messaging/engines/CoordinatorEngineWS.java	2008-01-25 17:18:13 UTC (rev 18124)
@@ -1,598 +0,0 @@
-package com.arjuna.wst.messaging.engines;
-
-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.wsaddrws.AddressingHelper;
-import com.arjuna.webservices.wsarj.ArjunaContextWS;
-import com.arjuna.webservices.wsarj.InstanceIdentifierWS;
-import com.arjuna.webservices.wsat.CoordinatorInboundEventsWS;
-import com.arjuna.webservices.wsat.StateWS;
-import com.arjuna.webservices.wsat.client.ParticipantClientWS;
-import com.arjuna.webservices.wsat.processors.CoordinatorProcessorWS;
-import com.arjuna.webservices.wscoor.CoordinationConstantsWS;
-import com.arjuna.wsc.messaging.MessageIdWS;
-import org.oasis_open.docs.ws_tx.wsat._2006._06.Notification;
-
-import javax.xml.namespace.QName;
-import javax.xml.ws.addressing.AddressingBuilder;
-import javax.xml.ws.addressing.AddressingProperties;
-import javax.xml.ws.addressing.AttributedURI;
-import javax.xml.ws.addressing.Relationship;
-import javax.xml.ws.wsaddressing.W3CEndpointReference;
-import java.util.TimerTask;
-
-/**
- * The coordinator state engine
- * @author kevin
- */
-public class CoordinatorEngineWS implements CoordinatorInboundEventsWS
-{
-    /**
-     * 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 InstanceIdentifierWS instanceIdentifier ;
-    /**
-     * The participant endpoint reference.
-     */
-    private final W3CEndpointReference participant ;
-    /**
-     * The current state.
-     */
-    private StateWS 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 CoordinatorEngineWS(final String id, final boolean durable, final W3CEndpointReference participant)
-    {
-        this(id, durable, participant, StateWS.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 CoordinatorEngineWS(final String id, final boolean durable, final W3CEndpointReference participant, final StateWS state)
-    {
-        this.id = id ;
-        this.instanceIdentifier = new InstanceIdentifierWS(id) ;
-        this.durable = durable ;
-        this.participant = participant ;
-        this.state = state ;
-        CoordinatorProcessorWS.getProcessor().activateCoordinator(this, id) ;
-    }
-
-    /**
-     * Handle the aborted event.
-     * @param aborted The aborted notification.
-     * @param addressingProperties The addressing context.
-     * @param arjunaContext The arjuna context.
-     *
-     * None -> None (ignore)
-     * Active -> Aborting (forget)
-     * Preparing -> Aborting (forget)
-     * PreparedSuccess -> PreparedSuccess (invalid state)
-     * Committing -> Committing (invalid state)
-     * Aborting -> Aborting (forget)
-     */
-    public synchronized void aborted(final Notification aborted, final AddressingProperties addressingProperties, final ArjunaContextWS arjunaContext)
-    {
-        final StateWS current = state ;
-        if (current == StateWS.STATE_ACTIVE)
-        {
-            changeStateWS(StateWS.STATE_ABORTING) ;
-        }
-        else if ((current == StateWS.STATE_PREPARING) || (current == StateWS.STATE_ABORTING))
-        {
-            forget() ;
-        }
-    }
-
-    /**
-     * Handle the committed event.
-     * @param committed The committed notification.
-     * @param addressingProperties The addressing context.
-     * @param arjunaContext The arjuna context.
-     *
-     * None -> None (ignore)
-     * Active -> Aborting (invalid state)
-     * Preparing -> Aborting (invalid state)
-     * PreparedSuccess -> PreparedSuccess (invalid state)
-     * Committing -> Committing (forget)
-     * Aborting -> Aborting (invalid state)
-     */
-    public synchronized void committed(final Notification committed, final AddressingProperties addressingProperties, final ArjunaContextWS arjunaContext)
-    {
-        final StateWS current = state ;
-        if (current == StateWS.STATE_ACTIVE)
-        {
-            changeStateWS(StateWS.STATE_ABORTING) ;
-        }
-        else if ((current == StateWS.STATE_PREPARING) || (current == StateWS.STATE_COMMITTING))
-        {
-            forget() ;
-        }
-    }
-
-    /**
-     * Handle the prepared event.
-     * @param prepared The prepared notification.
-     * @param addressingProperties The addressing context.
-     * @param arjunaContext The arjuna context.
-     *
-     * None -> Durable: (send rollback), Volatile: Invalid state: none
-     * 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 Notification prepared, final AddressingProperties addressingProperties, final ArjunaContextWS arjunaContext)
-    {
-        final StateWS current ;
-        synchronized(this)
-        {
-            current = state ;
-            if (current == StateWS.STATE_ACTIVE)
-            {
-                changeStateWS(StateWS.STATE_ABORTING) ;
-            }
-            else if (current == StateWS.STATE_PREPARING)
-            {
-                changeStateWS(StateWS.STATE_PREPARED_SUCCESS) ;
-            }
-        }
-        if (current == StateWS.STATE_COMMITTING)
-        {
-            sendCommit() ;
-        }
-        else if ((current == StateWS.STATE_ABORTING) || ((current == null) && !readOnly))
-        {
-            if (durable)
-            {
-                sendRollback() ;
-            }
-            else
-            {
-        	    sendInvalidStateWS(addressingProperties, arjunaContext) ;
-            }
-            if (current != null)
-            {
-        	forget() ;
-            }
-        }
-    }
-
-    /**
-     * Handle the readOnly event.
-     * @param readOnly The readOnly notification.
-     * @param addressingProperties The addressing context.
-     * @param arjunaContext The arjuna context.
-     *
-     * None -> None (ignore)
-     * Active -> Active (forget)
-     * Preparing -> Preparing (forget)
-     * PreparedSuccess -> PreparedSuccess (invalid state)
-     * Committing -> Committing (invalid state)
-     * Aborting -> Aborting (forget)
-     */
-    public synchronized void readOnly(final Notification readOnly, final AddressingProperties addressingProperties, final ArjunaContextWS arjunaContext)
-    {
-        final StateWS current = state ;
-        if ((current == StateWS.STATE_ACTIVE) || (current == StateWS.STATE_PREPARING) ||
-            (current == StateWS.STATE_ABORTING))
-        {
-            if (current != StateWS.STATE_ABORTING)
-            {
-                this.readOnly = true ;
-            }
-            forget() ;
-        }
-    }
-
-    /**
-     * Handle the soap fault event.
-     * @param soapFault The soap fault.
-     * @param addressingProperties The addressing context.
-     * @param arjunaContext The arjuna context.
-     *
-     * @message com.arjuna.wst.messaging.engines.CoordinatorEngineWS.soapFault_1 [com.arjuna.wst.messaging.engines.CoordinatorEngineWS.soapFault_1] - Unexpected SOAP fault for coordinator {0}: {1} {2}
-     */
-    public void soapFault(final SoapFault soapFault, final AddressingProperties addressingProperties, final ArjunaContextWS arjunaContext)
-    {
-        if (WSTLogger.arjLoggerI18N.isDebugEnabled())
-        {
-            final InstanceIdentifierWS instanceIdentifier = arjunaContext.getInstanceIdentifier() ;
-            final SoapFaultType soapFaultType = soapFault.getSoapFaultType() ;
-            final QName subCode = soapFault.getSubcode() ;
-            WSTLogger.arjLoggerI18N.debug("com.arjuna.wst.messaging.engines.CoordinatorEngineWS.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 StateWS prepare()
-    {
-        final StateWS current ;
-        synchronized(this)
-        {
-            current = state ;
-            if (current == StateWS.STATE_ACTIVE)
-            {
-                changeStateWS(StateWS.STATE_PREPARING) ;
-            }
-        }
-
-        if ((current == StateWS.STATE_ACTIVE) || (current == StateWS.STATE_PREPARING))
-        {
-            sendPrepare() ;
-        }
-
-        final StateWS result = waitForStateWS(StateWS.STATE_PREPARING, TransportTimer.getTransportTimeout()) ;
-        if (result != StateWS.STATE_PREPARING)
-        {
-            return result ;
-        }
-
-        synchronized(this)
-        {
-            if ((state == StateWS.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 StateWS commit()
-    {
-        final StateWS current ;
-        synchronized(this)
-        {
-            current = state ;
-            if (current == StateWS.STATE_PREPARED_SUCCESS)
-            {
-                changeStateWS(StateWS.STATE_COMMITTING) ;
-            }
-        }
-
-        if ((current == StateWS.STATE_PREPARED_SUCCESS) || (current == StateWS.STATE_COMMITTING))
-        {
-            sendCommit() ;
-        }
-
-        final StateWS result = waitForStateWS(StateWS.STATE_COMMITTING, TransportTimer.getTransportTimeout()) ;
-        if (result != StateWS.STATE_COMMITTING)
-        {
-            return result ;
-        }
-
-        synchronized(this)
-        {
-            if ((state == StateWS.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 StateWS rollback()
-    {
-        final StateWS current ;
-        synchronized(this)
-        {
-            current = state ;
-            if ((current == StateWS.STATE_ACTIVE) || (current == StateWS.STATE_PREPARING) ||
-                (current == StateWS.STATE_PREPARED_SUCCESS))
-            {
-                changeStateWS(StateWS.STATE_ABORTING) ;
-            }
-        }
-
-        if ((current == StateWS.STATE_ACTIVE) || (current == StateWS.STATE_PREPARING) ||
-            (current == StateWS.STATE_PREPARED_SUCCESS))
-        {
-            sendRollback() ;
-        }
-        else if (current == StateWS.STATE_ABORTING)
-        {
-            forget() ;
-        }
-
-        return waitForStateWS(StateWS.STATE_ABORTING, TransportTimer.getTransportTimeout()) ;
-    }
-
-    /**
-     * Handle the comms timeout event.
-     *
-     * Preparing -> Preparing (resend Prepare)
-     * Committing -> Committing (resend Commit)
-     */
-    private void commsTimeout()
-    {
-        final StateWS current ;
-        synchronized(this)
-        {
-            current = state ;
-        }
-
-        if (current == StateWS.STATE_PREPARING)
-        {
-            sendPrepare() ;
-        }
-        else if (current == StateWS.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 W3CEndpointReference 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 changeStateWS(final StateWS state)
-    {
-        if (this.state != state)
-        {
-            this.state = state ;
-            notifyAll() ;
-        }
-    }
-
-    /**
-     * Wait for the state to change from the specified state.
-     * @param origStateWS The original state.
-     * @param delay The maximum time to wait for (in milliseconds).
-     * @return The current state.
-     */
-    private StateWS waitForStateWS(final StateWS origStateWS, final long delay)
-    {
-        final long end = System.currentTimeMillis() + delay ;
-        synchronized(this)
-        {
-            while(state == origStateWS)
-            {
-                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()
-    {
-        changeStateWS(null) ;
-        CoordinatorProcessorWS.getProcessor().deactivateCoordinator(this) ;
-    }
-
-    /**
-     * Send the prepare message.
-     *
-     * @message com.arjuna.wst.messaging.engines.CoordinatorEngineWS.sendPrepare_1 [com.arjuna.wst.messaging.engines.CoordinatorEngineWS.sendPrepare_1] - Unexpecting exception while sending Prepare
-     */
-    private void sendPrepare()
-    {
-        try
-        {
-            ParticipantClientWS.getClient().sendPrepare(participant, createContext(), instanceIdentifier) ;
-        }
-        catch (final Throwable th)
-        {
-            if (WSTLogger.arjLoggerI18N.isDebugEnabled())
-            {
-                WSTLogger.arjLoggerI18N.debug("com.arjuna.wst.messaging.engines.CoordinatorEngineWS.sendPrepare_1", th) ;
-            }
-        }
-
-        initiateTimer() ;
-    }
-
-    /**
-     * Send the commit message.
-     *
-     * @message com.arjuna.wst.messaging.engines.CoordinatorEngineWS.sendCommit_1 [com.arjuna.wst.messaging.engines.CoordinatorEngineWS.sendCommit_1] - Unexpecting exception while sending Commit
-     */
-    private void sendCommit()
-    {
-        try
-        {
-            ParticipantClientWS.getClient().sendCommit(participant, createContext(), instanceIdentifier) ;
-        }
-        catch (final Throwable th)
-        {
-            if (WSTLogger.arjLoggerI18N.isDebugEnabled())
-            {
-                WSTLogger.arjLoggerI18N.debug("com.arjuna.wst.messaging.engines.CoordinatorEngineWS.sendCommit_1", th) ;
-            }
-        }
-
-        initiateTimer() ;
-    }
-
-    /**
-     * Send the rollback message.
-     *
-     * @message com.arjuna.wst.messaging.engines.CoordinatorEngineWS.sendRollback_1 [com.arjuna.wst.messaging.engines.CoordinatorEngineWS.sendRollback_1] - Unexpecting exception while sending Rollback
-     */
-    private void sendRollback()
-    {
-        try
-        {
-            ParticipantClientWS.getClient().sendRollback(participant, createContext(), instanceIdentifier) ;
-        }
-        catch (final Throwable th)
-        {
-            if (WSTLogger.arjLoggerI18N.isDebugEnabled())
-            {
-                WSTLogger.arjLoggerI18N.debug("com.arjuna.wst.messaging.engines.CoordinatorEngineWS.sendRollback_1", th) ;
-            }
-        }
-    }
-
-    /**
-     * Send the InvalidStateWS message.
-     *
-     * @message com.arjuna.wst.messaging.engines.CoordinatorEngineWS.sendInvalidStateWS_1 [com.arjuna.wst.messaging.engines.CoordinatorEngineWS.sendInvalidStateWS_1] - Inconsistent internal state.
-     * @message com.arjuna.wst.messaging.engines.CoordinatorEngineWS.sendInvalidStateWS_2 [com.arjuna.wst.messaging.engines.CoordinatorEngineWS.sendInvalidStateWS_2] - Unexpecting exception while sending InvalidStateWS
-     */
-    private void sendInvalidStateWS(final AddressingProperties addressingProperties, final ArjunaContextWS arjunaContext)
-    {
-        try
-        {
-            final AddressingProperties responseContext = createContext() ;
-            final AttributedURI messageId = addressingProperties.getMessageID() ;
-            final InstanceIdentifierWS instanceIdentifier = arjunaContext.getInstanceIdentifier() ;
-            if (messageId != null)
-            {
-                AddressingBuilder builder = AddressingBuilder.getAddressingBuilder();
-                Relationship[] relatesTo = new Relationship[] { builder.newRelationship(messageId.getURI()) };
-                responseContext.setRelatesTo(relatesTo);
-            }
-
-            final String message = WSTLogger.log_mesg.getString("com.arjuna.wst.messaging.engines.CoordinatorEngineWS.sendInvalidStateWS_1") ;
-            final SoapFault soapFault = new SoapFault(SoapFaultType.FAULT_SENDER, CoordinationConstantsWS.WSCOOR_ERROR_CODE_INVALID_STATE_QNAME, message) ;
-            ParticipantClientWS.getClient().sendSoapFault(participant, responseContext, soapFault, instanceIdentifier) ;
-        }
-        catch (final Throwable th)
-        {
-            if (WSTLogger.arjLoggerI18N.isDebugEnabled())
-            {
-                WSTLogger.arjLoggerI18N.debug("com.arjuna.wst.messaging.engines.CoordinatorEngineWS.sendInvalidStateWS_2", th) ;
-            }
-        }
-    }
-
-    /**
-     * Initiate the timer.
-     */
-    private synchronized void initiateTimer()
-    {
-        if (timerTask != null)
-        {
-            timerTask.cancel() ;
-        }
-        if ((state == StateWS.STATE_PREPARING) || (state == StateWS.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 AddressingProperties createContext()
-    {
-        final String messageId = MessageIdWS.getMessageId() ;
-        return AddressingHelper.createNotificationContext(messageId) ;
-    }
-}

Deleted: labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/wst/messaging/engines/ParticipantCompletionCoordinatorEngineWS.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/wst/messaging/engines/ParticipantCompletionCoordinatorEngineWS.java	2008-01-25 17:05:33 UTC (rev 18123)
+++ labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/wst/messaging/engines/ParticipantCompletionCoordinatorEngineWS.java	2008-01-25 17:18:13 UTC (rev 18124)
@@ -1,875 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. 
- * 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 com.arjuna.webservices.SoapFault;
-import com.arjuna.webservices.logging.WSTLogger;
-import com.arjuna.webservices.util.TransportTimer;
-import com.arjuna.webservices.wsaddrws.AddressingHelper;
-import com.arjuna.webservices.wsarj.ArjunaContextWS;
-import com.arjuna.webservices.wsarj.InstanceIdentifierWS;
-import com.arjuna.webservices.wsba.ParticipantCompletionCoordinatorInboundEventsWS;
-import com.arjuna.webservices.wsba.StateWS;
-import com.arjuna.webservices.wsba.client.ParticipantCompletionParticipantClientWS;
-import com.arjuna.webservices.wsba.processors.ParticipantCompletionCoordinatorProcessorWS;
-import com.arjuna.wsc.messaging.MessageIdWS;
-import com.arjuna.wst.BAParticipantManagerWS;
-import org.oasis_open.docs.ws_tx.wsba._2006._06.ExceptionType;
-import org.oasis_open.docs.ws_tx.wsba._2006._06.NotificationType;
-import org.oasis_open.docs.ws_tx.wsba._2006._06.StatusType;
-
-import javax.xml.namespace.QName;
-import javax.xml.ws.addressing.AddressingProperties;
-import javax.xml.ws.wsaddressing.W3CEndpointReference;
-
-/**
- * The participant completion coordinator state engine
- * @author kevin                     cannot
- */
-public class ParticipantCompletionCoordinatorEngineWS implements ParticipantCompletionCoordinatorInboundEventsWS
-{
-    /**
-     * The coordinator id.
-     */
-    private final String id ;
-    /**
-     * The instance identifier.
-     */
-    private final InstanceIdentifierWS instanceIdentifier ;
-    /**
-     * The participant endpoint reference.
-     */
-    private final W3CEndpointReference participant ;
-    /**
-     * The associated coordinator
-     */
-    private BAParticipantManagerWS coordinator ;
-    /**
-     * The current state.
-     */
-    private StateWS state ;
-
-    /**
-     * Construct the initial engine for the coordinator.
-     * @param id The coordinator id.
-     * @param participant The participant endpoint reference.
-     */
-    public ParticipantCompletionCoordinatorEngineWS(final String id, final W3CEndpointReference participant)
-    {
-        this(id, participant, StateWS.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 ParticipantCompletionCoordinatorEngineWS(final String id, final W3CEndpointReference participant,
-        final StateWS state)
-    {
-        this.id = id ;
-        this.instanceIdentifier = new InstanceIdentifierWS(id) ;
-        this.participant = participant ;
-        this.state = state ;
-    }
-
-    /**
-     * Set the coordinator and register
-     * @param coordinator
-     */
-    public void setCoordinator(final BAParticipantManagerWS coordinator)
-    {
-        this.coordinator = coordinator ;
-        ParticipantCompletionCoordinatorProcessorWS.getProcessor().activateCoordinator(this, id) ;
-    }
-
-    /**
-     * Handle the cancelled event.
-     * @param cancelled The cancelled notification.
-     * @param addressingProperties The addressing context.
-     * @param arjunaContext The arjuna 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 AddressingProperties addressingProperties, final ArjunaContextWS arjunaContext)
-    {
-        final StateWS current ;
-        synchronized(this)
-        {
-            current = state ;
-            if (current == StateWS.STATE_CANCELING)
-            {
-                ended() ;
-            }
-        }
-    }
-
-    /**
-     * Handle the closed event.
-     * @param closed The closed notification.
-     * @param addressingProperties The addressing context.
-     * @param arjunaContext The arjuna 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 AddressingProperties addressingProperties, final ArjunaContextWS arjunaContext)
-    {
-        final StateWS current ;
-        synchronized(this)
-        {
-            current = state ;
-            if (current == StateWS.STATE_CLOSING)
-            {
-                ended() ;
-            }
-        }
-    }
-
-    /**
-     * Handle the compensated event.
-     * @param compensated The compensated notification.
-     * @param addressingProperties The addressing context.
-     * @param arjunaContext The arjuna 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 AddressingProperties addressingProperties, final ArjunaContextWS arjunaContext)
-    {
-        final StateWS current ;
-        synchronized(this)
-        {
-            current = state ;
-            if (current == StateWS.STATE_COMPENSATING)
-            {
-                ended() ;
-            }
-        }
-    }
-
-    /**
-     * Handle the completed event.
-     * @param completed The completed notification.
-     * @param addressingProperties The addressing context.
-     * @param arjunaContext The arjuna 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 AddressingProperties addressingProperties,
-        final ArjunaContextWS arjunaContext)
-    {
-        final StateWS current ;
-        synchronized(this)
-        {
-            current = state ;
-            if (current == StateWS.STATE_ACTIVE)
-            {
-                changeState(StateWS.STATE_COMPLETED) ;
-            }
-            else if (current == StateWS.STATE_CANCELING)
-            {
-        	state = StateWS.STATE_COMPENSATING ;
-            }
-        }
-
-        if (current == StateWS.STATE_ACTIVE)
-        {
-            executeCompleted() ;
-        }
-        else if (current == StateWS.STATE_CLOSING)
-        {
-            sendClose() ;
-        }
-        else if ((current == StateWS.STATE_CANCELING) || (current == StateWS.STATE_COMPENSATING))
-        {
-            sendCompensate() ;
-        }
-    }
-
-    /**
-     * Handle the exit event.
-     * @param exit The exit notification.
-     * @param addressingProperties The addressing context.
-     * @param arjunaContext The arjuna 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 AddressingProperties addressingProperties, final ArjunaContextWS arjunaContext)
-    {
-        final StateWS current ;
-        synchronized(this)
-        {
-            current = state ;
-            if ((current == StateWS.STATE_ACTIVE) || (current == StateWS.STATE_CANCELING))
-            {
-                changeState(StateWS.STATE_EXITING) ;
-            }
-        }
-
-        if ((current == StateWS.STATE_ACTIVE) || (current == StateWS.STATE_CANCELING))
-        {
-            executeExit() ;
-        }
-        else if (current == StateWS.STATE_ENDED)
-        {
-            sendExited() ;
-        }
-    }
-
-    /**
-     * Handle the fail event.
-     * @param fail The fail exception.
-     * @param addressingProperties The addressing context.
-     * @param arjunaContext The arjuna 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 AddressingProperties addressingProperties,
-        final ArjunaContextWS arjunaContext)
-    {
-        final StateWS current ;
-        synchronized(this)
-        {
-            current = state ;
-            if (current == StateWS.STATE_ACTIVE)
-            {
-        	changeState(StateWS.STATE_FAILING_ACTIVE) ;
-            }
-            else if (current == StateWS.STATE_CANCELING)
-            {
-                changeState(StateWS.STATE_FAILING_CANCELING) ;
-            }
-            else if (current == StateWS.STATE_COMPENSATING)
-            {
-                changeState(StateWS.STATE_FAILING_COMPENSATING) ;
-            }
-        }
-
-        if (current == StateWS.STATE_ACTIVE)
-        {
-            executeFail(fail.getExceptionIdentifier()) ;
-        }
-        else if ((current == StateWS.STATE_CANCELING) || (current == StateWS.STATE_COMPENSATING))
-        {
-            sendFailed() ;
-            ended() ;
-        }
-        else if (current == StateWS.STATE_ENDED)
-        {
-            sendFailed() ;
-        }
-    }
-
-    /**
-     * Handle the cannot complete event.
-     * @param cannotComplete The cannotComplete exception.
-     * @param addressingProperties The addressing context.
-     * @param arjunaContext The arjuna 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 AddressingProperties addressingProperties,
-        final ArjunaContextWS arjunaContext)
-    {
-        final StateWS current ;
-        synchronized(this)
-        {
-            current = state ;
-            if ((current == StateWS.STATE_ACTIVE) || (state == StateWS.STATE_CANCELING))
-            {
-                changeState(StateWS.STATE_NOT_COMPLETING) ;
-            }
-        }
-
-        if ((current == StateWS.STATE_ACTIVE) || (current == StateWS.STATE_CANCELING))
-        {
-            executeCannotComplete() ;
-        }
-        else if (current == StateWS.STATE_ENDED)
-        {
-            sendNotCompleted() ;
-        }
-    }
-    /**
-     * Handle the getStatus event.
-     * @param getStatus The getStatus notification.
-     * @param addressingProperties The addressing context.
-     * @param arjunaContext The arjuna context.
-     */
-    public void getStatus(final NotificationType getStatus, final AddressingProperties addressingProperties, final ArjunaContextWS arjunaContext)
-    {
-	final StateWS current ;
-	synchronized(this)
-	{
-	    current = state ;
-	}
-        sendStatus(current) ;
-    }
-
-    /**
-     * Handle the status event.
-     * @param status The status.
-     * @param addressingProperties The addressing context.
-     * @param arjunaContext The arjuna context.
-     */
-    public void status(final StatusType status, final AddressingProperties addressingProperties, final ArjunaContextWS arjunaContext)
-    {
-        // TODO - is this correct?
-
-        final StateWS current ;
-	    synchronized(this)
-	    {
-	        current = state ;
-	    }
-        sendStatus(current) ;
-    }
-
-    /**
-     * Handle the get status event.
-     * @return The state.
-     */
-    public synchronized StateWS 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 StateWS cancel()
-    {
-        final StateWS current ;
-        synchronized(this)
-        {
-            current = state ;
-            if (current == StateWS.STATE_ACTIVE)
-            {
-                changeState(StateWS.STATE_CANCELING) ;
-            }
-        }
-
-        if ((current == StateWS.STATE_ACTIVE) || (current == StateWS.STATE_CANCELING))
-        {
-            sendCancel() ;
-            return waitForState(StateWS.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 StateWS compensate()
-    {
-        final StateWS current ;
-        synchronized(this)
-        {
-            current = state ;
-            if (current == StateWS.STATE_COMPLETED)
-            {
-                changeState(StateWS.STATE_COMPENSATING) ;
-            }
-        }
-
-        if ((current == StateWS.STATE_COMPLETED) || (current == StateWS.STATE_COMPENSATING))
-        {
-            sendCompensate() ;
-            return waitForState(StateWS.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 StateWS close()
-    {
-        final StateWS current ;
-        synchronized(this)
-        {
-            current = state ;
-            if (current == StateWS.STATE_COMPLETED)
-            {
-                changeState(StateWS.STATE_CLOSING) ;
-            }
-        }
-
-        if ((current == StateWS.STATE_COMPLETED) || (current == StateWS.STATE_CLOSING))
-        {
-            sendClose() ;
-            return waitForState(StateWS.STATE_CLOSING, TransportTimer.getTransportTimeout()) ;
-        }
-        return current ;
-    }
-
-    /**
-     * Handle the soap fault event.
-     * @param soapFault The soap fault.
-     * @param addressingProperties The addressing context.
-     * @param arjunaContext The arjuna context.
-     */
-    public void soapFault(final SoapFault soapFault, final AddressingProperties addressingProperties, final ArjunaContextWS arjunaContext)
-    {
-	ended() ;
-	try
-	{
-	    // TODO - we cannot do this with JaxWS. need to log something
-	}
-	catch (final Throwable th) {} // ignore
-    }
-
-    /**
-     * Send the close message.
-     *
-     * @message com.arjuna.wst.messaging.engines.ParticipantCompletionCoordinatorEngineWS.sendClose_1 [com.arjuna.wst.messaging.engines.ParticipantCompletionCoordinatorEngineWS.sendClose_1] - Unexpected exception while sending Close
-     */
-    private void sendClose()
-    {
-        final AddressingProperties addressingProperties = createContext() ;
-        try
-        {
-            ParticipantCompletionParticipantClientWS.getClient().sendClose(participant, addressingProperties, instanceIdentifier) ;
-        }
-        catch (final Throwable th)
-        {
-            if (WSTLogger.arjLoggerI18N.isDebugEnabled())
-            {
-                WSTLogger.arjLoggerI18N.debug("com.arjuna.wst.messaging.engines.ParticipantCompletionCoordinatorEngineWS.sendClose_1", th) ;
-            }
-        }
-    }
-
-    /**
-     * Send the compensate message.
-     *
-     * @message com.arjuna.wst.messaging.engines.ParticipantCompletionCoordinatorEngineWS.sendCompensate_1 [com.arjuna.wst.messaging.engines.ParticipantCompletionCoordinatorEngineWS.sendCompensate_1] - Unexpected exception while sending Compensate
-     */
-    private void sendCompensate()
-    {
-        final AddressingProperties addressingProperties = createContext() ;
-        try
-        {
-            ParticipantCompletionParticipantClientWS.getClient().sendCompensate(participant, addressingProperties, instanceIdentifier) ;
-        }
-        catch (final Throwable th)
-        {
-            if (WSTLogger.arjLoggerI18N.isDebugEnabled())
-            {
-                WSTLogger.arjLoggerI18N.debug("com.arjuna.wst.messaging.engines.ParticipantCompletionCoordinatorEngineWS.sendCompensate_1", th) ;
-            }
-        }
-    }
-
-    /**
-     * Send the cancel message.
-     *
-     * @message com.arjuna.wst.messaging.engines.ParticipantCompletionCoordinatorEngineWS.sendCancel_1 [com.arjuna.wst.messaging.engines.ParticipantCompletionCoordinatorEngineWS.sendCancel_1] - Unexpected exception while sending Cancel
-     */
-    private void sendCancel()
-    {
-        final AddressingProperties addressingProperties = createContext() ;
-        try
-        {
-            ParticipantCompletionParticipantClientWS.getClient().sendCancel(participant, addressingProperties, instanceIdentifier) ;
-        }
-        catch (final Throwable th)
-        {
-            if (WSTLogger.arjLoggerI18N.isDebugEnabled())
-            {
-                WSTLogger.arjLoggerI18N.debug("com.arjuna.wst.messaging.engines.ParticipantCompletionCoordinatorEngineWS.sendCancel_1", th) ;
-            }
-        }
-    }
-
-    /**
-     * Send the exited message.
-     *
-     * @message com.arjuna.wst.messaging.engines.ParticipantCompletionCoordinatorEngineWS.sendExited_1 [com.arjuna.wst.messaging.engines.ParticipantCompletionCoordinatorEngineWS.sendExited_1] - Unexpected exception while sending Exited
-     */
-    private void sendExited()
-    {
-        final AddressingProperties addressingProperties  = createContext() ;
-        try
-        {
-            ParticipantCompletionParticipantClientWS.getClient().sendExited(participant, addressingProperties, instanceIdentifier) ;
-        }
-        catch (final Throwable th)
-        {
-            if (WSTLogger.arjLoggerI18N.isDebugEnabled())
-            {
-                WSTLogger.arjLoggerI18N.debug("com.arjuna.wst.messaging.engines.ParticipantCompletionCoordinatorEngineWS.sendExited_1", th) ;
-            }
-        }
-    }
-
-    /**
-     * Send the faulted message.
-     *
-     * @message com.arjuna.wst.messaging.engines.ParticipantCompletionCoordinatorEngineWS.sendFailed_1 [com.arjuna.wst.messaging.engines.ParticipantCompletionCoordinatorEngineWS.sendFailed_1] - Unexpected exception while sending Faulted
-     */
-    private void sendFailed()
-    {
-        final AddressingProperties addressingProperties = createContext() ;
-        try
-        {
-            ParticipantCompletionParticipantClientWS.getClient().sendFailed(participant, addressingProperties, instanceIdentifier) ;
-        }
-        catch (final Throwable th)
-        {
-            if (WSTLogger.arjLoggerI18N.isDebugEnabled())
-            {
-                WSTLogger.arjLoggerI18N.debug("com.arjuna.wst.messaging.engines.ParticipantCompletionCoordinatorEngineWS.sendFailed_1", th) ;
-            }
-        }
-    }
-
-    /**
-     * Send the not completed message.
-     *
-     * @message com.arjuna.wst.messaging.engines.ParticipantCompletionCoordinatorEngineWS.sendNotCompleted_1 [com.arjuna.wst.messaging.engines.ParticipantCompletionCoordinatorEngineWS.sendNotCompleted_1] - Unexpected exception while sending NotCompleted
-     */
-    private void sendNotCompleted()
-    {
-        final AddressingProperties addressingProperties = createContext() ;
-        try
-        {
-            ParticipantCompletionParticipantClientWS.getClient().sendNotCompleted(participant, addressingProperties, instanceIdentifier) ;
-        }
-        catch (final Throwable th)
-        {
-            if (WSTLogger.arjLoggerI18N.isDebugEnabled())
-            {
-                WSTLogger.arjLoggerI18N.debug("com.arjuna.wst.messaging.engines.ParticipantCompletionCoordinatorEngineWS.sendNotCompleted_1", th) ;
-            }
-        }
-    }
-
-    /**
-     * Send the status message.
-     * @param state The state.
-     *
-     * @message com.arjuna.wst.messaging.engines.ParticipantCompletionCoordinatorEngineWS.sendStatus_1 [com.arjuna.wst.messaging.engines.ParticipantCompletionCoordinatorEngineWS.sendStatus_1] - Unexpected exception while sending Status
-     */
-    private void sendStatus(final StateWS state)
-    {
-        final AddressingProperties addressingProperties = createContext() ;
-        try
-        {
-            ParticipantCompletionParticipantClientWS.getClient().sendStatus(participant, addressingProperties, instanceIdentifier, state.getValue()) ;
-        }
-        catch (final Throwable th)
-        {
-            if (WSTLogger.arjLoggerI18N.isDebugEnabled())
-            {
-                WSTLogger.arjLoggerI18N.debug("com.arjuna.wst.messaging.engines.ParticipantCompletionCoordinatorEngineWS.sendStatus_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 W3CEndpointReference getParticipant()
-    {
-        return participant ;
-    }
-
-    /**
-     * Get the associated coordinator.
-     * @return The associated coordinator.
-     */
-    public BAParticipantManagerWS getCoordinator()
-    {
-        return coordinator;
-    }
-
-    /**
-     * Change the state and notify any listeners.
-     * @param state The new state.
-     */
-    private synchronized void changeState(final StateWS 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 StateWS waitForState(final StateWS 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.ParticipantCompletionCoordinatorEngineWS.executeCompleted_1 [com.arjuna.wst.messaging.engines.ParticipantCompletionCoordinatorEngineWS.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.ParticipantCompletionCoordinatorEngineWS.executeCompleted_1", th) ;
-            }
-        }
-    }
-
-    /**
-     * Execute the exit transition.
-     *
-     * @message com.arjuna.wst.messaging.engines.ParticipantCompletionCoordinatorEngineWS.executeExit_1 [com.arjuna.wst.messaging.engines.ParticipantCompletionCoordinatorEngineWS.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.ParticipantCompletionCoordinatorEngineWS.executeExit_1", th) ;
-            }
-            return ;
-        }
-        sendExited() ;
-        ended() ;
-    }
-
-    /**
-     * Executing the fail transition.
-     *
-     * @throws com.arjuna.webservices.SoapFault for SOAP errors.
-     * @throws java.io.IOException for transport errors.
-     *
-     * @message com.arjuna.wst.messaging.engines.ParticipantCompletionCoordinatorEngineWS.executeFault_1 [com.arjuna.wst.messaging.engines.ParticipantCompletionCoordinatorEngineWS.executeFault_1] - Unexpected exception from coordinator fault
-     */
-    private void executeFail(QName fail)
-    {
-        try
-        {
-            coordinator.fail(fail) ;
-        }
-        catch (final Throwable th)
-        {
-            if (WSTLogger.arjLoggerI18N.isDebugEnabled())
-            {
-                WSTLogger.arjLoggerI18N.debug("com.arjuna.wst.messaging.engines.ParticipantCompletionCoordinatorEngineWS.executeFault_1", th) ;
-            }
-            return ;
-        }
-        sendFailed() ;
-        ended() ;
-    }
-
-    /**
-     * Executing the cannot complete transition.
-     *
-     * @throws SoapFault for SOAP errors.
-     *
-     * @message com.arjuna.wst.messaging.engines.ParticipantCompletionCoordinatorEngineWS.executeCannotComplete_1 [com.arjuna.wst.messaging.engines.ParticipantCompletionCoordinatorEngineWS.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.ParticipantCompletionCoordinatorEngineWS.executeCannotComplete_1", th) ;
-            }
-            return ;
-        }
-        sendNotCompleted() ;
-        ended() ;
-    }
-    /**
-     * End the current coordinator.
-     */
-    private void ended()
-    {
-        changeState(StateWS.STATE_ENDED) ;
-        ParticipantCompletionCoordinatorProcessorWS.getProcessor().deactivateCoordinator(this) ;
-    }
-
-    /**
-     * Create a context for the outgoing message.
-     * @return The addressing context.
-     */
-    private AddressingProperties createContext()
-    {
-        final String messageId = MessageIdWS.getMessageId() ;
-        return AddressingHelper.createNotificationContext(messageId);
-    }
-}
\ No newline at end of file

Deleted: labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/wst/messaging/engines/ParticipantCompletionParticipantEngineWS.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/wst/messaging/engines/ParticipantCompletionParticipantEngineWS.java	2008-01-25 17:05:33 UTC (rev 18123)
+++ labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/wst/messaging/engines/ParticipantCompletionParticipantEngineWS.java	2008-01-25 17:18:13 UTC (rev 18124)
@@ -1,953 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. 
- * 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 com.arjuna.webservices.SoapFault;
-import com.arjuna.webservices.logging.WSTLogger;
-import com.arjuna.webservices.util.TransportTimer;
-import com.arjuna.webservices.wsaddrws.AddressingHelper;
-import com.arjuna.webservices.wsarj.ArjunaContextWS;
-import com.arjuna.webservices.wsarj.InstanceIdentifierWS;
-import com.arjuna.webservices.wsarjtx.ArjunaTXConstants;
-import com.arjuna.webservices.wsba.ParticipantCompletionParticipantInboundEventsWS;
-import com.arjuna.webservices.wsba.StateWS;
-import com.arjuna.webservices.wsba.client.ParticipantCompletionCoordinatorClientWS;
-import com.arjuna.webservices.wsba.processors.ParticipantCompletionParticipantProcessorWS;
-import com.arjuna.wsc.messaging.MessageIdWS;
-import com.arjuna.wst.BusinessAgreementWithParticipantCompletionParticipant;
-import com.arjuna.wst.FaultedException;
-import org.oasis_open.docs.ws_tx.wsba._2006._06.NotificationType;
-import org.oasis_open.docs.ws_tx.wsba._2006._06.StatusType;
-
-import javax.xml.namespace.QName;
-import javax.xml.ws.addressing.AddressingProperties;
-import javax.xml.ws.wsaddressing.W3CEndpointReference;
-import java.util.TimerTask;
-
-/**
- * The participant completion participant state engine
- * @author kevin
- */
-public class ParticipantCompletionParticipantEngineWS implements ParticipantCompletionParticipantInboundEventsWS
-{
-    /**
-     * The participant id.
-     */
-    private final String id ;
-    /**
-     * The instance identifier.
-     */
-    private final InstanceIdentifierWS instanceIdentifier ;
-    /**
-     * The coordinator endpoint reference.
-     */
-    private final W3CEndpointReference coordinator ;
-    /**
-     * The associated participant
-     */
-    private final BusinessAgreementWithParticipantCompletionParticipant participant ;
-    /**
-     * The current state.
-     */
-    private StateWS 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 ParticipantCompletionParticipantEngineWS(final String id, final W3CEndpointReference coordinator,
-        final BusinessAgreementWithParticipantCompletionParticipant participant)
-    {
-        this(id, coordinator, participant, StateWS.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 ParticipantCompletionParticipantEngineWS(final String id, final W3CEndpointReference coordinator,
-        final BusinessAgreementWithParticipantCompletionParticipant participant, final StateWS state)
-    {
-        this.id = id ;
-        this.instanceIdentifier = new InstanceIdentifierWS(id) ;
-        this.coordinator = coordinator ;
-        this.participant = participant ;
-        this.state = state ;
-    }
-
-    /**
-     * Handle the cancel event.
-     * @param cancel The cancel notification.
-     * @param addressingProperties The addressing context.
-     * @param arjunaContext The arjuna 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 AddressingProperties addressingProperties, final ArjunaContextWS arjunaContext)
-    {
-        final StateWS current ;
-        synchronized(this)
-        {
-            current = state ;
-            if (current == StateWS.STATE_ACTIVE)
-            {
-                changeState(StateWS.STATE_CANCELING) ;
-            }
-        }
-
-        if (current == StateWS.STATE_ACTIVE)
-        {
-            executeCancel() ;
-        }
-        else if (current == StateWS.STATE_COMPLETED)
-        {
-            sendCompleted() ;
-        }
-        else if ((current == StateWS.STATE_FAILING_ACTIVE) || (current == StateWS.STATE_FAILING_CANCELING))
-        {
-            sendFail(current.getValue()) ;
-        }
-        else if (current == StateWS.STATE_NOT_COMPLETING)
-        {
-            sendCannotComplete() ;
-        }
-        else if (current == StateWS.STATE_EXITING)
-        {
-            sendExit() ;
-        }
-        else if (current == StateWS.STATE_ENDED)
-        {
-            sendCancelled() ;
-        }
-    }
-
-    /**
-     * Handle the close event.
-     * @param close The close notification.
-     * @param addressingProperties The addressing context.
-     * @param arjunaContext The arjuna 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 AddressingProperties addressingProperties, final ArjunaContextWS arjunaContext)
-    {
-        final StateWS current ;
-        synchronized(this)
-        {
-            current = state ;
-            if (current == StateWS.STATE_COMPLETED)
-            {
-                changeState(StateWS.STATE_CLOSING) ;
-            }
-        }
-
-        if (current == StateWS.STATE_COMPLETED)
-        {
-            if (timerTask != null)
-            {
-                timerTask.cancel() ;
-            }
-            executeClose() ;
-        }
-        else if (current == StateWS.STATE_ENDED)
-        {
-            sendClosed() ;
-        }
-    }
-
-    /**
-     * Handle the compensate event.
-     * @param compensate The compensate notification.
-     * @param addressingProperties The addressing context.
-     * @param arjunaContext The arjuna 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 AddressingProperties addressingProperties, final ArjunaContextWS arjunaContext)
-    {
-        final StateWS current ;
-        synchronized(this)
-        {
-            current = state ;
-            if (current == StateWS.STATE_COMPLETED)
-            {
-                changeState(StateWS.STATE_COMPENSATING) ;
-            }
-        }
-
-        if (current == StateWS.STATE_COMPLETED)
-        {
-            if (timerTask != null)
-            {
-                timerTask.cancel() ;
-            }
-            executeCompensate() ;
-        }
-        else if (current == StateWS.STATE_FAILING_COMPENSATING)
-        {
-            sendFail(current.getValue()) ;
-        }
-        else if (current == StateWS.STATE_ENDED)
-        {
-            sendCompensated() ;
-        }
-    }
-
-    /**
-     * Handle the exited event.
-     * @param exited The exited notification.
-     * @param addressingProperties The addressing context.
-     * @param arjunaContext The arjuna 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 AddressingProperties addressingProperties, final ArjunaContextWS arjunaContext)
-    {
-        final StateWS current ;
-        synchronized(this)
-        {
-            current = state ;
-            if (current == StateWS.STATE_EXITING)
-            {
-                ended() ;
-            }
-        }
-    }
-
-    /**
-     * Handle the failed event.
-     * @param failed The failed notification.
-     * @param addressingProperties The addressing context.
-     * @param arjunaContext The arjuna 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 AddressingProperties addressingProperties, final ArjunaContextWS arjunaContext)
-    {
-        final StateWS current ;
-        synchronized(this)
-        {
-            current = state ;
-            if ((current == StateWS.STATE_FAILING_ACTIVE) || (current == StateWS.STATE_FAILING_CANCELING) ||
-                (current == StateWS.STATE_FAILING_COMPENSATING))
-            {
-                ended() ;
-            }
-        }
-    }
-
-    /**
-     * Handle the not completed event.
-     * @param notCompleted The notCompleted notification.
-     * @param addressingProperties The addressing context.
-     * @param arjunaContext The arjuna 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 AddressingProperties addressingProperties, final ArjunaContextWS arjunaContext)
-    {
-        final StateWS current ;
-        synchronized(this)
-        {
-            current = state ;
-            if (current == StateWS.STATE_NOT_COMPLETING)
-            {
-        	ended() ;
-            }
-        }
-    }
-
-    /**
-     * Handle the getStatus event.
-     * @param getStatus The getStatus notification.
-     * @param addressingProperties The addressing context.
-     * @param arjunaContext The arjuna context.
-     *
-     * @message com.arjuna.wst.messaging.engines.ParticipantCompletionParticipantEngineWS.getStatus_1 [com.arjuna.wst.messaging.engines.ParticipantCompletionParticipantEngineWS.getStatus_1] - Unknown error: {0}
-     */
-    public void getStatus(final NotificationType getStatus, final AddressingProperties addressingProperties, final ArjunaContextWS arjunaContext)
-    {
-	final StateWS current ;
-	synchronized(this)
-	{
-	    current = state ;
-	}
-	sendStatus(current) ;
-    }
-
-    /**
-     * Handle the status event.
-     * @param status The status type.
-     * @param addressingProperties The addressing context.
-     * @param arjunaContext The arjuna context.
-     */
-    public void status(final StatusType status, final AddressingProperties addressingProperties, final ArjunaContextWS arjunaContext)
-    {
-        // KEV - implement
-    }
-
-    /**
-     * Handle the soap fault event.
-     * @param soapFault The soap fault.
-     * @param addressingProperties The addressing context.
-     * @param arjunaContext The arjuna context.
-     */
-    public void soapFault(final SoapFault soapFault, final AddressingProperties addressingProperties, final ArjunaContextWS arjunaContext)
-    {
-	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 StateWS completed()
-    {
-        final StateWS current ;
-        synchronized(this)
-        {
-            current = state ;
-            if (current == StateWS.STATE_ACTIVE)
-            {
-                changeState(StateWS.STATE_COMPLETED) ;
-            }
-        }
-
-        if ((current == StateWS.STATE_ACTIVE) || (current == StateWS.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 StateWS exit()
-    {
-        final StateWS current ;
-        synchronized (this)
-        {
-            current = state ;
-            if (current == StateWS.STATE_ACTIVE)
-            {
-                changeState(StateWS.STATE_EXITING) ;
-            }
-        }
-
-        if ((current == StateWS.STATE_ACTIVE) || (current == StateWS.STATE_EXITING))
-        {
-            sendExit() ;
-        }
-
-        return waitForState(StateWS.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 StateWS fail(final QName exceptionIdentifier)
-    {
-        final StateWS current ;
-        synchronized (this)
-        {
-            current = state ;
-            if (current == StateWS.STATE_ACTIVE)
-            {
-                changeState(StateWS.STATE_FAILING_ACTIVE) ;
-            }
-            else if (current == StateWS.STATE_CANCELING)
-            {
-        	changeState(StateWS.STATE_FAILING_CANCELING) ;
-            }
-            else if (current == StateWS.STATE_COMPENSATING)
-            {
-                changeState(StateWS.STATE_FAILING_COMPENSATING) ;
-            }
-        }
-
-        if ((current == StateWS.STATE_ACTIVE) || (current == StateWS.STATE_FAILING_ACTIVE))
-        {
-            sendFail(exceptionIdentifier) ;
-            return waitForState(StateWS.STATE_FAILING_ACTIVE, TransportTimer.getTransportTimeout()) ;
-        }
-        else if ((current == StateWS.STATE_CANCELING) || (current == StateWS.STATE_FAILING_CANCELING))
-        {
-            sendFail(exceptionIdentifier) ;
-            return waitForState(StateWS.STATE_FAILING_CANCELING, TransportTimer.getTransportTimeout()) ;
-        }
-        else if ((current == StateWS.STATE_COMPENSATING) || (current == StateWS.STATE_FAILING_COMPENSATING))
-        {
-            sendFail(exceptionIdentifier) ;
-            return waitForState(StateWS.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 StateWS cannotComplete()
-    {
-        final StateWS current ;
-        synchronized (this)
-        {
-            current = state ;
-            if (current == StateWS.STATE_ACTIVE)
-            {
-                changeState(StateWS.STATE_NOT_COMPLETING) ;
-            }
-        }
-
-        if ((current == StateWS.STATE_ACTIVE) || (current == StateWS.STATE_NOT_COMPLETING))
-        {
-            sendCannotComplete() ;
-            return waitForState(StateWS.STATE_NOT_COMPLETING, TransportTimer.getTransportTimeout()) ;
-        }
-        return current ;
-    }
-
-    /**
-     * Handle the comms timeout event.
-     *
-     * Completed -> Completed (resend Completed)
-     */
-    private void commsTimeout()
-    {
-        final StateWS current ;
-        synchronized(this)
-        {
-            current = state ;
-        }
-
-        if (current == StateWS.STATE_COMPLETED)
-        {
-            sendCompleted() ;
-        }
-    }
-
-    /**
-     * Send the exit message.
-     *
-     * @message com.arjuna.wst.messaging.engines.ParticipantCompletionParticipantEngineWS.sendExit_1 [com.arjuna.wst.messaging.engines.ParticipantCompletionParticipantEngineWS.sendExit_1] - Unexpected exception while sending Exit
-     */
-    private void sendExit()
-    {
-        final AddressingProperties addressingProperties = createContext() ;
-        try
-        {
-            ParticipantCompletionCoordinatorClientWS.getClient().sendExit(coordinator, addressingProperties, instanceIdentifier) ;
-        }
-        catch (final Throwable th)
-        {
-            if (WSTLogger.arjLoggerI18N.isDebugEnabled())
-            {
-                WSTLogger.arjLoggerI18N.debug("com.arjuna.wst.messaging.engines.ParticipantCompletionParticipantEngineWS.sendExit_1", th) ;
-            }
-        }
-    }
-
-    /**
-     * Send the completed message.
-     *
-     * @message com.arjuna.wst.messaging.engines.ParticipantCompletionParticipantEngineWS.sendCompleted_1 [com.arjuna.wst.messaging.engines.ParticipantCompletionParticipantEngineWS.sendCompleted_1] - Unexpected exception while sending Completed
-     */
-    private void sendCompleted()
-    {
-        final AddressingProperties addressingProperties = createContext() ;
-        try
-        {
-            ParticipantCompletionCoordinatorClientWS.getClient().sendCompleted(coordinator, addressingProperties, instanceIdentifier) ;
-        }
-        catch (final Throwable th)
-        {
-            if (WSTLogger.arjLoggerI18N.isDebugEnabled())
-            {
-                WSTLogger.arjLoggerI18N.debug("com.arjuna.wst.messaging.engines.ParticipantCompletionParticipantEngineWS.sendCompleted_1", th) ;
-            }
-        }
-
-        initiateTimer() ;
-    }
-
-    /**
-     * Send the fail message.
-     * @param message The fail message.
-     *
-     * @message com.arjuna.wst.messaging.engines.ParticipantCompletionParticipantEngineWS.sendFail_1 [com.arjuna.wst.messaging.engines.ParticipantCompletionParticipantEngineWS.sendFail_1] - Unexpected exception while sending Fault
-     */
-    private void sendFail(final QName message)
-    {
-        final AddressingProperties addressingProperties = createContext() ;
-        try
-        {
-            ParticipantCompletionCoordinatorClientWS.getClient().sendFail(coordinator, addressingProperties, instanceIdentifier, message) ;
-        }
-        catch (final Throwable th)
-        {
-            if (WSTLogger.arjLoggerI18N.isDebugEnabled())
-            {
-                WSTLogger.arjLoggerI18N.debug("com.arjuna.wst.messaging.engines.ParticipantCompletionParticipantEngineWS.sendFail_1", th) ;
-            }
-        }
-    }
-
-    /**
-     * Send the cancelled message.
-     *
-     * @message com.arjuna.wst.messaging.engines.ParticipantCompletionParticipantEngineWS.sendCancelled_1 [com.arjuna.wst.messaging.engines.ParticipantCompletionParticipantEngineWS.sendCancelled_1] - Unexpected exception while sending Cancelled
-     */
-    private void sendCancelled()
-    {
-        final AddressingProperties addressingProperties = createContext() ;
-        try
-        {
-            ParticipantCompletionCoordinatorClientWS.getClient().sendCancelled(coordinator, addressingProperties, instanceIdentifier) ;
-        }
-        catch (final Throwable th)
-        {
-            if (WSTLogger.arjLoggerI18N.isDebugEnabled())
-            {
-                WSTLogger.arjLoggerI18N.debug("com.arjuna.wst.messaging.engines.ParticipantCompletionParticipantEngineWS.sendCancelled_1", th) ;
-            }
-        }
-    }
-
-    /**
-     * Send the closed message.
-     *
-     * @message com.arjuna.wst.messaging.engines.ParticipantCompletionParticipantEngineWS.sendClosed_1 [com.arjuna.wst.messaging.engines.ParticipantCompletionParticipantEngineWS.sendClosed_1] - Unexpected exception while sending Closed
-     */
-    private void sendClosed()
-    {
-        final AddressingProperties addressingProperties = createContext() ;
-        try
-        {
-            ParticipantCompletionCoordinatorClientWS.getClient().sendClosed(coordinator, addressingProperties, instanceIdentifier) ;
-        }
-        catch (final Throwable th)
-        {
-            if (WSTLogger.arjLoggerI18N.isDebugEnabled())
-            {
-                WSTLogger.arjLoggerI18N.debug("com.arjuna.wst.messaging.engines.ParticipantCompletionParticipantEngineWS.sendClosed_1", th) ;
-            }
-        }
-    }
-
-    /**
-     * Send the compensated message.
-     *
-     * @message com.arjuna.wst.messaging.engines.ParticipantCompletionParticipantEngineWS.sendCompensated_1 [com.arjuna.wst.messaging.engines.ParticipantCompletionParticipantEngineWS.sendCompensated_1] - Unexpected exception while sending Compensated
-     */
-    private void sendCompensated()
-    {
-        final AddressingProperties addressingProperties = createContext() ;
-        try
-        {
-            ParticipantCompletionCoordinatorClientWS.getClient().sendCompensated(coordinator, addressingProperties, instanceIdentifier) ;
-        }
-        catch (final Throwable th)
-        {
-            if (WSTLogger.arjLoggerI18N.isDebugEnabled())
-            {
-                WSTLogger.arjLoggerI18N.debug("com.arjuna.wst.messaging.engines.ParticipantCompletionParticipantEngineWS.sendCompensated_1", th) ;
-            }
-        }
-    }
-
-    /**
-     * Send the status message.
-     * @param state The state.
-     *
-     * @message com.arjuna.wst.messaging.engines.ParticipantCompletionParticipantEngineWS.sendStatus_1 [com.arjuna.wst.messaging.engines.ParticipantCompletionParticipantEngineWS.sendStatus_1] - Unexpected exception while sending Status
-     */
-    private void sendStatus(final StateWS state)
-    {
-        final AddressingProperties addressingProperties = createContext() ;
-        try
-        {
-            ParticipantCompletionCoordinatorClientWS.getClient().sendStatus(coordinator, addressingProperties, instanceIdentifier, state.getValue()) ;
-        }
-        catch (final Throwable th)
-        {
-            if (WSTLogger.arjLoggerI18N.isDebugEnabled())
-            {
-                WSTLogger.arjLoggerI18N.debug("com.arjuna.wst.messaging.engines.ParticipantCompletionParticipantEngineWS.sendStatus_1", th) ;
-            }
-        }
-    }
-
-    /**
-     * Send the cannot complete message.
-     *
-     * @message com.arjuna.wst.messaging.engines.ParticipantCompletionParticipantEngineWS.sendCannotComplete_1 [com.arjuna.wst.messaging.engines.ParticipantCompletionParticipantEngineWS.sendCannotComplete_1] - Unexpected exception while sending Status
-     */
-    private void sendCannotComplete()
-    {
-        final AddressingProperties addressingProperties = createContext() ;
-        try
-        {
-            ParticipantCompletionCoordinatorClientWS.getClient().sendCannotComplete(coordinator, addressingProperties, instanceIdentifier) ;
-        }
-        catch (final Throwable th)
-        {
-            if (WSTLogger.arjLoggerI18N.isDebugEnabled())
-            {
-                WSTLogger.arjLoggerI18N.debug("com.arjuna.wst.messaging.engines.ParticipantCompletionParticipantEngineWS.sendCannotComplete_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 W3CEndpointReference 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 StateWS 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 StateWS waitForState(final StateWS 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.ParticipantCompletionParticipantEngineWS.executeCancel_1 [com.arjuna.wst.messaging.engines.ParticipantCompletionParticipantEngineWS.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.ParticipantCompletionParticipantEngineWS.executeCancel_1", th) ;
-            }
-            return ;
-        }
-        sendCancelled() ;
-        ended() ;
-    }
-
-    /**
-     * Execute the close transition.
-     *
-     * @message com.arjuna.wst.messaging.engines.ParticipantCompletionParticipantEngineWS.executeClose_1 [com.arjuna.wst.messaging.engines.ParticipantCompletionParticipantEngineWS.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.ParticipantCompletionParticipantEngineWS.executeClose_1", th) ;
-            }
-            return ;
-        }
-        sendClosed() ;
-        ended() ;
-    }
-
-    /**
-     * Execute the compensate transition.
-     *
-     * @message com.arjuna.wst.messaging.engines.ParticipantCompletionParticipantEngineWS.executeCompensate_1 [com.arjuna.wst.messaging.engines.ParticipantCompletionParticipantEngineWS.executeCompensate_1] - Unexpected exception from participant compensate
-     */
-    private void executeCompensate()
-    {
-        try
-        {
-            participant.compensate() ;
-        }
-        catch (final FaultedException fe)
-        {
-            // TODO - use the right value here -- shoudl be a QName for Faulted (Kev's 1.1 code uses JBOSSTX.FAULTED_ERROR_CODE_QNAME)
-            fail(ArjunaTXConstants.WSARJTX_ELEMENT_FAULTED_QNAME);
-        }
-        catch (final Throwable th)
-        {
-            final StateWS current ;
-            synchronized (this)
-            {
-                current = state ;
-                if (current == StateWS.STATE_COMPENSATING)
-                {
-                    changeState(StateWS.STATE_COMPLETED) ;
-                }
-            }
-            if (current == StateWS.STATE_COMPENSATING)
-            {
-                initiateTimer() ;
-            }
-
-            if (WSTLogger.arjLoggerI18N.isDebugEnabled())
-            {
-                WSTLogger.arjLoggerI18N.debug("com.arjuna.wst.messaging.engines.ParticipantCompletionParticipantEngineWS.executeClose_1", th) ;
-            }
-            return ;
-        }
-
-        final StateWS current ;
-        synchronized (this)
-        {
-            current = state ;
-            if (current == StateWS.STATE_COMPENSATING)
-            {
-                ended() ;
-            }
-        }
-        if (current == StateWS.STATE_COMPENSATING)
-        {
-            sendCompensated() ;
-        }
-    }
-
-    /**
-     * End the current participant.
-     */
-    private void ended()
-    {
-	changeState(StateWS.STATE_ENDED) ;
-        ParticipantCompletionParticipantProcessorWS.getProcessor().deactivateParticipant(this) ;
-    }
-
-    /**
-     * Initiate the timer.
-     */
-    private synchronized void initiateTimer()
-    {
-        if (timerTask != null)
-        {
-            timerTask.cancel() ;
-        }
-
-        if (state == StateWS.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 AddressingProperties createContext()
-    {
-        final String messageId = MessageIdWS.getMessageId() ;
-        return AddressingHelper.createNotificationContext(messageId) ;
-    }
-}
\ No newline at end of file

Deleted: labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/wst/messaging/engines/ParticipantEngineWS.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/wst/messaging/engines/ParticipantEngineWS.java	2008-01-25 17:05:33 UTC (rev 18123)
+++ labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/wst/messaging/engines/ParticipantEngineWS.java	2008-01-25 17:18:13 UTC (rev 18124)
@@ -1,575 +0,0 @@
-package com.arjuna.wst.messaging.engines;
-
-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.wsaddrws.AddressingHelper;
-import com.arjuna.webservices.wsarj.ArjunaContextWS;
-import com.arjuna.webservices.wsarj.InstanceIdentifierWS;
-import com.arjuna.webservices.wsat.ParticipantInboundEventsWS;
-import com.arjuna.webservices.wsat.StateWS;
-import com.arjuna.webservices.wsat.client.CoordinatorClientWS;
-import com.arjuna.webservices.wsat.processors.ParticipantProcessorWS;
-import com.arjuna.webservices.wscoor.CoordinationConstantsWS;
-import com.arjuna.wsc.messaging.MessageIdWS;
-import com.arjuna.wst.*;
-import org.oasis_open.docs.ws_tx.wsat._2006._06.Notification;
-
-import javax.xml.namespace.QName;
-import javax.xml.ws.addressing.AddressingProperties;
-import javax.xml.ws.wsaddressing.W3CEndpointReference;
-import java.util.TimerTask;
-
-/**
- * The participant state engine
- * @author kevin
- */
-public class ParticipantEngineWS implements ParticipantInboundEventsWS
-{
-    /**
-     * The associated participant
-     */
-    private final Participant participant ;
-    /**
-     * The participant id.
-     */
-    private final String id ;
-    /**
-     * The coordinator endpoint reference.
-     */
-    private final W3CEndpointReference coordinator ;
-    /**
-     * The current state.
-     */
-    private StateWS state ;
-    /**
-     * The associated timer task or null.
-     */
-    private TimerTask timerTask ;
-
-    /**
-     * Construct the initial engine for the participant.
-     * @param participant The participant.
-     * @param id The participant id.
-     * @param coordinator The coordinator endpoint reference.
-     */
-    public ParticipantEngineWS(final Participant participant, final String id, final W3CEndpointReference coordinator)
-    {
-        this(participant, id, StateWS.STATE_ACTIVE, coordinator) ;
-    }
-
-    /**
-     * Construct the engine for the participant in a specified state.
-     * @param participant The participant.
-     * @param id The participant id.
-     * @param state The initial state.
-     * @param coordinator The coordinator endpoint reference.
-     */
-    public ParticipantEngineWS(final Participant participant, final String id, final StateWS state, final W3CEndpointReference coordinator)
-    {
-        this.participant = participant ;
-        this.id = id ;
-        this.state = state ;
-        this.coordinator = coordinator ;
-    }
-
-    /**
-     * Handle the commit event.
-     * @param commit The commit notification.
-     * @param addressingProperties The addressing context.
-     * @param arjunaContext The arjuna context.
-     *
-     * None -> None (send committed)
-     * Active -> Aborting (do nothing)
-     * Preparing -> Aborting (do nothing)
-     * PreparedSuccess -> Committing (initiate commit)
-     * Committing -> Committing (do nothing)
-     * Aborting -> Aborting (do nothing)
-     */
-    public void commit(final Notification commit, final AddressingProperties addressingProperties, final ArjunaContextWS arjunaContext)
-    {
-        final StateWS current ;
-        synchronized(this)
-        {
-            current = state ;
-            if (current == StateWS.STATE_PREPARED_SUCCESS)
-            {
-                state = StateWS.STATE_COMMITTING ;
-                if (timerTask != null)
-                {
-                    timerTask.cancel() ;
-                }
-            }
-            else if ((current == StateWS.STATE_ACTIVE) || (current == StateWS.STATE_PREPARING))
-            {
-                state = StateWS.STATE_ABORTING ;
-            }
-        }
-
-        if (current == StateWS.STATE_PREPARED_SUCCESS)
-        {
-            executeCommit() ;
-        }
-        else if (current == null)
-        {
-            sendCommitted() ;
-        }
-    }
-
-    /**
-     * Handle the prepare event.
-     * @param prepare The prepare notification.
-     * @param addressingProperties The addressing context.
-     * @param arjunaContext The arjuna 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 Notification prepare, final AddressingProperties addressingProperties, final ArjunaContextWS arjunaContext)
-    {
-        final StateWS current ;
-        synchronized(this)
-        {
-            current = state ;
-            if (current == StateWS.STATE_ACTIVE)
-            {
-                state = StateWS.STATE_PREPARING ;
-            }
-        }
-
-        if (current == StateWS.STATE_ACTIVE)
-        {
-            executePrepare() ;
-        }
-        else if (current == StateWS.STATE_PREPARED_SUCCESS)
-        {
-            sendPrepared() ;
-        }
-        else if ((current == StateWS.STATE_ABORTING) || (current == null))
-        {
-            sendAborted() ;
-            forget() ;
-        }
-    }
-
-    /**
-     * Handle the rollback event.
-     * @param rollback The rollback notification.
-     * @param addressingProperties The addressing context.
-     * @param arjunaContext The arjuna 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 (ignore)
-     * Aborting -> Aborting (send aborted and forget)
-     */
-    public void rollback(final Notification rollback, final AddressingProperties addressingProperties, final ArjunaContextWS arjunaContext)
-    {
-        final StateWS current ;
-        synchronized(this)
-        {
-            current = state ;
-            if ((current == StateWS.STATE_ACTIVE) || (current == StateWS.STATE_PREPARING) ||
-                (current == StateWS.STATE_PREPARED_SUCCESS))
-            {
-                state = StateWS.STATE_ABORTING ;
-            }
-        }
-
-        if (current != StateWS.STATE_COMMITTING)
-        {
-            if ((current == StateWS.STATE_ACTIVE) || (current == StateWS.STATE_PREPARING) ||
-                (current == StateWS.STATE_PREPARED_SUCCESS))
-            {
-                if (!executeRollback())
-                {
-                    return ;
-                }
-            }
-
-            sendAborted() ;
-
-            if (current != null)
-            {
-                forget() ;
-            }
-        }
-    }
-
-    /**
-     * Handle the soap fault event.
-     * @param soapFault The soap fault.
-     * @param addressingProperties The addressing context.
-     * @param arjunaContext The arjuna context.
-     *
-     * @message com.arjuna.wst.messaging.engines.ParticipantEngineWS.soapFault_1 [com.arjuna.wst.messaging.engines.ParticipantEngineWS.soapFault_1] - Unexpected SOAP fault for participant {0}: {1} {2}
-     */
-    public void soapFault(final SoapFault soapFault, final AddressingProperties addressingProperties, final ArjunaContextWS arjunaContext)
-    {
-        if (WSTLogger.arjLoggerI18N.isDebugEnabled())
-        {
-            final InstanceIdentifierWS instanceIdentifier = arjunaContext.getInstanceIdentifier() ;
-            final SoapFaultType soapFaultType = soapFault.getSoapFaultType() ;
-            final QName subCode = soapFault.getSubcode() ;
-            WSTLogger.arjLoggerI18N.debug("com.arjuna.wst.messaging.engines.ParticipantEngineWS.soapFault_1", new Object[] {instanceIdentifier, soapFaultType, subCode}) ;
-        }
-
-        if (CoordinationConstantsWS.WSCOOR_ERROR_CODE_INVALID_STATE_QNAME.equals(soapFault.getSubcode()))
-        {
-            forget() ;
-        }
-    }
-
-    /**
-     * Handle the commit decision event.
-     *
-     * Preparing -> PreparedSuccess (send Prepared)
-     * Committing -> Committing (send committed and forget)
-     */
-    private void commitDecision()
-    {
-        final StateWS current ;
-        synchronized(this)
-        {
-            current = state ;
-            if (current == StateWS.STATE_PREPARING)
-            {
-                state = StateWS.STATE_PREPARED_SUCCESS ;
-            }
-        }
-
-        if (current == StateWS.STATE_PREPARING)
-        {
-            sendPrepared() ;
-        }
-        else if (current == StateWS.STATE_COMMITTING)
-        {
-            sendCommitted() ;
-            forget() ;
-        }
-    }
-
-    /**
-     * Handle the readOnly decision event.
-     *
-     * Active -> None (send ReadOnly)
-     * Preparing -> None (send ReadOnly)
-     */
-    private void readOnlyDecision()
-    {
-        final StateWS current ;
-        synchronized(this)
-        {
-            current = state ;
-            if ((current == StateWS.STATE_ACTIVE) || (current == StateWS.STATE_PREPARING))
-            {
-        	state = null ;
-            }
-        }
-
-        if ((current == StateWS.STATE_ACTIVE) || (current == StateWS.STATE_PREPARING))
-        {
-            sendReadOnly() ;
-            forget() ;
-        }
-    }
-
-    /**
-     * Handle the rollback decision event.
-     *
-     * Active -> Aborting (send aborted)
-     * Preparing -> Aborting (send aborted)
-     */
-    private void rollbackDecision()
-    {
-        final StateWS current ;
-        synchronized(this)
-        {
-            current = state ;
-            if ((current == StateWS.STATE_PREPARING) || (current == StateWS.STATE_ACTIVE))
-            {
-                state = StateWS.STATE_ABORTING ;
-            }
-        }
-
-        if ((current == StateWS.STATE_PREPARING) || (current == StateWS.STATE_ACTIVE))
-        {
-            sendAborted() ;
-            forget() ;
-        }
-    }
-
-    /**
-     * Handle the comms timeout event.
-     *
-     * PreparedSuccess -> PreparedSuccess (resend Prepared)
-     */
-    private void commsTimeout()
-    {
-        final StateWS current ;
-        synchronized(this)
-        {
-            current = state ;
-        }
-
-        if (current == StateWS.STATE_PREPARED_SUCCESS)
-        {
-            sendPrepared() ;
-        }
-    }
-
-    /**
-     * Execute the commit transition.
-     *
-     * @message com.arjuna.wst.messaging.engines.ParticipantEngineWS.executeCommit_1 [com.arjuna.wst.messaging.engines.ParticipantEngineWS.executeCommit_1] - Unexpected exception from participant commit
-     */
-    private void executeCommit()
-    {
-        try
-        {
-            participant.commit() ;
-            commitDecision() ;
-        }
-        catch (final Throwable th)
-        {
-            synchronized(this)
-            {
-                if (state == StateWS.STATE_COMMITTING)
-                {
-            	    state = StateWS.STATE_PREPARED_SUCCESS ;
-                }
-            }
-            if (WSTLogger.arjLoggerI18N.isDebugEnabled())
-            {
-                WSTLogger.arjLoggerI18N.debug("com.arjuna.wst.messaging.engines.ParticipantEngineWS.executeCommit_1", th) ;
-            }
-        }
-    }
-
-    /**
-     * Execute the rollback transition.
-     *
-     * @message com.arjuna.wst.messaging.engines.ParticipantEngineWS.executeRollback_1 [com.arjuna.wst.messaging.engines.ParticipantEngineWS.executeRollback_1] - Unexpected exception from participant rollback
-     */
-    private boolean executeRollback()
-    {
-        try
-        {
-            participant.rollback() ;
-        }
-        catch (final SystemException se)
-        {
-            return false ;
-        }
-        catch (final Throwable th)
-        {
-            if (WSTLogger.arjLoggerI18N.isDebugEnabled())
-            {
-                WSTLogger.arjLoggerI18N.debug("com.arjuna.wst.messaging.engines.ParticipantEngineWS.executeRollback_1", th) ;
-            }
-        }
-        return true ;
-    }
-
-    /**
-     * Execute the prepare transition.
-     *
-     * @message com.arjuna.wst.messaging.engines.ParticipantEngineWS.executePrepare_1 [com.arjuna.wst.messaging.engines.ParticipantEngineWS.executePrepare_1] - Unexpected exception from participant prepare
-     * @message com.arjuna.wst.messaging.engines.ParticipantEngineWS.executePrepare_2 [com.arjuna.wst.messaging.engines.ParticipantEngineWS.executePrepare_2] - Unexpected result from participant prepare: {0}
-     */
-    private void executePrepare()
-    {
-        final Vote vote ;
-        try
-        {
-            vote = participant.prepare();
-        }
-        catch (final SystemException se)
-        {
-            if (WSTLogger.arjLoggerI18N.isDebugEnabled())
-            {
-                WSTLogger.arjLoggerI18N.debug("com.arjuna.wst.messaging.engines.ParticipantEngineWS.executePrepare_1", se) ;
-            }
-            return ;
-        }
-        catch (final Throwable th)
-        {
-            if (WSTLogger.arjLoggerI18N.isDebugEnabled())
-            {
-                WSTLogger.arjLoggerI18N.debug("com.arjuna.wst.messaging.engines.ParticipantEngineWS.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.ParticipantEngineWS.executePrepare_2", new Object[] {(vote == null ? "null" : vote.getClass().getName())}) ;
-            }
-            rollbackDecision() ;
-        }
-    }
-
-    /**
-     * Forget the current participant.
-     */
-    private void forget()
-    {
-        synchronized(this)
-        {
-            state = null ;
-        }
-        ParticipantProcessorWS.getProcessor().deactivateParticipant(this) ;
-    }
-
-    /**
-     * Send the committed message.
-     *
-     * @message com.arjuna.wst.messaging.engines.ParticipantEngineWS.sendCommitted_1 [com.arjuna.wst.messaging.engines.ParticipantEngineWS.sendCommitted_1] - Unexpected exception while sending Committed
-     */
-    private void sendCommitted()
-    {
-        final AddressingProperties responseAddressingContext = createContext() ;
-        final InstanceIdentifierWS instanceIdentifier = new InstanceIdentifierWS(id) ;
-        try
-        {
-            CoordinatorClientWS.getClient().sendCommitted(coordinator, responseAddressingContext, instanceIdentifier) ;
-        }
-        catch (final Throwable th)
-        {
-            if (WSTLogger.arjLoggerI18N.isDebugEnabled())
-            {
-                WSTLogger.arjLoggerI18N.debug("com.arjuna.wst.messaging.engines.ParticipantEngineWS.sendCommitted_1", th) ;
-            }
-        }
-    }
-
-    /**
-     * Send the prepared message.
-     *
-     * @message com.arjuna.wst.messaging.engines.ParticipantEngineWS.sendPrepared_1 [com.arjuna.wst.messaging.engines.ParticipantEngineWS.sendPrepared_1] - Unexpected exception while sending Prepared
-     */
-    private void sendPrepared()
-    {
-        final AddressingProperties responseAddressingContext = createContext() ;
-        final InstanceIdentifierWS instanceIdentifier = new InstanceIdentifierWS(id) ;
-        try
-        {
-            CoordinatorClientWS.getClient().sendPrepared(coordinator, responseAddressingContext, instanceIdentifier) ;
-        }
-        catch (final Throwable th)
-        {
-            if (WSTLogger.arjLoggerI18N.isDebugEnabled())
-            {
-                WSTLogger.arjLoggerI18N.debug("com.arjuna.wst.messaging.engines.ParticipantEngineWS.sendPrepared_1", th) ;
-            }
-        }
-
-        initiateTimer() ;
-    }
-
-    /**
-     * Send the aborted message.
-     *
-     * @message com.arjuna.wst.messaging.engines.ParticipantEngineWS.sendAborted_1 [com.arjuna.wst.messaging.engines.ParticipantEngineWS.sendAborted_1] - Unexpected exception while sending Aborted
-     */
-    private void sendAborted()
-    {
-        final AddressingProperties responseAddressingContext = createContext() ;
-        final InstanceIdentifierWS instanceIdentifier = new InstanceIdentifierWS(id) ;
-        try
-        {
-            CoordinatorClientWS.getClient().sendAborted(coordinator, responseAddressingContext, instanceIdentifier) ;
-        }
-        catch (final Throwable th)
-        {
-            if (WSTLogger.arjLoggerI18N.isDebugEnabled())
-            {
-                WSTLogger.arjLoggerI18N.debug("com.arjuna.wst.messaging.engines.ParticipantEngineWS.sendAborted_1", th) ;
-            }
-        }
-    }
-
-    /**
-     * Send the read only message.
-     *
-     * @message com.arjuna.wst.messaging.engines.ParticipantEngineWS.sendReadOnly_1 [com.arjuna.wst.messaging.engines.ParticipantEngineWS.sendReadOnly_1] - Unexpected exception while sending ReadOnly
-     */
-    private void sendReadOnly()
-    {
-        final AddressingProperties responseAddressingContext = createContext() ;
-        final InstanceIdentifierWS instanceIdentifier = new InstanceIdentifierWS(id) ;
-        try
-        {
-            CoordinatorClientWS.getClient().sendReadOnly(coordinator, responseAddressingContext, instanceIdentifier) ;
-        }
-        catch (final Throwable th)
-        {
-            if (WSTLogger.arjLoggerI18N.isDebugEnabled())
-            {
-                WSTLogger.arjLoggerI18N.debug("com.arjuna.wst.messaging.engines.ParticipantEngineWS.sendReadOnly_1", th) ;
-            }
-        }
-    }
-
-    /**
-     * Initiate the timer.
-     */
-    private synchronized void initiateTimer()
-    {
-        if (timerTask != null)
-        {
-            timerTask.cancel() ;
-        }
-
-        if (state == StateWS.STATE_PREPARED_SUCCESS)
-        {
-            timerTask = new TimerTask() {
-                public void run() {
-                    commsTimeout() ;
-                }
-            } ;
-            TransportTimer.getTimer().schedule(timerTask, TransportTimer.getTransportPeriod()) ;
-        }
-        else
-        {
-            timerTask = null ;
-        }
-    }
-
-    /**
-     * Create a response context from the incoming context.
-     * @return The addressing context.
-     */
-    private AddressingProperties createContext()
-    {
-        final String messageId = MessageIdWS.getMessageId() ;
-        return AddressingHelper.createNotificationContext(messageId) ;
-    }
-    
-    public W3CEndpointReference getCoordinator()
-    {
-        return coordinator;
-    }
-}

Deleted: labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/wst/stub/BACoordinatorCompletionParticipantManagerStubWS.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/wst/stub/BACoordinatorCompletionParticipantManagerStubWS.java	2008-01-25 17:05:33 UTC (rev 18123)
+++ labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/wst/stub/BACoordinatorCompletionParticipantManagerStubWS.java	2008-01-25 17:18:13 UTC (rev 18124)
@@ -1,131 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. 
- * 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 com.arjuna.webservices.wsba.StateWS;
-import com.arjuna.wst.SystemException;
-import com.arjuna.wst.UnknownTransactionException;
-import com.arjuna.wst.WrongStateException;
-import com.arjuna.wst.messaging.engines.CoordinatorCompletionParticipantEngineWS;
-
-import javax.xml.namespace.QName;
-
-public class BACoordinatorCompletionParticipantManagerStubWS implements com.arjuna.wst.BAParticipantManagerWS
-{
-    private final CoordinatorCompletionParticipantEngineWS coordinator ;
-
-    public BACoordinatorCompletionParticipantManagerStubWS(final CoordinatorCompletionParticipantEngineWS coordinator)
-        throws Exception
-    {
-        this.coordinator = coordinator ;
-    }
-
-    public void exit ()
-        throws WrongStateException, UnknownTransactionException, SystemException
-    {
-        /*
-         * Active -> illegal state
-         * Canceling -> illegal state
-         * Completed -> illegal state
-         * Closing -> illegal state
-         * Compensating -> illegal state
-         * Faulting -> illegal state
-         * Faulting-Active -> illegal state
-         * Faulting-Compensating -> illegal state
-         * Exiting -> no response
-         * Ended -> ended
-         */
-        final StateWS state = coordinator.exit() ;
-        if (state == StateWS.STATE_EXITING)
-        {
-            throw new SystemException() ;
-        }
-        else if (state != StateWS.STATE_ENDED)
-        {
-            throw new WrongStateException() ;
-        }
-    }
-
-    public void completed ()
-        throws WrongStateException, UnknownTransactionException, SystemException
-    {
-        // returns original state
-        final StateWS state = coordinator.completed() ;
-        if ((state != StateWS.STATE_ACTIVE) && (state != StateWS.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 StateWS state = coordinator.cannotComplete() ;
-        if (state == StateWS.STATE_NOT_COMPLETING)
-        {
-            throw new SystemException() ;
-        }
-        else if (state != StateWS.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 StateWS state = coordinator.fail(exceptionIdentifier) ;
-        if (state != StateWS.STATE_ENDED)
-        {
-            throw new SystemException() ;
-        }
-    }
-}
\ No newline at end of file

Deleted: labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/wst/stub/BAParticipantCompletionParticipantManagerStubWS.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/wst/stub/BAParticipantCompletionParticipantManagerStubWS.java	2008-01-25 17:05:33 UTC (rev 18123)
+++ labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/wst/stub/BAParticipantCompletionParticipantManagerStubWS.java	2008-01-25 17:18:13 UTC (rev 18124)
@@ -1,128 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. 
- * 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 com.arjuna.webservices.wsba.StateWS;
-import com.arjuna.wst.SystemException;
-import com.arjuna.wst.UnknownTransactionException;
-import com.arjuna.wst.WrongStateException;
-import com.arjuna.wst.messaging.engines.ParticipantCompletionParticipantEngineWS;
-
-import javax.xml.namespace.QName;
-
-public class BAParticipantCompletionParticipantManagerStubWS implements com.arjuna.wst.BAParticipantManagerWS
-{
-    private final ParticipantCompletionParticipantEngineWS coordinator ;
-
-    public BAParticipantCompletionParticipantManagerStubWS(final ParticipantCompletionParticipantEngineWS 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 StateWS state = coordinator.exit() ;
-        if (state == StateWS.STATE_EXITING)
-        {
-            throw new SystemException() ;
-        }
-        else if (state != StateWS.STATE_ENDED)
-        {
-            throw new WrongStateException() ;
-        }
-    }
-
-    public synchronized void completed ()
-        throws WrongStateException, UnknownTransactionException, SystemException
-    {
-        // returns original state
-        final StateWS state = coordinator.completed() ;
-        if ((state != StateWS.STATE_ACTIVE) && (state != StateWS.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 StateWS state = coordinator.cannotComplete() ;
-        if (state == StateWS.STATE_NOT_COMPLETING)
-        {
-            throw new SystemException() ;
-        }
-        else if (state != StateWS.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 StateWS state = coordinator.fail(exceptionIdentifier) ;
-        if (state != StateWS.STATE_ENDED)
-        {
-            throw new SystemException() ;
-        }
-    }
-}
\ No newline at end of file

Deleted: labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/wst/stub/BusinessActivityTerminatorStubWS.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/wst/stub/BusinessActivityTerminatorStubWS.java	2008-01-25 17:05:33 UTC (rev 18123)
+++ labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/wst/stub/BusinessActivityTerminatorStubWS.java	2008-01-25 17:18:13 UTC (rev 18124)
@@ -1,400 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. 
- * 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: BusinessActivityTerminatorStub.java,v 1.7.6.1 2005/11/22 10:35:29 kconner Exp $
- */
-
-package com.arjuna.wst.stub;
-
-import com.arjuna.schemas.ws._2005._10.wsarjtx.NotificationType;
-import com.arjuna.webservices.SoapFault;
-import com.arjuna.webservices.SoapFaultType;
-import com.arjuna.webservices.logging.WSTLogger;
-import com.arjuna.webservices.wsaddrws.AddressingHelper;
-import com.arjuna.webservices.wsarj.ArjunaContextWS;
-import com.arjuna.webservices.wsarj.InstanceIdentifierWS;
-import com.arjuna.webservices.wsarjtx.ArjunaTXConstants;
-import com.arjuna.webservices.wsarjtx.client.TerminationCoordinatorClientWS;
-import com.arjuna.webservices.wsarjtx.processors.TerminationParticipantCallbackWS;
-import com.arjuna.webservices.wsarjtx.processors.TerminationParticipantProcessorWS;
-import com.arjuna.wsc.messaging.MessageId;
-import com.arjuna.wsc.messaging.MessageIdWS;
-import com.arjuna.wst.FaultedException;
-import com.arjuna.wst.SystemException;
-import com.arjuna.wst.TransactionRolledBackException;
-import com.arjuna.wst.UnknownTransactionException;
-
-import javax.xml.namespace.QName;
-import javax.xml.ws.addressing.AddressingProperties;
-import javax.xml.ws.wsaddressing.W3CEndpointReference;
-
-public class BusinessActivityTerminatorStubWS implements com.arjuna.wst.BusinessActivityTerminatorWS
-{
-    private W3CEndpointReference _terminationCoordinator = null;
-    private final String _id ;
-
-    public BusinessActivityTerminatorStubWS(final String id, final W3CEndpointReference terminationCoordinator)
-        throws Exception
-    {
-        _terminationCoordinator = terminationCoordinator;
-        _id = id ;
-    }
-
-    public void close ()
-        throws TransactionRolledBackException, UnknownTransactionException, SystemException
-    {
-        final AddressingProperties addressingProperties = AddressingHelper.createNotificationContext(MessageIdWS.getMessageId()) ;
-
-        final RequestCallback callback = new RequestCallback() ;
-        final TerminationParticipantProcessorWS terminationParticipantProcessor = TerminationParticipantProcessorWS.getProcessor() ;
-        terminationParticipantProcessor.registerCallback(_id, callback) ;
-        try
-        {
-            TerminationCoordinatorClientWS.getClient().sendClose(_terminationCoordinator, addressingProperties, new InstanceIdentifierWS(_id)) ;
-            callback.waitUntilTriggered() ;
-        }
-        catch (final Throwable th)
-        {
-            throw new SystemException() ;
-        }
-        finally
-        {
-            terminationParticipantProcessor.removeCallback(_id) ;
-        }
-
-        if (callback.hasTriggered())
-        {
-            if (callback.receivedClosed())
-            {
-                return ;
-            }
-            final SoapFault soapFault = callback.getSoapFault() ;
-            if (soapFault != null)
-            {
-                final QName subcode = soapFault.getSubcode() ;
-                if (ArjunaTXConstants.TRANSACTIONROLLEDBACK_ERROR_CODE_QNAME.equals(subcode))
-                {
-                    throw new TransactionRolledBackException();
-                }
-                else if (ArjunaTXConstants.UNKNOWNTRANSACTION_ERROR_CODE_QNAME.equals(subcode))
-                {
-                    throw new UnknownTransactionException() ;
-                }
-            }
-        }
-        throw new SystemException() ;
-    }
-
-    public void cancel ()
-        throws FaultedException, UnknownTransactionException, SystemException
-    {
-        final AddressingProperties addressingProperties = AddressingHelper.createNotificationContext(MessageIdWS.getMessageId()) ;
-
-        final RequestCallback callback = new RequestCallback() ;
-        final TerminationParticipantProcessorWS terminationParticipantProcessor = TerminationParticipantProcessorWS.getProcessor() ;
-        terminationParticipantProcessor.registerCallback(_id, callback) ;
-        try
-        {
-            TerminationCoordinatorClientWS.getClient().sendCancel(_terminationCoordinator, addressingProperties, new InstanceIdentifierWS(_id)) ;
-            callback.waitUntilTriggered() ;
-        }
-        catch (final Throwable th)
-        {
-            throw new SystemException() ;
-        }
-        finally
-        {
-            terminationParticipantProcessor.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 (ArjunaTXConstants.UNKNOWNTRANSACTION_ERROR_CODE_QNAME.equals(subcode))
-                {
-                    throw new UnknownTransactionException() ;
-                }
-            }
-        }
-        throw new SystemException() ;
-    }
-
-    public void complete ()
-        throws FaultedException, UnknownTransactionException, SystemException
-    {
-        final AddressingProperties addressingProperties = AddressingHelper.createNotificationContext(MessageIdWS.getMessageId()) ;
-
-        final RequestCallback callback = new RequestCallback() ;
-        final TerminationParticipantProcessorWS terminationParticipantProcessor = TerminationParticipantProcessorWS.getProcessor() ;
-        terminationParticipantProcessor.registerCallback(_id, callback) ;
-        try
-        {
-            TerminationCoordinatorClientWS.getClient().sendComplete(_terminationCoordinator, addressingProperties, new InstanceIdentifierWS(_id)) ;
-            callback.waitUntilTriggered() ;
-        }
-        catch (final Throwable th)
-        {
-            throw new SystemException() ;
-        }
-        finally
-        {
-            terminationParticipantProcessor.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 (ArjunaTXConstants.UNKNOWNTRANSACTION_ERROR_CODE_QNAME.equals(subcode))
-                {
-                    throw new UnknownTransactionException() ;
-                }
-            }
-        }
-        throw new SystemException() ;
-    }
-
-    public W3CEndpointReference getEndpoint()
-    {
-        return _terminationCoordinator;
-    }
-    /*
-     * this never gets called
-     */
-    public void unknown ()
-        throws SystemException
-    {
-        error() ;
-    }
-
-    /**
-     * @message com.arjuna.wst.stub.BusinessActivityTerminatorStubWS_1 [com.arjuna.wst.stub.BusinessActivityTerminatorStubWS_1] - Unknown error
-     */
-    /*
-     * this never gets called
-     */
-    public void error ()
-        throws SystemException
-    {
-        final AddressingProperties addressingProperties = AddressingHelper.createNotificationContext(MessageIdWS.getMessageId()) ;
-        final SoapFault soapFault = new SoapFault(SoapFaultType.FAULT_SENDER, ArjunaTXConstants.UNKNOWNERROR_ERROR_CODE_QNAME,
-                WSTLogger.log_mesg.getString("com.arjuna.wst.stub.BusinessActivityTerminatorStubWS_1")) ;
-        try
-        {
-            // the terminaron coordinator endpoint does not expose a soapFault web method as this never gets called
-            // TerminationCoordinatorClientWS.getClient().sendSoapFault(_terminationCoordinator, addressingProperties, soapFault, new InstanceIdentifierWS(_id)) ;
-        }
-        catch (final Throwable th)
-        {
-            throw new SystemException() ;
-        }
-    }
-
-    private static class RequestCallback extends TerminationParticipantCallbackWS
-    {
-        /**
-         * The addressing context.
-         */
-        private AddressingProperties addressingProperties ;
-        /**
-         * The arjuna context.
-         */
-        private ArjunaContextWS arjunaContext ;
-        /**
-         * 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.
-         */
-        AddressingProperties getAddressingProperties()
-        {
-            return addressingProperties ;
-        }
-
-        /**
-         * Get the arjuna context.
-         * @return The arjuna context.
-         */
-        ArjunaContextWS getArjunaContextWS()
-        {
-            return arjunaContext ;
-        }
-
-        /**
-         * 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 addressingProperties The addressing context.
-         * @param arjunaContext The arjuna context.
-         */
-        public void completed(final NotificationType completed, final AddressingProperties addressingProperties,
-            final ArjunaContextWS arjunaContext)
-        {
-            this.completed = true ;
-            this.addressingProperties = addressingProperties ;
-            this.arjunaContext = arjunaContext ;
-        }
-
-        /**
-         * A cancelled response.
-         * @param cancelled The cancelled notification.
-         * @param addressingProperties The addressing context.
-         * @param arjunaContext The arjuna context.
-         */
-        public void cancelled(final NotificationType cancelled, final AddressingProperties addressingProperties,
-            final ArjunaContextWS arjunaContext)
-        {
-            this.cancelled  = true ;
-            this.addressingProperties = addressingProperties ;
-            this.arjunaContext = arjunaContext ;
-        }
-
-        /**
-         * A closed response.
-         * @param closed The closed notification.
-         * @param addressingProperties The addressing context.
-         * @param arjunaContext The arjuna context.
-         */
-        public void closed(final NotificationType closed, final AddressingProperties addressingProperties,
-            final ArjunaContextWS arjunaContext)
-        {
-            this.closed = true ;
-            this.addressingProperties = addressingProperties ;
-            this.arjunaContext = arjunaContext ;
-        }
-
-        /**
-         * A faulted response.
-         * @param faulted The faulted notification.
-         * @param addressingProperties The addressing context.
-         * @param arjunaContext The arjuna context.
-         */
-        public void faulted(final NotificationType faulted, final AddressingProperties addressingProperties,
-            final ArjunaContextWS arjunaContext)
-        {
-            // TODO - convert wsdl to use NotificationType instead of ExceptionType
-            this.faulted = true ;
-            this.addressingProperties = addressingProperties ;
-            this.arjunaContext = arjunaContext ;
-        }
-
-        /**
-         * A SOAP fault response.
-         * @param soapFault The SOAP fault.
-         * @param addressingProperties The addressing context.
-         * @param arjunaContext The arjuna context.
-         */
-        public void soapFault(final SoapFault soapFault, final AddressingProperties addressingProperties,
-            final ArjunaContextWS arjunaContext)
-        {
-            // TODO - pass soap fault to this callback
-            this.soapFault = soapFault ;
-            this.addressingProperties = addressingProperties ;
-            this.arjunaContext = arjunaContext ;
-        }
-    }
-}
\ No newline at end of file

Deleted: labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/wst/stub/BusinessAgreementWithCoordinatorCompletionStubWS.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/wst/stub/BusinessAgreementWithCoordinatorCompletionStubWS.java	2008-01-25 17:05:33 UTC (rev 18123)
+++ labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/wst/stub/BusinessAgreementWithCoordinatorCompletionStubWS.java	2008-01-25 17:18:13 UTC (rev 18124)
@@ -1,282 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. 
- * 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: BusinessAgreementWithCoordinatorCompletionStub.java,v 1.1.2.2 2004/06/18 15:06:09 nmcl Exp $
- */
-
-package com.arjuna.wst.stub;
-
-import java.io.StringWriter;
-import java.io.StringReader;
-
-import javax.xml.namespace.QName;
-import javax.xml.stream.XMLStreamReader;
-import javax.xml.stream.XMLStreamWriter;
-import javax.xml.transform.stream.StreamSource;
-import javax.xml.ws.wsaddressing.W3CEndpointReference;
-
-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.wsba.StateWS;
-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.CoordinatorCompletionCoordinatorEngineWS;
-
-public class BusinessAgreementWithCoordinatorCompletionStubWS implements BusinessAgreementWithCoordinatorCompletionParticipant, PersistableParticipant
-{
-    private static final QName QNAME_BACCWS_PARTICIPANT = new QName("baccwsParticipant") ;
-    private CoordinatorCompletionCoordinatorEngineWS participant ;
-
-    public BusinessAgreementWithCoordinatorCompletionStubWS(final CoordinatorCompletionCoordinatorEngineWS participant)
-        throws Exception
-    {
-        this.participant = participant ;
-    }
-
-    public synchronized void close ()
-        throws WrongStateException, SystemException
-    {
-        /*
-         * Active -> illegal state
-         * Canceling -> illegal state
-         * Canceling-Active -> illegal state
-         * Canceling-Completing -> illegal state
-         * Completing -> illegal state
-         * Completed -> illegal state
-         * Closing -> no response
-         * Compensating -> illegal state
-         * Faulting -> illegal state
-         * Faulting-Active -> illegal state
-         * Faulting-Compensating -> illegal state
-         * Exiting -> illegal state
-         * Ended -> ended
-         */
-        final StateWS state = participant.close() ;
-
-        if (state == StateWS.STATE_CLOSING)
-        {
-            throw new SystemException() ;
-        }
-        else if (state != StateWS.STATE_ENDED)
-        {
-            throw new WrongStateException() ;
-        }
-    }
-
-    public synchronized void cancel ()
-        throws WrongStateException, SystemException
-    {
-        /*
-         * Active -> illegal state
-         * Canceling -> no response
-         * Canceling-Active -> no response
-         * Canceling-Completing -> no response
-         * Completing -> illegal state
-         * Completed -> illegal state
-         * Closing -> illegal state
-         * Compensating -> illegal state
-         * Faulting -> illegal state
-         * Faulting-Active -> illegal state
-         * Faulting-Compensating -> illegal state
-         * Exiting -> illegal state
-         * Ended -> ended
-         */
-        final StateWS state = participant.cancel() ;
-
-        if ((state == StateWS.STATE_CANCELING) || (state == StateWS.STATE_CANCELING_ACTIVE) ||
-            (state == StateWS.STATE_CANCELING_COMPLETING))
-        {
-            throw new SystemException() ;
-        }
-        else if (state != StateWS.STATE_ENDED)
-        {
-            throw new WrongStateException() ;
-        }
-    }
-
-    public synchronized void compensate ()
-        throws FaultedException, WrongStateException, SystemException
-    {
-        /*
-         * Active -> illegal state
-         * Canceling -> illegal state
-         * Canceling-Active -> illegal state
-         * Canceling-Completing -> illegal state
-         * Completing -> illegal state
-         * Completed -> illegal state
-         * Closing -> illegal state
-         * Compensating -> no response
-         * Faulting -> illegal state
-         * Faulting-Active -> illegal state
-         * Faulting-Compensating -> fault
-         * Exiting -> illegal state
-         * Ended -> ended
-         */
-        final StateWS state = participant.compensate() ;
-        if (state == StateWS.STATE_COMPENSATING)
-        {
-            throw new SystemException() ;
-        }
-        else if (state == StateWS.STATE_FAILING_COMPENSATING)
-        {
-            throw new FaultedException() ;
-        }
-        else if (state != StateWS.STATE_ENDED)
-        {
-            throw new WrongStateException() ;
-        }
-    }
-
-    public synchronized void complete ()
-        throws WrongStateException, SystemException
-    {
-        /*
-         * Active -> illegal state
-         * Canceling -> illegal state
-         * Canceling-Active -> illegal state
-         * Canceling-Completing -> canceling
-         * Completing -> no response
-         * Completed -> completed
-         * Closing -> illegal state
-         * Compensating -> illegal state
-         * Faulting -> illegal state
-         * Faulting-Active -> illegal state
-         * Faulting-Compensating -> fault
-         * Exiting -> exiting
-         * Ended -> illegal state
-         */
-        final StateWS state = participant.complete() ;
-        if (state == StateWS.STATE_COMPLETED)
-        {
-            return ;
-        }
-        else if ((state == StateWS.STATE_FAILING_COMPENSATING) || (state == StateWS.STATE_CANCELING_COMPLETING) ||
-            (state == StateWS.STATE_EXITING))
-        {
-            throw new SystemException() ;
-        }
-        throw new WrongStateException() ;
-    }
-
-    public String status ()
-        throws SystemException
-    {
-        final StateWS 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.BusinessAgreementWithCoordinatorCompletionStubWS_2 [com.arjuna.wst.stub.BusinessAgreementWithCoordinatorCompletionStubWS_2] - Error persisting participant state
-     */
-    public boolean saveState(final OutputObjectState oos)
-    {
-        try
-        {
-            oos.packString(participant.getId()) ;
-
-            // n.b. just use toString() for the endpoint -- it uses the writeTo() method which calls a suitable marshaller
-            final StringWriter sw = new StringWriter() ;
-            final XMLStreamWriter writer = SoapUtils.getXMLStreamWriter(sw) ;
-            StreamHelper.writeStartElement(writer, QNAME_BACCWS_PARTICIPANT) ;
-            String eprefText = participant.getParticipant().toString();
-            writer.writeCData(eprefText);
-            StreamHelper.writeEndElement(writer, null, null) ;
-            writer.close() ;
-
-            oos.packString(writer.toString()) ;
-
-            final StateWS state = participant.getStatus();
-            final QName stateName = state.getValue();
-            final String ns = stateName.getNamespaceURI();
-            final String localPart = stateName.getLocalPart();
-            final String prefix = stateName.getPrefix();
-            oos.packString(ns != null ? ns : "");
-            oos.packString(localPart != null ? localPart : "");
-            oos.packString(prefix != null ? prefix : "");
-
-            return true ;
-        }
-        catch (final Throwable th)
-        {
-            WSTLogger.arjLoggerI18N.error("com.arjuna.wst.stub.BusinessAgreementWithCoordinatorCompletionStubWS_2", th) ;
-            return false ;
-        }
-    }
-
-    /**
-     * @message com.arjuna.wst.stub.BusinessAgreementWithCoordinatorCompletionStubWS_3 [com.arjuna.wst.stub.BusinessAgreementWithCoordinatorCompletionStubWS_3] - Error restoring participant state
-     */
-    public boolean restoreState(final InputObjectState ios)
-    {
-        try
-        {
-            final String id = ios.unpackString();
-            final String eprValue = ios.unpackString();
-
-            final XMLStreamReader reader = SoapUtils.getXMLStreamReader(new StringReader(eprValue)) ;
-            StreamHelper.checkNextStartTag(reader, QNAME_BACCWS_PARTICIPANT) ;
-            String eprefText = reader.getText();
-            StreamSource source = new StreamSource(new StringReader(eprefText));
-            final W3CEndpointReference endpointReference = new W3CEndpointReference(source);
-
-            String ns = ios.unpackString();
-            final String localPart = ios.unpackString();
-            String prefix = ios.unpackString();
-            if ("".equals(ns)) {
-                ns = null;
-            }
-            if ("".equals(prefix)) {
-                prefix = null;
-            }
-
-            QName statename = new QName(ns, localPart, prefix);
-            StateWS state = StateWS.toStateWS(statename);
-
-            participant = new CoordinatorCompletionCoordinatorEngineWS(id, endpointReference, state);
-            return true ;
-        }
-        catch (final Throwable th)
-        {
-            WSTLogger.arjLoggerI18N.error("com.arjuna.wst.stub.BusinessAgreementWithCoordinatorCompletionStubWS_3", th) ;
-            return false ;
-        }
-    }
-}

Deleted: labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/wst/stub/BusinessAgreementWithParticipantCompletionStubWS.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/wst/stub/BusinessAgreementWithParticipantCompletionStubWS.java	2008-01-25 17:05:33 UTC (rev 18123)
+++ labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/wst/stub/BusinessAgreementWithParticipantCompletionStubWS.java	2008-01-25 17:18:13 UTC (rev 18124)
@@ -1,243 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. 
- * 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: BusinessAgreementWithParticipantCompletionStub.java,v 1.1.2.2 2004/06/18 15:06:09 nmcl Exp $
- */
-
-package com.arjuna.wst.stub;
-
-import java.io.StringWriter;
-import java.io.StringReader;
-
-import javax.xml.namespace.QName;
-import javax.xml.stream.XMLStreamReader;
-import javax.xml.stream.XMLStreamWriter;
-import javax.xml.ws.wsaddressing.W3CEndpointReference;
-import javax.xml.transform.stream.StreamSource;
-
-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.wsba.StateWS;
-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.ParticipantCompletionCoordinatorEngineWS;
-
-public class BusinessAgreementWithParticipantCompletionStubWS implements BusinessAgreementWithParticipantCompletionParticipant, PersistableParticipant
-{
-    private static final QName QNAME_BAPCWS_PARTICIPANT = new QName("bapcwsParticipant") ;
-
-    private ParticipantCompletionCoordinatorEngineWS participant ;
-
-    public BusinessAgreementWithParticipantCompletionStubWS(final ParticipantCompletionCoordinatorEngineWS 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
-         * Faulting -> illegal state
-         * Faulting-Active -> illegal state
-         * Faulting-Compensating -> illegal state
-         * Exiting -> illegal state
-         * Ended -> ended
-         */
-        final StateWS state = participant.close() ;
-
-        if (state == StateWS.STATE_CLOSING)
-        {
-            throw new SystemException() ;
-        }
-        else if (state != StateWS.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
-         * Faulting -> illegal state
-         * Faulting-Active -> illegal state
-         * Faulting-Compensating -> illegal state
-         * Exiting -> illegal state
-         * Ended -> ended
-         */
-        final StateWS state = participant.cancel() ;
-
-        if (state == StateWS.STATE_CANCELING)
-        {
-            throw new SystemException() ;
-        }
-        else if (state != StateWS.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
-         * Faulting -> illegal state
-         * Faulting-Active -> illegal state
-         * Faulting-Compensating -> fault
-         * Exiting -> illegal state
-         * Ended -> ended
-         */
-        final StateWS state = participant.compensate() ;
-        if (state == StateWS.STATE_COMPENSATING)
-        {
-            throw new SystemException() ;
-        }
-        else if (state == StateWS.STATE_FAILING_COMPENSATING)
-        {
-            throw new FaultedException() ;
-        }
-        else if (state != StateWS.STATE_ENDED)
-        {
-            throw new WrongStateException() ;
-        }
-    }
-
-    public String status ()
-        throws SystemException
-    {
-        final StateWS 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.BusinessAgreementWithParticipantCompletionStubWS_2 [com.arjuna.wst.stub.BusinessAgreementWithParticipantCompletionStubWS_2] - Error persisting participant state
-     */
-    public boolean saveState(final OutputObjectState oos)
-    {
-        try
-        {
-            oos.packString(participant.getId()) ;
-
-            // n.b. just use toString() for the endpoint -- it uses the writeTo() method which calls a suitable marshaller
-            final StringWriter sw = new StringWriter() ;
-            final XMLStreamWriter writer = SoapUtils.getXMLStreamWriter(sw) ;
-            StreamHelper.writeStartElement(writer, QNAME_BAPCWS_PARTICIPANT) ;
-            String eprefText = participant.getParticipant().toString();
-            writer.writeCData(eprefText);
-            StreamHelper.writeEndElement(writer, null, null) ;
-            writer.close() ;
-
-            oos.packString(writer.toString()) ;
-
-            final StateWS state = participant.getStatus();
-            final QName stateName = state.getValue();
-            final String ns = stateName.getNamespaceURI();
-            final String localPart = stateName.getLocalPart();
-            final String prefix = stateName.getPrefix();
-            oos.packString(ns != null ? ns : "");
-            oos.packString(localPart != null ? localPart : "");
-            oos.packString(prefix != null ? prefix : "");
-
-            return true ;
-        }
-        catch (final Throwable th)
-        {
-            WSTLogger.arjLoggerI18N.error("com.arjuna.wst.stub.BusinessAgreementWithParticipantCompletionStubWS_2", th) ;
-            return false ;
-        }
-    }
-
-    /**
-     * @message com.arjuna.wst.stub.BusinessAgreementWithParticipantCompletionStubWS_3 [com.arjuna.wst.stub.BusinessAgreementWithParticipantCompletionStubWS_3] - Error restoring participant state
-     */
-    public boolean restoreState(final InputObjectState ios)
-    {
-        try
-        {
-            final String id = ios.unpackString() ;
-            final String eprValue = ios.unpackString() ;
-
-            // this should successfully reverse the save process
-            final XMLStreamReader reader = SoapUtils.getXMLStreamReader(new StringReader(eprValue)) ;
-            StreamHelper.checkNextStartTag(reader, QNAME_BAPCWS_PARTICIPANT) ;
-            String eprefText = reader.getText();
-            StreamSource source = new StreamSource(new StringReader(eprefText));
-            final W3CEndpointReference endpointReference = new W3CEndpointReference(source);
-
-            String ns = ios.unpackString();
-            final String localPart = ios.unpackString();
-            String prefix = ios.unpackString();
-            if ("".equals(ns)) {
-                ns = null;
-            }
-            if ("".equals(prefix)) {
-                prefix = null;
-            }
-
-            QName statename = new QName(ns, localPart, prefix);
-            StateWS state = StateWS.toStateWS(statename);
-
-            participant = new ParticipantCompletionCoordinatorEngineWS(id, endpointReference, state);
-            return true ;
-        }
-        catch (final Throwable th)
-        {
-            WSTLogger.arjLoggerI18N.error("com.arjuna.wst.stub.BusinessAgreementWithParticipantCompletionStubWS_3", th) ;
-            return false ;
-        }
-    }
-}
\ No newline at end of file

Deleted: labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/wst/stub/CompletionStubWS.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/wst/stub/CompletionStubWS.java	2008-01-25 17:05:33 UTC (rev 18123)
+++ labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/wst/stub/CompletionStubWS.java	2008-01-25 17:18:13 UTC (rev 18124)
@@ -1,224 +0,0 @@
-package com.arjuna.wst.stub;
-
-import com.arjuna.webservices.SoapFault;
-import com.arjuna.webservices.wsaddrws.AddressingHelper;
-import com.arjuna.webservices.wsarj.ArjunaContextWS;
-import com.arjuna.webservices.wsarj.InstanceIdentifierWS;
-import com.arjuna.webservices.wsarjtx.ArjunaTXConstants;
-import com.arjuna.webservices.wsat.client.CompletionCoordinatorClientWS;
-import com.arjuna.webservices.wsat.processors.CompletionInitiatorCallbackWS;
-import com.arjuna.webservices.wsat.processors.CompletionInitiatorProcessorWS;
-import com.arjuna.wsc.messaging.MessageIdWS;
-import com.arjuna.wst.SystemException;
-import com.arjuna.wst.TransactionRolledBackException;
-import com.arjuna.wst.UnknownTransactionException;
-import org.oasis_open.docs.ws_tx.wsat._2006._06.Notification;
-
-import javax.xml.ws.addressing.AddressingProperties;
-import javax.xml.ws.wsaddressing.W3CEndpointReference;
-
-public class CompletionStubWS implements
-		com.arjuna.wst.CompletionCoordinatorParticipant
-{
-    private W3CEndpointReference _completionCoordinator = null;
-    private String _id;
-
-	public CompletionStubWS(final String id, final W3CEndpointReference completionCoordinator)
-			throws Exception
-	{
-		_completionCoordinator = completionCoordinator;
-		_id = id;
-	}
-
-	public void commit () throws TransactionRolledBackException,
-            UnknownTransactionException, SystemException
-    {
-        final AddressingProperties addressingProperties = AddressingHelper.createNotificationContext(MessageIdWS.getMessageId()) ;
-
-        final CompletionStubWS.RequestCallback callback = new CompletionStubWS.RequestCallback() ;
-        final CompletionInitiatorProcessorWS completionInitiator = CompletionInitiatorProcessorWS.getProcessor() ;
-        completionInitiator.registerCallback(_id, callback) ;
-        try
-        {
-            CompletionCoordinatorClientWS.getClient().sendCommit(_completionCoordinator, addressingProperties, new InstanceIdentifierWS(_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) && ArjunaTXConstants.UNKNOWNTRANSACTION_ERROR_CODE_QNAME.equals(soapFault.getSubcode()))
-            {
-                throw new UnknownTransactionException();
-            }
-        }
-
-        throw new SystemException() ;
-	}
-
-	public void rollback () throws UnknownTransactionException, SystemException
-	{
-        final AddressingProperties addressingProperties = AddressingHelper.createNotificationContext(MessageIdWS.getMessageId()) ;
-
-        final CompletionStubWS.RequestCallback callback = new CompletionStubWS.RequestCallback() ;
-        final CompletionInitiatorProcessorWS completionInitiator = CompletionInitiatorProcessorWS.getProcessor() ;
-        completionInitiator.registerCallback(_id, callback) ;
-        try
-        {
-            CompletionCoordinatorClientWS.getClient().sendRollback(_completionCoordinator, addressingProperties, new InstanceIdentifierWS(_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) && ArjunaTXConstants.UNKNOWNTRANSACTION_ERROR_CODE_QNAME.equals(soapFault.getSubcode()))
-            {
-                throw new UnknownTransactionException();
-            }
-        }
-
-        throw new SystemException() ;
-	}
-
-    private static class RequestCallback extends CompletionInitiatorCallbackWS
-    {
-        /**
-         * The addressing context.
-         */
-        private AddressingProperties addressingProperties ;
-        /**
-         * The arjuna context.
-         */
-        private ArjunaContextWS arjunaContext ;
-        /**
-         * 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.
-         */
-        AddressingProperties getAddressingProperties()
-        {
-            return addressingProperties ;
-        }
-
-        /**
-         * Get the arjuna context.
-         * @return The arjuna context.
-         */
-        ArjunaContextWS getArjunaContext()
-        {
-            return arjunaContext ;
-        }
-
-        /**
-         * 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 addressingProperties The addressing context.
-         * @param arjunaContext The arjuna context.
-         */
-        public void aborted(final Notification aborted, final AddressingProperties addressingProperties,
-            final ArjunaContextWS arjunaContext)
-        {
-            this.aborted = true ;
-            this.addressingProperties = addressingProperties ;
-            this.arjunaContext = arjunaContext ;
-        }
-
-        /**
-         * An committed response.
-         * @param committed The committed notification.
-         * @param addressingProperties The addressing context.
-         * @param arjunaContext The arjuna context.
-         */
-        public void committed(final Notification committed, final AddressingProperties addressingProperties,
-            final ArjunaContextWS arjunaContext)
-        {
-            this.committed  = true ;
-            this.addressingProperties = addressingProperties ;
-            this.arjunaContext = arjunaContext ;
-        }
-
-        /**
-         * A SOAP fault response.
-         * @param soapFault The SOAP fault.
-         * @param addressingProperties The addressing context.
-         * @param arjunaContext The arjuna context.
-         */
-        public void soapFault(final SoapFault soapFault, final AddressingProperties addressingProperties,
-            final ArjunaContextWS arjunaContext)
-        {
-            this.soapFault = soapFault ;
-            this.addressingProperties = addressingProperties ;
-            this.arjunaContext = arjunaContext ;
-        }
-    }
-}

Deleted: labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/wst/stub/Durable2PCStubWS.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/wst/stub/Durable2PCStubWS.java	2008-01-25 17:05:33 UTC (rev 18123)
+++ labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/wst/stub/Durable2PCStubWS.java	2008-01-25 17:18:13 UTC (rev 18124)
@@ -1,19 +0,0 @@
-package com.arjuna.wst.stub;
-
-import com.arjuna.wst.Durable2PCParticipant;
-
-import javax.xml.ws.wsaddressing.W3CEndpointReference;
-
-public class Durable2PCStubWS extends ParticipantStubWS implements Durable2PCParticipant
-{
-    // default ctor for crash recovery
-    public Durable2PCStubWS() throws Exception {
-        super(null, true, null);
-    }
-
-    public Durable2PCStubWS(final String id, final W3CEndpointReference twoPCParticipant)
-        throws Exception
-    {
-        super(id, true, twoPCParticipant) ;
-    }
-}

Deleted: labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/wst/stub/ParticipantStubWS.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/wst/stub/ParticipantStubWS.java	2008-01-25 17:05:33 UTC (rev 18123)
+++ labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/wst/stub/ParticipantStubWS.java	2008-01-25 17:18:13 UTC (rev 18124)
@@ -1,203 +0,0 @@
-package com.arjuna.wst.stub;
-
-import com.arjuna.wst.*;
-import com.arjuna.wst.messaging.engines.CoordinatorEngineWS;
-import com.arjuna.webservices.wsat.StateWS;
-import com.arjuna.webservices.soap.SoapUtils;
-import com.arjuna.webservices.util.StreamHelper;
-import com.arjuna.webservices.logging.WSTLogger;
-import com.arjuna.ats.arjuna.state.OutputObjectState;
-import com.arjuna.ats.arjuna.state.InputObjectState;
-
-import javax.xml.namespace.QName;
-import javax.xml.stream.XMLStreamWriter;
-import javax.xml.stream.XMLStreamReader;
-import javax.xml.ws.wsaddressing.W3CEndpointReference;
-import javax.xml.transform.stream.StreamSource;
-import java.io.StringWriter;
-import java.io.StringReader;
-
-public class ParticipantStubWS implements Participant, PersistableParticipant
-{
-    private static final QName QNAME_TWO_PC_PARTICIPANT = new QName("twoPCParticipant") ;
-    private CoordinatorEngineWS coordinator ;
-
-    public ParticipantStubWS(final String id, final boolean durable, final W3CEndpointReference twoPCParticipant)
-        throws Exception
-    {
-        coordinator = new CoordinatorEngineWS(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 StateWS state = coordinator.prepare() ;
-        if (state == StateWS.STATE_PREPARED_SUCCESS)
-        {
-            return new Prepared() ;
-        }
-        else if (state == StateWS.STATE_ABORTING)
-        {
-            return new Aborted() ;
-        }
-        else if (state == null)
-        {
-            if (coordinator.isReadOnly())
-            {
-                return new ReadOnly() ;
-            }
-            else
-            {
-                return new Aborted() ;
-            }
-        }
-        else if (state == StateWS.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 StateWS state = coordinator.commit() ;
-        if (state != null)
-        {
-            if (state == StateWS.STATE_COMMITTING)
-            {
-                // typically means no response from the remote end.
-                // throw a comm exception to distinguish this case from the
-                // one where the remote end itself threw a SystemException.
-                throw new SystemCommunicationException();
-            }
-            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 StateWS state = coordinator.rollback() ;
-        if (state != null)
-        {
-            if (state == StateWS.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.ParticipantStubWS_1 [com.arjuna.wst.stub.ParticipantStubWS_1] - Error persisting participant state
-     */
-    public boolean saveState(final OutputObjectState oos)
-    {
-        try
-        {
-            oos.packString(coordinator.getId()) ;
-            oos.packBoolean(coordinator.isDurable()) ;
-
-            // n.b. just use toString() for the endpoint -- it uses the writeTo() method which calls a suitable marshaller
-            final StringWriter sw = new StringWriter() ;
-            final XMLStreamWriter writer = SoapUtils.getXMLStreamWriter(sw) ;
-            StreamHelper.writeStartElement(writer, QNAME_TWO_PC_PARTICIPANT) ;
-            String eprefText = coordinator.getParticipant().toString();
-            writer.writeCData(eprefText);
-            StreamHelper.writeEndElement(writer, null, null) ;
-            writer.close() ;
-            sw.close();
-
-            String tmp = writer.toString();
-            String swString = sw.toString();
-            oos.packString(swString) ;
-
-            return true ;
-        }
-        catch (final Throwable th)
-        {
-            WSTLogger.arjLoggerI18N.error("com.arjuna.wst.stub.ParticipantStubWS_1", th) ;
-            return false ;
-        }
-    }
-
-    /**
-     * @message com.arjuna.wst.stub.ParticipantStubWS_2 [com.arjuna.wst.stub.ParticipantStubWS_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() ;
-
-            // this should successfully reverse the save process
-            final XMLStreamReader reader = SoapUtils.getXMLStreamReader(new StringReader(eprValue)) ;
-            StreamHelper.checkNextStartTag(reader, QNAME_TWO_PC_PARTICIPANT) ;
-            String eprefText = reader.getText();
-            StreamSource source = new StreamSource(new StringReader(eprefText));
-            final W3CEndpointReference endpointReference = new W3CEndpointReference(source);
-            coordinator = new CoordinatorEngineWS(id, durable, endpointReference, StateWS.STATE_PREPARED_SUCCESS) ;
-            return true ;
-        }
-        catch (final Throwable th)
-        {
-            WSTLogger.arjLoggerI18N.error("com.arjuna.wst.stub.ParticipantStubWS_2", th) ;
-            return false ;
-        }
-    }
-}

Deleted: labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/wst/stub/Volatile2PCStubWS.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/wst/stub/Volatile2PCStubWS.java	2008-01-25 17:05:33 UTC (rev 18123)
+++ labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/wst/stub/Volatile2PCStubWS.java	2008-01-25 17:18:13 UTC (rev 18124)
@@ -1,14 +0,0 @@
-package com.arjuna.wst.stub;
-
-import com.arjuna.wst.Volatile2PCParticipant;
-
-import javax.xml.ws.wsaddressing.W3CEndpointReference;
-
-public class Volatile2PCStubWS extends ParticipantStubWS implements Volatile2PCParticipant
-{
-    public Volatile2PCStubWS(final String id, final W3CEndpointReference twoPCParticipant)
-        throws Exception
-    {
-        super(id, false, twoPCParticipant) ;
-    }
-}

Added: labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/wst11/BAParticipantManager.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/wst11/BAParticipantManager.java	                        (rev 0)
+++ labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/wst11/BAParticipantManager.java	2008-01-25 17:18:13 UTC (rev 18124)
@@ -0,0 +1,83 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. 
+ * 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.wst11;
+
+import com.arjuna.wst.WrongStateException;
+import com.arjuna.wst.UnknownTransactionException;
+import com.arjuna.wst.SystemException;
+
+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 BAParticipantManager
+{
+
+    /**
+     * 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;
+
+    /**
+     * Cannot complete.
+     */
+
+    public void cannotComplete () throws WrongStateException, UnknownTransactionException, SystemException;
+
+    /**
+     * Fault.
+     */
+
+    public void fail (final QName exceptionIdentifier) throws SystemException;
+}
\ No newline at end of file

Added: labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/wst11/BusinessActivityTerminator.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/wst11/BusinessActivityTerminator.java	                        (rev 0)
+++ labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/wst11/BusinessActivityTerminator.java	2008-01-25 17:18:13 UTC (rev 18124)
@@ -0,0 +1,47 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. 
+ * 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: BusinessActivityTerminator.java,v 1.4 2004/09/09 08:48:32 kconner Exp $
+ */
+
+package com.arjuna.wst11;
+
+import javax.xml.ws.wsaddressing.W3CEndpointReference;
+
+/**
+ * Not in the 1.1 specification. Supposed to use participant interface.
+ */
+
+public interface BusinessActivityTerminator extends com.arjuna.wst.BusinessActivityTerminator
+{
+    /**
+     * return either the terminator or participant endpoint depending upon what type of terminator strub this is
+     * @return
+     */
+    public W3CEndpointReference getEndpoint() ;
+}
\ No newline at end of file

Added: labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/wst11/CompletionCoordinatorParticipant.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/wst11/CompletionCoordinatorParticipant.java	                        (rev 0)
+++ labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/wst11/CompletionCoordinatorParticipant.java	2008-01-25 17:18:13 UTC (rev 18124)
@@ -0,0 +1,11 @@
+package com.arjuna.wst11;
+
+import javax.xml.ws.wsaddressing.W3CEndpointReference;
+
+/**
+ */
+
+public interface CompletionCoordinatorParticipant extends com.arjuna.wst.CompletionCoordinatorParticipant
+{
+    public W3CEndpointReference getParticipant();
+}

Added: labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/wst11/messaging/CompletionCoordinatorProcessorImpl.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/wst11/messaging/CompletionCoordinatorProcessorImpl.java	                        (rev 0)
+++ labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/wst11/messaging/CompletionCoordinatorProcessorImpl.java	2008-01-25 17:18:13 UTC (rev 18124)
@@ -0,0 +1,220 @@
+package com.arjuna.wst11.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.webservices11.wsaddr.AddressingHelper;
+import com.arjuna.webservices11.wsarj.ArjunaContext;
+import com.arjuna.webservices11.wsarj.InstanceIdentifier;
+import com.arjuna.webservices11.wsat.client.CompletionInitiatorClient;
+import com.arjuna.webservices.wsarjtx.ArjunaTXConstants;
+import com.arjuna.webservices11.wsat.processors.CompletionCoordinatorProcessor;
+import com.arjuna.wsc11.messaging.MessageId;
+import com.arjuna.wst11.CompletionCoordinatorParticipant;
+import com.arjuna.wst.SystemException;
+import com.arjuna.wst.TransactionRolledBackException;
+import com.arjuna.wst.UnknownTransactionException;
+import org.oasis_open.docs.ws_tx.wsat._2006._06.Notification;
+
+import javax.xml.ws.addressing.AddressingProperties;
+import java.text.MessageFormat;
+
+/**
+ * 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 CompletionCoordinatorProcessorImpl 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 addressingProperties The addressing context.
+     * @param arjunaContext The arjuna context.
+     */
+    public void commit(final Notification commit, final AddressingProperties addressingProperties,
+        final ArjunaContext arjunaContext)
+    {
+        final InstanceIdentifier instanceIdentifier = arjunaContext.getInstanceIdentifier() ;
+        final CompletionCoordinatorParticipant participant = getParticipant(instanceIdentifier) ;
+
+        try
+        {
+            if (participant != null)
+            {
+                final String messageId = MessageId.getMessageId() ;
+                try
+                {
+                    participant.commit() ;
+                }
+                catch (final TransactionRolledBackException trbe)
+                {
+                    final AddressingProperties responseAddressingContext =
+                        AddressingHelper.createResponseContext(addressingProperties, messageId) ;
+                    CompletionInitiatorClient.getClient().sendAborted(participant.getParticipant(), responseAddressingContext, instanceIdentifier) ;
+                    return ;
+                }
+                catch (final UnknownTransactionException ute)
+                {
+                    final AddressingProperties faultAddressingContext = AddressingHelper.createFaultContext(addressingProperties, messageId) ;
+                    final SoapFault soapFault = new SoapFault(SoapFaultType.FAULT_SENDER, ArjunaTXConstants.UNKNOWNTRANSACTION_ERROR_CODE_QNAME,
+                        WSTLogger.log_mesg.getString("com.arjuna.wst.messaging.CompletionCoordinator11ProcessorImpl_1")) ;
+                    CompletionInitiatorClient.getClient().sendSoapFault(participant.getParticipant(), faultAddressingContext, soapFault, instanceIdentifier) ;
+                    return ;
+                }
+                catch (final SystemException se)
+                {
+                    final AddressingProperties faultAddressingContext = AddressingHelper.createFaultContext(addressingProperties, messageId) ;
+                    final String pattern = WSTLogger.log_mesg.getString("com.arjuna.wst.messaging.CompletionCoordinator11ProcessorImpl_2") ;
+                    final String message = MessageFormat.format(pattern, new Object[] {se}) ;
+                    final SoapFault soapFault = new SoapFault(SoapFaultType.FAULT_SENDER, ArjunaTXConstants.UNKNOWNERROR_ERROR_CODE_QNAME, message) ;
+                    CompletionInitiatorClient.getClient().sendSoapFault(participant.getParticipant(), faultAddressingContext, soapFault, instanceIdentifier) ;
+                    return ;
+                }
+                catch (final Throwable th)
+                {
+                    if (WSTLogger.arjLoggerI18N.isDebugEnabled())
+                    {
+                        WSTLogger.arjLoggerI18N.debug("com.arjuna.wst.messaging.CompletionCoordinator11ProcessorImpl_3", th) ;
+                    }
+                    final AddressingProperties faultAddressingContext = AddressingHelper.createFaultContext(addressingProperties, MessageId.getMessageId()) ;
+                    final SoapFault soapFault = new SoapFault(th) ;
+                    CompletionInitiatorClient.getClient().sendSoapFault(participant.getParticipant(), faultAddressingContext, soapFault, instanceIdentifier) ;
+                    return ;
+                }
+                final AddressingProperties responseAddressingContext = AddressingHelper.createResponseContext(addressingProperties, messageId) ;
+                CompletionInitiatorClient.getClient().sendCommitted(participant.getParticipant(), responseAddressingContext, instanceIdentifier) ;
+            }
+            else
+            {
+                if (WSTLogger.arjLoggerI18N.isDebugEnabled())
+                {
+                    WSTLogger.arjLoggerI18N.debug("com.arjuna.wst.messaging.CompletionCoordinator11ProcessorImpl_4", new Object[] {instanceIdentifier}) ;
+                }
+                final AddressingProperties faultAddressingContext = AddressingHelper.createFaultContext(addressingProperties, MessageId.getMessageId()) ;
+                final SoapFault soapFault = new SoapFault(SoapFaultType.FAULT_SENDER, ArjunaTXConstants.UNKNOWNTRANSACTION_ERROR_CODE_QNAME,
+                        WSTLogger.log_mesg.getString("com.arjuna.wst.messaging.CompletionCoordinator11ProcessorImpl_5")) ;
+                CompletionInitiatorClient.getClient().sendSoapFault(participant.getParticipant(), faultAddressingContext, soapFault, instanceIdentifier) ;
+            }
+        }
+        catch (Throwable throwable)
+        {
+            throwable.printStackTrace(System.err);
+        }
+    }
+
+    /**
+     * Rollback.
+     * @param rollback The rollback notification.
+     * @param addressingProperties The addressing context.
+     * @param arjunaContext The arjuna context.
+     */
+    public void rollback(final Notification rollback, final AddressingProperties addressingProperties,
+        final ArjunaContext arjunaContext)
+    {
+        final InstanceIdentifier instanceIdentifier = arjunaContext.getInstanceIdentifier() ;
+        final CompletionCoordinatorParticipant participant = getParticipant(instanceIdentifier) ;
+
+        try
+        {
+            if (participant != null)
+            {
+                final String messageId = MessageId.getMessageId() ;
+                try
+                {
+                    participant.rollback() ;
+                }
+                catch (final UnknownTransactionException ute)
+                {
+                    final AddressingProperties faultAddressingContext = AddressingHelper.createFaultContext(addressingProperties, messageId) ;
+                    final SoapFault soapFault = new SoapFault(SoapFaultType.FAULT_SENDER, ArjunaTXConstants.UNKNOWNTRANSACTION_ERROR_CODE_QNAME,
+                        WSTLogger.log_mesg.getString("com.arjuna.wst.messaging.CompletionCoordinator11ProcessorImpl_6")) ;
+                    CompletionInitiatorClient.getClient().sendSoapFault(participant.getParticipant(), faultAddressingContext, soapFault, instanceIdentifier) ;
+                    return ;
+                }
+                catch (SystemException systemException)
+                {
+                    final AddressingProperties faultAddressingContext = AddressingHelper.createFaultContext(addressingProperties, messageId) ;
+                    final String pattern = WSTLogger.log_mesg.getString("com.arjuna.wst.messaging.CompletionCoordinator11ProcessorImpl_7") ;
+                    final String message = MessageFormat.format(pattern, new Object[] {systemException}) ;
+                    final SoapFault soapFault = new SoapFault(SoapFaultType.FAULT_SENDER, ArjunaTXConstants.UNKNOWNERROR_ERROR_CODE_QNAME, message) ;
+                    CompletionInitiatorClient.getClient().sendSoapFault(participant.getParticipant(), faultAddressingContext, soapFault, instanceIdentifier) ;
+                    return ;
+                }
+                catch (final Throwable th)
+                {
+                    if (WSTLogger.arjLoggerI18N.isDebugEnabled())
+                    {
+                        WSTLogger.arjLoggerI18N.debug("com.arjuna.wst.messaging.CompletionCoordinator11ProcessorImpl_8", th) ;
+                    }
+                    final AddressingProperties faultAddressingContext = AddressingHelper.createFaultContext(addressingProperties, MessageId.getMessageId()) ;
+                    final SoapFault soapFault = new SoapFault(th) ;
+                    CompletionInitiatorClient.getClient().sendSoapFault(participant.getParticipant(), faultAddressingContext, soapFault, instanceIdentifier) ;
+                    return ;
+                }
+                final AddressingProperties responseAddressingContext = AddressingHelper.createResponseContext(addressingProperties, messageId) ;
+                CompletionInitiatorClient.getClient().sendAborted(participant.getParticipant(), responseAddressingContext, instanceIdentifier) ;
+            }
+            else
+            {
+                if (WSTLogger.arjLoggerI18N.isDebugEnabled())
+                {
+                    WSTLogger.arjLoggerI18N.debug("com.arjuna.wst.messaging.CompletionCoordinator11ProcessorImpl_9", new Object[] {instanceIdentifier}) ;
+                }
+                final AddressingProperties faultAddressingContext = AddressingHelper.createFaultContext(addressingProperties, MessageId.getMessageId()) ;
+                final SoapFault soapFault = new SoapFault(SoapFaultType.FAULT_SENDER, ArjunaTXConstants.UNKNOWNTRANSACTION_ERROR_CODE_QNAME,
+                    WSTLogger.log_mesg.getString("com.arjuna.wst.messaging.CompletionCoordinator11ProcessorImpl_10")) ;
+                CompletionInitiatorClient.getClient().sendSoapFault(participant.getParticipant(), faultAddressingContext, soapFault, instanceIdentifier) ;
+            }
+        }
+        catch (Throwable throwable)
+        {
+            throwable.printStackTrace(System.err);
+        }
+    }
+}

Added: labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/wst11/messaging/CoordinatorCompletionCoordinatorProcessorImpl.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/wst11/messaging/CoordinatorCompletionCoordinatorProcessorImpl.java	                        (rev 0)
+++ labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/wst11/messaging/CoordinatorCompletionCoordinatorProcessorImpl.java	2008-01-25 17:18:13 UTC (rev 18124)
@@ -0,0 +1,484 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags.
+ * 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.wst11.messaging;
+
+import com.arjuna.webservices.SoapFault;
+import com.arjuna.webservices.base.processors.ActivatedObjectProcessor;
+import com.arjuna.webservices.logging.WSTLogger;
+import com.arjuna.webservices11.wsaddr.AddressingHelper;
+import com.arjuna.webservices11.wsarj.ArjunaContext;
+import com.arjuna.webservices11.wsarj.InstanceIdentifier;
+import com.arjuna.webservices11.wsba.CoordinatorCompletionCoordinatorInboundEvents;
+import com.arjuna.webservices11.wsba.processors.CoordinatorCompletionCoordinatorProcessor;
+import com.arjuna.wsc11.messaging.MessageId;
+import org.oasis_open.docs.ws_tx.wsba._2006._06.ExceptionType;
+import org.oasis_open.docs.ws_tx.wsba._2006._06.NotificationType;
+import org.oasis_open.docs.ws_tx.wsba._2006._06.StatusType;
+
+import javax.xml.ws.addressing.AddressingProperties;
+
+
+/**
+ * The Coordinator Completion Coordinator processor.
+ * @author kevin
+ */
+public class CoordinatorCompletionCoordinatorProcessorImpl 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 canceled notification.
+     * @param addressingProperties The addressing context.
+     * @param arjunaContext The arjuna context.
+     *
+     * @message com.arjuna.wst11.messaging.CoordinatorCompletionCoordinatorProcessorImpl.canceled_1 [com.arjuna.wst11.messaging.CoordinatorCompletionCoordinatorProcessorImpl.cancelled_1] - Unexpected exception thrown from cancelled:
+     * @message com.arjuna.wst11.messaging.CoordinatorCompletionCoordinatorProcessorImpl.canceled_2 [com.arjuna.wst11.messaging.CoordinatorCompletionCoordinatorProcessorImpl.cancelled_2] - Cancelled called on unknown coordinator: {0}
+     */
+    public void cancelled(final NotificationType cancelled, final AddressingProperties addressingProperties, final ArjunaContext arjunaContext)
+    {
+        final InstanceIdentifier instanceIdentifier = arjunaContext.getInstanceIdentifier() ;
+        final CoordinatorCompletionCoordinatorInboundEvents coordinator = getCoordinator(instanceIdentifier) ;
+
+        if (coordinator != null)
+        {
+            try
+            {
+                coordinator.cancelled(cancelled, addressingProperties, arjunaContext) ;
+            }
+            catch (final Throwable th)
+            {
+                if (WSTLogger.arjLoggerI18N.isDebugEnabled())
+                {
+                    WSTLogger.arjLoggerI18N.debug("com.arjuna.wst11.messaging.CoordinatorCompletionCoordinatorProcessorImpl.canceled_1", th) ;
+                }
+            }
+        }
+        else if (WSTLogger.arjLoggerI18N.isDebugEnabled())
+        {
+            WSTLogger.arjLoggerI18N.debug("com.arjuna.wst11.messaging.CoordinatorCompletionCoordinatorProcessorImpl.canceled_2", new Object[] {instanceIdentifier}) ;
+        }
+    }
+
+    /**
+     * Closed.
+     * @param closed The closed notification.
+     * @param addressingProperties The addressing context.
+     * @param arjunaContext The arjuna context.
+     *
+     * @message com.arjuna.wst11.messaging.CoordinatorCompletionCoordinatorProcessorImpl.closed_1 [com.arjuna.wst11.messaging.CoordinatorCompletionCoordinatorProcessorImpl.closed_1] - Unexpected exception thrown from closed:
+     * @message com.arjuna.wst11.messaging.CoordinatorCompletionCoordinatorProcessorImpl.closed_2 [com.arjuna.wst11.messaging.CoordinatorCompletionCoordinatorProcessorImpl.closed_2] - Closed called on unknown coordinator: {0}
+     */
+    public void closed(final NotificationType closed, final AddressingProperties addressingProperties, final ArjunaContext arjunaContext)
+    {
+        final InstanceIdentifier instanceIdentifier = arjunaContext.getInstanceIdentifier() ;
+        final CoordinatorCompletionCoordinatorInboundEvents coordinator = getCoordinator(instanceIdentifier) ;
+
+        if (coordinator != null)
+        {
+            try
+            {
+                coordinator.closed(closed, addressingProperties, arjunaContext) ;
+            }
+            catch (final Throwable th)
+            {
+                if (WSTLogger.arjLoggerI18N.isDebugEnabled())
+                {
+                    WSTLogger.arjLoggerI18N.debug("com.arjuna.wst11.messaging.CoordinatorCompletionCoordinatorProcessorImpl.closed_1", th) ;
+                }
+            }
+        }
+        else if (WSTLogger.arjLoggerI18N.isDebugEnabled())
+        {
+            WSTLogger.arjLoggerI18N.debug("com.arjuna.wst11.messaging.CoordinatorCompletionCoordinatorProcessorImpl.closed_2", new Object[] {instanceIdentifier}) ;
+        }
+    }
+
+    /**
+     * Compensated.
+     * @param compensated The compensated notification.
+     * @param addressingProperties The addressing context.
+     * @param arjunaContext The arjuna context.
+     *
+     * @message com.arjuna.wst11.messaging.CoordinatorCompletionCoordinatorProcessorImpl.compensated_1 [com.arjuna.wst11.messaging.CoordinatorCompletionCoordinatorProcessorImpl.compensated_1] - Unexpected exception thrown from compensated:
+     * @message com.arjuna.wst11.messaging.CoordinatorCompletionCoordinatorProcessorImpl.compensated_2 [com.arjuna.wst11.messaging.CoordinatorCompletionCoordinatorProcessorImpl.compensated_2] - Compensated called on unknown coordinator: {0}
+     */
+    public void compensated(final NotificationType compensated, final AddressingProperties addressingProperties, final ArjunaContext arjunaContext)
+    {
+        final InstanceIdentifier instanceIdentifier = arjunaContext.getInstanceIdentifier() ;
+        final CoordinatorCompletionCoordinatorInboundEvents coordinator = getCoordinator(instanceIdentifier) ;
+
+        if (coordinator != null)
+        {
+            try
+            {
+                coordinator.compensated(compensated, addressingProperties, arjunaContext) ;
+            }
+            catch (final Throwable th)
+            {
+                if (WSTLogger.arjLoggerI18N.isDebugEnabled())
+                {
+                    WSTLogger.arjLoggerI18N.debug("com.arjuna.wst11.messaging.CoordinatorCompletionCoordinatorProcessorImpl.compensated_1", th) ;
+                }
+            }
+        }
+        else if (WSTLogger.arjLoggerI18N.isDebugEnabled())
+        {
+            WSTLogger.arjLoggerI18N.debug("com.arjuna.wst11.messaging.CoordinatorCompletionCoordinatorProcessorImpl.compensated_2", new Object[] {instanceIdentifier}) ;
+        }
+    }
+
+    /**
+      * Fail.
+      * @param fail The fail exceptionnotification.
+      * @param addressingProperties The addressing context.
+      * @param arjunaContext The arjuna context.
+      *
+      * @message com.arjuna.wst11.messaging.CoordinatorCompletionCoordinatorProcessorImpl.fail_1 [com.arjuna.wst11.messaging.CoordinatorCompletionCoordinatorProcessorImpl.fail_1] - Unexpected exception thrown from compensated:
+      * @message com.arjuna.wst11.messaging.CoordinatorCompletionCoordinatorProcessorImpl.fail_2 [com.arjuna.wst11.messaging.CoordinatorCompletionCoordinatorProcessorImpl.fail_2] - Compensated called on unknown coordinator: {0}
+      */
+     public void fail(final ExceptionType fail, final AddressingProperties addressingProperties, final ArjunaContext arjunaContext)
+     {
+         final InstanceIdentifier instanceIdentifier = arjunaContext.getInstanceIdentifier() ;
+         final CoordinatorCompletionCoordinatorInboundEvents coordinator = getCoordinator(instanceIdentifier) ;
+
+         if (coordinator != null)
+         {
+             try
+             {
+                 coordinator.fail(fail, addressingProperties, arjunaContext) ;
+             }
+             catch (final Throwable th)
+             {
+                 if (WSTLogger.arjLoggerI18N.isDebugEnabled())
+                 {
+                     WSTLogger.arjLoggerI18N.debug("com.arjuna.wst11.messaging.CoordinatorCompletionCoordinatorProcessorImpl.fail_1", th) ;
+                 }
+             }
+         }
+         else if (WSTLogger.arjLoggerI18N.isDebugEnabled())
+         {
+             WSTLogger.arjLoggerI18N.debug("com.arjuna.wst11.messaging.CoordinatorCompletionCoordinatorProcessorImpl.fail_2", new Object[] {instanceIdentifier}) ;
+         }
+     }
+    
+    /**
+     * Completed.
+     * @param completed The completed notification.
+     * @param addressingProperties The addressing context.
+     * @param arjunaContext The arjuna context.
+     *
+     * @message com.arjuna.wst11.messaging.CoordinatorCompletionCoordinatorProcessorImpl.completed_1 [com.arjuna.wst11.messaging.CoordinatorCompletionCoordinatorProcessorImpl.completed_1] - Unexpected exception thrown from completed:
+     * @message com.arjuna.wst11.messaging.CoordinatorCompletionCoordinatorProcessorImpl.completed_2 [com.arjuna.wst11.messaging.CoordinatorCompletionCoordinatorProcessorImpl.completed_2] - Completed called on unknown coordinator: {0}
+     */
+    public void completed(final NotificationType completed, final AddressingProperties addressingProperties,
+        final ArjunaContext arjunaContext)
+    {
+        final InstanceIdentifier instanceIdentifier = arjunaContext.getInstanceIdentifier() ;
+        final CoordinatorCompletionCoordinatorInboundEvents coordinator = getCoordinator(instanceIdentifier) ;
+
+        if (coordinator != null)
+        {
+            try
+            {
+                coordinator.completed(completed, addressingProperties, arjunaContext) ;
+            }
+            catch (final Throwable th)
+            {
+                if (WSTLogger.arjLoggerI18N.isDebugEnabled())
+                {
+                    WSTLogger.arjLoggerI18N.debug("com.arjuna.wst11.messaging.CoordinatorCompletionCoordinatorProcessorImpl.completed_1", th) ;
+                }
+            }
+        }
+        else if (WSTLogger.arjLoggerI18N.isDebugEnabled())
+        {
+            WSTLogger.arjLoggerI18N.debug("com.arjuna.wst11.messaging.CoordinatorCompletionCoordinatorProcessorImpl.completed_2", new Object[] {instanceIdentifier}) ;
+        }
+    }
+
+    /**
+     * Exit.
+     * @param exit The exit notification.
+     * @param addressingProperties The addressing context.
+     * @param arjunaContext The arjuna context.
+     *
+     * @message com.arjuna.wst11.messaging.CoordinatorCompletionCoordinatorProcessorImpl.exit_1 [com.arjuna.wst11.messaging.CoordinatorCompletionCoordinatorProcessorImpl.exit_1] - Unexpected exception thrown from exit:
+     * @message com.arjuna.wst11.messaging.CoordinatorCompletionCoordinatorProcessorImpl.exit_2 [com.arjuna.wst11.messaging.CoordinatorCompletionCoordinatorProcessorImpl.exit_2] - Exit called on unknown coordinator: {0}
+     */
+    public void exit(final NotificationType exit, final AddressingProperties addressingProperties, final ArjunaContext arjunaContext)
+    {
+        final InstanceIdentifier instanceIdentifier = arjunaContext.getInstanceIdentifier() ;
+        final CoordinatorCompletionCoordinatorInboundEvents coordinator = getCoordinator(instanceIdentifier) ;
+
+        if (coordinator != null)
+        {
+            try
+            {
+                coordinator.exit(exit, addressingProperties, arjunaContext) ;
+            }
+            catch (final Throwable th)
+            {
+                if (WSTLogger.arjLoggerI18N.isDebugEnabled())
+                {
+                    WSTLogger.arjLoggerI18N.debug("com.arjuna.wst11.messaging.CoordinatorCompletionCoordinatorProcessorImpl.exit_1", th) ;
+                }
+            }
+        }
+        else
+        {
+            if (WSTLogger.arjLoggerI18N.isDebugEnabled())
+            {
+                WSTLogger.arjLoggerI18N.debug("com.arjuna.wst11.messaging.CoordinatorCompletionCoordinatorProcessorImpl.exit_2", new Object[] {instanceIdentifier}) ;
+            }
+            sendExited(addressingProperties, arjunaContext) ;
+        }
+    }
+
+    /**
+     * FaulCannot completet.
+     * @param cannotComplete The cannot complete notification.
+     * @param addressingProperties The addressing context.
+     * @param arjunaContext The arjuna context.
+     *
+     * @message com.arjuna.wst11.messaging.CoordinatorCompletionCoordinatorProcessorImpl.cannotComplete_1 [com.arjuna.wst11.messaging.CoordinatorCompletionCoordinatorProcessorImpl.cannotComplete_1] - Unexpected exception thrown from fault:
+     * @message com.arjuna.wst11.messaging.CoordinatorCompletionCoordinatorProcessorImpl.cannotComplete_2 [com.arjuna.wst11.messaging.CoordinatorCompletionCoordinatorProcessorImpl.cannotComplete_2] - Fault called on unknown coordinator: {0}
+     */
+    public void cannotComplete(final NotificationType cannotComplete, final AddressingProperties addressingProperties,
+        final ArjunaContext arjunaContext)
+    {
+        final InstanceIdentifier instanceIdentifier = arjunaContext.getInstanceIdentifier() ;
+        final CoordinatorCompletionCoordinatorInboundEvents coordinator = getCoordinator(instanceIdentifier) ;
+
+        if (coordinator != null)
+        {
+            try
+            {
+                coordinator.cannotComplete(cannotComplete, addressingProperties, arjunaContext); ;
+            }
+            catch (final Throwable th)
+            {
+                if (WSTLogger.arjLoggerI18N.isDebugEnabled())
+                {
+                    WSTLogger.arjLoggerI18N.debug("com.arjuna.wst11.messaging.CoordinatorCompletionCoordinatorProcessorImpl.cannotComplete_1", th) ;
+                }
+            }
+        }
+        else
+        {
+            if (WSTLogger.arjLoggerI18N.isDebugEnabled())
+            {
+                WSTLogger.arjLoggerI18N.debug("com.arjuna.wst11.messaging.CoordinatorCompletionCoordinatorProcessorImpl.cannotComplete_2", new Object[] {instanceIdentifier}) ;
+            }
+            sendFailed(addressingProperties, arjunaContext) ;
+        }
+    }
+
+    /**
+     * Get Status.
+     * @param getStatus The get status notification.
+     * @param addressingProperties The addressing context.
+     * @param arjunaContext The arjuna context.
+     *
+     * @message com.arjuna.wst11.messaging.CoordinatorCompletionCoordinatorProcessorImpl.getStatus_1 [com.arjuna.wst11.messaging.CoordinatorCompletionCoordinatorProcessorImpl.getStatus_1] - Unexpected exception thrown from getStatus:
+     * @message com.arjuna.wst11.messaging.CoordinatorCompletionCoordinatorProcessorImpl.getStatus_2 [com.arjuna.wst11.messaging.CoordinatorCompletionCoordinatorProcessorImpl.getStatus_2] - GetStatus called on unknown coordinator: {0}
+     */
+    public void getStatus(final NotificationType getStatus, final AddressingProperties addressingProperties, final ArjunaContext arjunaContext)
+    {
+        final InstanceIdentifier instanceIdentifier = arjunaContext.getInstanceIdentifier() ;
+        final CoordinatorCompletionCoordinatorInboundEvents coordinator = getCoordinator(instanceIdentifier) ;
+
+        if (coordinator != null)
+        {
+            try
+            {
+                coordinator.getStatus(getStatus, addressingProperties, arjunaContext) ;
+            }
+            catch (final Throwable th)
+            {
+                if (WSTLogger.arjLoggerI18N.isDebugEnabled())
+                {
+                    WSTLogger.arjLoggerI18N.debug("com.arjuna.wst11.messaging.CoordinatorCompletionCoordinatorProcessorImpl.getStatus_1", th) ;
+                }
+            }
+        }
+        else if (WSTLogger.arjLoggerI18N.isDebugEnabled())
+        {
+            WSTLogger.arjLoggerI18N.debug("com.arjuna.wst11.messaging.CoordinatorCompletionCoordinatorProcessorImpl.getStatus_2", new Object[] {instanceIdentifier}) ;
+        }
+    }
+
+    /**
+     * Status.
+     * @param status The status.
+     * @param addressingProperties The addressing context.
+     * @param arjunaContext The arjuna context.
+     *
+     * @message com.arjuna.wst11.messaging.CoordinatorCompletionCoordinatorProcessorImpl.status_1 [com.arjuna.wst11.messaging.CoordinatorCompletionCoordinatorProcessorImpl.status_1] - Unexpected exception thrown from status:
+     * @message com.arjuna.wst11.messaging.CoordinatorCompletionCoordinatorProcessorImpl.status_2 [com.arjuna.wst11.messaging.CoordinatorCompletionCoordinatorProcessorImpl.status_2] - Status called on unknown coordinator: {0}
+     */
+    public void status(final StatusType status, final AddressingProperties addressingProperties, final ArjunaContext arjunaContext)
+    {
+        final InstanceIdentifier instanceIdentifier = arjunaContext.getInstanceIdentifier() ;
+        final CoordinatorCompletionCoordinatorInboundEvents coordinator = getCoordinator(instanceIdentifier) ;
+
+        if (coordinator != null)
+        {
+            try
+            {
+                coordinator.status(status, addressingProperties, arjunaContext) ;
+            }
+            catch (final Throwable th)
+            {
+                if (WSTLogger.arjLoggerI18N.isDebugEnabled())
+                {
+                    WSTLogger.arjLoggerI18N.debug("com.arjuna.wst11.messaging.CoordinatorCompletionCoordinatorProcessorImpl.status_1", th) ;
+                }
+            }
+        }
+        else if (WSTLogger.arjLoggerI18N.isDebugEnabled())
+        {
+            WSTLogger.arjLoggerI18N.debug("com.arjuna.wst11.messaging.CoordinatorCompletionCoordinatorProcessorImpl.status_2", new Object[] {instanceIdentifier}) ;
+        }
+    }
+
+    /**
+     * SOAP fault.
+     * @param soapFault The SOAP fault.
+     * @param addressingProperties The addressing context.
+     * @param arjunaContext The arjuna context.
+     *
+     * @message com.arjuna.wst11.messaging.CoordinatorCompletionCoordinatorProcessorImpl.soapFault_1 [com.arjuna.wst11.messaging.CoordinatorCompletionCoordinatorProcessorImpl.soapFault_1] - Unexpected exception thrown from soapFault:
+     * @message com.arjuna.wst11.messaging.CoordinatorCompletionCoordinatorProcessorImpl.soapFault_2 [com.arjuna.wst11.messaging.CoordinatorCompletionCoordinatorProcessorImpl.soapFault_2] - SoapFault called on unknown coordinator: {0}
+     */
+    public void soapFault(final SoapFault soapFault, final AddressingProperties addressingProperties,
+        final ArjunaContext arjunaContext)
+    {
+        final InstanceIdentifier instanceIdentifier = arjunaContext.getInstanceIdentifier() ;
+        final CoordinatorCompletionCoordinatorInboundEvents coordinator = getCoordinator(instanceIdentifier) ;
+
+        if (coordinator != null)
+        {
+            try
+            {
+                coordinator.soapFault(soapFault, addressingProperties, arjunaContext) ;
+            }
+            catch (final Throwable th)
+            {
+                if (WSTLogger.arjLoggerI18N.isDebugEnabled())
+                {
+                    WSTLogger.arjLoggerI18N.debug("com.arjuna.wst11.messaging.CoordinatorCompletionCoordinatorProcessorImpl.soapFault_1", th) ;
+                }
+            }
+        }
+        else if (WSTLogger.arjLoggerI18N.isDebugEnabled())
+        {
+            WSTLogger.arjLoggerI18N.debug("com.arjuna.wst11.messaging.CoordinatorCompletionCoordinatorProcessorImpl.soapFault_2", new Object[] {instanceIdentifier}) ;
+        }
+    }
+
+    /**
+     * Send an exited message.
+     *
+     * @param addressingProperties The addressing context.
+     * @param arjunaContext The arjuna context.
+     *
+     * @message com.arjuna.wst11.messaging.CoordinatorCompletionCoordinatorProcessorImpl.sendExited_1 [com.arjuna.wst11.messaging.CoordinatorCompletionCoordinatorProcessorImpl.sendExited_1] - Unexpected exception while sending Exited
+     */
+    private void sendExited(final AddressingProperties addressingProperties, final ArjunaContext arjunaContext)
+    {
+        // KEV add check for recovery
+        final String messageId = MessageId.getMessageId() ;
+        final AddressingProperties responseAddressingContext = AddressingHelper.createNotificationContext(messageId) ;
+        try
+        {
+            // TODO cannot do this without an endpoint so we have to log an error message!
+            // CoordinatorCompletionParticipantClient.getClient().sendExited(responseAddressingContext, arjunaContext.getInstanceIdentifier()) ;
+        }
+        catch (final Throwable th)
+        {
+            if (WSTLogger.arjLoggerI18N.isDebugEnabled())
+            {
+                WSTLogger.arjLoggerI18N.debug("com.arjuna.wst11.messaging.CoordinatorCompletionCoordinatorProcessorImpl.sendExited_1", th) ;
+            }
+        }
+    }
+
+    /**
+     * Send a faulted message.
+     *
+     * @param addressingProperties The addressing context.
+     * @param arjunaContext The arjuna context.
+     *
+     * @message com.arjuna.wst11.messaging.CoordinatorCompletionCoordinatorProcessorImpl.sendFailed_1 [com.arjuna.wst11.messaging.CoordinatorCompletionCoordinatorProcessorImpl.sendFailed_1] - Unexpected exception while sending Faulted
+     */
+    private void sendFailed(final AddressingProperties addressingProperties, final ArjunaContext arjunaContext)
+    {
+        // KEV add check for recovery
+        final String messageId = MessageId.getMessageId() ;
+        final AddressingProperties responseAddressingContext = AddressingHelper.createNotificationContext(messageId) ;
+        try
+        {
+            // TODO cannot do this without an endpoint so we have to log an error message!
+            // CoordinatorCompletionParticipantClient.getClient().sendFailed(responseAddressingContext, arjunaContext.getInstanceIdentifier()) ;
+        }
+        catch (final Throwable th)
+        {
+            if (WSTLogger.arjLoggerI18N.isDebugEnabled())
+            {
+                WSTLogger.arjLoggerI18N.debug("com.arjuna.wst11.messaging.CoordinatorCompletionCoordinatorProcessorImpl.sendFailed_1", th) ;
+            }
+        }
+    }
+}
\ No newline at end of file

Added: labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/wst11/messaging/CoordinatorCompletionParticipantProcessorImpl.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/wst11/messaging/CoordinatorCompletionParticipantProcessorImpl.java	                        (rev 0)
+++ labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/wst11/messaging/CoordinatorCompletionParticipantProcessorImpl.java	2008-01-25 17:18:13 UTC (rev 18124)
@@ -0,0 +1,549 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. 
+ * 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.wst11.messaging;
+
+import com.arjuna.webservices.SoapFault;
+import com.arjuna.webservices.base.processors.ActivatedObjectProcessor;
+import com.arjuna.webservices.logging.WSTLogger;
+import com.arjuna.webservices11.wsaddr.AddressingHelper;
+import com.arjuna.webservices11.wsarj.ArjunaContext;
+import com.arjuna.webservices11.wsarj.InstanceIdentifier;
+import com.arjuna.webservices11.wsba.CoordinatorCompletionParticipantInboundEvents;
+import com.arjuna.webservices11.wsba.processors.CoordinatorCompletionParticipantProcessor;
+import com.arjuna.wsc11.messaging.MessageId;
+import org.oasis_open.docs.ws_tx.wsba._2006._06.NotificationType;
+import org.oasis_open.docs.ws_tx.wsba._2006._06.StatusType;
+
+import javax.xml.ws.addressing.AddressingProperties;
+
+
+/**
+ * The Coordinator Completion Participant processor.
+ * @author kevin
+ */
+public class CoordinatorCompletionParticipantProcessorImpl 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 addressingProperties The addressing context.
+     * @param arjunaContext The arjuna context.
+     *
+     * @message com.arjuna.wst11.messaging.CoordinatorCompletionParticipantProcessorImpl.cancel_1 [com.arjuna.wst11.messaging.CoordinatorCompletionParticipantProcessorImpl.cancel_1] - Unexpected exception thrown from cancel:
+     * @message com.arjuna.wst11.messaging.CoordinatorCompletionParticipantProcessorImpl.cancel_2 [com.arjuna.wst11.messaging.CoordinatorCompletionParticipantProcessorImpl.cancel_2] - Cancel called on unknown participant: {0}
+     */
+    public void cancel(final NotificationType cancel, final AddressingProperties addressingProperties, final ArjunaContext arjunaContext)
+    {
+        final InstanceIdentifier instanceIdentifier = arjunaContext.getInstanceIdentifier() ;
+        final CoordinatorCompletionParticipantInboundEvents participant = getParticipant(instanceIdentifier) ;
+
+        if (participant != null)
+        {
+            try
+            {
+                participant.cancel(cancel, addressingProperties, arjunaContext) ;
+            }
+            catch (final Throwable th)
+            {
+                if (WSTLogger.arjLoggerI18N.isDebugEnabled())
+                {
+                    WSTLogger.arjLoggerI18N.debug("com.arjuna.wst11.messaging.CoordinatorCompletionParticipantProcessorImpl.cancel_1", th) ;
+                }
+            }
+        }
+        else
+        {
+            if (WSTLogger.arjLoggerI18N.isDebugEnabled())
+            {
+                WSTLogger.arjLoggerI18N.debug("com.arjuna.wst11.messaging.CoordinatorCompletionParticipantProcessorImpl.cancel_2", new Object[] {instanceIdentifier}) ;
+            }
+            // TODO - cannot do this as we don't have an endpoint
+            // sendCancelled(addressingProperties, arjunaContext) ;
+        }
+    }
+
+    /**
+     * Close.
+     * @param close The close notification.
+     * @param addressingProperties The addressing context.
+     * @param arjunaContext The arjuna context.
+     *
+     * @message com.arjuna.wst11.messaging.CoordinatorCompletionParticipantProcessorImpl.close_1 [com.arjuna.wst11.messaging.CoordinatorCompletionParticipantProcessorImpl.close_1] - Unexpected exception thrown from close:
+     * @message com.arjuna.wst11.messaging.CoordinatorCompletionParticipantProcessorImpl.close_2 [com.arjuna.wst11.messaging.CoordinatorCompletionParticipantProcessorImpl.close_2] - Close called on unknown participant: {0}
+     */
+    public void close(final NotificationType close, final AddressingProperties addressingProperties, final ArjunaContext arjunaContext)
+    {
+        final InstanceIdentifier instanceIdentifier = arjunaContext.getInstanceIdentifier() ;
+        final CoordinatorCompletionParticipantInboundEvents participant = getParticipant(instanceIdentifier) ;
+
+        if (participant != null)
+        {
+            try
+            {
+                participant.close(close, addressingProperties, arjunaContext) ;
+            }
+            catch (final Throwable th)
+            {
+                if (WSTLogger.arjLoggerI18N.isDebugEnabled())
+                {
+                    WSTLogger.arjLoggerI18N.debug("com.arjuna.wst11.messaging.CoordinatorCompletionParticipantProcessorImpl.close_1", th) ;
+                }
+            }
+        }
+        else
+        {
+            if (WSTLogger.arjLoggerI18N.isDebugEnabled())
+            {
+                WSTLogger.arjLoggerI18N.debug("com.arjuna.wst11.messaging.CoordinatorCompletionParticipantProcessorImpl.close_2", new Object[] {instanceIdentifier}) ;
+            }
+            // TODO - cannot do this as we don't have an endpoint
+            // sendClosed(addressingProperties, arjunaContext) ;
+        }
+    }
+
+    /**
+     * Compensate.
+     * @param compensate The compensate notification.
+     * @param addressingProperties The addressing context.
+     * @param arjunaContext The arjuna context.
+     *
+     * @message com.arjuna.wst11.messaging.CoordinatorCompletionParticipantProcessorImpl.compensate_1 [com.arjuna.wst11.messaging.CoordinatorCompletionParticipantProcessorImpl.compensate_1] - Unexpected exception thrown from compensate:
+     * @message com.arjuna.wst11.messaging.CoordinatorCompletionParticipantProcessorImpl.compensate_2 [com.arjuna.wst11.messaging.CoordinatorCompletionParticipantProcessorImpl.compensate_2] - Compensate called on unknown participant: {0}
+     */
+    public void compensate(final NotificationType compensate, final AddressingProperties addressingProperties, final ArjunaContext arjunaContext)
+    {
+        final InstanceIdentifier instanceIdentifier = arjunaContext.getInstanceIdentifier() ;
+        final CoordinatorCompletionParticipantInboundEvents participant = getParticipant(instanceIdentifier) ;
+
+        if (participant != null)
+        {
+            try
+            {
+                participant.compensate(compensate, addressingProperties, arjunaContext) ;
+            }
+            catch (final Throwable th)
+            {
+                if (WSTLogger.arjLoggerI18N.isDebugEnabled())
+                {
+                    WSTLogger.arjLoggerI18N.debug("com.arjuna.wst11.messaging.CoordinatorCompletionParticipantProcessorImpl.compensate_1", th) ;
+                }
+            }
+        }
+        else
+        {
+            if (WSTLogger.arjLoggerI18N.isDebugEnabled())
+            {
+                WSTLogger.arjLoggerI18N.debug("com.arjuna.wst11.messaging.CoordinatorCompletionParticipantProcessorImpl.compensate_2", new Object[] {instanceIdentifier}) ;
+            }
+            // TODO - cannot do this as we don't have an endpoint
+            // sendCompensated(addressingProperties, arjunaContext) ;
+        }
+    }
+
+    /**
+     * Complete.
+     * @param complete The complete notification.
+     * @param addressingProperties The addressing context.
+     * @param arjunaContext The arjuna context.
+     *
+     * @message com.arjuna.wst11.messaging.CoordinatorCompletionParticipantProcessorImpl.complete_1 [com.arjuna.wst11.messaging.CoordinatorCompletionParticipantProcessorImpl.complete_1] - Unexpected exception thrown from complete:
+     * @message com.arjuna.wst11.messaging.CoordinatorCompletionParticipantProcessorImpl.complete_2 [com.arjuna.wst11.messaging.CoordinatorCompletionParticipantProcessorImpl.complete_2] - Complete called on unknown participant: {0}
+     * @message com.arjuna.wst11.messaging.CoordinatorCompletionParticipantProcessorImpl.complete_3 [com.arjuna.wst11.messaging.CoordinatorCompletionParticipantProcessorImpl.complete_3] - Complete called on unknown participant
+     */
+    public void complete(final NotificationType complete, final AddressingProperties addressingProperties, final ArjunaContext arjunaContext)
+    {
+        final InstanceIdentifier instanceIdentifier = arjunaContext.getInstanceIdentifier() ;
+        final CoordinatorCompletionParticipantInboundEvents participant = getParticipant(instanceIdentifier) ;
+
+        if (participant != null)
+        {
+            try
+            {
+                participant.complete(complete, addressingProperties, arjunaContext) ;
+            }
+            catch (final Throwable th)
+            {
+                if (WSTLogger.arjLoggerI18N.isDebugEnabled())
+                {
+                    WSTLogger.arjLoggerI18N.debug("com.arjuna.wst11.messaging.CoordinatorCompletionParticipantProcessorImpl.complete_1", th) ;
+                }
+            }
+        }
+        else
+        {
+            if (WSTLogger.arjLoggerI18N.isDebugEnabled())
+            {
+                WSTLogger.arjLoggerI18N.debug("com.arjuna.wst11.messaging.CoordinatorCompletionParticipantProcessorImpl.complete_2", new Object[] {instanceIdentifier}) ;
+            }
+            // TODO - cannot do this as we don't have an endpoint
+            // sendFault(addressingProperties, arjunaContext, WSTLogger.log_mesg.getString("com.arjuna.wst11.messaging.CoordinatorCompletionParticipantProcessorImpl.complete_3")) ;
+        }
+    }
+
+    /**
+     * Exited.
+     * @param exited The exited notification.
+     * @param addressingProperties The addressing context.
+     * @param arjunaContext The arjuna context.
+     *
+     * @message com.arjuna.wst11.messaging.CoordinatorCompletionParticipantProcessorImpl.exited_1 [com.arjuna.wst11.messaging.CoordinatorCompletionParticipantProcessorImpl.exited_1] - Unexpected exception thrown from exited:
+     * @message com.arjuna.wst11.messaging.CoordinatorCompletionParticipantProcessorImpl.exited_2 [com.arjuna.wst11.messaging.CoordinatorCompletionParticipantProcessorImpl.exited_2] - Exited called on unknown participant: {0}
+     */
+    public void exited(final NotificationType exited, final AddressingProperties addressingProperties, final ArjunaContext arjunaContext)
+    {
+        final InstanceIdentifier instanceIdentifier = arjunaContext.getInstanceIdentifier() ;
+        final CoordinatorCompletionParticipantInboundEvents participant = getParticipant(instanceIdentifier) ;
+
+        if (participant != null)
+        {
+            try
+            {
+                participant.exited(exited, addressingProperties, arjunaContext) ;
+            }
+            catch (final Throwable th)
+            {
+                if (WSTLogger.arjLoggerI18N.isDebugEnabled())
+                {
+                    WSTLogger.arjLoggerI18N.debug("com.arjuna.wst11.messaging.CoordinatorCompletionParticipantProcessorImpl.exited_1", th) ;
+                }
+            }
+        }
+        else if (WSTLogger.arjLoggerI18N.isDebugEnabled())
+        {
+            WSTLogger.arjLoggerI18N.debug("com.arjuna.wst11.messaging.CoordinatorCompletionParticipantProcessorImpl.exited_2", new Object[] {instanceIdentifier}) ;
+        }
+    }
+
+    /**
+     * Not Completed.
+     * @param notCompleted The not completed notification.
+     * @param addressingProperties The addressing context.
+     * @param arjunaContext The arjuna context.
+     *
+     * @message com.arjuna.wst11.messaging.CoordinatorCompletionParticipantProcessorImpl.notCompleted_1 [com.arjuna.wst11.messaging.CoordinatorCompletionParticipantProcessorImpl.notCompleted_1] - Unexpected exception thrown from notCompleted:
+     * @message com.arjuna.wst11.messaging.CoordinatorCompletionParticipantProcessorImpl.notCompleted_2 [com.arjuna.wst11.messaging.CoordinatorCompletionParticipantProcessorImpl.notCompleted_2] - NotCompleted called on unknown participant: {0}
+     */
+    public void notCompleted(final NotificationType notCompleted, final AddressingProperties addressingProperties, final ArjunaContext arjunaContext)
+    {
+        final InstanceIdentifier instanceIdentifier = arjunaContext.getInstanceIdentifier() ;
+        final CoordinatorCompletionParticipantInboundEvents participant = getParticipant(instanceIdentifier) ;
+
+        if (participant != null)
+        {
+            try
+            {
+                participant.notCompleted(notCompleted, addressingProperties, arjunaContext) ;
+            }
+            catch (final Throwable th)
+            {
+                if (WSTLogger.arjLoggerI18N.isDebugEnabled())
+                {
+                    WSTLogger.arjLoggerI18N.debug("com.arjuna.wst11.messaging.CoordinatorCompletionParticipantProcessorImpl.notCompleted_1", th) ;
+                }
+            }
+        }
+        else if (WSTLogger.arjLoggerI18N.isDebugEnabled())
+        {
+            WSTLogger.arjLoggerI18N.debug("com.arjuna.wst11.messaging.CoordinatorCompletionParticipantProcessorImpl.notCompleted_2", new Object[] {instanceIdentifier}) ;
+        }
+    }
+
+    /**
+     * Failed.
+     * @param failed The failed notification.
+     * @param addressingProperties The addressing context.
+     * @param arjunaContext The arjuna context.
+     *
+     * @message com.arjuna.wst11.messaging.CoordinatorCompletionParticipantProcessorImpl.failed_1 [com.arjuna.wst11.messaging.CoordinatorCompletionParticipantProcessorImpl.failed_1] - Unexpected exception thrown from failed:
+     * @message com.arjuna.wst11.messaging.CoordinatorCompletionParticipantProcessorImpl.failed_2 [com.arjuna.wst11.messaging.CoordinatorCompletionParticipantProcessorImpl.failed_2] - Failed called on unknown participant: {0}
+     */
+    public void failed(final NotificationType failed, final AddressingProperties addressingProperties, final ArjunaContext arjunaContext)
+    {
+        final InstanceIdentifier instanceIdentifier = arjunaContext.getInstanceIdentifier() ;
+        final CoordinatorCompletionParticipantInboundEvents participant = getParticipant(instanceIdentifier) ;
+
+        if (participant != null)
+        {
+            try
+            {
+                participant.failed(failed, addressingProperties, arjunaContext) ;
+            }
+            catch (final Throwable th)
+            {
+                if (WSTLogger.arjLoggerI18N.isDebugEnabled())
+                {
+                    WSTLogger.arjLoggerI18N.debug("com.arjuna.wst11.messaging.CoordinatorCompletionParticipantProcessorImpl.faulted_1", th) ;
+                }
+            }
+        }
+        else if (WSTLogger.arjLoggerI18N.isDebugEnabled())
+        {
+            WSTLogger.arjLoggerI18N.debug("com.arjuna.wst11.messaging.CoordinatorCompletionParticipantProcessorImpl.faulted_2", new Object[] {instanceIdentifier}) ;
+        }
+    }
+
+    /**
+     * Get Status.
+     * @param getStatus The get status notification.
+     * @param addressingProperties The addressing context.
+     * @param arjunaContext The arjuna context.
+     *
+     * @message com.arjuna.wst11.messaging.CoordinatorCompletionParticipantProcessorImpl.getStatus_1 [com.arjuna.wst11.messaging.CoordinatorCompletionParticipantProcessorImpl.getStatus_1] - Unexpected exception thrown from getStatus:
+     * @message com.arjuna.wst11.messaging.CoordinatorCompletionParticipantProcessorImpl.getStatus_2 [com.arjuna.wst11.messaging.CoordinatorCompletionParticipantProcessorImpl.getStatus_2] - GetStatus called on unknown participant: {0}
+     */
+    public void getStatus(final NotificationType getStatus, final AddressingProperties addressingProperties, final ArjunaContext arjunaContext)
+    {
+        final InstanceIdentifier instanceIdentifier = arjunaContext.getInstanceIdentifier() ;
+        final CoordinatorCompletionParticipantInboundEvents participant = getParticipant(instanceIdentifier) ;
+
+        if (participant != null)
+        {
+            try
+            {
+                participant.getStatus(getStatus, addressingProperties, arjunaContext) ;
+            }
+            catch (final Throwable th)
+            {
+                if (WSTLogger.arjLoggerI18N.isDebugEnabled())
+                {
+                    WSTLogger.arjLoggerI18N.debug("com.arjuna.wst11.messaging.CoordinatorCompletionParticipantProcessorImpl.getStatus_1", th) ;
+                }
+            }
+        }
+        else if (WSTLogger.arjLoggerI18N.isDebugEnabled())
+        {
+            WSTLogger.arjLoggerI18N.debug("com.arjuna.wst11.messaging.CoordinatorCompletionParticipantProcessorImpl.getStatus_2", new Object[] {instanceIdentifier}) ;
+        }
+    }
+
+    /**
+     * Status.
+     * @param status The status.
+     * @param addressingProperties The addressing context.
+     * @param arjunaContext The arjuna context.
+     *
+     * @message com.arjuna.wst11.messaging.CoordinatorCompletionParticipantProcessorImpl.status_1 [com.arjuna.wst11.messaging.CoordinatorCompletionParticipantProcessorImpl.status_1] - Unexpected exception thrown from status:
+     * @message com.arjuna.wst11.messaging.CoordinatorCompletionParticipantProcessorImpl.status_2 [com.arjuna.wst11.messaging.CoordinatorCompletionParticipantProcessorImpl.status_2] - Status called on unknown participant: {0}
+     */
+    public void status(final StatusType status, final AddressingProperties addressingProperties, final ArjunaContext arjunaContext)
+    {
+        final InstanceIdentifier instanceIdentifier = arjunaContext.getInstanceIdentifier() ;
+        final CoordinatorCompletionParticipantInboundEvents participant = getParticipant(instanceIdentifier) ;
+
+        if (participant != null)
+        {
+            try
+            {
+                participant.status(status, addressingProperties, arjunaContext) ;
+            }
+            catch (final Throwable th)
+            {
+                if (WSTLogger.arjLoggerI18N.isDebugEnabled())
+                {
+                    WSTLogger.arjLoggerI18N.debug("com.arjuna.wst11.messaging.CoordinatorCompletionParticipantProcessorImpl.status_1", th) ;
+                }
+            }
+        }
+        else if (WSTLogger.arjLoggerI18N.isDebugEnabled())
+        {
+            WSTLogger.arjLoggerI18N.debug("com.arjuna.wst11.messaging.CoordinatorCompletionParticipantProcessorImpl.status_2", new Object[] {instanceIdentifier}) ;
+        }
+    }
+
+    /**
+     * SOAP Fault.
+     * @param fault The SOAP fault notification.
+     * @param addressingProperties The addressing context.
+     * @param arjunaContext The arjuna context.
+     *
+     * @message com.arjuna.wst11.messaging.CoordinatorCompletionParticipantProcessorImpl.soapFault_1 [com.arjuna.wst11.messaging.CoordinatorCompletionParticipantProcessorImpl.soapFault_1] - Unexpected exception thrown from soapFault:
+     * @message com.arjuna.wst11.messaging.CoordinatorCompletionParticipantProcessorImpl.soapFault_2 [com.arjuna.wst11.messaging.CoordinatorCompletionParticipantProcessorImpl.soapFault_2] - SoapFault called on unknown participant: {0}
+     */
+    public void soapFault(final SoapFault fault, final AddressingProperties addressingProperties,
+        final ArjunaContext arjunaContext)
+    {
+        final InstanceIdentifier instanceIdentifier = arjunaContext.getInstanceIdentifier() ;
+        final CoordinatorCompletionParticipantInboundEvents participant = getParticipant(instanceIdentifier) ;
+
+        if (participant != null)
+        {
+            try
+            {
+                participant.soapFault(fault, addressingProperties, arjunaContext) ;
+            }
+            catch (final Throwable th)
+            {
+                if (WSTLogger.arjLoggerI18N.isDebugEnabled())
+                {
+                    WSTLogger.arjLoggerI18N.debug("com.arjuna.wst11.messaging.CoordinatorCompletionParticipantProcessorImpl.soapFault_1", th) ;
+                }
+            }
+        }
+        else if (WSTLogger.arjLoggerI18N.isDebugEnabled())
+        {
+            WSTLogger.arjLoggerI18N.debug("com.arjuna.wst11.messaging.CoordinatorCompletionParticipantProcessorImpl.soapFault_2", new Object[] {instanceIdentifier}) ;
+        }
+    }
+
+    /**
+     * Send a cancelled message.
+     *
+     * @param addressingProperties The addressing context.
+     * @param arjunaContext The arjuna context.
+     *
+     * @message com.arjuna.wst11.messaging.CoordinatorCompletionCoordinatorProcessorImpl.sendCancelled_1 [com.arjuna.wst11.messaging.CoordinatorCompletionCoordinatorProcessorImpl.sendCancelled_1] - Unexpected exception while sending Cancelled
+     */
+    private void sendCancelled(final AddressingProperties addressingProperties, final ArjunaContext arjunaContext)
+    {
+        // KEV add check for recovery
+        final String messageId = com.arjuna.wsc.messaging.MessageId.getMessageId() ;
+        final AddressingProperties responseAddressingProperties = AddressingHelper.createNotificationContext(messageId) ;
+        try
+        {
+            // TODO - have to just log an error as we cannot do this without a client endpoint
+            // CoordinatorCompletionCoordinatorClient.getClient().sendCancelled(responseAddressingProperties, arjunaContext.getInstanceIdentifier()) ;
+        }
+        catch (final Throwable th)
+        {
+            if (WSTLogger.arjLoggerI18N.isDebugEnabled())
+            {
+                WSTLogger.arjLoggerI18N.debug("com.arjuna.wst11.messaging.CoordinatorCompletionCoordinatorProcessorImpl.sendCancelled_1", th) ;
+            }
+        }
+    }
+
+    /**
+     * Send a closed message.
+     *
+     * @param addressingProperties The addressing context.
+     * @param arjunaContext The arjuna context.
+     *
+     * @message com.arjuna.wst11.messaging.CoordinatorCompletionCoordinatorProcessorImpl.sendClosed_1 [com.arjuna.wst11.messaging.CoordinatorCompletionCoordinatorProcessorImpl.sendClosed_1] - Unexpected exception while sending Closed
+     */
+    private void sendClosed(final AddressingProperties addressingProperties, final ArjunaContext arjunaContext)
+    {
+        // KEV add check for recovery
+        final String messageId = MessageId.getMessageId() ;
+        final AddressingProperties responseAddressingProperties = AddressingHelper.createNotificationContext(messageId) ;
+        try
+        {
+            // TODO - have to just log an error as we cannot do this without a client endpoint
+            // CoordinatorCompletionCoordinatorClient.getClient().sendClosed(responseAddressingProperties, arjunaContext.getInstanceIdentifier()) ;
+        }
+        catch (final Throwable th)
+        {
+            if (WSTLogger.arjLoggerI18N.isDebugEnabled())
+            {
+                WSTLogger.arjLoggerI18N.debug("com.arjuna.wst11.messaging.CoordinatorCompletionCoordinatorProcessorImpl.sendClosed_1", th) ;
+            }
+        }
+    }
+
+    /**
+     * Send a compensated message.
+     *
+     * @param addressingProperties The addressing context.
+     * @param arjunaContext The arjuna context.
+     *
+     * @message com.arjuna.wst11.messaging.CoordinatorCompletionCoordinatorProcessorImpl.sendCompensated_1 [com.arjuna.wst11.messaging.CoordinatorCompletionCoordinatorProcessorImpl.sendCompensated_1] - Unexpected exception while sending Compensated
+     */
+    private void sendCompensated(final AddressingProperties addressingProperties, final ArjunaContext arjunaContext)
+    {
+        // KEV add check for recovery
+        final String messageId = MessageId.getMessageId() ;
+        final AddressingProperties responseAddressingProperties = AddressingHelper.createNotificationContext(messageId) ;
+        try
+        {
+            // TODO - have to just log an error as we cannot do this without a client endpoint
+            // CoordinatorCompletionCoordinatorClient.getClient().sendCompensated(responseAddressingProperties, arjunaContext.getInstanceIdentifier()) ;
+        }
+        catch (final Throwable th)
+        {
+            if (WSTLogger.arjLoggerI18N.isDebugEnabled())
+            {
+                WSTLogger.arjLoggerI18N.debug("com.arjuna.wst11.messaging.CoordinatorCompletionCoordinatorProcessorImpl.sendCompensated_1", th) ;
+            }
+        }
+    }
+
+    /**
+     * Send a fault message.
+     *
+     * @param addressingProperties The addressing context.
+     * @param arjunaContext The arjuna context.
+     * @param exceptionIdentifier The exception identifier.
+     *
+     * @message com.arjuna.wst11.messaging.CoordinatorCompletionCoordinatorProcessorImpl.sendFault_1 [com.arjuna.wst11.messaging.CoordinatorCompletionCoordinatorProcessorImpl.sendFault_1] - Unexpected exception while sending Fail
+     */
+    private void sendFault(final AddressingProperties addressingProperties, final ArjunaContext arjunaContext, final String exceptionIdentifier)
+    {
+        // KEV add check for recovery
+        final String messageId = MessageId.getMessageId() ;
+        final AddressingProperties responseAddressingProperties = AddressingHelper.createNotificationContext(messageId) ;
+        try
+        {
+            // TODO - have to just log an error as we cannot do this without a client endpoint
+            // CoordinatorCompletionCoordinatorClient.getClient().sendFault(responseAddressingProperties, arjunaContext.getInstanceIdentifier(), exceptionIdentifier) ;
+        }
+        catch (final Throwable th)
+        {
+            if (WSTLogger.arjLoggerI18N.isDebugEnabled())
+            {
+                WSTLogger.arjLoggerI18N.debug("com.arjuna.wst11.messaging.CoordinatorCompletionCoordinatorProcessorImpl.sendFault_1", th) ;
+            }
+        }
+    }
+}
\ No newline at end of file

Added: labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/wst11/messaging/CoordinatorProcessorImpl.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/wst11/messaging/CoordinatorProcessorImpl.java	                        (rev 0)
+++ labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/wst11/messaging/CoordinatorProcessorImpl.java	2008-01-25 17:18:13 UTC (rev 18124)
@@ -0,0 +1,319 @@
+package com.arjuna.wst11.messaging;
+
+import com.arjuna.webservices.SoapFault;
+import com.arjuna.webservices.base.processors.ActivatedObjectProcessor;
+import com.arjuna.webservices.logging.WSTLogger;
+import com.arjuna.webservices11.wsaddr.AddressingHelper;
+import com.arjuna.webservices11.wsarj.ArjunaContext;
+import com.arjuna.webservices11.wsarj.InstanceIdentifier;
+import com.arjuna.webservices11.wsat.CoordinatorInboundEvents;
+import com.arjuna.webservices11.wsat.processors.CoordinatorProcessor;
+import com.arjuna.wsc11.messaging.MessageId;
+import org.oasis_open.docs.ws_tx.wsat._2006._06.Notification;
+
+import javax.xml.ws.addressing.AddressingProperties;
+
+/**
+ * The Coordinator processor.
+ * @author kevin
+ */
+public class CoordinatorProcessorImpl 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 addressingProperties The addressing context.
+     * @param arjunaContext The arjuna context.
+     *
+     * @message com.arjuna.wst11.messaging.CoordinatorProcessorImpl.aborted_1 [com.arjuna.wst11.messaging.CoordinatorProcessorImpl.aborted_1] - Unexpected exception thrown from aborted:
+     * @message com.arjuna.wst11.messaging.CoordinatorProcessorImpl.aborted_2 [com.arjuna.wst11.messaging.CoordinatorProcessorImpl.aborted_2] - Aborted called on unknown coordinator: {0}
+     */
+    public void aborted(final Notification aborted, final AddressingProperties addressingProperties,
+        final ArjunaContext arjunaContext)
+    {
+        final InstanceIdentifier instanceIdentifier = arjunaContext.getInstanceIdentifier() ;
+        final CoordinatorInboundEvents coordinator = getCoordinator(instanceIdentifier) ;
+
+        if (coordinator != null)
+        {
+            try
+            {
+                coordinator.aborted(aborted, addressingProperties, arjunaContext) ;
+            }
+            catch (final Throwable th)
+            {
+                if (WSTLogger.arjLoggerI18N.isWarnEnabled())
+                {
+                    WSTLogger.arjLoggerI18N.warn("com.arjuna.wst11.messaging.CoordinatorProcessorImpl.aborted_1", th) ;
+                }
+            }
+        }
+        else if (WSTLogger.arjLoggerI18N.isWarnEnabled())
+        {
+            WSTLogger.arjLoggerI18N.warn("com.arjuna.wst11.messaging.CoordinatorProcessorImpl.aborted_2", new Object[] {instanceIdentifier}) ;
+        }
+    }
+
+    /**
+     * Committed.
+     * @param committed The committed notification.
+     * @param addressingProperties The addressing context.
+     * @param arjunaContext The arjuna context.
+     *
+     * @message com.arjuna.wst11.messaging.CoordinatorProcessorImpl.committed_1 [com.arjuna.wst11.messaging.CoordinatorProcessorImpl.committed_1] - Unexpected exception thrown from committed:
+     * @message com.arjuna.wst11.messaging.CoordinatorProcessorImpl.committed_2 [com.arjuna.wst11.messaging.CoordinatorProcessorImpl.committed_2] - Committed called on unknown coordinator: {0}
+     */
+    public void committed(final Notification committed, final AddressingProperties addressingProperties,
+        final ArjunaContext arjunaContext)
+    {
+        final InstanceIdentifier instanceIdentifier = arjunaContext.getInstanceIdentifier() ;
+        final CoordinatorInboundEvents coordinator = getCoordinator(instanceIdentifier) ;
+
+        if (coordinator != null)
+        {
+            try
+            {
+                coordinator.committed(committed, addressingProperties, arjunaContext) ;
+            }
+            catch (final Throwable th)
+            {
+                if (WSTLogger.arjLoggerI18N.isWarnEnabled())
+                {
+                    WSTLogger.arjLoggerI18N.warn("com.arjuna.wst11.messaging.CoordinatorProcessorImpl.committed_1", th) ;
+                }
+            }
+        }
+        else if (WSTLogger.arjLoggerI18N.isWarnEnabled())
+        {
+            WSTLogger.arjLoggerI18N.warn("com.arjuna.wst11.messaging.CoordinatorProcessorImpl.committed_2", new Object[] {instanceIdentifier}) ;
+        }
+    }
+
+    /**
+     * Prepared.
+     * @param prepared The prepared notification.
+     * @param addressingProperties The addressing context.
+     * @param arjunaContext The arjuna context.
+     *
+     * @message com.arjuna.wst11.messaging.CoordinatorProcessorImpl.prepared_1 [com.arjuna.wst11.messaging.CoordinatorProcessorImpl.prepared_1] - Unexpected exception thrown from prepared:
+     * @message com.arjuna.wst11.messaging.CoordinatorProcessorImpl.prepared_2 [com.arjuna.wst11.messaging.CoordinatorProcessorImpl.prepared_2] - Prepared called on unknown coordinator: {0}
+     */
+    public void prepared(final Notification prepared, final AddressingProperties addressingProperties,
+        final ArjunaContext arjunaContext)
+    {
+        final InstanceIdentifier instanceIdentifier = arjunaContext.getInstanceIdentifier() ;
+        final CoordinatorInboundEvents coordinator = getCoordinator(instanceIdentifier) ;
+
+        if (coordinator != null)
+        {
+            try
+            {
+                coordinator.prepared(prepared, addressingProperties, arjunaContext) ;
+            }
+            catch (final Throwable th)
+            {
+                if (WSTLogger.arjLoggerI18N.isWarnEnabled())
+                {
+                    WSTLogger.arjLoggerI18N.warn("com.arjuna.wst11.messaging.CoordinatorProcessorImpl.prepared_1", th) ;
+                }
+            }
+        }
+        else
+        {
+            if (WSTLogger.arjLoggerI18N.isWarnEnabled())
+            {
+                WSTLogger.arjLoggerI18N.warn("com.arjuna.wst11.messaging.CoordinatorProcessorImpl.prepared_2", new Object[] {instanceIdentifier}) ;
+            }
+
+            final String identifierValue = instanceIdentifier.getInstanceIdentifier() ;
+            if ((identifierValue != null) && (identifierValue.length() > 0) && (identifierValue.charAt(0) == 'D'))
+            {
+        	    sendRollback(addressingProperties, arjunaContext) ;
+            }
+            else
+            {
+                sendInvalidState(addressingProperties, arjunaContext) ;
+            }
+        }
+    }
+
+    /**
+     * Read only.
+     * @param readOnly The read only notification.
+     * @param addressingProperties The addressing context.
+     * @param arjunaContext The arjuna context.
+     *
+     * @message com.arjuna.wst11.messaging.CoordinatorProcessorImpl.readOnly_1 [com.arjuna.wst11.messaging.CoordinatorProcessorImpl.readOnly_1] - Unexpected exception thrown from readOnly:
+     * @message com.arjuna.wst11.messaging.CoordinatorProcessorImpl.readOnly_2 [com.arjuna.wst11.messaging.CoordinatorProcessorImpl.readOnly_2] - ReadOnly called on unknown coordinator: {0}
+     */
+    public void readOnly(final Notification readOnly, final AddressingProperties addressingProperties,
+        final ArjunaContext arjunaContext)
+    {
+        final InstanceIdentifier instanceIdentifier = arjunaContext.getInstanceIdentifier() ;
+        final CoordinatorInboundEvents coordinator = getCoordinator(instanceIdentifier) ;
+
+        if (coordinator != null)
+        {
+            try
+            {
+                coordinator.readOnly(readOnly, addressingProperties, arjunaContext) ;
+            }
+            catch (final Throwable th)
+            {
+                if (WSTLogger.arjLoggerI18N.isWarnEnabled())
+                {
+                    WSTLogger.arjLoggerI18N.warn("com.arjuna.wst11.messaging.CoordinatorProcessorImpl.readOnly_1", th) ;
+                }
+            }
+        }
+        else if (WSTLogger.arjLoggerI18N.isWarnEnabled())
+        {
+            WSTLogger.arjLoggerI18N.warn("com.arjuna.wst11.messaging.CoordinatorProcessorImpl.readOnly_2", new Object[] {instanceIdentifier}) ;
+        }
+    }
+
+    /**
+     * SOAP Fault.
+     * @param fault The SOAP fault notification.
+     * @param addressingProperties The addressing context.
+     * @param arjunaContext The arjuna context.
+     *
+     * @message com.arjuna.wst11.messaging.CoordinatorProcessorImpl.soapFault_1 [com.arjuna.wst11.messaging.CoordinatorProcessorImpl.soapFault_1] - Unexpected exception thrown from soapFault:
+     * @message com.arjuna.wst11.messaging.CoordinatorProcessorImpl.soapFault_2 [com.arjuna.wst11.messaging.CoordinatorProcessorImpl.soapFault_2] - SoapFault called on unknown coordinator: {0}
+     */
+    public void soapFault(final SoapFault fault, final AddressingProperties addressingProperties,
+        final ArjunaContext arjunaContext)
+    {
+        final InstanceIdentifier instanceIdentifier = arjunaContext.getInstanceIdentifier() ;
+        final CoordinatorInboundEvents coordinator = getCoordinator(instanceIdentifier) ;
+
+        if (coordinator != null)
+        {
+            try
+            {
+                coordinator.soapFault(fault, addressingProperties, arjunaContext) ;
+            }
+            catch (final Throwable th)
+            {
+                if (WSTLogger.arjLoggerI18N.isWarnEnabled())
+                {
+                    WSTLogger.arjLoggerI18N.warn("com.arjuna.wst11.messaging.CoordinatorProcessorImpl.soapFault_1", th) ;
+                }
+            }
+        }
+        else
+        {
+            if (WSTLogger.arjLoggerI18N.isWarnEnabled())
+            {
+                WSTLogger.arjLoggerI18N.warn("com.arjuna.wst11.messaging.CoordinatorProcessorImpl.soapFault_2", new Object[] {instanceIdentifier}) ;
+            }
+        }
+    }
+
+    /**
+     * Send an unknown transaction fault.
+     *
+     * @param addressingProperties The addressing context.
+     * @param arjunaContext The arjuna context.
+     *
+     * @message com.arjuna.wst11.messaging.CoordinatorProcessorImpl.sendInvalidState_1 [com.arjuna.wst11.messaging.CoordinatorProcessorImpl.sendInvalidState_1] - Unknown Transaction.
+     * @message com.arjuna.wst11.messaging.CoordinatorProcessorImpl.sendInvalidState_2 [com.arjuna.wst11.messaging.CoordinatorProcessorImpl.sendInvalidState_2] - Unexpecting exception while sending InvalidState
+     */
+    private void sendInvalidState(final AddressingProperties addressingProperties, final ArjunaContext arjunaContext)
+    {
+        // KEV add check for recovery
+        final String responseMessageId = MessageId.getMessageId() ;
+        final AddressingProperties responseAddressingContext = AddressingHelper.createNotificationContext(responseMessageId) ;
+        final InstanceIdentifier instanceIdentifier = arjunaContext.getInstanceIdentifier() ;
+
+        /*
+         * TODO - fix this. cannot send invalid state fault as we have no participant end point!
+
+        final AttributedURI requestMessageId = addressingProperties.getMessageID() ;
+        if (requestMessageId != null)
+        {
+            AddressingBuilder builder = AddressingBuilder.getAddressingBuilder();
+            Relationship relatesToValue = builder.newRelationship(requestMessageId.getURI());
+            Relationship[] relatesToSet = { relatesToValue };
+            responseAddressingContext.setRelatesTo(relatesToSet);
+        }
+
+        try {
+            final String message = WSTLogger.log_mesg.getString("com.arjuna.wst11.messaging.CoordinatorProcessorImpl.sendInvalidState_1") ;
+            final SoapFault soapFault = new SoapFault(SoapFaultType.FAULT_SENDER, CoordinationConstants.WSCOOR_ERROR_CODE_INVALID_STATE_QNAME, message) ;
+            ParticipantClient.getClient().sendSoapFault(responseAddressingContext, soapFault, instanceIdentifier) ;
+        } catch (final Throwable th) {
+            if (WSTLogger.arjLoggerI18N.isDebugEnabled())
+            {
+                WSTLogger.arjLoggerI18N.debug("com.arjuna.wst11.messaging.CoordinatorProcessorImpl.sendInvalidState_2", th) ;
+            }
+        }
+        */
+    }
+
+    /**
+     * Send a rollback message.
+     *
+     * @param addressingProperties The addressing context.
+     * @param arjunaContext The arjuna context.
+     *
+     * @message com.arjuna.wst11.messaging.CoordinatorProcessorImpl.sendRollback_1 [com.arjuna.wst11.messaging.CoordinatorProcessorImpl.sendRollback_1] - Unexpected exception while sending Rollback
+     */
+    private void sendRollback(final AddressingProperties addressingProperties, final ArjunaContext arjunaContext)
+    {
+        // KEV add check for recovery
+        final String messageId = MessageId.getMessageId() ;
+        final AddressingProperties responseAddressingContext = AddressingHelper.createNotificationContext(messageId) ;
+        final InstanceIdentifier instanceIdentifier = arjunaContext.getInstanceIdentifier() ;
+        /*
+         * TODO - fix this. cannot send rollback as we have no participant end point!
+
+        try
+        {
+            ParticipantClient.getClient().sendRollback(responseAddressingContext, instanceIdentifier) ;
+        }
+        catch (final Throwable th)
+        {
+            if (WSTLogger.arjLoggerI18N.isDebugEnabled())
+            {
+                WSTLogger.arjLoggerI18N.debug("com.arjuna.wst11.messaging.CoordinatorProcessorImpl.sendRollback_1", th) ;
+            }
+        }
+        */
+    }
+}

Added: labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/wst11/messaging/ParticipantCompletionCoordinatorProcessorImpl.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/wst11/messaging/ParticipantCompletionCoordinatorProcessorImpl.java	                        (rev 0)
+++ labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/wst11/messaging/ParticipantCompletionCoordinatorProcessorImpl.java	2008-01-25 17:18:13 UTC (rev 18124)
@@ -0,0 +1,485 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags.
+ * 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.wst11.messaging;
+
+import com.arjuna.webservices.SoapFault;
+import com.arjuna.webservices.base.processors.ActivatedObjectProcessor;
+import com.arjuna.webservices.logging.WSTLogger;
+import com.arjuna.webservices11.wsaddr.AddressingHelper;
+import com.arjuna.webservices11.wsarj.ArjunaContext;
+import com.arjuna.webservices11.wsarj.InstanceIdentifier;
+import com.arjuna.webservices11.wsba.ParticipantCompletionCoordinatorInboundEvents;
+import com.arjuna.webservices11.wsba.processors.ParticipantCompletionCoordinatorProcessor;
+import com.arjuna.wsc11.messaging.MessageId;
+import org.oasis_open.docs.ws_tx.wsba._2006._06.ExceptionType;
+import org.oasis_open.docs.ws_tx.wsba._2006._06.NotificationType;
+import org.oasis_open.docs.ws_tx.wsba._2006._06.StatusType;
+
+import javax.xml.ws.addressing.AddressingProperties;
+
+
+/**
+ * The Participant Completion Coordinator processor.
+ * @author kevin
+ */
+public class ParticipantCompletionCoordinatorProcessorImpl 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 addressingProperties The addressing context.
+     * @param arjunaContext The arjuna context.
+     *
+     * @message com.arjuna.wst11.messaging.ParticipantCompletionCoordinatorProcessorImpl.cancelled_1 [com.arjuna.wst11.messaging.ParticipantCompletionCoordinatorProcessorImpl.cancelled_1] - Unexpected exception thrown from cancelled:
+     * @message com.arjuna.wst11.messaging.ParticipantCompletionCoordinatorProcessorImpl.cancelled_2 [com.arjuna.wst11.messaging.ParticipantCompletionCoordinatorProcessorImpl.cancelled_2] - Cancelled called on unknown coordinator: {0}
+     */
+    public void cancelled(final NotificationType cancelled, final AddressingProperties addressingProperties, final ArjunaContext arjunaContext)
+    {
+        final InstanceIdentifier instanceIdentifier = arjunaContext.getInstanceIdentifier() ;
+        final ParticipantCompletionCoordinatorInboundEvents coordinator = getCoordinator(instanceIdentifier) ;
+
+        if (coordinator != null)
+        {
+            try
+            {
+                coordinator.cancelled(cancelled, addressingProperties, arjunaContext) ;
+            }
+            catch (final Throwable th)
+            {
+                if (WSTLogger.arjLoggerI18N.isDebugEnabled())
+                {
+                    WSTLogger.arjLoggerI18N.debug("com.arjuna.wst11.messaging.ParticipantCompletionCoordinatorProcessorImpl.cancelled_1", th) ;
+                }
+            }
+        }
+        else if (WSTLogger.arjLoggerI18N.isDebugEnabled())
+        {
+            WSTLogger.arjLoggerI18N.debug("com.arjuna.wst11.messaging.ParticipantCompletionCoordinatorProcessorImpl.cancelled_2", new Object[] {instanceIdentifier}) ;
+        }
+    }
+
+    /**
+     * Closed.
+     * @param closed The closed notification.
+     * @param addressingProperties The addressing context.
+     * @param arjunaContext The arjuna context.
+     *
+     * @message com.arjuna.wst11.messaging.ParticipantCompletionCoordinatorProcessorImpl.closed_1 [com.arjuna.wst11.messaging.ParticipantCompletionCoordinatorProcessorImpl.closed_1] - Unexpected exception thrown from closed:
+     * @message com.arjuna.wst11.messaging.ParticipantCompletionCoordinatorProcessorImpl.closed_2 [com.arjuna.wst11.messaging.ParticipantCompletionCoordinatorProcessorImpl.closed_2] - Closed called on unknown coordinator: {0}
+     */
+    public void closed(final NotificationType closed, final AddressingProperties addressingProperties, final ArjunaContext arjunaContext)
+    {
+        final InstanceIdentifier instanceIdentifier = arjunaContext.getInstanceIdentifier() ;
+        final ParticipantCompletionCoordinatorInboundEvents coordinator = getCoordinator(instanceIdentifier) ;
+
+        if (coordinator != null)
+        {
+            try
+            {
+                coordinator.closed(closed, addressingProperties, arjunaContext) ;
+            }
+            catch (final Throwable th)
+            {
+                if (WSTLogger.arjLoggerI18N.isDebugEnabled())
+                {
+                    WSTLogger.arjLoggerI18N.debug("com.arjuna.wst11.messaging.ParticipantCompletionCoordinatorProcessorImpl.closed_1", th) ;
+                }
+            }
+        }
+        else if (WSTLogger.arjLoggerI18N.isDebugEnabled())
+        {
+            WSTLogger.arjLoggerI18N.debug("com.arjuna.wst11.messaging.ParticipantCompletionCoordinatorProcessorImpl.closed_2", new Object[] {instanceIdentifier}) ;
+        }
+    }
+
+    /**
+     * Compensated.
+     * @param compensated The compensated notification.
+     * @param addressingProperties The addressing context.
+     * @param arjunaContext The arjuna context.
+     *
+     * @message com.arjuna.wst11.messaging.ParticipantCompletionCoordinatorProcessorImpl.compensated_1 [com.arjuna.wst11.messaging.ParticipantCompletionCoordinatorProcessorImpl.compensated_1] - Unexpected exception thrown from compensated:
+     * @message com.arjuna.wst11.messaging.ParticipantCompletionCoordinatorProcessorImpl.compensated_2 [com.arjuna.wst11.messaging.ParticipantCompletionCoordinatorProcessorImpl.compensated_2] - Compensated called on unknown coordinator: {0}
+     */
+    public void compensated(final NotificationType compensated, final AddressingProperties addressingProperties, final ArjunaContext arjunaContext)
+    {
+        final InstanceIdentifier instanceIdentifier = arjunaContext.getInstanceIdentifier() ;
+        final ParticipantCompletionCoordinatorInboundEvents coordinator = getCoordinator(instanceIdentifier) ;
+
+        if (coordinator != null)
+        {
+            try
+            {
+                coordinator.compensated(compensated, addressingProperties, arjunaContext) ;
+            }
+            catch (final Throwable th)
+            {
+                if (WSTLogger.arjLoggerI18N.isDebugEnabled())
+                {
+                    WSTLogger.arjLoggerI18N.debug("com.arjuna.wst11.messaging.ParticipantCompletionCoordinatorProcessorImpl.compensated_1", th) ;
+                }
+            }
+        }
+        else if (WSTLogger.arjLoggerI18N.isDebugEnabled())
+        {
+            WSTLogger.arjLoggerI18N.debug("com.arjuna.wst11.messaging.ParticipantCompletionCoordinatorProcessorImpl.compensated_2", new Object[] {instanceIdentifier}) ;
+        }
+    }
+
+    /**
+     * Completed.
+     * @param completed The completed notification.
+     * @param addressingProperties The addressing context.
+     * @param arjunaContext The arjuna context.
+     *
+     * @message com.arjuna.wst11.messaging.ParticipantCompletionCoordinatorProcessorImpl.completed_1 [com.arjuna.wst11.messaging.ParticipantCompletionCoordinatorProcessorImpl.completed_1] - Unexpected exception thrown from completed:
+     * @message com.arjuna.wst11.messaging.ParticipantCompletionCoordinatorProcessorImpl.completed_2 [com.arjuna.wst11.messaging.ParticipantCompletionCoordinatorProcessorImpl.completed_2] - Completed called on unknown coordinator: {0}
+     */
+    public void completed(final NotificationType completed, final AddressingProperties addressingProperties,
+        final ArjunaContext arjunaContext)
+    {
+        final InstanceIdentifier instanceIdentifier = arjunaContext.getInstanceIdentifier() ;
+        final ParticipantCompletionCoordinatorInboundEvents coordinator = getCoordinator(instanceIdentifier) ;
+
+        if (coordinator != null)
+        {
+            try
+            {
+                coordinator.completed(completed, addressingProperties, arjunaContext) ;
+            }
+            catch (final Throwable th)
+            {
+                if (WSTLogger.arjLoggerI18N.isDebugEnabled())
+                {
+                    WSTLogger.arjLoggerI18N.debug("com.arjuna.wst11.messaging.ParticipantCompletionCoordinatorProcessorImpl.completed_1", th) ;
+                }
+            }
+        }
+        else if (WSTLogger.arjLoggerI18N.isDebugEnabled())
+        {
+            WSTLogger.arjLoggerI18N.debug("com.arjuna.wst11.messaging.ParticipantCompletionCoordinatorProcessorImpl.completed_2", new Object[] {instanceIdentifier}) ;
+        }
+    }
+
+    /**
+     * Completed.
+     * @param cannotComplete The cannot complete notification.
+     * @param addressingProperties The addressing context.
+     * @param arjunaContext The arjuna context.
+     *
+     * @message com.arjuna.wst11.messaging.ParticipantCompletionCoordinatorProcessorImpl.cannotComplete_1 [com.arjuna.wst11.messaging.ParticipantCompletionCoordinatorProcessorImpl.cannotComplete_1] - Unexpected exception thrown from cannot complete:
+     * @message com.arjuna.wst11.messaging.ParticipantCompletionCoordinatorProcessorImpl.cannotComplete_2 [com.arjuna.wst11.messaging.ParticipantCompletionCoordinatorProcessorImpl.cannotComplete_2] - Cannot complete called on unknown coordinator: {0}
+     */
+    public void cannotComplete(final NotificationType cannotComplete, final AddressingProperties addressingProperties,
+        final ArjunaContext arjunaContext)
+    {
+        final InstanceIdentifier instanceIdentifier = arjunaContext.getInstanceIdentifier() ;
+        final ParticipantCompletionCoordinatorInboundEvents coordinator = getCoordinator(instanceIdentifier) ;
+
+        if (coordinator != null)
+        {
+            try
+            {
+                coordinator.cannotComplete(cannotComplete, addressingProperties, arjunaContext) ;
+            }
+            catch (final Throwable th)
+            {
+                if (WSTLogger.arjLoggerI18N.isDebugEnabled())
+                {
+                    WSTLogger.arjLoggerI18N.debug("com.arjuna.wst11.messaging.ParticipantCompletionCoordinatorProcessorImpl.completed_1", th) ;
+                }
+            }
+        }
+        else if (WSTLogger.arjLoggerI18N.isDebugEnabled())
+        {
+            WSTLogger.arjLoggerI18N.debug("com.arjuna.wst11.messaging.ParticipantCompletionCoordinatorProcessorImpl.completed_2", new Object[] {instanceIdentifier}) ;
+        }
+    }
+
+    /**
+     * Exit.
+     * @param exit The exit notification.
+     * @param addressingProperties The addressing context.
+     * @param arjunaContext The arjuna context.
+     *
+     * @message com.arjuna.wst11.messaging.ParticipantCompletionCoordinatorProcessorImpl.exit_1 [com.arjuna.wst11.messaging.ParticipantCompletionCoordinatorProcessorImpl.exit_1] - Unexpected exception thrown from exit:
+     * @message com.arjuna.wst11.messaging.ParticipantCompletionCoordinatorProcessorImpl.exit_2 [com.arjuna.wst11.messaging.ParticipantCompletionCoordinatorProcessorImpl.exit_2] - Exit called on unknown coordinator: {0}
+     */
+    public void exit(final NotificationType exit, final AddressingProperties addressingProperties, final ArjunaContext arjunaContext)
+    {
+        final InstanceIdentifier instanceIdentifier = arjunaContext.getInstanceIdentifier() ;
+        final ParticipantCompletionCoordinatorInboundEvents coordinator = getCoordinator(instanceIdentifier) ;
+
+        if (coordinator != null)
+        {
+            try
+            {
+                coordinator.exit(exit, addressingProperties, arjunaContext) ;
+            }
+            catch (final Throwable th)
+            {
+                if (WSTLogger.arjLoggerI18N.isDebugEnabled())
+                {
+                    WSTLogger.arjLoggerI18N.debug("com.arjuna.wst11.messaging.ParticipantCompletionCoordinatorProcessorImpl.exit_1", th) ;
+                }
+            }
+        }
+        else
+        {
+            if (WSTLogger.arjLoggerI18N.isDebugEnabled())
+            {
+                WSTLogger.arjLoggerI18N.debug("com.arjuna.wst11.messaging.ParticipantCompletionCoordinatorProcessorImpl.exit_2", new Object[] {instanceIdentifier}) ;
+            }
+            sendExited(addressingProperties, arjunaContext) ;
+        }
+    }
+
+    /**
+     * Fault.
+     * @param fail The fault notification.
+     * @param addressingProperties The addressing context.
+     * @param arjunaContext The arjuna context.
+     *
+     * @message com.arjuna.wst11.messaging.ParticipantCompletionCoordinatorProcessorImpl.fault_1 [com.arjuna.wst11.messaging.ParticipantCompletionCoordinatorProcessorImpl.fault_1] - Unexpected exception thrown from fault:
+     * @message com.arjuna.wst11.messaging.ParticipantCompletionCoordinatorProcessorImpl.fault_2 [com.arjuna.wst11.messaging.ParticipantCompletionCoordinatorProcessorImpl.fault_2] - Fault called on unknown coordinator: {0}
+     */
+    public void fail(final ExceptionType fail, final AddressingProperties addressingProperties,
+        final ArjunaContext arjunaContext)
+    {
+        final InstanceIdentifier instanceIdentifier = arjunaContext.getInstanceIdentifier() ;
+        final ParticipantCompletionCoordinatorInboundEvents coordinator = getCoordinator(instanceIdentifier) ;
+
+        if (coordinator != null)
+        {
+            try
+            {
+                coordinator.fail(fail, addressingProperties, arjunaContext) ;
+            }
+            catch (final Throwable th)
+            {
+                if (WSTLogger.arjLoggerI18N.isDebugEnabled())
+                {
+                    WSTLogger.arjLoggerI18N.debug("com.arjuna.wst11.messaging.ParticipantCompletionCoordinatorProcessorImpl.fault_1", th) ;
+                }
+            }
+        }
+        else
+        {
+            if (WSTLogger.arjLoggerI18N.isDebugEnabled())
+            {
+                WSTLogger.arjLoggerI18N.debug("com.arjuna.wst11.messaging.ParticipantCompletionCoordinatorProcessorImpl.fault_2", new Object[] {instanceIdentifier}) ;
+            }
+            sendFailed(addressingProperties, arjunaContext) ;
+        }
+    }
+
+    /**
+     * Get Status.
+     * @param getStatus The get status notification.
+     * @param addressingProperties The addressing context.
+     * @param arjunaContext The arjuna context.
+     *
+     * @message com.arjuna.wst11.messaging.ParticipantCompletionCoordinatorProcessorImpl.getStatus_1 [com.arjuna.wst11.messaging.ParticipantCompletionCoordinatorProcessorImpl.getStatus_1] - Unexpected exception thrown from getStatus:
+     * @message com.arjuna.wst11.messaging.ParticipantCompletionCoordinatorProcessorImpl.getStatus_2 [com.arjuna.wst11.messaging.ParticipantCompletionCoordinatorProcessorImpl.getStatus_2] - GetStatus called on unknown coordinator: {0}
+     */
+    public void getStatus(final NotificationType getStatus, final AddressingProperties addressingProperties, final ArjunaContext arjunaContext)
+    {
+        final InstanceIdentifier instanceIdentifier = arjunaContext.getInstanceIdentifier() ;
+        final ParticipantCompletionCoordinatorInboundEvents coordinator = getCoordinator(instanceIdentifier) ;
+
+        if (coordinator != null)
+        {
+            try
+            {
+                coordinator.getStatus(getStatus, addressingProperties, arjunaContext) ;
+            }
+            catch (final Throwable th)
+            {
+                if (WSTLogger.arjLoggerI18N.isDebugEnabled())
+                {
+                    WSTLogger.arjLoggerI18N.debug("com.arjuna.wst11.messaging.ParticipantCompletionCoordinatorProcessorImpl.getStatus_1", th) ;
+                }
+            }
+        }
+        else if (WSTLogger.arjLoggerI18N.isDebugEnabled())
+        {
+            WSTLogger.arjLoggerI18N.debug("com.arjuna.wst11.messaging.ParticipantCompletionCoordinatorProcessorImpl.getStatus_2", new Object[] {instanceIdentifier}) ;
+        }
+    }
+
+    /**
+     * Status.
+     * @param status The status.
+     * @param addressingProperties The addressing context.
+     * @param arjunaContext The arjuna context.
+     *
+     * @message com.arjuna.wst11.messaging.ParticipantCompletionCoordinatorProcessorImpl.status_1 [com.arjuna.wst11.messaging.ParticipantCompletionCoordinatorProcessorImpl.status_1] - Unexpected exception thrown from status:
+     * @message com.arjuna.wst11.messaging.ParticipantCompletionCoordinatorProcessorImpl.status_2 [com.arjuna.wst11.messaging.ParticipantCompletionCoordinatorProcessorImpl.status_2] - Status called on unknown coordinator: {0}
+     */
+    public void status(final StatusType status, final AddressingProperties addressingProperties, final ArjunaContext arjunaContext)
+    {
+        final InstanceIdentifier instanceIdentifier = arjunaContext.getInstanceIdentifier() ;
+        final ParticipantCompletionCoordinatorInboundEvents coordinator = getCoordinator(instanceIdentifier) ;
+
+        if (coordinator != null)
+        {
+            try
+            {
+                coordinator.status(status, addressingProperties, arjunaContext) ;
+            }
+            catch (final Throwable th)
+            {
+                if (WSTLogger.arjLoggerI18N.isDebugEnabled())
+                {
+                    WSTLogger.arjLoggerI18N.debug("com.arjuna.wst11.messaging.ParticipantCompletionCoordinatorProcessorImpl.status_1", th) ;
+                }
+            }
+        }
+        else if (WSTLogger.arjLoggerI18N.isDebugEnabled())
+        {
+            WSTLogger.arjLoggerI18N.debug("com.arjuna.wst11.messaging.ParticipantCompletionCoordinatorProcessorImpl.status_2", new Object[] {instanceIdentifier}) ;
+        }
+    }
+
+    /**
+     * SOAP fault.
+     * @param soapFault The SOAP fault.
+     * @param addressingProperties The addressing context.
+     * @param arjunaContext The arjuna context.
+     *
+     * @message com.arjuna.wst11.messaging.ParticipantCompletionCoordinatorProcessorImpl.soapFault_1 [com.arjuna.wst11.messaging.ParticipantCompletionCoordinatorProcessorImpl.soapFault_1] - Unexpected exception thrown from soapFault:
+     * @message com.arjuna.wst11.messaging.ParticipantCompletionCoordinatorProcessorImpl.soapFault_2 [com.arjuna.wst11.messaging.ParticipantCompletionCoordinatorProcessorImpl.soapFault_2] - SoapFault called on unknown coordinator: {0}
+     */
+    public void soapFault(final SoapFault soapFault, final AddressingProperties addressingProperties,
+        final ArjunaContext arjunaContext)
+    {
+        final InstanceIdentifier instanceIdentifier = arjunaContext.getInstanceIdentifier() ;
+        final ParticipantCompletionCoordinatorInboundEvents coordinator = getCoordinator(instanceIdentifier) ;
+
+        if (coordinator != null)
+        {
+            try
+            {
+                coordinator.soapFault(soapFault, addressingProperties, arjunaContext) ;
+            }
+            catch (final Throwable th)
+            {
+                if (WSTLogger.arjLoggerI18N.isDebugEnabled())
+                {
+                    WSTLogger.arjLoggerI18N.debug("com.arjuna.wst11.messaging.ParticipantCompletionCoordinatorProcessorImpl.soapFault_1", th) ;
+                }
+            }
+        }
+        else if (WSTLogger.arjLoggerI18N.isDebugEnabled())
+        {
+            WSTLogger.arjLoggerI18N.debug("com.arjuna.wst11.messaging.ParticipantCompletionCoordinatorProcessorImpl.soapFault_2", new Object[] {instanceIdentifier}) ;
+        }
+    }
+
+    /**
+     * Send an exited message.
+     *
+     * @param addressingProperties The addressing context.
+     * @param arjunaContext The arjuna context.
+     *
+     * @message com.arjuna.wst11.messaging.ParticipantCompletionCoordinatorProcessorImpl.sendExited_1 [com.arjuna.wst11.messaging.ParticipantCompletionCoordinatorProcessorImpl.sendExited_1] - Unexpected exception while sending Exited
+     */
+    private void sendExited(final AddressingProperties addressingProperties, final ArjunaContext arjunaContext)
+    {
+        // KEV add check for recovery
+        final String messageId = MessageId.getMessageId() ;
+        final AddressingProperties responseAddressingProperties = AddressingHelper.createNotificationContext(messageId) ;
+        try
+        {
+            // cannot do this without a coordinator endpoint and that is the only way it gets called
+            // ParticipantCompletionParticipantClient.getClient().sendExited(responseAddressingProperties, arjunaContext.getInstanceIdentifier()) ;
+        }
+        catch (final Throwable th)
+        {
+            if (WSTLogger.arjLoggerI18N.isDebugEnabled())
+            {
+                WSTLogger.arjLoggerI18N.debug("com.arjuna.wst11.messaging.ParticipantCompletionCoordinatorProcessorImpl.sendExited_1", th) ;
+            }
+        }
+    }
+
+    /**
+     * Send a faulted message.
+     *
+     * @param addressingProperties The addressing context.
+     * @param arjunaContext The arjuna context.
+     *
+     * @message com.arjuna.wst11.messaging.ParticipantCompletionCoordinatorProcessorImpl.sendFaulted_1 [com.arjuna.wst11.messaging.ParticipantCompletionCoordinatorProcessorImpl.sendFaulted_1] - Unexpected exception while sending Faulted
+     */
+    private void sendFailed(final AddressingProperties addressingProperties, final ArjunaContext arjunaContext)
+    {
+        // KEV add check for recovery
+        final String messageId = MessageId.getMessageId() ;
+        final AddressingProperties responseAddressingProperties = AddressingHelper.createNotificationContext(  messageId) ;
+        try
+        {
+            // cannot do this without a coordinator endpoint and that is the only way it gets called
+            // ParticipantCompletionParticipantClient.getClient().sendFaulted(responseAddressingProperties, arjunaContext.getInstanceIdentifier()) ;
+        }
+        catch (final Throwable th)
+        {
+            if (WSTLogger.arjLoggerI18N.isDebugEnabled())
+            {
+                WSTLogger.arjLoggerI18N.debug("com.arjuna.wst11.messaging.ParticipantCompletionCoordinatorProcessorImpl.sendFailed_1", th) ;
+            }
+        }
+    }
+}
\ No newline at end of file

Added: labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/wst11/messaging/ParticipantCompletionParticipantProcessorImpl.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/wst11/messaging/ParticipantCompletionParticipantProcessorImpl.java	                        (rev 0)
+++ labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/wst11/messaging/ParticipantCompletionParticipantProcessorImpl.java	2008-01-25 17:18:13 UTC (rev 18124)
@@ -0,0 +1,478 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. 
+ * 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.wst11.messaging;
+
+import com.arjuna.webservices.SoapFault;
+import com.arjuna.webservices.base.processors.ActivatedObjectProcessor;
+import com.arjuna.webservices.logging.WSTLogger;
+import com.arjuna.webservices11.wsaddr.AddressingHelper;
+import com.arjuna.webservices11.wsarj.ArjunaContext;
+import com.arjuna.webservices11.wsarj.InstanceIdentifier;
+import com.arjuna.webservices11.wsba.ParticipantCompletionParticipantInboundEvents;
+import com.arjuna.webservices11.wsba.processors.ParticipantCompletionParticipantProcessor;
+import com.arjuna.wsc11.messaging.MessageId;
+import org.oasis_open.docs.ws_tx.wsba._2006._06.NotificationType;
+import org.oasis_open.docs.ws_tx.wsba._2006._06.StatusType;
+
+import javax.xml.ws.addressing.AddressingProperties;
+
+
+/**
+ * The Participant Completion Participant processor.
+ * @author kevin
+ */
+public class ParticipantCompletionParticipantProcessorImpl 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 addressingProperties The addressing context.
+     * @param arjunaContext The arjuna context.
+     *
+     * @message com.arjuna.wst11.messaging.ParticipantCompletionParticipantProcessorImpl.cancel_1 [com.arjuna.wst11.messaging.ParticipantCompletionParticipantProcessorImpl.cancel_1] - Unexpected exception thrown from cancel:
+     * @message com.arjuna.wst11.messaging.ParticipantCompletionParticipantProcessorImpl.cancel_2 [com.arjuna.wst11.messaging.ParticipantCompletionParticipantProcessorImpl.cancel_2] - Cancel called on unknown participant: {0}
+     */
+    public void cancel(final NotificationType cancel, final AddressingProperties addressingProperties, final ArjunaContext arjunaContext)
+    {
+        final InstanceIdentifier instanceIdentifier = arjunaContext.getInstanceIdentifier() ;
+        final ParticipantCompletionParticipantInboundEvents participant = getParticipant(instanceIdentifier) ;
+
+        if (participant != null)
+        {
+            try
+            {
+                participant.cancel(cancel, addressingProperties, arjunaContext) ;
+            }
+            catch (final Throwable th)
+            {
+                if (WSTLogger.arjLoggerI18N.isDebugEnabled())
+                {
+                    WSTLogger.arjLoggerI18N.debug("com.arjuna.wst11.messaging.ParticipantCompletionParticipantProcessorImpl.cancel_1", th) ;
+                }
+            }
+        }
+        else
+        {
+            if (WSTLogger.arjLoggerI18N.isDebugEnabled())
+            {
+                WSTLogger.arjLoggerI18N.debug("com.arjuna.wst11.messaging.ParticipantCompletionParticipantProcessorImpl.cancel_2", new Object[] {instanceIdentifier}) ;
+            }
+            sendCancelled(addressingProperties, arjunaContext) ;
+        }
+    }
+
+    /**
+     * Close.
+     * @param close The close notification.
+     * @param addressingProperties The addressing context.
+     * @param arjunaContext The arjuna context.
+     *
+     * @message com.arjuna.wst11.messaging.ParticipantCompletionParticipantProcessorImpl.close_1 [com.arjuna.wst11.messaging.ParticipantCompletionParticipantProcessorImpl.close_1] - Unexpected exception thrown from close:
+     * @message com.arjuna.wst11.messaging.ParticipantCompletionParticipantProcessorImpl.close_2 [com.arjuna.wst11.messaging.ParticipantCompletionParticipantProcessorImpl.close_2] - Close called on unknown participant: {0}
+     */
+    public void close(final NotificationType close, final AddressingProperties addressingProperties, final ArjunaContext arjunaContext)
+    {
+        final InstanceIdentifier instanceIdentifier = arjunaContext.getInstanceIdentifier() ;
+        final ParticipantCompletionParticipantInboundEvents participant = getParticipant(instanceIdentifier) ;
+
+        if (participant != null)
+        {
+            try
+            {
+                participant.close(close, addressingProperties, arjunaContext) ;
+            }
+            catch (final Throwable th)
+            {
+                if (WSTLogger.arjLoggerI18N.isDebugEnabled())
+                {
+                    WSTLogger.arjLoggerI18N.debug("com.arjuna.wst11.messaging.ParticipantCompletionParticipantProcessorImpl.close_1", th) ;
+                }
+            }
+        }
+        else
+        {
+            if (WSTLogger.arjLoggerI18N.isDebugEnabled())
+            {
+                WSTLogger.arjLoggerI18N.debug("com.arjuna.wst11.messaging.ParticipantCompletionParticipantProcessorImpl.close_2", new Object[] {instanceIdentifier}) ;
+            }
+            sendClosed(addressingProperties, arjunaContext) ;
+        }
+    }
+
+    /**
+     * Compensate.
+     * @param compensate The compensate notification.
+     * @param addressingProperties The addressing context.
+     * @param arjunaContext The arjuna context.
+     *
+     * @message com.arjuna.wst11.messaging.ParticipantCompletionParticipantProcessorImpl.compensate_1 [com.arjuna.wst11.messaging.ParticipantCompletionParticipantProcessorImpl.compensate_1] - Unexpected exception thrown from compensate:
+     * @message com.arjuna.wst11.messaging.ParticipantCompletionParticipantProcessorImpl.compensate_2 [com.arjuna.wst11.messaging.ParticipantCompletionParticipantProcessorImpl.compensate_2] - Compensate called on unknown participant: {0}
+     */
+    public void compensate(final NotificationType compensate, final AddressingProperties addressingProperties, final ArjunaContext arjunaContext)
+    {
+        final InstanceIdentifier instanceIdentifier = arjunaContext.getInstanceIdentifier() ;
+        final ParticipantCompletionParticipantInboundEvents participant = getParticipant(instanceIdentifier) ;
+
+        if (participant != null)
+        {
+            try
+            {
+                participant.compensate(compensate, addressingProperties, arjunaContext) ;
+            }
+            catch (final Throwable th)
+            {
+                if (WSTLogger.arjLoggerI18N.isDebugEnabled())
+                {
+                    WSTLogger.arjLoggerI18N.debug("com.arjuna.wst11.messaging.ParticipantCompletionParticipantProcessorImpl.compensate_1", th) ;
+                }
+            }
+        }
+        else
+        {
+            if (WSTLogger.arjLoggerI18N.isDebugEnabled())
+            {
+                WSTLogger.arjLoggerI18N.debug("com.arjuna.wst11.messaging.ParticipantCompletionParticipantProcessorImpl.compensate_2", new Object[] {instanceIdentifier}) ;
+            }
+            sendCompensated(addressingProperties, arjunaContext) ;
+        }
+    }
+
+    /**
+     * Exited.
+     * @param exited The exited notification.
+     * @param addressingProperties The addressing context.
+     * @param arjunaContext The arjuna context.
+     *
+     * @message com.arjuna.wst11.messaging.ParticipantCompletionParticipantProcessorImpl.exited_1 [com.arjuna.wst11.messaging.ParticipantCompletionParticipantProcessorImpl.exited_1] - Unexpected exception thrown from exited:
+     * @message com.arjuna.wst11.messaging.ParticipantCompletionParticipantProcessorImpl.exited_2 [com.arjuna.wst11.messaging.ParticipantCompletionParticipantProcessorImpl.exited_2] - Exited called on unknown participant: {0}
+     */
+    public void exited(final NotificationType exited, final AddressingProperties addressingProperties, final ArjunaContext arjunaContext)
+    {
+        final InstanceIdentifier instanceIdentifier = arjunaContext.getInstanceIdentifier() ;
+        final ParticipantCompletionParticipantInboundEvents participant = getParticipant(instanceIdentifier) ;
+
+        if (participant != null)
+        {
+            try
+            {
+                participant.exited(exited, addressingProperties, arjunaContext) ;
+            }
+            catch (final Throwable th)
+            {
+                if (WSTLogger.arjLoggerI18N.isDebugEnabled())
+                {
+                    WSTLogger.arjLoggerI18N.debug("com.arjuna.wst11.messaging.ParticipantCompletionParticipantProcessorImpl.exited_1", th) ;
+                }
+            }
+        }
+        else if (WSTLogger.arjLoggerI18N.isDebugEnabled())
+        {
+            WSTLogger.arjLoggerI18N.debug("com.arjuna.wst11.messaging.ParticipantCompletionParticipantProcessorImpl.exited_2", new Object[] {instanceIdentifier}) ;
+        }
+    }
+
+    /**
+     * Not Completed.
+     * @param notCompleted The not completed notification.
+     * @param addressingProperties The addressing context.
+     * @param arjunaContext The arjuna context.
+     *
+     * @message com.arjuna.wst11.messaging.ParticipantCompletionParticipantProcessorImpl.notCompleted_1 [com.arjuna.wst11.messaging.ParticipantCompletionParticipantProcessorImpl.notCompleted_1] - Unexpected exception thrown from notCompleted:
+     * @message com.arjuna.wst11.messaging.ParticipantCompletionParticipantProcessorImpl.notCompleted_2 [com.arjuna.wst11.messaging.ParticipantCompletionParticipantProcessorImpl.notCompleted_2] - Exited called on unknown participant: {0}
+     */
+    public void notCompleted(final NotificationType notCompleted, final AddressingProperties addressingProperties, final ArjunaContext arjunaContext)
+    {
+        final InstanceIdentifier instanceIdentifier = arjunaContext.getInstanceIdentifier() ;
+        final ParticipantCompletionParticipantInboundEvents participant = getParticipant(instanceIdentifier) ;
+
+        if (participant != null)
+        {
+            try
+            {
+                participant.notCompleted(notCompleted, addressingProperties, arjunaContext) ;
+            }
+            catch (final Throwable th)
+            {
+                if (WSTLogger.arjLoggerI18N.isDebugEnabled())
+                {
+                    WSTLogger.arjLoggerI18N.debug("com.arjuna.wst11.messaging.ParticipantCompletionParticipantProcessorImpl.notCompleted_1", th) ;
+                }
+            }
+        }
+        else if (WSTLogger.arjLoggerI18N.isDebugEnabled())
+        {
+            WSTLogger.arjLoggerI18N.debug("com.arjuna.wst11.messaging.ParticipantCompletionParticipantProcessorImpl.notCompleted_2", new Object[] {instanceIdentifier}) ;
+        }
+    }
+
+    /**
+     * Failed.
+     * @param failed The failed notification.
+     * @param addressingProperties The addressing context.
+     * @param arjunaContext The arjuna context.
+     *
+     * @message com.arjuna.wst11.messaging.ParticipantCompletionParticipantProcessorImpl.failed_1 [com.arjuna.wst11.messaging.ParticipantCompletionParticipantProcessorImpl.failed_1] - Unexpected exception thrown from failed:
+     * @message com.arjuna.wst11.messaging.ParticipantCompletionParticipantProcessorImpl.failed_2 [com.arjuna.wst11.messaging.ParticipantCompletionParticipantProcessorImpl.failed_2] - Failed called on unknown participant: {0}
+     */
+    public void failed(final NotificationType failed, final AddressingProperties addressingProperties, final ArjunaContext arjunaContext)
+    {
+        final InstanceIdentifier instanceIdentifier = arjunaContext.getInstanceIdentifier() ;
+        final ParticipantCompletionParticipantInboundEvents participant = getParticipant(instanceIdentifier) ;
+
+        if (participant != null)
+        {
+            try
+            {
+                participant.failed(failed, addressingProperties, arjunaContext) ;
+            }
+            catch (final Throwable th)
+            {
+                if (WSTLogger.arjLoggerI18N.isDebugEnabled())
+                {
+                    WSTLogger.arjLoggerI18N.debug("com.arjuna.wst11.messaging.ParticipantCompletionParticipantProcessorImpl.failed_1", th) ;
+                }
+            }
+        }
+        else if (WSTLogger.arjLoggerI18N.isDebugEnabled())
+        {
+            WSTLogger.arjLoggerI18N.debug("com.arjuna.wst11.messaging.ParticipantCompletionParticipantProcessorImpl.failed_2", new Object[] {instanceIdentifier}) ;
+        }
+    }
+
+    /**
+     * Get Status.
+     * @param getStatus The get status notification.
+     * @param addressingProperties The addressing context.
+     * @param arjunaContext The arjuna context.
+     *
+     * @message com.arjuna.wst11.messaging.ParticipantCompletionParticipantProcessorImpl.getStatus_1 [com.arjuna.wst11.messaging.ParticipantCompletionParticipantProcessorImpl.getStatus_1] - Unexpected exception thrown from getStatus:
+     * @message com.arjuna.wst11.messaging.ParticipantCompletionParticipantProcessorImpl.getStatus_2 [com.arjuna.wst11.messaging.ParticipantCompletionParticipantProcessorImpl.getStatus_2] - Complete called on unknown participant: {0}
+     */
+    public void getStatus(final NotificationType getStatus, final AddressingProperties addressingProperties, final ArjunaContext arjunaContext)
+    {
+        final InstanceIdentifier instanceIdentifier = arjunaContext.getInstanceIdentifier() ;
+        final ParticipantCompletionParticipantInboundEvents participant = getParticipant(instanceIdentifier) ;
+
+        if (participant != null)
+        {
+            try
+            {
+                participant.getStatus(getStatus, addressingProperties, arjunaContext) ;
+            }
+            catch (final Throwable th)
+            {
+                if (WSTLogger.arjLoggerI18N.isDebugEnabled())
+                {
+                    WSTLogger.arjLoggerI18N.debug("com.arjuna.wst11.messaging.ParticipantCompletionParticipantProcessorImpl.getStatus_1", th) ;
+                }
+            }
+        }
+        else if (WSTLogger.arjLoggerI18N.isDebugEnabled())
+        {
+            WSTLogger.arjLoggerI18N.debug("com.arjuna.wst11.messaging.ParticipantCompletionParticipantProcessorImpl.getStatus_2", new Object[] {instanceIdentifier}) ;
+        }
+    }
+
+    /**
+     * Status.
+     * @param status The status type.
+     * @param addressingProperties The addressing context.
+     * @param arjunaContext The arjuna context.
+     *
+     * @message com.arjuna.wst11.messaging.ParticipantCompletionParticipantProcessorImpl.status_1 [com.arjuna.wst11.messaging.ParticipantCompletionParticipantProcessorImpl.status_1] - Unexpected exception thrown from status:
+     * @message com.arjuna.wst11.messaging.ParticipantCompletionParticipantProcessorImpl.status_2 [com.arjuna.wst11.messaging.ParticipantCompletionParticipantProcessorImpl.status_2] - Status called on unknown participant: {0}
+     */
+    public void status(final StatusType status, final AddressingProperties addressingProperties, final ArjunaContext arjunaContext)
+    {
+        final InstanceIdentifier instanceIdentifier = arjunaContext.getInstanceIdentifier() ;
+        final ParticipantCompletionParticipantInboundEvents participant = getParticipant(instanceIdentifier) ;
+
+        if (participant != null)
+        {
+            try
+            {
+                participant.status(status, addressingProperties, arjunaContext) ;
+            }
+            catch (final Throwable th)
+            {
+                if (WSTLogger.arjLoggerI18N.isDebugEnabled())
+                {
+                    WSTLogger.arjLoggerI18N.debug("com.arjuna.wst11.messaging.ParticipantCompletionParticipantProcessorImpl.status_1", th) ;
+                }
+            }
+        }
+        else if (WSTLogger.arjLoggerI18N.isDebugEnabled())
+        {
+            WSTLogger.arjLoggerI18N.debug("com.arjuna.wst11.messaging.ParticipantCompletionParticipantProcessorImpl.status_2", new Object[] {instanceIdentifier}) ;
+        }
+    }
+
+    /**
+     * SOAP Fault.
+     * @param fault The SOAP fault notification.
+     * @param addressingProperties The addressing context.
+     * @param arjunaContext The arjuna context.
+     *
+     * @message com.arjuna.wst11.messaging.ParticipantCompletionParticipantProcessorImpl.soapFault_1 [com.arjuna.wst11.messaging.ParticipantCompletionParticipantProcessorImpl.soapFault_1] - Unexpected exception thrown from soapFault:
+     * @message com.arjuna.wst11.messaging.ParticipantCompletionParticipantProcessorImpl.soapFault_2 [com.arjuna.wst11.messaging.ParticipantCompletionParticipantProcessorImpl.soapFault_2] - SoapFault called on unknown participant: {0}
+     */
+    public void soapFault(final SoapFault fault, final AddressingProperties addressingProperties,
+        final ArjunaContext arjunaContext)
+    {
+        final InstanceIdentifier instanceIdentifier = arjunaContext.getInstanceIdentifier() ;
+        final ParticipantCompletionParticipantInboundEvents participant = getParticipant(instanceIdentifier) ;
+
+        if (participant != null)
+        {
+            try
+            {
+                participant.soapFault(fault, addressingProperties, arjunaContext) ;
+            }
+            catch (final Throwable th)
+            {
+                if (WSTLogger.arjLoggerI18N.isDebugEnabled())
+                {
+                    WSTLogger.arjLoggerI18N.debug("com.arjuna.wst11.messaging.ParticipantCompletionParticipantProcessorImpl.soapFault_1", th) ;
+                }
+            }
+        }
+        else if (WSTLogger.arjLoggerI18N.isDebugEnabled())
+        {
+            WSTLogger.arjLoggerI18N.debug("com.arjuna.wst11.messaging.ParticipantCompletionParticipantProcessorImpl.soapFault_2", new Object[] {instanceIdentifier}) ;
+        }
+    }
+
+    /**
+     * Send a cancelled message.
+     *
+     * @param addressingProperties The addressing context.
+     * @param arjunaContext The arjuna context.
+     *
+     * @message com.arjuna.wst11.messaging.ParticipantCompletionParticipantProcessorImpl.sendCancelled_1 [com.arjuna.wst11.messaging.ParticipantCompletionParticipantProcessorImpl.sendCancelled_1] - Unexpected exception while sending Cancelled
+     */
+    private void sendCancelled(final AddressingProperties addressingProperties, final ArjunaContext arjunaContext)
+    {
+        // KEV add check for recovery
+        final String messageId = MessageId.getMessageId() ;
+        final AddressingProperties responseAddressingProperties = AddressingHelper.createNotificationContext(messageId) ;
+        try
+        {
+            // TODO - cannot do this without a coordinator endpoint and this only gets called when we don't have one
+            // ParticipantCompletionCoordinatorClient.getClient().sendCancelled(responseAddressingProperties, arjunaContext.getInstanceIdentifier()) ;
+        }
+        catch (final Throwable th)
+        {
+            if (WSTLogger.arjLoggerI18N.isDebugEnabled())
+            {
+                WSTLogger.arjLoggerI18N.debug("com.arjuna.wst11.messaging.ParticipantCompletionParticipantProcessorImpl.sendCancelled_1", th) ;
+            }
+        }
+    }
+
+    /**
+     * Send a closed message.
+     *
+     * @param addressingProperties The addressing context.
+     * @param arjunaContext The arjuna context.
+     *
+     * @message com.arjuna.wst11.messaging.ParticipantCompletionParticipantProcessorImpl.sendClosed_1 [com.arjuna.wst11.messaging.ParticipantCompletionParticipantProcessorImpl.sendClosed_1] - Unexpected exception while sending Closed
+     */
+    private void sendClosed(final AddressingProperties addressingProperties, final ArjunaContext arjunaContext)
+    {
+        // KEV add check for recovery
+        final String messageId = MessageId.getMessageId() ;
+        final AddressingProperties responseAddressingProperties = AddressingHelper.createNotificationContext(messageId) ;
+        try
+        {
+            // TODO - cannot do this without a coordinator endpoint and this only gets called when we don't have one
+            // ParticipantCompletionCoordinatorClient.getClient().sendClosed(responseAddressingProperties, arjunaContext.getInstanceIdentifier()) ;
+        }
+        catch (final Throwable th)
+        {
+            if (WSTLogger.arjLoggerI18N.isDebugEnabled())
+            {
+                WSTLogger.arjLoggerI18N.debug("com.arjuna.wst11.messaging.ParticipantCompletionParticipantProcessorImpl.sendClosed_1", th) ;
+            }
+        }
+    }
+
+    /**
+     * Send a compensated message.
+     *
+     * @param addressingProperties The addressing context.
+     * @param arjunaContext The arjuna context.
+     *
+     * @message com.arjuna.wst11.messaging.ParticipantCompletionParticipantProcessorImpl.sendCompensated_1 [com.arjuna.wst11.messaging.ParticipantCompletionParticipantProcessorImpl.sendCompensated_1] - Unexpected exception while sending Compensated
+     */
+    private void sendCompensated(final AddressingProperties addressingProperties, final ArjunaContext arjunaContext)
+    {
+        // KEV add check for recovery
+        final String messageId = MessageId.getMessageId() ;
+        final AddressingProperties responseAddressingProperties = AddressingHelper.createNotificationContext(messageId) ;
+        try
+        {
+            // TODO - cannot do this without a coordinator endpoint and this only gets called when we don't have one
+            // ParticipantCompletionCoordinatorClient.getClient().sendCompensated(responseAddressingProperties, arjunaContext.getInstanceIdentifier()) ;
+        }
+        catch (final Throwable th)
+        {
+            if (WSTLogger.arjLoggerI18N.isDebugEnabled())
+            {
+                WSTLogger.arjLoggerI18N.debug("com.arjuna.wst11.messaging.ParticipantCompletionParticipantProcessorImpl.sendCompensated_1", th) ;
+            }
+        }
+    }
+}
\ No newline at end of file

Added: labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/wst11/messaging/ParticipantProcessorImpl.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/wst11/messaging/ParticipantProcessorImpl.java	                        (rev 0)
+++ labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/wst11/messaging/ParticipantProcessorImpl.java	2008-01-25 17:18:13 UTC (rev 18124)
@@ -0,0 +1,271 @@
+package com.arjuna.wst11.messaging;
+
+import com.arjuna.webservices.SoapFault;
+import com.arjuna.webservices.base.processors.ActivatedObjectProcessor;
+import com.arjuna.webservices.logging.WSTLogger;
+import com.arjuna.webservices11.wsaddr.AddressingHelper;
+import com.arjuna.webservices11.wsarj.ArjunaContext;
+import com.arjuna.webservices11.wsarj.InstanceIdentifier;
+import com.arjuna.webservices11.wsat.processors.ParticipantProcessor;
+import com.arjuna.webservices11.wsat.ParticipantInboundEvents;
+import com.arjuna.wsc11.messaging.MessageId;
+import org.oasis_open.docs.ws_tx.wsat._2006._06.Notification;
+
+import javax.xml.ws.addressing.AddressingProperties;
+
+/**
+ * The Participant processor.
+ * @author kevin
+ */
+public class ParticipantProcessorImpl 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 addressingProperties The addressing context.
+     * @param arjunaContext The arjuna context.
+     *
+     * @message com.arjuna.wst11.messaging.ParticipantProcessorImpl.commit_1 [com.arjuna.wst11.messaging.ParticipantProcessorImpl.commit_1] - Unexpected exception thrown from commit:
+     * @message com.arjuna.wst11.messaging.ParticipantProcessorImpl.commit_2 [com.arjuna.wst11.messaging.ParticipantProcessorImpl.commit_2] - Commit called on unknown participant: {0}
+     */
+    public void commit(final Notification commit, final AddressingProperties addressingProperties,
+        final ArjunaContext arjunaContext)
+    {
+        final InstanceIdentifier instanceIdentifier = arjunaContext.getInstanceIdentifier() ;
+        final ParticipantInboundEvents participant = getParticipant(instanceIdentifier) ;
+
+        if (participant != null)
+        {
+            try
+            {
+                participant.commit(commit, addressingProperties, arjunaContext) ;
+            }
+            catch (final Throwable th)
+            {
+                if (WSTLogger.arjLoggerI18N.isWarnEnabled())
+                {
+                    WSTLogger.arjLoggerI18N.warn("com.arjuna.wst11.messaging.ParticipantProcessorImpl.commit_1", th) ;
+                }
+            }
+        }
+        else
+        {
+            if (WSTLogger.arjLoggerI18N.isWarnEnabled())
+            {
+                WSTLogger.arjLoggerI18N.warn("com.arjuna.wst11.messaging.ParticipantProcessorImpl.commit_2", new Object[] {instanceIdentifier}) ;
+            }
+            sendCommitted(addressingProperties, arjunaContext) ;
+        }
+    }
+
+    /**
+     * Prepare.
+     * @param prepare The prepare notification.
+     * @param addressingProperties The addressing context.
+     * @param arjunaContext The arjuna context.
+     *
+     * @message com.arjuna.wst11.messaging.ParticipantProcessorImpl.prepare_1 [com.arjuna.wst11.messaging.ParticipantProcessorImpl.prepare_1] - Unexpected exception thrown from prepare:
+     * @message com.arjuna.wst11.messaging.ParticipantProcessorImpl.prepare_2 [com.arjuna.wst11.messaging.ParticipantProcessorImpl.prepare_2] - Prepare called on unknown participant: {0}
+     */
+    public void prepare(final Notification prepare, final AddressingProperties addressingProperties,
+        final ArjunaContext arjunaContext)
+    {
+        final InstanceIdentifier instanceIdentifier = arjunaContext.getInstanceIdentifier() ;
+        final ParticipantInboundEvents participant = getParticipant(instanceIdentifier) ;
+
+        if (participant != null)
+        {
+            try
+            {
+                participant.prepare(prepare, addressingProperties, arjunaContext) ;
+            }
+            catch (final Throwable th)
+            {
+                if (WSTLogger.arjLoggerI18N.isWarnEnabled())
+                {
+                    WSTLogger.arjLoggerI18N.warn("com.arjuna.wst11.messaging.ParticipantProcessorImpl.prepare_1", th) ;
+                }
+            }
+        }
+        else
+        {
+            if (WSTLogger.arjLoggerI18N.isWarnEnabled())
+            {
+                WSTLogger.arjLoggerI18N.warn("com.arjuna.wst11.messaging.ParticipantProcessorImpl.prepare_2", new Object[] {instanceIdentifier}) ;
+            }
+            sendAborted(addressingProperties, arjunaContext) ;
+        }
+    }
+
+    /**
+     * Rollback.
+     * @param rollback The rollback notification.
+     * @param addressingProperties The addressing context.
+     * @param arjunaContext The arjuna context.
+     *
+     * @message com.arjuna.wst11.messaging.ParticipantProcessorImpl.rollback_1 [com.arjuna.wst11.messaging.ParticipantProcessorImpl.rollback_1] - Unexpected exception thrown from rollback:
+     * @message com.arjuna.wst11.messaging.ParticipantProcessorImpl.rollback_2 [com.arjuna.wst11.messaging.ParticipantProcessorImpl.rollback_2] - Rollback called on unknown participant: {0}
+     */
+    public void rollback(final Notification rollback, final AddressingProperties addressingProperties,
+        final ArjunaContext arjunaContext)
+    {
+        final InstanceIdentifier instanceIdentifier = arjunaContext.getInstanceIdentifier() ;
+        final ParticipantInboundEvents participant = getParticipant(instanceIdentifier) ;
+
+        if (participant != null)
+        {
+            try
+            {
+                participant.rollback(rollback, addressingProperties, arjunaContext) ;
+            }
+            catch (final Throwable th)
+            {
+                if (WSTLogger.arjLoggerI18N.isWarnEnabled())
+                {
+                    WSTLogger.arjLoggerI18N.warn("com.arjuna.wst11.messaging.ParticipantProcessorImpl.rollback_1", th) ;
+                }
+            }
+        }
+        else
+        {
+            if (WSTLogger.arjLoggerI18N.isWarnEnabled())
+            {
+                WSTLogger.arjLoggerI18N.warn("com.arjuna.wst11.messaging.ParticipantProcessorImpl.rollback_2", new Object[] {instanceIdentifier}) ;
+            }
+            sendAborted(addressingProperties, arjunaContext) ;
+        }
+    }
+
+    /**
+     * SOAP Fault.
+     * @param fault The SOAP fault notification.
+     * @param addressingProperties The addressing context.
+     * @param arjunaContext The arjuna context.
+     *
+     * @message com.arjuna.wst11.messaging.ParticipantProcessorImpl.soapFault_1 [com.arjuna.wst11.messaging.ParticipantProcessorImpl.soapFault_1] - Unexpected exception thrown from soapFault:
+     * @message com.arjuna.wst11.messaging.ParticipantProcessorImpl.soapFault_2 [com.arjuna.wst11.messaging.ParticipantProcessorImpl.soapFault_2] - SoapFault called on unknown participant: {0}
+     */
+    public void soapFault(final SoapFault fault, final AddressingProperties addressingProperties,
+        final ArjunaContext arjunaContext)
+    {
+        final InstanceIdentifier instanceIdentifier = arjunaContext.getInstanceIdentifier() ;
+        final ParticipantInboundEvents participant = getParticipant(instanceIdentifier) ;
+
+        if (participant != null)
+        {
+            try
+            {
+                participant.soapFault(fault, addressingProperties, arjunaContext) ;
+            }
+            catch (final Throwable th)
+            {
+                if (WSTLogger.arjLoggerI18N.isWarnEnabled())
+                {
+                    WSTLogger.arjLoggerI18N.warn("com.arjuna.wst11.messaging.ParticipantProcessorImpl.soapFault_1", th) ;
+                }
+            }
+        }
+        else
+        {
+            if (WSTLogger.arjLoggerI18N.isWarnEnabled())
+            {
+                WSTLogger.arjLoggerI18N.warn("com.arjuna.wst11.messaging.ParticipantProcessorImpl.soapFault_2", new Object[] {instanceIdentifier}) ;
+            }
+        }
+    }
+
+    /**
+     * Send a committed message.
+     *
+     * @param addressingProperties The addressing context.
+     * @param arjunaContext The arjuna context.
+     *
+     * @message com.arjuna.wst11.messaging.ParticipantProcessorImpl.sendCommitted_1 [com.arjuna.wst11.messaging.ParticipantProcessorImpl.sendCommitted_1] - Unexpected exception while sending Committed
+     */
+    private void sendCommitted(final AddressingProperties addressingProperties, final ArjunaContext arjunaContext)
+    {
+        // KEV add check for recovery
+        final String messageId = MessageId.getMessageId() ;
+        final AddressingProperties responseAddressingProperties = AddressingHelper.createResponseContext(addressingProperties, messageId) ;
+        final InstanceIdentifier instanceIdentifier = arjunaContext.getInstanceIdentifier() ;
+        /*
+         * TODO - fix this. participant is null and we cannto send a message without an endpoint
+        try
+        {
+            CoordinatorClient.getClient().sendCommitted(responseAddressingProperties, instanceIdentifier) ;
+        }
+        catch (final Throwable th)
+        {
+            if (WSTLogger.arjLoggerI18N.isDebugEnabled())
+            {
+                WSTLogger.arjLoggerI18N.debug("com.arjuna.wst11.messaging.ParticipantProcessorImpl.sendCommitted_1", th) ;
+            }
+        }
+        */
+    }
+
+    /**
+     * Send an aborted message.
+     *
+     * @param addressingProperties The addressing context.
+     * @param arjunaContext The arjuna context.
+     *
+     * @message com.arjuna.wst11.messaging.ParticipantProcessorImpl.sendAborted_1 [com.arjuna.wst11.messaging.ParticipantProcessorImpl.sendAborted_1] - Unexpected exception while sending Aborted
+     */
+    private void sendAborted(final AddressingProperties addressingProperties, final ArjunaContext arjunaContext)
+    {
+        // KEV add check for recovery
+        final String messageId = MessageId.getMessageId() ;
+        final AddressingProperties responseAddressingProperties = AddressingHelper.createResponseContext(addressingProperties, messageId) ;
+        final InstanceIdentifier instanceIdentifier = arjunaContext.getInstanceIdentifier() ;
+        /*
+         * TODO - fix this. participant is null and we cannto send a message without an endpoint
+        try
+        {
+            CoordinatorClient.getClient().sendAborted(responseAddressingProperties, instanceIdentifier) ;
+        }
+        catch (final Throwable th)
+        {
+            if (WSTLogger.arjLoggerI18N.isDebugEnabled())
+            {
+                WSTLogger.arjLoggerI18N.debug("com.arjuna.wst11.messaging.ParticipantProcessorImpl.sendAborted_1", th) ;
+            }
+        }
+        */
+    }
+}

Added: labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/wst11/messaging/TerminationCoordinatorProcessorImpl.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/wst11/messaging/TerminationCoordinatorProcessorImpl.java	                        (rev 0)
+++ labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/wst11/messaging/TerminationCoordinatorProcessorImpl.java	2008-01-25 17:18:13 UTC (rev 18124)
@@ -0,0 +1,341 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. 
+ * 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.wst11.messaging;
+
+import com.arjuna.schemas.ws._2005._10.wsarjtx.NotificationType;
+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.webservices11.wsaddr.AddressingHelper;
+import com.arjuna.webservices11.wsarj.ArjunaContext;
+import com.arjuna.webservices11.wsarj.InstanceIdentifier;
+import com.arjuna.webservices11.wsarjtx.client.TerminationParticipantClient;
+import com.arjuna.webservices11.wsarjtx.processors.TerminationCoordinatorProcessor;
+import com.arjuna.webservices.wsarjtx.ArjunaTXConstants;
+import com.arjuna.wsc11.messaging.MessageId;
+import com.arjuna.wst.*;
+import com.arjuna.wst11.BusinessActivityTerminator;
+
+import javax.xml.ws.addressing.AddressingProperties;
+import javax.xml.ws.wsaddressing.W3CEndpointReference;
+import java.text.MessageFormat;
+
+/**
+ * The Terminator Participant processor.
+ * @author kevin
+ *
+ * @message com.arjuna.wst.messaging.TerminationCoordinator11ProcessorImpl_1 [com.arjuna.wst.messaging.TerminationCoordinator11ProcessorImpl_1] - Unknown transaction
+ * @message com.arjuna.wst.messaging.TerminationCoordinator11ProcessorImpl_2 [com.arjuna.wst.messaging.TerminationCoordinator11ProcessorImpl_2] - Unknown error: {0}
+ * @message com.arjuna.wst.messaging.TerminationCoordinator11ProcessorImpl_3 [com.arjuna.wst.messaging.TerminationCoordinator11ProcessorImpl_3] - Unexpected exception thrown from cancel:
+ * @message com.arjuna.wst.messaging.TerminationCoordinator11ProcessorImpl_4 [com.arjuna.wst.messaging.TerminationCoordinator11ProcessorImpl_4] - Cancel called on unknown participant: {0}
+ * @message com.arjuna.wst.messaging.TerminationCoordinator11ProcessorImpl_5 [com.arjuna.wst.messaging.TerminationCoordinator11ProcessorImpl_5] - Unknown participant
+ * @message com.arjuna.wst.messaging.TerminationCoordinator11ProcessorImpl_6 [com.arjuna.wst.messaging.TerminationCoordinator11ProcessorImpl_6] - Unknown transaction
+ * @message com.arjuna.wst.messaging.TerminationCoordinator11ProcessorImpl_7 [com.arjuna.wst.messaging.TerminationCoordinator11ProcessorImpl_7] - Transaction rolled back
+ * @message com.arjuna.wst.messaging.TerminationCoordinator11ProcessorImpl_8 [com.arjuna.wst.messaging.TerminationCoordinator11ProcessorImpl_8] - Unknown error: {0}
+ * @message com.arjuna.wst.messaging.TerminationCoordinator11ProcessorImpl_9 [com.arjuna.wst.messaging.TerminationCoordinator11ProcessorImpl_9] - Unexpected exception thrown from close:
+ * @message com.arjuna.wst.messaging.TerminationCoordinator11ProcessorImpl_10 [com.arjuna.wst.messaging.TerminationCoordinator11ProcessorImpl_10] - Close called on unknown participant: {0}
+ * @message com.arjuna.wst.messaging.TerminationCoordinator11ProcessorImpl_11 [com.arjuna.wst.messaging.TerminationCoordinator11ProcessorImpl_11] - Unknown participant
+ * @message com.arjuna.wst.messaging.TerminationCoordinator11ProcessorImpl_12 [com.arjuna.wst.messaging.TerminationCoordinator11ProcessorImpl_12] - Unknown transaction
+ * @message com.arjuna.wst.messaging.TerminationCoordinator11ProcessorImpl_13 [com.arjuna.wst.messaging.TerminationCoordinator11ProcessorImpl_13] - Unknown error: {0}
+ * @message com.arjuna.wst.messaging.TerminationCoordinator11ProcessorImpl_14 [com.arjuna.wst.messaging.TerminationCoordinator11ProcessorImpl_14] - Unexpected exception thrown from complete:
+ * @message com.arjuna.wst.messaging.TerminationCoordinator11ProcessorImpl_15 [com.arjuna.wst.messaging.TerminationCoordinator11ProcessorImpl_15] - Complete called on unknown participant: {0}
+ * @message com.arjuna.wst.messaging.TerminationCoordinator11ProcessorImpl_16 [com.arjuna.wst.messaging.TerminationCoordinator11ProcessorImpl_16] - Unknown participant
+ */
+public class TerminationCoordinatorProcessorImpl 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.
+     */
+    public BusinessActivityTerminator getParticipant(final InstanceIdentifier instanceIdentifier)
+    {
+        final String identifier = (instanceIdentifier != null ? instanceIdentifier.getInstanceIdentifier() : null) ;
+        return (com.arjuna.wst11.BusinessActivityTerminator)activatedObjectProcessor.getObject(identifier) ;
+    }
+
+    /**
+     * Cancel.
+     * @param cancel The cancel notification.
+     * @param addressingProperties The addressing context.
+     * @param arjunaContext The arjuna context.
+     */
+    public void cancel(final NotificationType cancel, final AddressingProperties addressingProperties,
+        final ArjunaContext arjunaContext)
+    {
+        final InstanceIdentifier instanceIdentifier = arjunaContext.getInstanceIdentifier() ;
+        final BusinessActivityTerminator participant = getParticipant(instanceIdentifier) ;
+
+        try
+        {
+            if (participant != null)
+            {
+                W3CEndpointReference endpoint = participant.getEndpoint();
+
+                final String messageId = MessageId.getMessageId() ;
+                try
+                {
+                    participant.cancel() ;
+                }
+                catch (final FaultedException fe)
+                {
+                    final AddressingProperties responseAddressingProperties =
+                        AddressingHelper.createNotificationContext(messageId) ;
+                    TerminationParticipantClient.getClient().sendFaulted(endpoint, responseAddressingProperties, instanceIdentifier) ;
+                }
+                catch (final UnknownTransactionException ute)
+                {
+                    final AddressingProperties faultAddressingProperties = AddressingHelper.createNotificationContext(messageId) ;
+                    final SoapFault soapFault = new SoapFault(SoapFaultType.FAULT_SENDER, ArjunaTXConstants.UNKNOWNTRANSACTION_ERROR_CODE_QNAME,
+                        WSTLogger.log_mesg.getString("com.arjuna.wst.messaging.TerminationCoordinator11ProcessorImpl_1")) ;
+                    TerminationParticipantClient.getClient().sendSoapFault(endpoint, faultAddressingProperties, soapFault, instanceIdentifier) ;
+                    return ;
+                }
+                catch (final SystemException se)
+                {
+                    final AddressingProperties faultAddressingProperties = AddressingHelper.createNotificationContext(messageId) ;
+                    final String pattern = WSTLogger.log_mesg.getString("com.arjuna.wst.messaging.TerminationCoordinator11ProcessorImpl_2") ;
+                    final String message = MessageFormat.format(pattern, new Object[] {se}) ;
+                    final SoapFault soapFault = new SoapFault(SoapFaultType.FAULT_SENDER, ArjunaTXConstants.UNKNOWNERROR_ERROR_CODE_QNAME, message) ;
+                    TerminationParticipantClient.getClient().sendSoapFault(endpoint, faultAddressingProperties, soapFault, instanceIdentifier) ;
+                    return ;
+                }
+                catch (final Throwable th)
+                {
+                    if (WSTLogger.arjLoggerI18N.isDebugEnabled())
+                    {
+                        WSTLogger.arjLoggerI18N.debug("com.arjuna.wst.messaging.TerminationCoordinator11ProcessorImpl_3", th) ;
+                    }
+                    final AddressingProperties faultAddressingProperties = AddressingHelper.createNotificationContext(MessageId.getMessageId()) ;
+                    final SoapFault soapFault = new SoapFault(th) ;
+                    TerminationParticipantClient.getClient().sendSoapFault(endpoint, faultAddressingProperties, soapFault, instanceIdentifier) ;
+                    return ;
+                }
+                final AddressingProperties responseAddressingProperties =
+                    AddressingHelper.createNotificationContext(messageId) ;
+                TerminationParticipantClient.getClient().sendCancelled(endpoint, responseAddressingProperties, instanceIdentifier) ;
+            }
+            else
+            {
+                if (WSTLogger.arjLoggerI18N.isDebugEnabled())
+                {
+                    WSTLogger.arjLoggerI18N.debug("com.arjuna.wst.messaging.TerminationCoordinator11ProcessorImpl_4", new Object[] {instanceIdentifier}) ;
+                }
+                // cannot do this without an endpoint
+                //final AddressingProperties faultAddressingProperties = AddressingHelper.createNotificationContext(MessageId.getMessageId()) ;
+                // final SoapFault soapFault = new SoapFault(SoapFaultType.FAULT_SENDER, ArjunaTXConstants.UNKNOWNTRANSACTION_ERROR_CODE_QNAME,
+                //     WSTLogger.log_mesg.getString("com.arjuna.wst.messaging.TerminationCoordinator11ProcessorImpl_5")) ;
+                // TerminationParticipantClient.getClient().sendSoapFault(endpoint, faultAddressingProperties, soapFault, instanceIdentifier) ;
+            }
+        }
+        catch (Throwable throwable)
+        {
+            throwable.printStackTrace(System.err);
+        }
+    }
+
+    /**
+     * Close.
+     * @param close The close notification.
+     * @param addressingProperties The addressing context.
+     * @param arjunaContext The arjuna context.
+     */
+    public void close(final NotificationType close, final AddressingProperties addressingProperties,
+        final ArjunaContext arjunaContext)
+    {
+        final InstanceIdentifier instanceIdentifier = arjunaContext.getInstanceIdentifier() ;
+        final BusinessActivityTerminator participant = getParticipant(instanceIdentifier) ;
+
+        try
+        {
+            if (participant != null)
+            {
+                W3CEndpointReference endpoint = participant.getEndpoint();
+
+                final String messageId = MessageId.getMessageId() ;
+                try
+                {
+                    participant.close() ;
+                }
+                catch (final UnknownTransactionException ute)
+                {
+                    final AddressingProperties faultAddressingProperties = AddressingHelper.createFaultContext(addressingProperties, messageId) ;
+                    final SoapFault soapFault = new SoapFault(SoapFaultType.FAULT_SENDER, ArjunaTXConstants.UNKNOWNTRANSACTION_ERROR_CODE_QNAME,
+                        WSTLogger.log_mesg.getString("com.arjuna.wst.messaging.TerminationCoordinator11ProcessorImpl_6")) ;
+                    TerminationParticipantClient.getClient().sendSoapFault(endpoint, faultAddressingProperties, soapFault, instanceIdentifier) ;
+                    return ;
+                }
+                catch (final TransactionRolledBackException trbe)
+                {
+                    final AddressingProperties faultAddressingProperties = AddressingHelper.createFaultContext(addressingProperties, messageId) ;
+                    final SoapFault soapFault = new SoapFault(SoapFaultType.FAULT_SENDER, ArjunaTXConstants.TRANSACTIONROLLEDBACK_ERROR_CODE_QNAME,
+                        WSTLogger.log_mesg.getString("com.arjuna.wst.messaging.TerminationCoordinator11ProcessorImpl_7")) ;
+                    TerminationParticipantClient.getClient().sendSoapFault(endpoint, faultAddressingProperties, soapFault, instanceIdentifier) ;
+                    return ;
+                }
+                catch (final SystemException se)
+                {
+                    final AddressingProperties faultAddressingProperties = AddressingHelper.createFaultContext(addressingProperties, messageId) ;
+                    final String pattern = WSTLogger.log_mesg.getString("com.arjuna.wst.messaging.TerminationCoordinator11ProcessorImpl_8") ;
+                    final String message = MessageFormat.format(pattern, new Object[] {se}) ;
+                    final SoapFault soapFault = new SoapFault(SoapFaultType.FAULT_SENDER, ArjunaTXConstants.UNKNOWNERROR_ERROR_CODE_QNAME, message) ;
+                    TerminationParticipantClient.getClient().sendSoapFault(endpoint, faultAddressingProperties, soapFault, instanceIdentifier) ;
+                    return ;
+                }
+                catch (final Throwable th)
+                {
+                    if (WSTLogger.arjLoggerI18N.isDebugEnabled())
+                    {
+                        WSTLogger.arjLoggerI18N.debug("com.arjuna.wst.messaging.TerminationCoordinator11ProcessorImpl_9", th) ;
+                    }
+                    final AddressingProperties faultAddressingProperties = AddressingHelper.createFaultContext(addressingProperties, MessageId.getMessageId()) ;
+                    final SoapFault soapFault = new SoapFault(th) ;
+                    TerminationParticipantClient.getClient().sendSoapFault(endpoint, faultAddressingProperties, soapFault, instanceIdentifier) ;
+                    return ;
+                }
+                final AddressingProperties responseAddressingProperties =
+                    AddressingHelper.createResponseContext(addressingProperties, messageId) ;
+                TerminationParticipantClient.getClient().sendClosed(endpoint, responseAddressingProperties, instanceIdentifier) ;
+            }
+            else
+            {
+                if (WSTLogger.arjLoggerI18N.isDebugEnabled())
+                {
+                    WSTLogger.arjLoggerI18N.debug("com.arjuna.wst.messaging.TerminationCoordinator11ProcessorImpl_10", new Object[] {instanceIdentifier}) ;
+                }
+                // cannot do this without an endpoint
+                // final AddressingProperties faultAddressingProperties = AddressingHelper.createNotificationContext(MessageId.getMessageId()) ;
+                // final SoapFault soapFault = new SoapFault(SoapFaultType.FAULT_SENDER, ArjunaTXConstants.UNKNOWNTRANSACTION_ERROR_CODE_QNAME,
+                //     WSTLogger.log_mesg.getString("com.arjuna.wst.messaging.TerminationCoordinator11ProcessorImpl_11")) ;
+                // TerminationParticipantClient.getClient().sendSoapFault(endpoint, faultAddressingProperties, soapFault, instanceIdentifier) ;
+            }
+        }
+        catch (Throwable throwable)
+        {
+            throwable.printStackTrace(System.err);
+        }
+    }
+
+    /**
+     * Complete.
+     * @param complete The complete notification.
+     * @param addressingProperties The addressing context.
+     * @param arjunaContext The arjuna context.
+     */
+    public void complete(final NotificationType complete, final AddressingProperties addressingProperties,
+        final ArjunaContext arjunaContext)
+    {
+        final InstanceIdentifier instanceIdentifier = arjunaContext.getInstanceIdentifier() ;
+        final BusinessActivityTerminator participant = getParticipant(instanceIdentifier) ;
+
+        try
+        {
+            if (participant != null)
+            {
+                W3CEndpointReference endpoint = participant.getEndpoint();
+
+                final String messageId = MessageId.getMessageId() ;
+                try
+                {
+                    participant.complete() ;
+                }
+                catch (final FaultedException fe)
+                {
+                    final AddressingProperties responseAddressingProperties =
+                        AddressingHelper.createNotificationContext(messageId) ;
+                    TerminationParticipantClient.getClient().sendFaulted(endpoint, responseAddressingProperties, instanceIdentifier) ;
+                }
+                catch (final UnknownTransactionException ute)
+                {
+                    final AddressingProperties faultAddressingProperties = AddressingHelper.createNotificationContext(messageId) ;
+                    final SoapFault soapFault = new SoapFault(SoapFaultType.FAULT_SENDER, ArjunaTXConstants.UNKNOWNTRANSACTION_ERROR_CODE_QNAME,
+                        WSTLogger.log_mesg.getString("com.arjuna.wst.messaging.TerminationCoordinator11ProcessorImpl_12")) ;
+                    TerminationParticipantClient.getClient().sendSoapFault(endpoint, faultAddressingProperties, soapFault, instanceIdentifier) ;
+                    return ;
+                }
+                catch (final SystemException se)
+                {
+                    final AddressingProperties faultAddressingProperties = AddressingHelper.createNotificationContext(messageId) ;
+                    final String pattern = WSTLogger.log_mesg.getString("com.arjuna.wst.messaging.TerminationCoordinator11ProcessorImpl_13") ;
+                    final String message = MessageFormat.format(pattern, new Object[] {se}) ;
+                    final SoapFault soapFault = new SoapFault(SoapFaultType.FAULT_SENDER, ArjunaTXConstants.UNKNOWNERROR_ERROR_CODE_QNAME, message) ;
+                    TerminationParticipantClient.getClient().sendSoapFault(endpoint, faultAddressingProperties, soapFault, instanceIdentifier) ;
+                    return ;
+                }
+                catch (final Throwable th)
+                {
+                    if (WSTLogger.arjLoggerI18N.isDebugEnabled())
+                    {
+                        WSTLogger.arjLoggerI18N.debug("com.arjuna.wst.messaging.TerminationCoordinator11ProcessorImpl_14", th) ;
+                    }
+                    final AddressingProperties faultAddressingProperties = AddressingHelper.createNotificationContext(MessageId.getMessageId()) ;
+                    final SoapFault soapFault = new SoapFault(th) ;
+                    TerminationParticipantClient.getClient().sendSoapFault(endpoint, faultAddressingProperties, soapFault, instanceIdentifier) ;
+                    return ;
+                }
+                final AddressingProperties responseAddressingProperties =
+                    AddressingHelper.createNotificationContext(messageId) ;
+                TerminationParticipantClient.getClient().sendCompleted(endpoint, responseAddressingProperties, instanceIdentifier) ;
+            }
+            else
+            {
+                if (WSTLogger.arjLoggerI18N.isDebugEnabled())
+                {
+                    WSTLogger.arjLoggerI18N.debug("com.arjuna.wst.messaging.TerminationCoordinator11ProcessorImpl_15", new Object[] {instanceIdentifier}) ;
+                }
+                // cannot do this without an endpoint
+                // final AddressingProperties faultAddressingProperties = AddressingHelper.createNotificationContext(MessageId.getMessageId()) ;
+                // final SoapFault soapFault = new SoapFault(SoapFaultType.FAULT_SENDER, ArjunaTXConstants.UNKNOWNTRANSACTION_ERROR_CODE_QNAME,
+                //     WSTLogger.log_mesg.getString("com.arjuna.wst.messaging.TerminationCoordinator11ProcessorImpl_16")) ;
+                // TerminationParticipantClient.getClient().sendSoapFault(endpoint, faultAddressingProperties, soapFault, instanceIdentifier) ;
+            }
+        }
+        catch (Throwable throwable)
+        {
+            throwable.printStackTrace(System.err);
+        }
+    }
+}
\ No newline at end of file

Added: labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/wst11/messaging/deploy/TransactionInitialisation.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/wst11/messaging/deploy/TransactionInitialisation.java	                        (rev 0)
+++ labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/wst11/messaging/deploy/TransactionInitialisation.java	2008-01-25 17:18:13 UTC (rev 18124)
@@ -0,0 +1,72 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. 
+ * 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.wst11.messaging.deploy;
+
+import com.arjuna.services.framework.startup.Sequencer;
+import com.arjuna.webservices11.wsarjtx.processors.TerminationCoordinatorProcessor;
+import com.arjuna.webservices11.wsat.processors.CompletionCoordinatorProcessor;
+import com.arjuna.webservices11.wsat.processors.CoordinatorProcessor;
+import com.arjuna.webservices11.wsat.processors.ParticipantProcessor;
+import com.arjuna.webservices11.wsba.processors.CoordinatorCompletionCoordinatorProcessor;
+import com.arjuna.webservices11.wsba.processors.CoordinatorCompletionParticipantProcessor;
+import com.arjuna.webservices11.wsba.processors.ParticipantCompletionCoordinatorProcessor;
+import com.arjuna.webservices11.wsba.processors.ParticipantCompletionParticipantProcessor;
+import com.arjuna.wst11.messaging.*;
+
+import javax.servlet.ServletContextEvent;
+import javax.servlet.ServletContextListener;
+
+/**
+ * Initialise the transaction services.
+ * @author kevin
+ */
+public class TransactionInitialisation implements ServletContextListener
+{
+    /**
+     * The context has been initialized.
+     * @param servletContextEvent The servlet context event.
+     */
+    public void contextInitialized(final ServletContextEvent servletContextEvent)
+    {
+        Sequencer.Callback callback = new Sequencer.Callback(Sequencer.SEQUENCE_WSCOOR11, Sequencer.WEBAPP_WST11) {
+           public void run() {
+               CompletionCoordinatorProcessor.setProcessor(new CompletionCoordinatorProcessorImpl()) ;
+               ParticipantProcessor.setProcessor(new ParticipantProcessorImpl()) ;
+               CoordinatorProcessor.setProcessor(new CoordinatorProcessorImpl()) ;
+               TerminationCoordinatorProcessor.setProcessor(new TerminationCoordinatorProcessorImpl()) ;
+               CoordinatorCompletionParticipantProcessor.setProcessor(new CoordinatorCompletionParticipantProcessorImpl()) ;
+               ParticipantCompletionParticipantProcessor.setProcessor(new ParticipantCompletionParticipantProcessorImpl()) ;
+               CoordinatorCompletionCoordinatorProcessor.setProcessor(new CoordinatorCompletionCoordinatorProcessorImpl()) ;
+               ParticipantCompletionCoordinatorProcessor.setProcessor(new ParticipantCompletionCoordinatorProcessorImpl()) ;
+           }
+        };
+        // this is the last WST callback to be initialised so close the list
+        Sequencer.close(Sequencer.SEQUENCE_WSCOOR11, Sequencer.WEBAPP_WST11);
+    }
+
+    /**
+     * The context is about to be destroyed.
+     * @param servletContextEvent The servlet context event.
+     */
+    public void contextDestroyed(final ServletContextEvent servletContextEvent)
+    {
+    }
+}
\ No newline at end of file

Added: labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/wst11/messaging/engines/CoordinatorCompletionCoordinatorEngine.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/wst11/messaging/engines/CoordinatorCompletionCoordinatorEngine.java	                        (rev 0)
+++ labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/wst11/messaging/engines/CoordinatorCompletionCoordinatorEngine.java	2008-01-25 17:18:13 UTC (rev 18124)
@@ -0,0 +1,980 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. 
+ * 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.wst11.messaging.engines;
+
+import com.arjuna.webservices.SoapFault;
+import com.arjuna.webservices.logging.WSTLogger;
+import com.arjuna.webservices.util.TransportTimer;
+import com.arjuna.webservices11.wsaddr.AddressingHelper;
+import com.arjuna.webservices11.wsarj.ArjunaContext;
+import com.arjuna.webservices11.wsarj.InstanceIdentifier;
+import com.arjuna.webservices11.wsba.CoordinatorCompletionCoordinatorInboundEvents;
+import com.arjuna.webservices11.wsba.State;
+import com.arjuna.webservices11.wsba.processors.CoordinatorCompletionCoordinatorProcessor;
+import com.arjuna.webservices11.wsba.client.CoordinatorCompletionParticipantClient;
+import com.arjuna.wsc11.messaging.MessageId;
+import com.arjuna.wst11.BAParticipantManager;
+import org.oasis_open.docs.ws_tx.wsba._2006._06.ExceptionType;
+import org.oasis_open.docs.ws_tx.wsba._2006._06.NotificationType;
+import org.oasis_open.docs.ws_tx.wsba._2006._06.StatusType;
+
+import javax.xml.namespace.QName;
+import javax.xml.ws.addressing.AddressingProperties;
+import javax.xml.ws.wsaddressing.W3CEndpointReference;
+
+/**
+ * The coordinator completion coordinator state engine
+ * @author kevin
+ */
+public class CoordinatorCompletionCoordinatorEngine implements CoordinatorCompletionCoordinatorInboundEvents
+{
+    /**
+     * The coordinator id.
+     */
+    private final String id ;
+    /**
+     * The instance identifier.
+     */
+    private final InstanceIdentifier instanceIdentifier ;
+    /**
+     * The participant endpoint reference.
+     */
+    private final W3CEndpointReference participant ;
+    /**
+     * The associated coordinator
+     */
+    private BAParticipantManager 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 CoordinatorCompletionCoordinatorEngine(final String id, final W3CEndpointReference 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 CoordinatorCompletionCoordinatorEngine(final String id, final W3CEndpointReference 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 BAParticipantManager coordinator)
+    {
+        this.coordinator = coordinator ;
+        CoordinatorCompletionCoordinatorProcessor.getProcessor().activateCoordinator(this, id) ;
+    }
+
+    /**
+     * Handle the cancelled event.
+     * @param cancelled The cancelled notification.
+     * @param addressingProperties The addressing context.
+     * @param arjunaContext The arjuna 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 AddressingProperties addressingProperties, final ArjunaContext arjunaContext)
+    {
+        final State current ;
+        synchronized(this)
+        {
+            current = state ;
+            if ((current == State.STATE_CANCELING) || (current == State.STATE_CANCELING_ACTIVE) ||
+                (current == State.STATE_CANCELING_COMPLETING))
+            {
+                ended() ;
+            }
+        }
+    }
+
+    /**
+     * Handle the closed event.
+     * @param closed The closed notification.
+     * @param addressingProperties The addressing context.
+     * @param arjunaContext The arjuna 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 AddressingProperties addressingProperties, final ArjunaContext arjunaContext)
+    {
+        final State current ;
+        synchronized(this)
+        {
+            current = state ;
+            if (current == State.STATE_CLOSING)
+            {
+                ended() ;
+            }
+        }
+    }
+
+    /**
+     * Handle the compensated event.
+     * @param compensated The compensated notification.
+     * @param addressingProperties The addressing context.
+     * @param arjunaContext The arjuna 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 AddressingProperties addressingProperties, final ArjunaContext arjunaContext)
+    {
+        final State current ;
+        synchronized(this)
+        {
+            current = state ;
+            if (current == State.STATE_COMPENSATING)
+            {
+                ended() ;
+            }
+        }
+    }
+
+    /**
+     * Handle the completed event.
+     * @param completed The completed notification.
+     * @param addressingProperties The addressing context.
+     * @param arjunaContext The arjuna 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 completed(final NotificationType completed, final AddressingProperties addressingProperties,
+        final ArjunaContext arjunaContext)
+    {
+        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)
+        {
+            // TODO - we cannot send a fault here
+            // sendInvalidStateFault() ;
+        }
+    }
+
+    /**
+     * Handle the exit event.
+     * @param exit The exit notification.
+     * @param addressingProperties The addressing context.
+     * @param arjunaContext The arjuna context.
+     *
+     * Active -> Exiting
+     * Canceling -> Exiting
+     * Canceling-Active -> Exiting
+     * Canceling-Completing -> Exiting
+     * Completing -> Exiting
+     * Completed -> Completed (invalid state)
+     * Closing -> Closing (invalid state)
+     * Compensating -> Compensating (invalid state)
+     * Faulting -> Faulting (invalid state)
+     * Faulting-Active -> Faulting (invalid state)
+     * Faulting-Compensating -> Faulting (invalid state)
+     * Exiting -> Exiting
+     * Ended -> Ended (resend Exited)
+     */
+    public void exit(final NotificationType exit, final AddressingProperties addressingProperties, final ArjunaContext arjunaContext)
+    {
+        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 addressingProperties The addressing context.
+     * @param arjunaContext The arjuna 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 AddressingProperties addressingProperties,
+        final ArjunaContext arjunaContext)
+    {
+        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 addressingProperties The addressing context.
+     * @param arjunaContext The arjuna 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 AddressingProperties addressingProperties,
+        final ArjunaContext arjunaContext)
+    {
+        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 addressingProperties The addressing context.
+     * @param arjunaContext The arjuna context.
+     */
+    public void getStatus(final NotificationType getStatus, final AddressingProperties addressingProperties, final ArjunaContext arjunaContext)
+    {
+        final State current ;
+        synchronized(this)
+        {
+            current = state ;
+        }
+        sendStatus(current) ;
+    }
+
+    /**
+     * Handle the status event.
+     * @param status The status.
+     * @param addressingProperties The addressing context.
+     * @param arjunaContext The arjuna context.
+     */
+    public void status(final StatusType status, final AddressingProperties addressingProperties, final ArjunaContext arjunaContext)
+    {
+        // KEV - implement
+    }
+
+    /**
+     * 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 ;
+    }
+
+    /**
+     * Handle the soap fault event.
+     * @param soapFault The soap fault.
+     * @param addressingProperties The addressing context.
+     * @param arjunaContext The arjuna context.
+     */
+    public void soapFault(final SoapFault soapFault, final AddressingProperties addressingProperties, final ArjunaContext arjunaContext)
+    {
+        ended() ;
+        try
+        {
+            coordinator.fail(soapFault.getSubcode()) ;
+        }
+        catch (final Throwable th) {} // ignore
+    }
+
+    /**
+     * Send the close message.
+     *
+     * @message com.arjuna.wst11.messaging.engines.CoordinatorCompletionCoordinatorEngine.sendClose_1 [com.arjuna.wst11.messaging.engines.CoordinatorCompletionCoordinatorEngine.sendClose_1] - Unexpected exception while sending Close
+     */
+    private void sendClose()
+    {
+        final AddressingProperties addressingProperties = createContext() ;
+        try
+        {
+            CoordinatorCompletionParticipantClient.getClient().sendClose(participant, addressingProperties, instanceIdentifier) ;
+        }
+        catch (final Throwable th)
+        {
+            if (WSTLogger.arjLoggerI18N.isDebugEnabled())
+            {
+                WSTLogger.arjLoggerI18N.debug("com.arjuna.wst11.messaging.engines.CoordinatorCompletionCoordinatorEngine.sendClose_1", th) ;
+            }
+        }
+    }
+
+    /**
+     * Send the compensate message.
+     *
+     * @message com.arjuna.wst11.messaging.engines.CoordinatorCompletionCoordinatorEngine.sendCompensate_1 [com.arjuna.wst11.messaging.engines.CoordinatorCompletionCoordinatorEngine.sendCompensate_1] - Unexpected exception while sending Compensate
+     */
+    private void sendCompensate()
+    {
+        final AddressingProperties addressingProperties = createContext() ;
+        try
+        {
+            CoordinatorCompletionParticipantClient.getClient().sendCompensate(participant, addressingProperties, instanceIdentifier) ;
+        }
+        catch (final Throwable th)
+        {
+            if (WSTLogger.arjLoggerI18N.isDebugEnabled())
+            {
+                WSTLogger.arjLoggerI18N.debug("com.arjuna.wst11.messaging.engines.CoordinatorCompletionCoordinatorEngine.sendCompensate_1", th) ;
+            }
+        }
+    }
+
+    /**
+     * Send the complete message.
+     *
+     * @message com.arjuna.wst11.messaging.engines.CoordinatorCompletionCoordinatorEngine.sendComplete_1 [com.arjuna.wst11.messaging.engines.CoordinatorCompletionCoordinatorEngine.sendComplete_1] - Unexpected exception while sending Complete
+     */
+    private void sendComplete()
+    {
+        final AddressingProperties addressingProperties = createContext() ;
+        try
+        {
+            CoordinatorCompletionParticipantClient.getClient().sendComplete(participant, addressingProperties, instanceIdentifier) ;
+        }
+        catch (final Throwable th)
+        {
+            if (WSTLogger.arjLoggerI18N.isDebugEnabled())
+            {
+                WSTLogger.arjLoggerI18N.debug("com.arjuna.wst11.messaging.engines.CoordinatorCompletionCoordinatorEngine.sendComplete_1", th) ;
+            }
+        }
+    }
+
+    /**
+     * Send the cancel message.
+     *
+     * @message com.arjuna.wst11.messaging.engines.CoordinatorCompletionCoordinatorEngine.sendCancel_1 [com.arjuna.wst11.messaging.engines.CoordinatorCompletionCoordinatorEngine.sendCancel_1] - Unexpected exception while sending Cancel
+     */
+    private void sendCancel()
+    {
+        final AddressingProperties addressingProperties = createContext() ;
+        try
+        {
+            CoordinatorCompletionParticipantClient.getClient().sendCancel(participant, addressingProperties, instanceIdentifier) ;
+        }
+        catch (final Throwable th)
+        {
+            if (WSTLogger.arjLoggerI18N.isDebugEnabled())
+            {
+                WSTLogger.arjLoggerI18N.debug("com.arjuna.wst11.messaging.engines.CoordinatorCompletionCoordinatorEngine.sendCancel_1", th) ;
+            }
+        }
+    }
+
+    /**
+     * Send the exited message.
+     *
+     * @message com.arjuna.wst11.messaging.engines.CoordinatorCompletionCoordinatorEngine.sendExited_1 [com.arjuna.wst11.messaging.engines.CoordinatorCompletionCoordinatorEngine.sendExited_1] - Unexpected exception while sending Exited
+     */
+    private void sendExited()
+    {
+        final AddressingProperties addressingProperties = createContext() ;
+        try
+        {
+            CoordinatorCompletionParticipantClient.getClient().sendExited(participant, addressingProperties, instanceIdentifier) ;
+        }
+        catch (final Throwable th)
+        {
+            if (WSTLogger.arjLoggerI18N.isDebugEnabled())
+            {
+                WSTLogger.arjLoggerI18N.debug("com.arjuna.wst11.messaging.engines.CoordinatorCompletionCoordinatorEngine.sendExited_1", th) ;
+            }
+        }
+    }
+
+    /**
+     * Send the failed message.
+     *
+     * @message com.arjuna.wst11.messaging.engines.CoordinatorCompletionCoordinatorEngine.sendFailed_1 [com.arjuna.wst11.messaging.engines.CoordinatorCompletionCoordinatorEngine.sendFailed_1] - Unexpected exception while sending Faulted
+     */
+    private void sendFailed()
+    {
+        final AddressingProperties addressingProperties = createContext() ;
+        try
+        {
+            CoordinatorCompletionParticipantClient.getClient().sendFailed(participant, addressingProperties, instanceIdentifier) ;
+        }
+        catch (final Throwable th)
+        {
+            if (WSTLogger.arjLoggerI18N.isDebugEnabled())
+            {
+                WSTLogger.arjLoggerI18N.debug("com.arjuna.wst11.messaging.engines.CoordinatorCompletionCoordinatorEngine.sendFailed_1", th) ;
+            }
+        }
+    }
+
+    /**
+     * Send the not completed message.
+     *
+     * @message com.arjuna.wst11.messaging.engines.CoordinatorCompletionCoordinatorEngine.sendNotCompleted_1 [com.arjuna.wst11.messaging.engines.CoordinatorCompletionCoordinatorEngine.sendNotCompleted_1] - Unexpected exception while sending NotCompleted
+     */
+    private void sendNotCompleted()
+    {
+        final AddressingProperties addressingProperties = createContext() ;
+        try
+        {
+            CoordinatorCompletionParticipantClient.getClient().sendNotCompleted(participant, addressingProperties, instanceIdentifier) ;
+        }
+        catch (final Throwable th)
+        {
+            if (WSTLogger.arjLoggerI18N.isDebugEnabled())
+            {
+                WSTLogger.arjLoggerI18N.debug("com.arjuna.wst11.messaging.engines.CoordinatorCompletionCoordinatorEngine.sendNotCompleted_1", th) ;
+            }
+        }
+    }
+    /**
+     * Send the status message.
+     * @param state The state.
+     *
+     * @message com.arjuna.wst11.messaging.engines.CoordinatorCompletionCoordinatorEngine.sendStatus_1 [com.arjuna.wst11.messaging.engines.CoordinatorCompletionCoordinatorEngine.sendStatus_1] - Unexpected exception while sending Status
+     */
+    private void sendStatus(final State state)
+    {
+        final AddressingProperties addressingProperties = createContext() ;
+        try
+        {
+            CoordinatorCompletionParticipantClient.getClient().sendStatus(participant, addressingProperties, instanceIdentifier, state.getValue()) ;
+        }
+        catch (final Throwable th)
+        {
+            if (WSTLogger.arjLoggerI18N.isDebugEnabled())
+            {
+                WSTLogger.arjLoggerI18N.debug("com.arjuna.wst11.messaging.engines.CoordinatorCompletionCoordinatorEngine.sendStatus_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 W3CEndpointReference getParticipant()
+    {
+        return participant ;
+    }
+
+    /**
+     * Get the associated coordinator.
+     * @return The associated coordinator.
+     */
+    public BAParticipantManager 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.wst11.messaging.engines.CoordinatorCompletionCoordinatorEngine.executeCompleted_1 [com.arjuna.wst11.messaging.engines.CoordinatorCompletionCoordinatorEngine.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.wst11.messaging.engines.CoordinatorCompletionCoordinatorEngine.executeCompleted_1", th) ;
+            }
+        }
+    }
+
+    /**
+     * Execute the exit transition.
+     *
+     * @message com.arjuna.wst11.messaging.engines.CoordinatorCompletionCoordinatorEngine.executeExit_1 [com.arjuna.wst11.messaging.engines.CoordinatorCompletionCoordinatorEngine.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.wst11.messaging.engines.CoordinatorCompletionCoordinatorEngine.executeExit_1", th) ;
+            }
+            return ;
+        }
+        sendExited() ;
+        ended() ;
+    }
+
+    /**
+     * Executing the fail transition.
+     *
+     * @throws com.arjuna.webservices.SoapFault for SOAP errors.
+     * @throws java.io.IOException for transport errors.
+     *
+     * @message com.arjuna.wst11.messaging.engines.CoordinatorCompletionCoordinatorEngine.executeFail_1 [com.arjuna.wst11.messaging.engines.CoordinatorCompletionCoordinatorEngine.executeFail_1] - Unexpected exception from coordinator fail
+     */
+    private void executeFail(final QName exceptionIdentifier)
+    {
+        try
+        {
+            coordinator.fail(exceptionIdentifier) ;
+        }
+        catch (final Throwable th)
+        {
+            if (WSTLogger.arjLoggerI18N.isDebugEnabled())
+            {
+                WSTLogger.arjLoggerI18N.debug("com.arjuna.wst11.messaging.engines.CoordinatorCompletionCoordinatorEngine.executeFail_1", th) ;
+            }
+            return ;
+        }
+        sendFailed() ;
+        ended() ;
+    }
+
+    /**
+     * Executing the cannot complete transition.
+     *
+     * @throws com.arjuna.webservices.SoapFault for SOAP errors.
+     * @throws java.io.IOException for transport errors.
+     *
+     * @message com.arjuna.wst11.messaging.engines.CoordinatorCompletionCoordinatorEngine.executeCannotComplete_1 [com.arjuna.wst11.messaging.engines.CoordinatorCompletionCoordinatorEngine.executeCannotComplete_1] - Unexpected exception from coordinator cannotComplete
+     */
+    private void executeCannotComplete()
+    {
+        try
+        {
+            coordinator.cannotComplete() ;
+        }
+        catch (final Throwable th)
+        {
+            if (WSTLogger.arjLoggerI18N.isDebugEnabled())
+            {
+                WSTLogger.arjLoggerI18N.debug("com.arjuna.wst11.messaging.engines.CoordinatorCompletionCoordinatorEngine.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 AddressingProperties createContext()
+    {
+        final String messageId = MessageId.getMessageId() ;
+        return AddressingHelper.createNotificationContext(messageId) ;
+    }
+}
\ No newline at end of file

Added: labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/wst11/messaging/engines/CoordinatorCompletionParticipantEngine.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/wst11/messaging/engines/CoordinatorCompletionParticipantEngine.java	                        (rev 0)
+++ labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/wst11/messaging/engines/CoordinatorCompletionParticipantEngine.java	2008-01-25 17:18:13 UTC (rev 18124)
@@ -0,0 +1,1074 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. 
+ * 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.wst11.messaging.engines;
+
+import com.arjuna.webservices.SoapFault;
+import com.arjuna.webservices.logging.WSTLogger;
+import com.arjuna.webservices.util.TransportTimer;
+import com.arjuna.webservices11.wsaddr.AddressingHelper;
+import com.arjuna.webservices11.wsarj.ArjunaContext;
+import com.arjuna.webservices11.wsarj.InstanceIdentifier;
+import com.arjuna.webservices.wsarjtx.ArjunaTXConstants;
+import com.arjuna.webservices11.wsba.CoordinatorCompletionParticipantInboundEvents;
+import com.arjuna.webservices11.wsba.State;
+import com.arjuna.webservices11.wsba.processors.CoordinatorCompletionParticipantProcessor;
+import com.arjuna.webservices11.wsba.client.CoordinatorCompletionCoordinatorClient;
+import com.arjuna.wsc11.messaging.MessageId;
+import com.arjuna.wst.BusinessAgreementWithCoordinatorCompletionParticipant;
+import com.arjuna.wst.FaultedException;
+import org.oasis_open.docs.ws_tx.wsba._2006._06.NotificationType;
+import org.oasis_open.docs.ws_tx.wsba._2006._06.StatusType;
+
+import javax.xml.namespace.QName;
+import javax.xml.ws.addressing.AddressingProperties;
+import javax.xml.ws.wsaddressing.W3CEndpointReference;
+import java.util.TimerTask;
+
+/**
+ * The coordinator completion participant state engine
+ * @author kevin
+ */
+public class CoordinatorCompletionParticipantEngine implements CoordinatorCompletionParticipantInboundEvents
+{
+    /**
+     * The participant id.
+     */
+    private final String id ;
+    /**
+     * The instance identifier.
+     */
+    private final InstanceIdentifier instanceIdentifier ;
+    /**
+     * The coordinator endpoint reference.
+     */
+    private final W3CEndpointReference 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 CoordinatorCompletionParticipantEngine(final String id, final W3CEndpointReference 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 CoordinatorCompletionParticipantEngine(final String id, final W3CEndpointReference 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 addressingProperties The addressing context.
+     * @param arjunaContext The arjuna 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 AddressingProperties addressingProperties, final ArjunaContext arjunaContext)
+    {
+        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 addressingProperties The addressing context.
+     * @param arjunaContext The arjuna 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 AddressingProperties addressingProperties, final ArjunaContext arjunaContext)
+    {
+        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 addressingProperties The addressing context.
+     * @param arjunaContext The arjuna 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 AddressingProperties addressingProperties, final ArjunaContext arjunaContext)
+    {
+        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 addressingProperties The addressing context.
+     * @param arjunaContext The arjuna 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 AddressingProperties addressingProperties, final ArjunaContext arjunaContext)
+    {
+        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 addressingProperties The addressing context.
+     * @param arjunaContext The arjuna 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 AddressingProperties addressingProperties, final ArjunaContext arjunaContext)
+    {
+        final State current ;
+        synchronized(this)
+        {
+            current = state ;
+            if (current == State.STATE_EXITING)
+            {
+                ended() ;
+            }
+        }
+    }
+
+    /**
+     * Handle the failed event.
+     * @param failed The failed notification.
+     * @param addressingProperties The addressing context.
+     * @param arjunaContext The arjuna 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 AddressingProperties addressingProperties, final ArjunaContext arjunaContext)
+    {
+        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 not completed notification.
+     * @param addressingProperties The addressing context.
+     * @param arjunaContext The arjuna 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 AddressingProperties addressingProperties, final ArjunaContext arjunaContext)
+    {
+        final State current ;
+        synchronized(this)
+        {
+            current = state ;
+            if (current == State.STATE_NOT_COMPLETING)
+            {
+        	ended() ;
+            }
+        }
+    }
+
+    /**
+     * Handle the getStatus event.
+     * @param getStatus The getStatus notification.
+     * @param addressingProperties The addressing context.
+     * @param arjunaContext The arjuna context.
+     *
+     * @message com.arjuna.wst11.messaging.engines.CoordinatorCompletionParticipantEngine.getStatus_1 [com.arjuna.wst11.messaging.engines.CoordinatorCompletionParticipantEngine.getStatus_1] - Unknown error: {0}
+     */
+    public void getStatus(final NotificationType getStatus, final AddressingProperties addressingProperties, final ArjunaContext arjunaContext)
+    {
+	final State current ;
+	synchronized(this)
+	{
+	    current = state ;
+	}
+	sendStatus(current) ;
+    }
+
+    /**
+     * Handle the status event.
+     * @param status The status type.
+     * @param addressingProperties The addressing context.
+     * @param arjunaContext The arjuna context.
+     */
+    public void status(final StatusType status, final AddressingProperties addressingProperties, final ArjunaContext arjunaContext)
+    {
+        // KEV - implement
+    }
+
+    /**
+     * Handle the soap fault event.
+     * @param soapFault The soap fault.
+     * @param addressingProperties The addressing context.
+     * @param arjunaContext The arjuna context.
+     */
+    public void soapFault(final SoapFault soapFault, final AddressingProperties addressingProperties, final ArjunaContext arjunaContext)
+    {
+	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.wst11.messaging.engines.CoordinatorCompletionParticipantEngine.sendExit_1 [com.arjuna.wst11.messaging.engines.CoordinatorCompletionParticipantEngine.sendExit_1] - Unexpected exception while sending Exit
+     */
+    private void sendExit()
+    {
+        final AddressingProperties addressingProperties = createContext() ;
+        try
+        {
+            CoordinatorCompletionCoordinatorClient.getClient().sendExit(coordinator, addressingProperties, instanceIdentifier) ;
+        }
+        catch (final Throwable th)
+        {
+            if (WSTLogger.arjLoggerI18N.isDebugEnabled())
+            {
+                WSTLogger.arjLoggerI18N.debug("com.arjuna.wst11.messaging.engines.CoordinatorCompletionParticipantEngine.sendExit_1", th) ;
+            }
+        }
+    }
+
+    /**
+     * Send the completed message.
+     *
+     * @message com.arjuna.wst11.messaging.engines.CoordinatorCompletionParticipantEngine.sendCompleted_1 [com.arjuna.wst11.messaging.engines.CoordinatorCompletionParticipantEngine.sendCompleted_1] - Unexpected exception while sending Completed
+     */
+    private void sendCompleted()
+    {
+        final AddressingProperties addressingProperties = createContext() ;
+        try
+        {
+            CoordinatorCompletionCoordinatorClient.getClient().sendCompleted(coordinator, addressingProperties, instanceIdentifier) ;
+        }
+        catch (final Throwable th)
+        {
+            if (WSTLogger.arjLoggerI18N.isDebugEnabled())
+            {
+                WSTLogger.arjLoggerI18N.debug("com.arjuna.wst11.messaging.engines.CoordinatorCompletionParticipantEngine.sendCompleted_1", th) ;
+            }
+        }
+
+        initiateTimer() ;
+    }
+
+    /**
+     * Send the fail message.
+     * @param message The fail message.
+     *
+     * @message com.arjuna.wst11.messaging.engines.CoordinatorCompletionParticipantEngine.sendFail_1 [com.arjuna.wst11.messaging.engines.CoordinatorCompletionParticipantEngine.sendFail_1] - Unexpected exception while sending Fail
+     */
+    private void sendFail(final QName message)
+    {
+        final AddressingProperties addressingProperties = createContext() ;
+        try
+        {
+            CoordinatorCompletionCoordinatorClient.getClient().sendFail(coordinator, addressingProperties, instanceIdentifier, message) ;
+        }
+        catch (final Throwable th)
+        {
+            if (WSTLogger.arjLoggerI18N.isDebugEnabled())
+            {
+                WSTLogger.arjLoggerI18N.debug("com.arjuna.wst11.messaging.engines.CoordinatorCompletionParticipantEngine.sendFail_1", th) ;
+            }
+        }
+    }
+
+    /**
+     * Send the cancelled message.
+     *
+     * @message com.arjuna.wst11.messaging.engines.CoordinatorCompletionParticipantEngine.sendCancelled_1 [com.arjuna.wst11.messaging.engines.CoordinatorCompletionParticipantEngine.sendCancelled_1] - Unexpected exception while sending Cancelled
+     */
+    private void sendCancelled()
+    {
+        final AddressingProperties addressingProperties = createContext() ;
+        try
+        {
+            CoordinatorCompletionCoordinatorClient.getClient().sendCancelled(coordinator, addressingProperties, instanceIdentifier) ;
+        }
+        catch (final Throwable th)
+        {
+            if (WSTLogger.arjLoggerI18N.isDebugEnabled())
+            {
+                WSTLogger.arjLoggerI18N.debug("com.arjuna.wst11.messaging.engines.CoordinatorCompletionParticipantEngine.sendCancelled_1", th) ;
+            }
+        }
+    }
+
+    /**
+     * Send the closed message.
+     *
+     * @message com.arjuna.wst11.messaging.engines.CoordinatorCompletionParticipantEngine.sendClosed_1 [com.arjuna.wst11.messaging.engines.CoordinatorCompletionParticipantEngine.sendClosed_1] - Unexpected exception while sending Closed
+     */
+    private void sendClosed()
+    {
+        final AddressingProperties addressingProperties = createContext() ;
+        try
+        {
+            CoordinatorCompletionCoordinatorClient.getClient().sendClosed(coordinator, addressingProperties, instanceIdentifier) ;
+        }
+        catch (final Throwable th)
+        {
+            if (WSTLogger.arjLoggerI18N.isDebugEnabled())
+            {
+                WSTLogger.arjLoggerI18N.debug("com.arjuna.wst11.messaging.engines.CoordinatorCompletionParticipantEngine.sendClosed_1", th) ;
+            }
+        }
+    }
+
+    /**
+     * Send the compensated message.
+     *
+     * @message com.arjuna.wst11.messaging.engines.CoordinatorCompletionParticipantEngine.sendCompensated_1 [com.arjuna.wst11.messaging.engines.CoordinatorCompletionParticipantEngine.sendCompensated_1] - Unexpected exception while sending Compensated
+     */
+    private void sendCompensated()
+    {
+        final AddressingProperties addressingProperties = createContext() ;
+        try
+        {
+            CoordinatorCompletionCoordinatorClient.getClient().sendCompensated(coordinator, addressingProperties, instanceIdentifier) ;
+        }
+        catch (final Throwable th)
+        {
+            if (WSTLogger.arjLoggerI18N.isDebugEnabled())
+            {
+                WSTLogger.arjLoggerI18N.debug("com.arjuna.wst11.messaging.engines.CoordinatorCompletionParticipantEngine.sendCompensated_1", th) ;
+            }
+        }
+    }
+
+    /**
+     * Send the status message.
+     * @param state The state.
+     *
+     * @message com.arjuna.wst11.messaging.engines.CoordinatorCompletionParticipantEngine.sendStatus_1 [com.arjuna.wst11.messaging.engines.CoordinatorCompletionParticipantEngine.sendStatus_1] - Unexpected exception while sending Status
+     */
+    private void sendStatus(final State state)
+    {
+        final AddressingProperties addressingProperties = createContext() ;
+        try
+        {
+            CoordinatorCompletionCoordinatorClient.getClient().sendStatus(coordinator, addressingProperties, instanceIdentifier, state.getValue()) ;
+        }
+        catch (final Throwable th)
+        {
+            if (WSTLogger.arjLoggerI18N.isDebugEnabled())
+            {
+                WSTLogger.arjLoggerI18N.debug("com.arjuna.wst11.messaging.engines.CoordinatorCompletionParticipantEngine.sendStatus_1", th) ;
+            }
+        }
+    }
+
+    /**
+     * Send the cannot complete message.
+     *
+     * @message com.arjuna.wst11.messaging.engines.CoordinatorCompletionParticipantEngine.sendCannotComplete_1 [com.arjuna.wst11.messaging.engines.CoordinatorCompletionParticipantEngine.sendCannotComplete_1] - Unexpected exception while sending CannotComplete
+     */
+    private void sendCannotComplete()
+    {
+        final AddressingProperties addressingProperties = createContext() ;
+        try
+        {
+            CoordinatorCompletionCoordinatorClient.getClient().sendCannotComplete(coordinator, addressingProperties, instanceIdentifier) ;
+        }
+        catch (final Throwable th)
+        {
+            if (WSTLogger.arjLoggerI18N.isDebugEnabled())
+            {
+                WSTLogger.arjLoggerI18N.debug("com.arjuna.wst11.messaging.engines.CoordinatorCompletionParticipantEngine.sendCannotComplete_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 W3CEndpointReference 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)
+        {
+            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.wst11.messaging.engines.CoordinatorCompletionParticipantEngine.executeCancel_1 [com.arjuna.wst11.messaging.engines.CoordinatorCompletionParticipantEngine.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.wst11.messaging.engines.CoordinatorCompletionParticipantEngine.executeCancel_1", th) ;
+            }
+            return ;
+        }
+        sendCancelled() ;
+        ended() ;
+    }
+
+    /**
+     * Execute the close transition.
+     *
+     * @message com.arjuna.wst11.messaging.engines.CoordinatorCompletionParticipantEngine.executeClose_1 [com.arjuna.wst11.messaging.engines.CoordinatorCompletionParticipantEngine.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.wst11.messaging.engines.CoordinatorCompletionParticipantEngine.executeClose_1", th) ;
+            }
+            return ;
+        }
+        sendClosed() ;
+        ended() ;
+    }
+
+    /**
+     * Execute the compensate transition.
+     *
+     * @message com.arjuna.wst11.messaging.engines.CoordinatorCompletionParticipantEngine.executeCompensate_1 [com.arjuna.wst11.messaging.engines.CoordinatorCompletionParticipantEngine.executeCompensate_1] - Unexpected exception from participant compensate
+     */
+    private void executeCompensate()
+    {
+        try
+        {
+            participant.compensate() ;
+        }
+        catch (final FaultedException fe)
+        {
+            fail(ArjunaTXConstants.WSARJTX_ELEMENT_FAULTED_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.wst11.messaging.engines.CoordinatorCompletionParticipantEngine.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.wst11.messaging.engines.CoordinatorCompletionParticipantEngine.executeComplete_1 [com.arjuna.wst11.messaging.engines.CoordinatorCompletionParticipantEngine.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.wst11.messaging.engines.CoordinatorCompletionParticipantEngine.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 AddressingProperties createContext()
+    {
+        final String messageId = MessageId.getMessageId() ;
+        return AddressingHelper.createNotificationContext(messageId) ;
+    }
+}
\ No newline at end of file

Added: labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/wst11/messaging/engines/CoordinatorEngine.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/wst11/messaging/engines/CoordinatorEngine.java	                        (rev 0)
+++ labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/wst11/messaging/engines/CoordinatorEngine.java	2008-01-25 17:18:13 UTC (rev 18124)
@@ -0,0 +1,598 @@
+package com.arjuna.wst11.messaging.engines;
+
+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.webservices11.wsaddr.AddressingHelper;
+import com.arjuna.webservices11.wsarj.ArjunaContext;
+import com.arjuna.webservices11.wsarj.InstanceIdentifier;
+import com.arjuna.webservices11.wsat.CoordinatorInboundEvents;
+import com.arjuna.webservices11.wsat.State;
+import com.arjuna.webservices11.wsat.client.ParticipantClient;
+import com.arjuna.webservices11.wsat.processors.CoordinatorProcessor;
+import com.arjuna.webservices11.wscoor.CoordinationConstants;
+import com.arjuna.wsc11.messaging.MessageId;
+import org.oasis_open.docs.ws_tx.wsat._2006._06.Notification;
+
+import javax.xml.namespace.QName;
+import javax.xml.ws.addressing.AddressingBuilder;
+import javax.xml.ws.addressing.AddressingProperties;
+import javax.xml.ws.addressing.AttributedURI;
+import javax.xml.ws.addressing.Relationship;
+import javax.xml.ws.wsaddressing.W3CEndpointReference;
+import java.util.TimerTask;
+
+/**
+ * The coordinator state engine
+ * @author kevin
+ */
+public class CoordinatorEngine 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 W3CEndpointReference 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 CoordinatorEngine(final String id, final boolean durable, final W3CEndpointReference 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 CoordinatorEngine(final String id, final boolean durable, final W3CEndpointReference 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 addressingProperties The addressing context.
+     * @param arjunaContext The arjuna context.
+     *
+     * None -> None (ignore)
+     * Active -> Aborting (forget)
+     * Preparing -> Aborting (forget)
+     * PreparedSuccess -> PreparedSuccess (invalid state)
+     * Committing -> Committing (invalid state)
+     * Aborting -> Aborting (forget)
+     */
+    public synchronized void aborted(final Notification aborted, final AddressingProperties addressingProperties, final ArjunaContext arjunaContext)
+    {
+        final State current = state ;
+        if (current == State.STATE_ACTIVE)
+        {
+            changeState(State.STATE_ABORTING) ;
+        }
+        else if ((current == State.STATE_PREPARING) || (current == State.STATE_ABORTING))
+        {
+            forget() ;
+        }
+    }
+
+    /**
+     * Handle the committed event.
+     * @param committed The committed notification.
+     * @param addressingProperties The addressing context.
+     * @param arjunaContext The arjuna context.
+     *
+     * None -> None (ignore)
+     * Active -> Aborting (invalid state)
+     * Preparing -> Aborting (invalid state)
+     * PreparedSuccess -> PreparedSuccess (invalid state)
+     * Committing -> Committing (forget)
+     * Aborting -> Aborting (invalid state)
+     */
+    public synchronized void committed(final Notification committed, final AddressingProperties addressingProperties, final ArjunaContext arjunaContext)
+    {
+        final State current = state ;
+        if (current == State.STATE_ACTIVE)
+        {
+            changeState(State.STATE_ABORTING) ;
+        }
+        else if ((current == State.STATE_PREPARING) || (current == State.STATE_COMMITTING))
+        {
+            forget() ;
+        }
+    }
+
+    /**
+     * Handle the prepared event.
+     * @param prepared The prepared notification.
+     * @param addressingProperties The addressing context.
+     * @param arjunaContext The arjuna context.
+     *
+     * None -> Durable: (send rollback), Volatile: Invalid state: none
+     * 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 Notification prepared, final AddressingProperties addressingProperties, final ArjunaContext arjunaContext)
+    {
+        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
+            {
+        	    sendInvalidState(addressingProperties, arjunaContext) ;
+            }
+            if (current != null)
+            {
+        	forget() ;
+            }
+        }
+    }
+
+    /**
+     * Handle the readOnly event.
+     * @param readOnly The readOnly notification.
+     * @param addressingProperties The addressing context.
+     * @param arjunaContext The arjuna context.
+     *
+     * None -> None (ignore)
+     * Active -> Active (forget)
+     * Preparing -> Preparing (forget)
+     * PreparedSuccess -> PreparedSuccess (invalid state)
+     * Committing -> Committing (invalid state)
+     * Aborting -> Aborting (forget)
+     */
+    public synchronized void readOnly(final Notification readOnly, final AddressingProperties addressingProperties, final ArjunaContext arjunaContext)
+    {
+        final State current = state ;
+        if ((current == State.STATE_ACTIVE) || (current == State.STATE_PREPARING) ||
+            (current == State.STATE_ABORTING))
+        {
+            if (current != State.STATE_ABORTING)
+            {
+                this.readOnly = true ;
+            }
+            forget() ;
+        }
+    }
+
+    /**
+     * Handle the soap fault event.
+     * @param soapFault The soap fault.
+     * @param addressingProperties The addressing context.
+     * @param arjunaContext The arjuna context.
+     *
+     * @message com.arjuna.wst11.messaging.engines.CoordinatorEngine.soapFault_1 [com.arjuna.wst11.messaging.engines.CoordinatorEngine.soapFault_1] - Unexpected SOAP fault for coordinator {0}: {1} {2}
+     */
+    public void soapFault(final SoapFault soapFault, final AddressingProperties addressingProperties, final ArjunaContext arjunaContext)
+    {
+        if (WSTLogger.arjLoggerI18N.isDebugEnabled())
+        {
+            final InstanceIdentifier instanceIdentifier = arjunaContext.getInstanceIdentifier() ;
+            final SoapFaultType soapFaultType = soapFault.getSoapFaultType() ;
+            final QName subCode = soapFault.getSubcode() ;
+            WSTLogger.arjLoggerI18N.debug("com.arjuna.wst11.messaging.engines.CoordinatorEngine.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 W3CEndpointReference 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.wst11.messaging.engines.CoordinatorEngine.sendPrepare_1 [com.arjuna.wst11.messaging.engines.CoordinatorEngine.sendPrepare_1] - Unexpecting exception while sending Prepare
+     */
+    private void sendPrepare()
+    {
+        try
+        {
+            ParticipantClient.getClient().sendPrepare(participant, createContext(), instanceIdentifier) ;
+        }
+        catch (final Throwable th)
+        {
+            if (WSTLogger.arjLoggerI18N.isDebugEnabled())
+            {
+                WSTLogger.arjLoggerI18N.debug("com.arjuna.wst11.messaging.engines.CoordinatorEngine.sendPrepare_1", th) ;
+            }
+        }
+
+        initiateTimer() ;
+    }
+
+    /**
+     * Send the commit message.
+     *
+     * @message com.arjuna.wst11.messaging.engines.CoordinatorEngine.sendCommit_1 [com.arjuna.wst11.messaging.engines.CoordinatorEngine.sendCommit_1] - Unexpecting exception while sending Commit
+     */
+    private void sendCommit()
+    {
+        try
+        {
+            ParticipantClient.getClient().sendCommit(participant, createContext(), instanceIdentifier) ;
+        }
+        catch (final Throwable th)
+        {
+            if (WSTLogger.arjLoggerI18N.isDebugEnabled())
+            {
+                WSTLogger.arjLoggerI18N.debug("com.arjuna.wst11.messaging.engines.CoordinatorEngine.sendCommit_1", th) ;
+            }
+        }
+
+        initiateTimer() ;
+    }
+
+    /**
+     * Send the rollback message.
+     *
+     * @message com.arjuna.wst11.messaging.engines.CoordinatorEngine.sendRollback_1 [com.arjuna.wst11.messaging.engines.CoordinatorEngine.sendRollback_1] - Unexpecting exception while sending Rollback
+     */
+    private void sendRollback()
+    {
+        try
+        {
+            ParticipantClient.getClient().sendRollback(participant, createContext(), instanceIdentifier) ;
+        }
+        catch (final Throwable th)
+        {
+            if (WSTLogger.arjLoggerI18N.isDebugEnabled())
+            {
+                WSTLogger.arjLoggerI18N.debug("com.arjuna.wst11.messaging.engines.CoordinatorEngine.sendRollback_1", th) ;
+            }
+        }
+    }
+
+    /**
+     * Send the InvalidStateWS message.
+     *
+     * @message com.arjuna.wst11.messaging.engines.CoordinatorEngine.sendInvalidState_1 [com.arjuna.wst11.messaging.engines.CoordinatorEngine.sendInvalidState_1] - Inconsistent internal state.
+     * @message com.arjuna.wst11.messaging.engines.CoordinatorEngine.sendInvalidState_2 [com.arjuna.wst11.messaging.engines.CoordinatorEngine.sendInvalidState_2] - Unexpecting exception while sending InvalidState
+     */
+    private void sendInvalidState(final AddressingProperties addressingProperties, final ArjunaContext arjunaContext)
+    {
+        try
+        {
+            final AddressingProperties responseContext = createContext() ;
+            final AttributedURI messageId = addressingProperties.getMessageID() ;
+            final InstanceIdentifier instanceIdentifier = arjunaContext.getInstanceIdentifier() ;
+            if (messageId != null)
+            {
+                AddressingBuilder builder = AddressingBuilder.getAddressingBuilder();
+                Relationship[] relatesTo = new Relationship[] { builder.newRelationship(messageId.getURI()) };
+                responseContext.setRelatesTo(relatesTo);
+            }
+
+            final String message = WSTLogger.log_mesg.getString("com.arjuna.wst11.messaging.engines.CoordinatorEngine.sendInvalidState_1") ;
+            final SoapFault soapFault = new SoapFault(SoapFaultType.FAULT_SENDER, CoordinationConstants.WSCOOR_ERROR_CODE_INVALID_STATE_QNAME, message) ;
+            ParticipantClient.getClient().sendSoapFault(participant, responseContext, soapFault, instanceIdentifier) ;
+        }
+        catch (final Throwable th)
+        {
+            if (WSTLogger.arjLoggerI18N.isDebugEnabled())
+            {
+                WSTLogger.arjLoggerI18N.debug("com.arjuna.wst11.messaging.engines.CoordinatorEngine.sendInvalidState_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 AddressingProperties createContext()
+    {
+        final String messageId = MessageId.getMessageId() ;
+        return AddressingHelper.createNotificationContext(messageId) ;
+    }
+}

Added: labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/wst11/messaging/engines/ParticipantCompletionCoordinatorEngine.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/wst11/messaging/engines/ParticipantCompletionCoordinatorEngine.java	                        (rev 0)
+++ labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/wst11/messaging/engines/ParticipantCompletionCoordinatorEngine.java	2008-01-25 17:18:13 UTC (rev 18124)
@@ -0,0 +1,875 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. 
+ * 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.wst11.messaging.engines;
+
+import com.arjuna.webservices.SoapFault;
+import com.arjuna.webservices.logging.WSTLogger;
+import com.arjuna.webservices.util.TransportTimer;
+import com.arjuna.webservices11.wsaddr.AddressingHelper;
+import com.arjuna.webservices11.wsarj.ArjunaContext;
+import com.arjuna.webservices11.wsarj.InstanceIdentifier;
+import com.arjuna.webservices11.wsba.ParticipantCompletionCoordinatorInboundEvents;
+import com.arjuna.webservices11.wsba.State;
+import com.arjuna.webservices11.wsba.processors.ParticipantCompletionCoordinatorProcessor;
+import com.arjuna.webservices11.wsba.client.ParticipantCompletionParticipantClient;
+import com.arjuna.wsc11.messaging.MessageId;
+import com.arjuna.wst11.BAParticipantManager;
+import org.oasis_open.docs.ws_tx.wsba._2006._06.ExceptionType;
+import org.oasis_open.docs.ws_tx.wsba._2006._06.NotificationType;
+import org.oasis_open.docs.ws_tx.wsba._2006._06.StatusType;
+
+import javax.xml.namespace.QName;
+import javax.xml.ws.addressing.AddressingProperties;
+import javax.xml.ws.wsaddressing.W3CEndpointReference;
+
+/**
+ * The participant completion coordinator state engine
+ * @author kevin                     cannot
+ */
+public class ParticipantCompletionCoordinatorEngine implements ParticipantCompletionCoordinatorInboundEvents
+{
+    /**
+     * The coordinator id.
+     */
+    private final String id ;
+    /**
+     * The instance identifier.
+     */
+    private final InstanceIdentifier instanceIdentifier ;
+    /**
+     * The participant endpoint reference.
+     */
+    private final W3CEndpointReference participant ;
+    /**
+     * The associated coordinator
+     */
+    private BAParticipantManager 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 ParticipantCompletionCoordinatorEngine(final String id, final W3CEndpointReference 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 ParticipantCompletionCoordinatorEngine(final String id, final W3CEndpointReference 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 BAParticipantManager coordinator)
+    {
+        this.coordinator = coordinator ;
+        ParticipantCompletionCoordinatorProcessor.getProcessor().activateCoordinator(this, id) ;
+    }
+
+    /**
+     * Handle the cancelled event.
+     * @param cancelled The cancelled notification.
+     * @param addressingProperties The addressing context.
+     * @param arjunaContext The arjuna 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 AddressingProperties addressingProperties, final ArjunaContext arjunaContext)
+    {
+        final State current ;
+        synchronized(this)
+        {
+            current = state ;
+            if (current == State.STATE_CANCELING)
+            {
+                ended() ;
+            }
+        }
+    }
+
+    /**
+     * Handle the closed event.
+     * @param closed The closed notification.
+     * @param addressingProperties The addressing context.
+     * @param arjunaContext The arjuna 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 AddressingProperties addressingProperties, final ArjunaContext arjunaContext)
+    {
+        final State current ;
+        synchronized(this)
+        {
+            current = state ;
+            if (current == State.STATE_CLOSING)
+            {
+                ended() ;
+            }
+        }
+    }
+
+    /**
+     * Handle the compensated event.
+     * @param compensated The compensated notification.
+     * @param addressingProperties The addressing context.
+     * @param arjunaContext The arjuna 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 AddressingProperties addressingProperties, final ArjunaContext arjunaContext)
+    {
+        final State current ;
+        synchronized(this)
+        {
+            current = state ;
+            if (current == State.STATE_COMPENSATING)
+            {
+                ended() ;
+            }
+        }
+    }
+
+    /**
+     * Handle the completed event.
+     * @param completed The completed notification.
+     * @param addressingProperties The addressing context.
+     * @param arjunaContext The arjuna 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 AddressingProperties addressingProperties,
+        final ArjunaContext arjunaContext)
+    {
+        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 addressingProperties The addressing context.
+     * @param arjunaContext The arjuna 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 AddressingProperties addressingProperties, final ArjunaContext arjunaContext)
+    {
+        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 addressingProperties The addressing context.
+     * @param arjunaContext The arjuna 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 AddressingProperties addressingProperties,
+        final ArjunaContext arjunaContext)
+    {
+        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 addressingProperties The addressing context.
+     * @param arjunaContext The arjuna 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 AddressingProperties addressingProperties,
+        final ArjunaContext arjunaContext)
+    {
+        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 addressingProperties The addressing context.
+     * @param arjunaContext The arjuna context.
+     */
+    public void getStatus(final NotificationType getStatus, final AddressingProperties addressingProperties, final ArjunaContext arjunaContext)
+    {
+	final State current ;
+	synchronized(this)
+	{
+	    current = state ;
+	}
+        sendStatus(current) ;
+    }
+
+    /**
+     * Handle the status event.
+     * @param status The status.
+     * @param addressingProperties The addressing context.
+     * @param arjunaContext The arjuna context.
+     */
+    public void status(final StatusType status, final AddressingProperties addressingProperties, final ArjunaContext arjunaContext)
+    {
+        // TODO - is this correct?
+
+        final State current ;
+	    synchronized(this)
+	    {
+	        current = state ;
+	    }
+        sendStatus(current) ;
+    }
+
+    /**
+     * 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 ;
+    }
+
+    /**
+     * Handle the soap fault event.
+     * @param soapFault The soap fault.
+     * @param addressingProperties The addressing context.
+     * @param arjunaContext The arjuna context.
+     */
+    public void soapFault(final SoapFault soapFault, final AddressingProperties addressingProperties, final ArjunaContext arjunaContext)
+    {
+	ended() ;
+	try
+	{
+	    // TODO - we cannot do this with JaxWS. need to log something
+	}
+	catch (final Throwable th) {} // ignore
+    }
+
+    /**
+     * Send the close message.
+     *
+     * @message com.arjuna.wst11.messaging.engines.ParticipantCompletionCoordinatorEngine.sendClose_1 [com.arjuna.wst11.messaging.engines.ParticipantCompletionCoordinatorEngine.sendClose_1] - Unexpected exception while sending Close
+     */
+    private void sendClose()
+    {
+        final AddressingProperties addressingProperties = createContext() ;
+        try
+        {
+            ParticipantCompletionParticipantClient.getClient().sendClose(participant, addressingProperties, instanceIdentifier) ;
+        }
+        catch (final Throwable th)
+        {
+            if (WSTLogger.arjLoggerI18N.isDebugEnabled())
+            {
+                WSTLogger.arjLoggerI18N.debug("com.arjuna.wst11.messaging.engines.ParticipantCompletionCoordinatorEngine.sendClose_1", th) ;
+            }
+        }
+    }
+
+    /**
+     * Send the compensate message.
+     *
+     * @message com.arjuna.wst11.messaging.engines.ParticipantCompletionCoordinatorEngine.sendCompensate_1 [com.arjuna.wst11.messaging.engines.ParticipantCompletionCoordinatorEngine.sendCompensate_1] - Unexpected exception while sending Compensate
+     */
+    private void sendCompensate()
+    {
+        final AddressingProperties addressingProperties = createContext() ;
+        try
+        {
+            ParticipantCompletionParticipantClient.getClient().sendCompensate(participant, addressingProperties, instanceIdentifier) ;
+        }
+        catch (final Throwable th)
+        {
+            if (WSTLogger.arjLoggerI18N.isDebugEnabled())
+            {
+                WSTLogger.arjLoggerI18N.debug("com.arjuna.wst11.messaging.engines.ParticipantCompletionCoordinatorEngine.sendCompensate_1", th) ;
+            }
+        }
+    }
+
+    /**
+     * Send the cancel message.
+     *
+     * @message com.arjuna.wst11.messaging.engines.ParticipantCompletionCoordinatorEngine.sendCancel_1 [com.arjuna.wst11.messaging.engines.ParticipantCompletionCoordinatorEngine.sendCancel_1] - Unexpected exception while sending Cancel
+     */
+    private void sendCancel()
+    {
+        final AddressingProperties addressingProperties = createContext() ;
+        try
+        {
+            ParticipantCompletionParticipantClient.getClient().sendCancel(participant, addressingProperties, instanceIdentifier) ;
+        }
+        catch (final Throwable th)
+        {
+            if (WSTLogger.arjLoggerI18N.isDebugEnabled())
+            {
+                WSTLogger.arjLoggerI18N.debug("com.arjuna.wst11.messaging.engines.ParticipantCompletionCoordinatorEngine.sendCancel_1", th) ;
+            }
+        }
+    }
+
+    /**
+     * Send the exited message.
+     *
+     * @message com.arjuna.wst11.messaging.engines.ParticipantCompletionCoordinatorEngine.sendExited_1 [com.arjuna.wst11.messaging.engines.ParticipantCompletionCoordinatorEngine.sendExited_1] - Unexpected exception while sending Exited
+     */
+    private void sendExited()
+    {
+        final AddressingProperties addressingProperties  = createContext() ;
+        try
+        {
+            ParticipantCompletionParticipantClient.getClient().sendExited(participant, addressingProperties, instanceIdentifier) ;
+        }
+        catch (final Throwable th)
+        {
+            if (WSTLogger.arjLoggerI18N.isDebugEnabled())
+            {
+                WSTLogger.arjLoggerI18N.debug("com.arjuna.wst11.messaging.engines.ParticipantCompletionCoordinatorEngine.sendExited_1", th) ;
+            }
+        }
+    }
+
+    /**
+     * Send the faulted message.
+     *
+     * @message com.arjuna.wst11.messaging.engines.ParticipantCompletionCoordinatorEngine.sendFailed_1 [com.arjuna.wst11.messaging.engines.ParticipantCompletionCoordinatorEngine.sendFailed_1] - Unexpected exception while sending Faulted
+     */
+    private void sendFailed()
+    {
+        final AddressingProperties addressingProperties = createContext() ;
+        try
+        {
+            ParticipantCompletionParticipantClient.getClient().sendFailed(participant, addressingProperties, instanceIdentifier) ;
+        }
+        catch (final Throwable th)
+        {
+            if (WSTLogger.arjLoggerI18N.isDebugEnabled())
+            {
+                WSTLogger.arjLoggerI18N.debug("com.arjuna.wst11.messaging.engines.ParticipantCompletionCoordinatorEngine.sendFailed_1", th) ;
+            }
+        }
+    }
+
+    /**
+     * Send the not completed message.
+     *
+     * @message com.arjuna.wst11.messaging.engines.ParticipantCompletionCoordinatorEngine.sendNotCompleted_1 [com.arjuna.wst11.messaging.engines.ParticipantCompletionCoordinatorEngine.sendNotCompleted_1] - Unexpected exception while sending NotCompleted
+     */
+    private void sendNotCompleted()
+    {
+        final AddressingProperties addressingProperties = createContext() ;
+        try
+        {
+            ParticipantCompletionParticipantClient.getClient().sendNotCompleted(participant, addressingProperties, instanceIdentifier) ;
+        }
+        catch (final Throwable th)
+        {
+            if (WSTLogger.arjLoggerI18N.isDebugEnabled())
+            {
+                WSTLogger.arjLoggerI18N.debug("com.arjuna.wst11.messaging.engines.ParticipantCompletionCoordinatorEngine.sendNotCompleted_1", th) ;
+            }
+        }
+    }
+
+    /**
+     * Send the status message.
+     * @param state The state.
+     *
+     * @message com.arjuna.wst11.messaging.engines.ParticipantCompletionCoordinatorEngine.sendStatus_1 [com.arjuna.wst11.messaging.engines.ParticipantCompletionCoordinatorEngine.sendStatus_1] - Unexpected exception while sending Status
+     */
+    private void sendStatus(final State state)
+    {
+        final AddressingProperties addressingProperties = createContext() ;
+        try
+        {
+            ParticipantCompletionParticipantClient.getClient().sendStatus(participant, addressingProperties, instanceIdentifier, state.getValue()) ;
+        }
+        catch (final Throwable th)
+        {
+            if (WSTLogger.arjLoggerI18N.isDebugEnabled())
+            {
+                WSTLogger.arjLoggerI18N.debug("com.arjuna.wst11.messaging.engines.ParticipantCompletionCoordinatorEngine.sendStatus_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 W3CEndpointReference getParticipant()
+    {
+        return participant ;
+    }
+
+    /**
+     * Get the associated coordinator.
+     * @return The associated coordinator.
+     */
+    public BAParticipantManager 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.wst11.messaging.engines.ParticipantCompletionCoordinatorEngine.executeCompleted_1 [com.arjuna.wst11.messaging.engines.ParticipantCompletionCoordinatorEngine.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.wst11.messaging.engines.ParticipantCompletionCoordinatorEngine.executeCompleted_1", th) ;
+            }
+        }
+    }
+
+    /**
+     * Execute the exit transition.
+     *
+     * @message com.arjuna.wst11.messaging.engines.ParticipantCompletionCoordinatorEngine.executeExit_1 [com.arjuna.wst11.messaging.engines.ParticipantCompletionCoordinatorEngine.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.wst11.messaging.engines.ParticipantCompletionCoordinatorEngine.executeExit_1", th) ;
+            }
+            return ;
+        }
+        sendExited() ;
+        ended() ;
+    }
+
+    /**
+     * Executing the fail transition.
+     *
+     * @throws com.arjuna.webservices.SoapFault for SOAP errors.
+     * @throws java.io.IOException for transport errors.
+     *
+     * @message com.arjuna.wst11.messaging.engines.ParticipantCompletionCoordinatorEngine.executeFault_1 [com.arjuna.wst11.messaging.engines.ParticipantCompletionCoordinatorEngine.executeFault_1] - Unexpected exception from coordinator fault
+     */
+    private void executeFail(QName fail)
+    {
+        try
+        {
+            coordinator.fail(fail) ;
+        }
+        catch (final Throwable th)
+        {
+            if (WSTLogger.arjLoggerI18N.isDebugEnabled())
+            {
+                WSTLogger.arjLoggerI18N.debug("com.arjuna.wst11.messaging.engines.ParticipantCompletionCoordinatorEngine.executeFault_1", th) ;
+            }
+            return ;
+        }
+        sendFailed() ;
+        ended() ;
+    }
+
+    /**
+     * Executing the cannot complete transition.
+     *
+     * @throws SoapFault for SOAP errors.
+     *
+     * @message com.arjuna.wst11.messaging.engines.ParticipantCompletionCoordinatorEngine.executeCannotComplete_1 [com.arjuna.wst11.messaging.engines.ParticipantCompletionCoordinatorEngine.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.wst11.messaging.engines.ParticipantCompletionCoordinatorEngine.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 AddressingProperties createContext()
+    {
+        final String messageId = MessageId.getMessageId() ;
+        return AddressingHelper.createNotificationContext(messageId);
+    }
+}
\ No newline at end of file

Added: labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/wst11/messaging/engines/ParticipantCompletionParticipantEngine.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/wst11/messaging/engines/ParticipantCompletionParticipantEngine.java	                        (rev 0)
+++ labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/wst11/messaging/engines/ParticipantCompletionParticipantEngine.java	2008-01-25 17:18:13 UTC (rev 18124)
@@ -0,0 +1,953 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. 
+ * 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.wst11.messaging.engines;
+
+import com.arjuna.webservices.SoapFault;
+import com.arjuna.webservices.logging.WSTLogger;
+import com.arjuna.webservices.util.TransportTimer;
+import com.arjuna.webservices11.wsaddr.AddressingHelper;
+import com.arjuna.webservices11.wsarj.ArjunaContext;
+import com.arjuna.webservices11.wsarj.InstanceIdentifier;
+import com.arjuna.webservices11.wsba.ParticipantCompletionParticipantInboundEvents;
+import com.arjuna.webservices11.wsba.State;
+import com.arjuna.webservices11.wsba.processors.ParticipantCompletionParticipantProcessor;
+import com.arjuna.webservices11.wsba.client.ParticipantCompletionCoordinatorClient;
+import com.arjuna.webservices.wsarjtx.ArjunaTXConstants;
+import com.arjuna.wsc11.messaging.MessageId;
+import com.arjuna.wst.BusinessAgreementWithParticipantCompletionParticipant;
+import com.arjuna.wst.FaultedException;
+import org.oasis_open.docs.ws_tx.wsba._2006._06.NotificationType;
+import org.oasis_open.docs.ws_tx.wsba._2006._06.StatusType;
+
+import javax.xml.namespace.QName;
+import javax.xml.ws.addressing.AddressingProperties;
+import javax.xml.ws.wsaddressing.W3CEndpointReference;
+import java.util.TimerTask;
+
+/**
+ * The participant completion participant state engine
+ * @author kevin
+ */
+public class ParticipantCompletionParticipantEngine implements ParticipantCompletionParticipantInboundEvents
+{
+    /**
+     * The participant id.
+     */
+    private final String id ;
+    /**
+     * The instance identifier.
+     */
+    private final InstanceIdentifier instanceIdentifier ;
+    /**
+     * The coordinator endpoint reference.
+     */
+    private final W3CEndpointReference 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 ParticipantCompletionParticipantEngine(final String id, final W3CEndpointReference 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 ParticipantCompletionParticipantEngine(final String id, final W3CEndpointReference 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 addressingProperties The addressing context.
+     * @param arjunaContext The arjuna 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 AddressingProperties addressingProperties, final ArjunaContext arjunaContext)
+    {
+        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 addressingProperties The addressing context.
+     * @param arjunaContext The arjuna 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 AddressingProperties addressingProperties, final ArjunaContext arjunaContext)
+    {
+        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 addressingProperties The addressing context.
+     * @param arjunaContext The arjuna 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 AddressingProperties addressingProperties, final ArjunaContext arjunaContext)
+    {
+        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 addressingProperties The addressing context.
+     * @param arjunaContext The arjuna 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 AddressingProperties addressingProperties, final ArjunaContext arjunaContext)
+    {
+        final State current ;
+        synchronized(this)
+        {
+            current = state ;
+            if (current == State.STATE_EXITING)
+            {
+                ended() ;
+            }
+        }
+    }
+
+    /**
+     * Handle the failed event.
+     * @param failed The failed notification.
+     * @param addressingProperties The addressing context.
+     * @param arjunaContext The arjuna 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 AddressingProperties addressingProperties, final ArjunaContext arjunaContext)
+    {
+        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 addressingProperties The addressing context.
+     * @param arjunaContext The arjuna 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 AddressingProperties addressingProperties, final ArjunaContext arjunaContext)
+    {
+        final State current ;
+        synchronized(this)
+        {
+            current = state ;
+            if (current == State.STATE_NOT_COMPLETING)
+            {
+        	ended() ;
+            }
+        }
+    }
+
+    /**
+     * Handle the getStatus event.
+     * @param getStatus The getStatus notification.
+     * @param addressingProperties The addressing context.
+     * @param arjunaContext The arjuna context.
+     *
+     * @message com.arjuna.wst11.messaging.engines.ParticipantCompletionParticipantEngine.getStatus_1 [com.arjuna.wst11.messaging.engines.ParticipantCompletionParticipantEngine.getStatus_1] - Unknown error: {0}
+     */
+    public void getStatus(final NotificationType getStatus, final AddressingProperties addressingProperties, final ArjunaContext arjunaContext)
+    {
+	final State current ;
+	synchronized(this)
+	{
+	    current = state ;
+	}
+	sendStatus(current) ;
+    }
+
+    /**
+     * Handle the status event.
+     * @param status The status type.
+     * @param addressingProperties The addressing context.
+     * @param arjunaContext The arjuna context.
+     */
+    public void status(final StatusType status, final AddressingProperties addressingProperties, final ArjunaContext arjunaContext)
+    {
+        // KEV - implement
+    }
+
+    /**
+     * Handle the soap fault event.
+     * @param soapFault The soap fault.
+     * @param addressingProperties The addressing context.
+     * @param arjunaContext The arjuna context.
+     */
+    public void soapFault(final SoapFault soapFault, final AddressingProperties addressingProperties, final ArjunaContext arjunaContext)
+    {
+	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.wst11.messaging.engines.ParticipantCompletionParticipantEngine.sendExit_1 [com.arjuna.wst11.messaging.engines.ParticipantCompletionParticipantEngine.sendExit_1] - Unexpected exception while sending Exit
+     */
+    private void sendExit()
+    {
+        final AddressingProperties addressingProperties = createContext() ;
+        try
+        {
+            ParticipantCompletionCoordinatorClient.getClient().sendExit(coordinator, addressingProperties, instanceIdentifier) ;
+        }
+        catch (final Throwable th)
+        {
+            if (WSTLogger.arjLoggerI18N.isDebugEnabled())
+            {
+                WSTLogger.arjLoggerI18N.debug("com.arjuna.wst11.messaging.engines.ParticipantCompletionParticipantEngine.sendExit_1", th) ;
+            }
+        }
+    }
+
+    /**
+     * Send the completed message.
+     *
+     * @message com.arjuna.wst11.messaging.engines.ParticipantCompletionParticipantEngine.sendCompleted_1 [com.arjuna.wst11.messaging.engines.ParticipantCompletionParticipantEngine.sendCompleted_1] - Unexpected exception while sending Completed
+     */
+    private void sendCompleted()
+    {
+        final AddressingProperties addressingProperties = createContext() ;
+        try
+        {
+            ParticipantCompletionCoordinatorClient.getClient().sendCompleted(coordinator, addressingProperties, instanceIdentifier) ;
+        }
+        catch (final Throwable th)
+        {
+            if (WSTLogger.arjLoggerI18N.isDebugEnabled())
+            {
+                WSTLogger.arjLoggerI18N.debug("com.arjuna.wst11.messaging.engines.ParticipantCompletionParticipantEngine.sendCompleted_1", th) ;
+            }
+        }
+
+        initiateTimer() ;
+    }
+
+    /**
+     * Send the fail message.
+     * @param message The fail message.
+     *
+     * @message com.arjuna.wst11.messaging.engines.ParticipantCompletionParticipantEngine.sendFail_1 [com.arjuna.wst11.messaging.engines.ParticipantCompletionParticipantEngine.sendFail_1] - Unexpected exception while sending Fault
+     */
+    private void sendFail(final QName message)
+    {
+        final AddressingProperties addressingProperties = createContext() ;
+        try
+        {
+            ParticipantCompletionCoordinatorClient.getClient().sendFail(coordinator, addressingProperties, instanceIdentifier, message) ;
+        }
+        catch (final Throwable th)
+        {
+            if (WSTLogger.arjLoggerI18N.isDebugEnabled())
+            {
+                WSTLogger.arjLoggerI18N.debug("com.arjuna.wst11.messaging.engines.ParticipantCompletionParticipantEngine.sendFail_1", th) ;
+            }
+        }
+    }
+
+    /**
+     * Send the cancelled message.
+     *
+     * @message com.arjuna.wst11.messaging.engines.ParticipantCompletionParticipantEngine.sendCancelled_1 [com.arjuna.wst11.messaging.engines.ParticipantCompletionParticipantEngine.sendCancelled_1] - Unexpected exception while sending Cancelled
+     */
+    private void sendCancelled()
+    {
+        final AddressingProperties addressingProperties = createContext() ;
+        try
+        {
+            ParticipantCompletionCoordinatorClient.getClient().sendCancelled(coordinator, addressingProperties, instanceIdentifier) ;
+        }
+        catch (final Throwable th)
+        {
+            if (WSTLogger.arjLoggerI18N.isDebugEnabled())
+            {
+                WSTLogger.arjLoggerI18N.debug("com.arjuna.wst11.messaging.engines.ParticipantCompletionParticipantEngine.sendCancelled_1", th) ;
+            }
+        }
+    }
+
+    /**
+     * Send the closed message.
+     *
+     * @message com.arjuna.wst11.messaging.engines.ParticipantCompletionParticipantEngine.sendClosed_1 [com.arjuna.wst11.messaging.engines.ParticipantCompletionParticipantEngine.sendClosed_1] - Unexpected exception while sending Closed
+     */
+    private void sendClosed()
+    {
+        final AddressingProperties addressingProperties = createContext() ;
+        try
+        {
+            ParticipantCompletionCoordinatorClient.getClient().sendClosed(coordinator, addressingProperties, instanceIdentifier) ;
+        }
+        catch (final Throwable th)
+        {
+            if (WSTLogger.arjLoggerI18N.isDebugEnabled())
+            {
+                WSTLogger.arjLoggerI18N.debug("com.arjuna.wst11.messaging.engines.ParticipantCompletionParticipantEngine.sendClosed_1", th) ;
+            }
+        }
+    }
+
+    /**
+     * Send the compensated message.
+     *
+     * @message com.arjuna.wst11.messaging.engines.ParticipantCompletionParticipantEngine.sendCompensated_1 [com.arjuna.wst11.messaging.engines.ParticipantCompletionParticipantEngine.sendCompensated_1] - Unexpected exception while sending Compensated
+     */
+    private void sendCompensated()
+    {
+        final AddressingProperties addressingProperties = createContext() ;
+        try
+        {
+            ParticipantCompletionCoordinatorClient.getClient().sendCompensated(coordinator, addressingProperties, instanceIdentifier) ;
+        }
+        catch (final Throwable th)
+        {
+            if (WSTLogger.arjLoggerI18N.isDebugEnabled())
+            {
+                WSTLogger.arjLoggerI18N.debug("com.arjuna.wst11.messaging.engines.ParticipantCompletionParticipantEngine.sendCompensated_1", th) ;
+            }
+        }
+    }
+
+    /**
+     * Send the status message.
+     * @param state The state.
+     *
+     * @message com.arjuna.wst11.messaging.engines.ParticipantCompletionParticipantEngine.sendStatus_1 [com.arjuna.wst11.messaging.engines.ParticipantCompletionParticipantEngine.sendStatus_1] - Unexpected exception while sending Status
+     */
+    private void sendStatus(final State state)
+    {
+        final AddressingProperties addressingProperties = createContext() ;
+        try
+        {
+            ParticipantCompletionCoordinatorClient.getClient().sendStatus(coordinator, addressingProperties, instanceIdentifier, state.getValue()) ;
+        }
+        catch (final Throwable th)
+        {
+            if (WSTLogger.arjLoggerI18N.isDebugEnabled())
+            {
+                WSTLogger.arjLoggerI18N.debug("com.arjuna.wst11.messaging.engines.ParticipantCompletionParticipantEngine.sendStatus_1", th) ;
+            }
+        }
+    }
+
+    /**
+     * Send the cannot complete message.
+     *
+     * @message com.arjuna.wst11.messaging.engines.ParticipantCompletionParticipantEngine.sendCannotComplete_1 [com.arjuna.wst11.messaging.engines.ParticipantCompletionParticipantEngine.sendCannotComplete_1] - Unexpected exception while sending Status
+     */
+    private void sendCannotComplete()
+    {
+        final AddressingProperties addressingProperties = createContext() ;
+        try
+        {
+            ParticipantCompletionCoordinatorClient.getClient().sendCannotComplete(coordinator, addressingProperties, instanceIdentifier) ;
+        }
+        catch (final Throwable th)
+        {
+            if (WSTLogger.arjLoggerI18N.isDebugEnabled())
+            {
+                WSTLogger.arjLoggerI18N.debug("com.arjuna.wst11.messaging.engines.ParticipantCompletionParticipantEngine.sendCannotComplete_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 W3CEndpointReference 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)
+        {
+            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.wst11.messaging.engines.ParticipantCompletionParticipantEngine.executeCancel_1 [com.arjuna.wst11.messaging.engines.ParticipantCompletionParticipantEngine.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.wst11.messaging.engines.ParticipantCompletionParticipantEngine.executeCancel_1", th) ;
+            }
+            return ;
+        }
+        sendCancelled() ;
+        ended() ;
+    }
+
+    /**
+     * Execute the close transition.
+     *
+     * @message com.arjuna.wst11.messaging.engines.ParticipantCompletionParticipantEngine.executeClose_1 [com.arjuna.wst11.messaging.engines.ParticipantCompletionParticipantEngine.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.wst11.messaging.engines.ParticipantCompletionParticipantEngine.executeClose_1", th) ;
+            }
+            return ;
+        }
+        sendClosed() ;
+        ended() ;
+    }
+
+    /**
+     * Execute the compensate transition.
+     *
+     * @message com.arjuna.wst11.messaging.engines.ParticipantCompletionParticipantEngine.executeCompensate_1 [com.arjuna.wst11.messaging.engines.ParticipantCompletionParticipantEngine.executeCompensate_1] - Unexpected exception from participant compensate
+     */
+    private void executeCompensate()
+    {
+        try
+        {
+            participant.compensate() ;
+        }
+        catch (final FaultedException fe)
+        {
+            // TODO - use the right value here -- shoudl be a QName for Faulted (Kev's 1.1 code uses JBOSSTX.FAULTED_ERROR_CODE_QNAME)
+            fail(ArjunaTXConstants.WSARJTX_ELEMENT_FAULTED_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.wst11.messaging.engines.ParticipantCompletionParticipantEngine.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 AddressingProperties createContext()
+    {
+        final String messageId = MessageId.getMessageId() ;
+        return AddressingHelper.createNotificationContext(messageId) ;
+    }
+}
\ No newline at end of file

Added: labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/wst11/messaging/engines/ParticipantEngine.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/wst11/messaging/engines/ParticipantEngine.java	                        (rev 0)
+++ labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/wst11/messaging/engines/ParticipantEngine.java	2008-01-25 17:18:13 UTC (rev 18124)
@@ -0,0 +1,575 @@
+package com.arjuna.wst11.messaging.engines;
+
+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.webservices11.wsaddr.AddressingHelper;
+import com.arjuna.webservices11.wsarj.ArjunaContext;
+import com.arjuna.webservices11.wsarj.InstanceIdentifier;
+import com.arjuna.webservices11.wscoor.CoordinationConstants;
+import com.arjuna.webservices11.wsat.client.CoordinatorClient;
+import com.arjuna.webservices11.wsat.ParticipantInboundEvents;
+import com.arjuna.webservices11.wsat.State;
+import com.arjuna.webservices11.wsat.processors.ParticipantProcessor;
+import com.arjuna.wsc11.messaging.MessageId;
+import com.arjuna.wst.*;
+import org.oasis_open.docs.ws_tx.wsat._2006._06.Notification;
+
+import javax.xml.namespace.QName;
+import javax.xml.ws.addressing.AddressingProperties;
+import javax.xml.ws.wsaddressing.W3CEndpointReference;
+import java.util.TimerTask;
+
+/**
+ * The participant state engine
+ * @author kevin
+ */
+public class ParticipantEngine implements ParticipantInboundEvents
+{
+    /**
+     * The associated participant
+     */
+    private final Participant participant ;
+    /**
+     * The participant id.
+     */
+    private final String id ;
+    /**
+     * The coordinator endpoint reference.
+     */
+    private final W3CEndpointReference 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 id The participant id.
+     * @param coordinator The coordinator endpoint reference.
+     */
+    public ParticipantEngine(final Participant participant, final String id, final W3CEndpointReference coordinator)
+    {
+        this(participant, id, State.STATE_ACTIVE, coordinator) ;
+    }
+
+    /**
+     * Construct the engine for the participant in a specified state.
+     * @param participant The participant.
+     * @param id The participant id.
+     * @param state The initial state.
+     * @param coordinator The coordinator endpoint reference.
+     */
+    public ParticipantEngine(final Participant participant, final String id, final State state, final W3CEndpointReference coordinator)
+    {
+        this.participant = participant ;
+        this.id = id ;
+        this.state = state ;
+        this.coordinator = coordinator ;
+    }
+
+    /**
+     * Handle the commit event.
+     * @param commit The commit notification.
+     * @param addressingProperties The addressing context.
+     * @param arjunaContext The arjuna context.
+     *
+     * None -> None (send committed)
+     * Active -> Aborting (do nothing)
+     * Preparing -> Aborting (do nothing)
+     * PreparedSuccess -> Committing (initiate commit)
+     * Committing -> Committing (do nothing)
+     * Aborting -> Aborting (do nothing)
+     */
+    public void commit(final Notification commit, final AddressingProperties addressingProperties, final ArjunaContext arjunaContext)
+    {
+        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 == null)
+        {
+            sendCommitted() ;
+        }
+    }
+
+    /**
+     * Handle the prepare event.
+     * @param prepare The prepare notification.
+     * @param addressingProperties The addressing context.
+     * @param arjunaContext The arjuna 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 Notification prepare, final AddressingProperties addressingProperties, final ArjunaContext arjunaContext)
+    {
+        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 addressingProperties The addressing context.
+     * @param arjunaContext The arjuna 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 (ignore)
+     * Aborting -> Aborting (send aborted and forget)
+     */
+    public void rollback(final Notification rollback, final AddressingProperties addressingProperties, final ArjunaContext arjunaContext)
+    {
+        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)
+        {
+            if ((current == State.STATE_ACTIVE) || (current == State.STATE_PREPARING) ||
+                (current == State.STATE_PREPARED_SUCCESS))
+            {
+                if (!executeRollback())
+                {
+                    return ;
+                }
+            }
+
+            sendAborted() ;
+
+            if (current != null)
+            {
+                forget() ;
+            }
+        }
+    }
+
+    /**
+     * Handle the soap fault event.
+     * @param soapFault The soap fault.
+     * @param addressingProperties The addressing context.
+     * @param arjunaContext The arjuna context.
+     *
+     * @message com.arjuna.wst11.messaging.engines.ParticipantEngine.soapFault_1 [com.arjuna.wst11.messaging.engines.ParticipantEngine.soapFault_1] - Unexpected SOAP fault for participant {0}: {1} {2}
+     */
+    public void soapFault(final SoapFault soapFault, final AddressingProperties addressingProperties, final ArjunaContext arjunaContext)
+    {
+        if (WSTLogger.arjLoggerI18N.isDebugEnabled())
+        {
+            final InstanceIdentifier instanceIdentifier = arjunaContext.getInstanceIdentifier() ;
+            final SoapFaultType soapFaultType = soapFault.getSoapFaultType() ;
+            final QName subCode = soapFault.getSubcode() ;
+            WSTLogger.arjLoggerI18N.debug("com.arjuna.wst11.messaging.engines.ParticipantEngine.soapFault_1", new Object[] {instanceIdentifier, soapFaultType, subCode}) ;
+        }
+
+        if (CoordinationConstants.WSCOOR_ERROR_CODE_INVALID_STATE_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.wst11.messaging.engines.ParticipantEngine.executeCommit_1 [com.arjuna.wst11.messaging.engines.ParticipantEngine.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.wst11.messaging.engines.ParticipantEngine.executeCommit_1", th) ;
+            }
+        }
+    }
+
+    /**
+     * Execute the rollback transition.
+     *
+     * @message com.arjuna.wst11.messaging.engines.ParticipantEngine.executeRollback_1 [com.arjuna.wst11.messaging.engines.ParticipantEngine.executeRollback_1] - Unexpected exception from participant rollback
+     */
+    private boolean executeRollback()
+    {
+        try
+        {
+            participant.rollback() ;
+        }
+        catch (final SystemException se)
+        {
+            return false ;
+        }
+        catch (final Throwable th)
+        {
+            if (WSTLogger.arjLoggerI18N.isDebugEnabled())
+            {
+                WSTLogger.arjLoggerI18N.debug("com.arjuna.wst11.messaging.engines.ParticipantEngine.executeRollback_1", th) ;
+            }
+        }
+        return true ;
+    }
+
+    /**
+     * Execute the prepare transition.
+     *
+     * @message com.arjuna.wst11.messaging.engines.ParticipantEngine.executePrepare_1 [com.arjuna.wst11.messaging.engines.ParticipantEngine.executePrepare_1] - Unexpected exception from participant prepare
+     * @message com.arjuna.wst11.messaging.engines.ParticipantEngine.executePrepare_2 [com.arjuna.wst11.messaging.engines.ParticipantEngine.executePrepare_2] - Unexpected result from participant prepare: {0}
+     */
+    private void executePrepare()
+    {
+        final Vote vote ;
+        try
+        {
+            vote = participant.prepare();
+        }
+        catch (final SystemException se)
+        {
+            if (WSTLogger.arjLoggerI18N.isDebugEnabled())
+            {
+                WSTLogger.arjLoggerI18N.debug("com.arjuna.wst11.messaging.engines.ParticipantEngine.executePrepare_1", se) ;
+            }
+            return ;
+        }
+        catch (final Throwable th)
+        {
+            if (WSTLogger.arjLoggerI18N.isDebugEnabled())
+            {
+                WSTLogger.arjLoggerI18N.debug("com.arjuna.wst11.messaging.engines.ParticipantEngine.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.wst11.messaging.engines.ParticipantEngine.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.wst11.messaging.engines.ParticipantEngine.sendCommitted_1 [com.arjuna.wst11.messaging.engines.ParticipantEngine.sendCommitted_1] - Unexpected exception while sending Committed
+     */
+    private void sendCommitted()
+    {
+        final AddressingProperties responseAddressingContext = createContext() ;
+        final InstanceIdentifier instanceIdentifier = new InstanceIdentifier(id) ;
+        try
+        {
+            CoordinatorClient.getClient().sendCommitted(coordinator, responseAddressingContext, instanceIdentifier) ;
+        }
+        catch (final Throwable th)
+        {
+            if (WSTLogger.arjLoggerI18N.isDebugEnabled())
+            {
+                WSTLogger.arjLoggerI18N.debug("com.arjuna.wst11.messaging.engines.ParticipantEngine.sendCommitted_1", th) ;
+            }
+        }
+    }
+
+    /**
+     * Send the prepared message.
+     *
+     * @message com.arjuna.wst11.messaging.engines.ParticipantEngine.sendPrepared_1 [com.arjuna.wst11.messaging.engines.ParticipantEngine.sendPrepared_1] - Unexpected exception while sending Prepared
+     */
+    private void sendPrepared()
+    {
+        final AddressingProperties responseAddressingContext = createContext() ;
+        final InstanceIdentifier instanceIdentifier = new InstanceIdentifier(id) ;
+        try
+        {
+            CoordinatorClient.getClient().sendPrepared(coordinator, responseAddressingContext, instanceIdentifier) ;
+        }
+        catch (final Throwable th)
+        {
+            if (WSTLogger.arjLoggerI18N.isDebugEnabled())
+            {
+                WSTLogger.arjLoggerI18N.debug("com.arjuna.wst11.messaging.engines.ParticipantEngine.sendPrepared_1", th) ;
+            }
+        }
+
+        initiateTimer() ;
+    }
+
+    /**
+     * Send the aborted message.
+     *
+     * @message com.arjuna.wst11.messaging.engines.ParticipantEngine.sendAborted_1 [com.arjuna.wst11.messaging.engines.ParticipantEngine.sendAborted_1] - Unexpected exception while sending Aborted
+     */
+    private void sendAborted()
+    {
+        final AddressingProperties responseAddressingContext = createContext() ;
+        final InstanceIdentifier instanceIdentifier = new InstanceIdentifier(id) ;
+        try
+        {
+            CoordinatorClient.getClient().sendAborted(coordinator, responseAddressingContext, instanceIdentifier) ;
+        }
+        catch (final Throwable th)
+        {
+            if (WSTLogger.arjLoggerI18N.isDebugEnabled())
+            {
+                WSTLogger.arjLoggerI18N.debug("com.arjuna.wst11.messaging.engines.ParticipantEngine.sendAborted_1", th) ;
+            }
+        }
+    }
+
+    /**
+     * Send the read only message.
+     *
+     * @message com.arjuna.wst11.messaging.engines.ParticipantEngine.sendReadOnly_1 [com.arjuna.wst11.messaging.engines.ParticipantEngine.sendReadOnly_1] - Unexpected exception while sending ReadOnly
+     */
+    private void sendReadOnly()
+    {
+        final AddressingProperties responseAddressingContext = createContext() ;
+        final InstanceIdentifier instanceIdentifier = new InstanceIdentifier(id) ;
+        try
+        {
+            CoordinatorClient.getClient().sendReadOnly(coordinator, responseAddressingContext, instanceIdentifier) ;
+        }
+        catch (final Throwable th)
+        {
+            if (WSTLogger.arjLoggerI18N.isDebugEnabled())
+            {
+                WSTLogger.arjLoggerI18N.debug("com.arjuna.wst11.messaging.engines.ParticipantEngine.sendReadOnly_1", 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 response context from the incoming context.
+     * @return The addressing context.
+     */
+    private AddressingProperties createContext()
+    {
+        final String messageId = MessageId.getMessageId() ;
+        return AddressingHelper.createNotificationContext(messageId) ;
+    }
+    
+    public W3CEndpointReference getCoordinator()
+    {
+        return coordinator;
+    }
+}

Added: labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/wst11/stub/BACoordinatorCompletionParticipantManagerStub.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/wst11/stub/BACoordinatorCompletionParticipantManagerStub.java	                        (rev 0)
+++ labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/wst11/stub/BACoordinatorCompletionParticipantManagerStub.java	2008-01-25 17:18:13 UTC (rev 18124)
@@ -0,0 +1,132 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. 
+ * 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.wst11.stub;
+
+import com.arjuna.webservices11.wsba.State;
+import com.arjuna.wst.SystemException;
+import com.arjuna.wst.UnknownTransactionException;
+import com.arjuna.wst.WrongStateException;
+import com.arjuna.wst11.BAParticipantManager;
+import com.arjuna.wst11.messaging.engines.CoordinatorCompletionParticipantEngine;
+
+import javax.xml.namespace.QName;
+
+public class BACoordinatorCompletionParticipantManagerStub implements BAParticipantManager
+{
+    private final CoordinatorCompletionParticipantEngine coordinator ;
+
+    public BACoordinatorCompletionParticipantManagerStub(final CoordinatorCompletionParticipantEngine coordinator)
+        throws Exception
+    {
+        this.coordinator = coordinator ;
+    }
+
+    public void exit ()
+        throws WrongStateException, UnknownTransactionException, SystemException
+    {
+        /*
+         * Active -> illegal state
+         * Canceling -> illegal state
+         * Completed -> illegal state
+         * Closing -> illegal state
+         * Compensating -> illegal state
+         * Faulting -> illegal state
+         * Faulting-Active -> illegal state
+         * Faulting-Compensating -> 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_ACTIVE) && (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() ;
+        }
+    }
+}
\ No newline at end of file

Added: labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/wst11/stub/BAParticipantCompletionParticipantManagerStub.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/wst11/stub/BAParticipantCompletionParticipantManagerStub.java	                        (rev 0)
+++ labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/wst11/stub/BAParticipantCompletionParticipantManagerStub.java	2008-01-25 17:18:13 UTC (rev 18124)
@@ -0,0 +1,129 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. 
+ * 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.wst11.stub;
+
+import com.arjuna.webservices11.wsba.State;
+import com.arjuna.wst.SystemException;
+import com.arjuna.wst.UnknownTransactionException;
+import com.arjuna.wst.WrongStateException;
+import com.arjuna.wst11.BAParticipantManager;
+import com.arjuna.wst11.messaging.engines.ParticipantCompletionParticipantEngine;
+
+import javax.xml.namespace.QName;
+
+public class BAParticipantCompletionParticipantManagerStub implements BAParticipantManager
+{
+    private final ParticipantCompletionParticipantEngine coordinator ;
+
+    public BAParticipantCompletionParticipantManagerStub(final ParticipantCompletionParticipantEngine 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() ;
+        }
+    }
+}
\ No newline at end of file

Added: labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/wst11/stub/BusinessActivityTerminatorStub.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/wst11/stub/BusinessActivityTerminatorStub.java	                        (rev 0)
+++ labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/wst11/stub/BusinessActivityTerminatorStub.java	2008-01-25 17:18:13 UTC (rev 18124)
@@ -0,0 +1,397 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. 
+ * 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: BusinessActivityTerminatorStub.java,v 1.7.6.1 2005/11/22 10:35:29 kconner Exp $
+ */
+
+package com.arjuna.wst11.stub;
+
+import com.arjuna.schemas.ws._2005._10.wsarjtx.NotificationType;
+import com.arjuna.webservices.SoapFault;
+import com.arjuna.webservices.SoapFaultType;
+import com.arjuna.webservices.logging.WSTLogger;
+import com.arjuna.webservices11.wsaddr.AddressingHelper;
+import com.arjuna.webservices11.wsarj.ArjunaContext;
+import com.arjuna.webservices11.wsarj.InstanceIdentifier;
+import com.arjuna.webservices.wsarjtx.ArjunaTXConstants;
+import com.arjuna.webservices11.wsarjtx.client.TerminationCoordinatorClient;
+import com.arjuna.webservices11.wsarjtx.processors.TerminationParticipantCallback;
+import com.arjuna.webservices11.wsarjtx.processors.TerminationParticipantProcessor;
+import com.arjuna.wsc11.messaging.MessageId;
+import com.arjuna.wst.*;
+import com.arjuna.wst11.BusinessActivityTerminator;
+
+import javax.xml.namespace.QName;
+import javax.xml.ws.addressing.AddressingProperties;
+import javax.xml.ws.wsaddressing.W3CEndpointReference;
+
+public class BusinessActivityTerminatorStub implements BusinessActivityTerminator
+{
+    private W3CEndpointReference _terminationCoordinator = null;
+    private final String _id ;
+
+    public BusinessActivityTerminatorStub(final String id, final W3CEndpointReference terminationCoordinator)
+        throws Exception
+    {
+        _terminationCoordinator = terminationCoordinator;
+        _id = id ;
+    }
+
+    public void close ()
+        throws TransactionRolledBackException, UnknownTransactionException, SystemException
+    {
+        final AddressingProperties addressingProperties = AddressingHelper.createNotificationContext(MessageId.getMessageId()) ;
+
+        final RequestCallback callback = new RequestCallback() ;
+        final TerminationParticipantProcessor terminationParticipantProcessor = TerminationParticipantProcessor.getProcessor() ;
+        terminationParticipantProcessor.registerCallback(_id, callback) ;
+        try
+        {
+            TerminationCoordinatorClient.getClient().sendClose(_terminationCoordinator, addressingProperties, new InstanceIdentifier(_id)) ;
+            callback.waitUntilTriggered() ;
+        }
+        catch (final Throwable th)
+        {
+            throw new SystemException() ;
+        }
+        finally
+        {
+            terminationParticipantProcessor.removeCallback(_id) ;
+        }
+
+        if (callback.hasTriggered())
+        {
+            if (callback.receivedClosed())
+            {
+                return ;
+            }
+            final SoapFault soapFault = callback.getSoapFault() ;
+            if (soapFault != null)
+            {
+                final QName subcode = soapFault.getSubcode() ;
+                if (ArjunaTXConstants.TRANSACTIONROLLEDBACK_ERROR_CODE_QNAME.equals(subcode))
+                {
+                    throw new TransactionRolledBackException();
+                }
+                else if (ArjunaTXConstants.UNKNOWNTRANSACTION_ERROR_CODE_QNAME.equals(subcode))
+                {
+                    throw new UnknownTransactionException() ;
+                }
+            }
+        }
+        throw new SystemException() ;
+    }
+
+    public void cancel ()
+        throws FaultedException, UnknownTransactionException, SystemException
+    {
+        final AddressingProperties addressingProperties = AddressingHelper.createNotificationContext(MessageId.getMessageId()) ;
+
+        final RequestCallback callback = new RequestCallback() ;
+        final TerminationParticipantProcessor terminationParticipantProcessor = TerminationParticipantProcessor.getProcessor() ;
+        terminationParticipantProcessor.registerCallback(_id, callback) ;
+        try
+        {
+            TerminationCoordinatorClient.getClient().sendCancel(_terminationCoordinator, addressingProperties, new InstanceIdentifier(_id)) ;
+            callback.waitUntilTriggered() ;
+        }
+        catch (final Throwable th)
+        {
+            throw new SystemException() ;
+        }
+        finally
+        {
+            terminationParticipantProcessor.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 (ArjunaTXConstants.UNKNOWNTRANSACTION_ERROR_CODE_QNAME.equals(subcode))
+                {
+                    throw new UnknownTransactionException() ;
+                }
+            }
+        }
+        throw new SystemException() ;
+    }
+
+    public void complete ()
+        throws FaultedException, UnknownTransactionException, SystemException
+    {
+        final AddressingProperties addressingProperties = AddressingHelper.createNotificationContext(MessageId.getMessageId()) ;
+
+        final RequestCallback callback = new RequestCallback() ;
+        final TerminationParticipantProcessor terminationParticipantProcessor = TerminationParticipantProcessor.getProcessor() ;
+        terminationParticipantProcessor.registerCallback(_id, callback) ;
+        try
+        {
+            TerminationCoordinatorClient.getClient().sendComplete(_terminationCoordinator, addressingProperties, new InstanceIdentifier(_id)) ;
+            callback.waitUntilTriggered() ;
+        }
+        catch (final Throwable th)
+        {
+            throw new SystemException() ;
+        }
+        finally
+        {
+            terminationParticipantProcessor.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 (ArjunaTXConstants.UNKNOWNTRANSACTION_ERROR_CODE_QNAME.equals(subcode))
+                {
+                    throw new UnknownTransactionException() ;
+                }
+            }
+        }
+        throw new SystemException() ;
+    }
+
+    public W3CEndpointReference getEndpoint()
+    {
+        return _terminationCoordinator;
+    }
+    /*
+     * this never gets called
+     */
+    public void unknown ()
+        throws SystemException
+    {
+        error() ;
+    }
+
+    /**
+     * @message com.arjuna.wst.stub.BusinessActivityTerminator11Stub_1 [com.arjuna.wst.stub.BusinessActivityTerminator11Stub_1] - Unknown error
+     */
+    /*
+     * this never gets called
+     */
+    public void error ()
+        throws SystemException
+    {
+        final AddressingProperties addressingProperties = AddressingHelper.createNotificationContext(MessageId.getMessageId()) ;
+        final SoapFault soapFault = new SoapFault(SoapFaultType.FAULT_SENDER, ArjunaTXConstants.UNKNOWNERROR_ERROR_CODE_QNAME,
+                WSTLogger.log_mesg.getString("com.arjuna.wst.stub.BusinessActivityTerminator11Stub_1")) ;
+        try
+        {
+            // the terminaron coordinator endpoint does not expose a soapFault web method as this never gets called
+            // TerminationCoordinatorClient.getClient().sendSoapFault(_terminationCoordinator, addressingProperties, soapFault, new InstanceIdentifier(_id)) ;
+        }
+        catch (final Throwable th)
+        {
+            throw new SystemException() ;
+        }
+    }
+
+    private static class RequestCallback extends TerminationParticipantCallback
+    {
+        /**
+         * The addressing context.
+         */
+        private AddressingProperties addressingProperties ;
+        /**
+         * The arjuna context.
+         */
+        private ArjunaContext arjunaContext ;
+        /**
+         * 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.
+         */
+        AddressingProperties getAddressingProperties()
+        {
+            return addressingProperties ;
+        }
+
+        /**
+         * Get the arjuna context.
+         * @return The arjuna context.
+         */
+        ArjunaContext getArjunaContextWS()
+        {
+            return arjunaContext ;
+        }
+
+        /**
+         * 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 addressingProperties The addressing context.
+         * @param arjunaContext The arjuna context.
+         */
+        public void completed(final NotificationType completed, final AddressingProperties addressingProperties,
+            final ArjunaContext arjunaContext)
+        {
+            this.completed = true ;
+            this.addressingProperties = addressingProperties ;
+            this.arjunaContext = arjunaContext ;
+        }
+
+        /**
+         * A cancelled response.
+         * @param cancelled The cancelled notification.
+         * @param addressingProperties The addressing context.
+         * @param arjunaContext The arjuna context.
+         */
+        public void cancelled(final NotificationType cancelled, final AddressingProperties addressingProperties,
+            final ArjunaContext arjunaContext)
+        {
+            this.cancelled  = true ;
+            this.addressingProperties = addressingProperties ;
+            this.arjunaContext = arjunaContext ;
+        }
+
+        /**
+         * A closed response.
+         * @param closed The closed notification.
+         * @param addressingProperties The addressing context.
+         * @param arjunaContext The arjuna context.
+         */
+        public void closed(final NotificationType closed, final AddressingProperties addressingProperties,
+            final ArjunaContext arjunaContext)
+        {
+            this.closed = true ;
+            this.addressingProperties = addressingProperties ;
+            this.arjunaContext = arjunaContext ;
+        }
+
+        /**
+         * A faulted response.
+         * @param faulted The faulted notification.
+         * @param addressingProperties The addressing context.
+         * @param arjunaContext The arjuna context.
+         */
+        public void faulted(final NotificationType faulted, final AddressingProperties addressingProperties,
+            final ArjunaContext arjunaContext)
+        {
+            // TODO - convert wsdl to use NotificationType instead of ExceptionType
+            this.faulted = true ;
+            this.addressingProperties = addressingProperties ;
+            this.arjunaContext = arjunaContext ;
+        }
+
+        /**
+         * A SOAP fault response.
+         * @param soapFault The SOAP fault.
+         * @param addressingProperties The addressing context.
+         * @param arjunaContext The arjuna context.
+         */
+        public void soapFault(final SoapFault soapFault, final AddressingProperties addressingProperties,
+            final ArjunaContext arjunaContext)
+        {
+            // TODO - pass soap fault to this callback
+            this.soapFault = soapFault ;
+            this.addressingProperties = addressingProperties ;
+            this.arjunaContext = arjunaContext ;
+        }
+    }
+}
\ No newline at end of file

Added: labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/wst11/stub/BusinessAgreementWithCoordinatorCompletionStub.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/wst11/stub/BusinessAgreementWithCoordinatorCompletionStub.java	                        (rev 0)
+++ labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/wst11/stub/BusinessAgreementWithCoordinatorCompletionStub.java	2008-01-25 17:18:13 UTC (rev 18124)
@@ -0,0 +1,282 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. 
+ * 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: BusinessAgreementWithCoordinatorCompletionStub.java,v 1.1.2.2 2004/06/18 15:06:09 nmcl Exp $
+ */
+
+package com.arjuna.wst11.stub;
+
+import java.io.StringWriter;
+import java.io.StringReader;
+
+import javax.xml.namespace.QName;
+import javax.xml.stream.XMLStreamReader;
+import javax.xml.stream.XMLStreamWriter;
+import javax.xml.transform.stream.StreamSource;
+import javax.xml.ws.wsaddressing.W3CEndpointReference;
+
+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.webservices11.wsba.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.wst11.messaging.engines.CoordinatorCompletionCoordinatorEngine;
+
+public class BusinessAgreementWithCoordinatorCompletionStub implements BusinessAgreementWithCoordinatorCompletionParticipant, PersistableParticipant
+{
+    private static final QName QNAME_BACCWS_PARTICIPANT = new QName("baccwsParticipant") ;
+    private CoordinatorCompletionCoordinatorEngine participant ;
+
+    public BusinessAgreementWithCoordinatorCompletionStub(final CoordinatorCompletionCoordinatorEngine participant)
+        throws Exception
+    {
+        this.participant = participant ;
+    }
+
+    public synchronized void close ()
+        throws WrongStateException, SystemException
+    {
+        /*
+         * Active -> illegal state
+         * Canceling -> illegal state
+         * Canceling-Active -> illegal state
+         * Canceling-Completing -> illegal state
+         * Completing -> illegal state
+         * Completed -> illegal state
+         * Closing -> no response
+         * Compensating -> illegal state
+         * Faulting -> illegal state
+         * Faulting-Active -> illegal state
+         * Faulting-Compensating -> 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
+         * Canceling-Active -> no response
+         * Canceling-Completing -> no response
+         * Completing -> illegal state
+         * Completed -> illegal state
+         * Closing -> illegal state
+         * Compensating -> illegal state
+         * Faulting -> illegal state
+         * Faulting-Active -> illegal state
+         * Faulting-Compensating -> illegal state
+         * Exiting -> illegal state
+         * Ended -> ended
+         */
+        final State state = participant.cancel() ;
+
+        if ((state == State.STATE_CANCELING) || (state == State.STATE_CANCELING_ACTIVE) ||
+            (state == State.STATE_CANCELING_COMPLETING))
+        {
+            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
+         * Canceling-Active -> illegal state
+         * Canceling-Completing -> illegal state
+         * Completing -> illegal state
+         * Completed -> illegal state
+         * Closing -> illegal state
+         * Compensating -> no response
+         * Faulting -> illegal state
+         * Faulting-Active -> illegal state
+         * Faulting-Compensating -> fault
+         * 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 -> illegal state
+         * Canceling-Active -> illegal state
+         * Canceling-Completing -> canceling
+         * Completing -> no response
+         * Completed -> completed
+         * Closing -> illegal state
+         * Compensating -> illegal state
+         * Faulting -> illegal state
+         * Faulting-Active -> illegal state
+         * Faulting-Compensating -> fault
+         * Exiting -> exiting
+         * Ended -> illegal state
+         */
+        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_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()) ;
+
+            // n.b. just use toString() for the endpoint -- it uses the writeTo() method which calls a suitable marshaller
+            final StringWriter sw = new StringWriter() ;
+            final XMLStreamWriter writer = SoapUtils.getXMLStreamWriter(sw) ;
+            StreamHelper.writeStartElement(writer, QNAME_BACCWS_PARTICIPANT) ;
+            String eprefText = participant.getParticipant().toString();
+            writer.writeCData(eprefText);
+            StreamHelper.writeEndElement(writer, null, null) ;
+            writer.close() ;
+
+            oos.packString(writer.toString()) ;
+
+            final State state = participant.getStatus();
+            final QName stateName = state.getValue();
+            final String ns = stateName.getNamespaceURI();
+            final String localPart = stateName.getLocalPart();
+            final String prefix = stateName.getPrefix();
+            oos.packString(ns != null ? ns : "");
+            oos.packString(localPart != null ? localPart : "");
+            oos.packString(prefix != null ? prefix : "");
+
+            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)
+    {
+        try
+        {
+            final String id = ios.unpackString();
+            final String eprValue = ios.unpackString();
+
+            final XMLStreamReader reader = SoapUtils.getXMLStreamReader(new StringReader(eprValue)) ;
+            StreamHelper.checkNextStartTag(reader, QNAME_BACCWS_PARTICIPANT) ;
+            String eprefText = reader.getText();
+            StreamSource source = new StreamSource(new StringReader(eprefText));
+            final W3CEndpointReference endpointReference = new W3CEndpointReference(source);
+
+            String ns = ios.unpackString();
+            final String localPart = ios.unpackString();
+            String prefix = ios.unpackString();
+            if ("".equals(ns)) {
+                ns = null;
+            }
+            if ("".equals(prefix)) {
+                prefix = null;
+            }
+
+            QName statename = new QName(ns, localPart, prefix);
+            State state = State.toState11(statename);
+
+            participant = new CoordinatorCompletionCoordinatorEngine(id, endpointReference, state);
+            return true ;
+        }
+        catch (final Throwable th)
+        {
+            WSTLogger.arjLoggerI18N.error("com.arjuna.wst.stub.BusinessAgreementWithCoordinatorCompletion11Stub_3", th) ;
+            return false ;
+        }
+    }
+}

Added: labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/wst11/stub/BusinessAgreementWithParticipantCompletionStub.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/wst11/stub/BusinessAgreementWithParticipantCompletionStub.java	                        (rev 0)
+++ labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/wst11/stub/BusinessAgreementWithParticipantCompletionStub.java	2008-01-25 17:18:13 UTC (rev 18124)
@@ -0,0 +1,243 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. 
+ * 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: BusinessAgreementWithParticipantCompletionStub.java,v 1.1.2.2 2004/06/18 15:06:09 nmcl Exp $
+ */
+
+package com.arjuna.wst11.stub;
+
+import java.io.StringWriter;
+import java.io.StringReader;
+
+import javax.xml.namespace.QName;
+import javax.xml.stream.XMLStreamReader;
+import javax.xml.stream.XMLStreamWriter;
+import javax.xml.ws.wsaddressing.W3CEndpointReference;
+import javax.xml.transform.stream.StreamSource;
+
+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.webservices11.wsba.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.wst11.messaging.engines.ParticipantCompletionCoordinatorEngine;
+
+public class BusinessAgreementWithParticipantCompletionStub implements BusinessAgreementWithParticipantCompletionParticipant, PersistableParticipant
+{
+    private static final QName QNAME_BAPCWS_PARTICIPANT = new QName("bapcwsParticipant") ;
+
+    private ParticipantCompletionCoordinatorEngine participant ;
+
+    public BusinessAgreementWithParticipantCompletionStub(final ParticipantCompletionCoordinatorEngine 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
+         * Faulting -> illegal state
+         * Faulting-Active -> illegal state
+         * Faulting-Compensating -> 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
+         * Faulting -> illegal state
+         * Faulting-Active -> illegal state
+         * Faulting-Compensating -> illegal state
+         * Exiting -> illegal state
+         * Ended -> ended
+         */
+        final State state = participant.cancel() ;
+
+        if (state == State.STATE_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 -> illegal state
+         * Completed -> illegal state
+         * Closing -> illegal state
+         * Compensating -> no answer
+         * Faulting -> illegal state
+         * Faulting-Active -> illegal state
+         * Faulting-Compensating -> fault
+         * 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()) ;
+
+            // n.b. just use toString() for the endpoint -- it uses the writeTo() method which calls a suitable marshaller
+            final StringWriter sw = new StringWriter() ;
+            final XMLStreamWriter writer = SoapUtils.getXMLStreamWriter(sw) ;
+            StreamHelper.writeStartElement(writer, QNAME_BAPCWS_PARTICIPANT) ;
+            String eprefText = participant.getParticipant().toString();
+            writer.writeCData(eprefText);
+            StreamHelper.writeEndElement(writer, null, null) ;
+            writer.close() ;
+
+            oos.packString(writer.toString()) ;
+
+            final State state = participant.getStatus();
+            final QName stateName = state.getValue();
+            final String ns = stateName.getNamespaceURI();
+            final String localPart = stateName.getLocalPart();
+            final String prefix = stateName.getPrefix();
+            oos.packString(ns != null ? ns : "");
+            oos.packString(localPart != null ? localPart : "");
+            oos.packString(prefix != null ? prefix : "");
+
+            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)
+    {
+        try
+        {
+            final String id = ios.unpackString() ;
+            final String eprValue = ios.unpackString() ;
+
+            // this should successfully reverse the save process
+            final XMLStreamReader reader = SoapUtils.getXMLStreamReader(new StringReader(eprValue)) ;
+            StreamHelper.checkNextStartTag(reader, QNAME_BAPCWS_PARTICIPANT) ;
+            String eprefText = reader.getText();
+            StreamSource source = new StreamSource(new StringReader(eprefText));
+            final W3CEndpointReference endpointReference = new W3CEndpointReference(source);
+
+            String ns = ios.unpackString();
+            final String localPart = ios.unpackString();
+            String prefix = ios.unpackString();
+            if ("".equals(ns)) {
+                ns = null;
+            }
+            if ("".equals(prefix)) {
+                prefix = null;
+            }
+
+            QName statename = new QName(ns, localPart, prefix);
+            State state = State.toState11(statename);
+
+            participant = new ParticipantCompletionCoordinatorEngine(id, endpointReference, state);
+            return true ;
+        }
+        catch (final Throwable th)
+        {
+            WSTLogger.arjLoggerI18N.error("com.arjuna.wst.stub.BusinessAgreementWithParticipantCompletion11Stub_3", th) ;
+            return false ;
+        }
+    }
+}
\ No newline at end of file

Added: labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/wst11/stub/CompletionStub.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/wst11/stub/CompletionStub.java	                        (rev 0)
+++ labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/wst11/stub/CompletionStub.java	2008-01-25 17:18:13 UTC (rev 18124)
@@ -0,0 +1,224 @@
+package com.arjuna.wst11.stub;
+
+import com.arjuna.webservices.SoapFault;
+import com.arjuna.webservices11.wsaddr.AddressingHelper;
+import com.arjuna.webservices11.wsarj.ArjunaContext;
+import com.arjuna.webservices11.wsarj.InstanceIdentifier;
+import com.arjuna.webservices11.wsat.client.CompletionCoordinatorClient;
+import com.arjuna.webservices11.wsat.processors.CompletionInitiatorCallback;
+import com.arjuna.webservices11.wsat.processors.CompletionInitiatorProcessor;
+import com.arjuna.webservices.wsarjtx.ArjunaTXConstants;
+import com.arjuna.wsc11.messaging.MessageId;
+import com.arjuna.wst.SystemException;
+import com.arjuna.wst.TransactionRolledBackException;
+import com.arjuna.wst.UnknownTransactionException;
+import org.oasis_open.docs.ws_tx.wsat._2006._06.Notification;
+
+import javax.xml.ws.addressing.AddressingProperties;
+import javax.xml.ws.wsaddressing.W3CEndpointReference;
+
+public class CompletionStub implements
+		com.arjuna.wst.CompletionCoordinatorParticipant
+{
+    private W3CEndpointReference _completionCoordinator = null;
+    private String _id;
+
+	public CompletionStub(final String id, final W3CEndpointReference completionCoordinator)
+			throws Exception
+	{
+		_completionCoordinator = completionCoordinator;
+		_id = id;
+	}
+
+	public void commit () throws TransactionRolledBackException,
+            UnknownTransactionException, SystemException
+    {
+        final AddressingProperties addressingProperties = AddressingHelper.createNotificationContext(MessageId.getMessageId()) ;
+
+        final CompletionStub.RequestCallback callback = new CompletionStub.RequestCallback() ;
+        final CompletionInitiatorProcessor completionInitiator = CompletionInitiatorProcessor.getProcessor() ;
+        completionInitiator.registerCallback(_id, callback) ;
+        try
+        {
+            CompletionCoordinatorClient.getClient().sendCommit(_completionCoordinator, addressingProperties, 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) && ArjunaTXConstants.UNKNOWNTRANSACTION_ERROR_CODE_QNAME.equals(soapFault.getSubcode()))
+            {
+                throw new UnknownTransactionException();
+            }
+        }
+
+        throw new SystemException() ;
+	}
+
+	public void rollback () throws UnknownTransactionException, SystemException
+	{
+        final AddressingProperties addressingProperties = AddressingHelper.createNotificationContext(MessageId.getMessageId()) ;
+
+        final CompletionStub.RequestCallback callback = new CompletionStub.RequestCallback() ;
+        final CompletionInitiatorProcessor completionInitiator = CompletionInitiatorProcessor.getProcessor() ;
+        completionInitiator.registerCallback(_id, callback) ;
+        try
+        {
+            CompletionCoordinatorClient.getClient().sendRollback(_completionCoordinator, addressingProperties, 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) && ArjunaTXConstants.UNKNOWNTRANSACTION_ERROR_CODE_QNAME.equals(soapFault.getSubcode()))
+            {
+                throw new UnknownTransactionException();
+            }
+        }
+
+        throw new SystemException() ;
+	}
+
+    private static class RequestCallback extends CompletionInitiatorCallback
+    {
+        /**
+         * The addressing context.
+         */
+        private AddressingProperties addressingProperties ;
+        /**
+         * The arjuna context.
+         */
+        private ArjunaContext arjunaContext ;
+        /**
+         * 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.
+         */
+        AddressingProperties getAddressingProperties()
+        {
+            return addressingProperties ;
+        }
+
+        /**
+         * Get the arjuna context.
+         * @return The arjuna context.
+         */
+        ArjunaContext getArjunaContext()
+        {
+            return arjunaContext ;
+        }
+
+        /**
+         * 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 addressingProperties The addressing context.
+         * @param arjunaContext The arjuna context.
+         */
+        public void aborted(final Notification aborted, final AddressingProperties addressingProperties,
+            final ArjunaContext arjunaContext)
+        {
+            this.aborted = true ;
+            this.addressingProperties = addressingProperties ;
+            this.arjunaContext = arjunaContext ;
+        }
+
+        /**
+         * An committed response.
+         * @param committed The committed notification.
+         * @param addressingProperties The addressing context.
+         * @param arjunaContext The arjuna context.
+         */
+        public void committed(final Notification committed, final AddressingProperties addressingProperties,
+            final ArjunaContext arjunaContext)
+        {
+            this.committed  = true ;
+            this.addressingProperties = addressingProperties ;
+            this.arjunaContext = arjunaContext ;
+        }
+
+        /**
+         * A SOAP fault response.
+         * @param soapFault The SOAP fault.
+         * @param addressingProperties The addressing context.
+         * @param arjunaContext The arjuna context.
+         */
+        public void soapFault(final SoapFault soapFault, final AddressingProperties addressingProperties,
+            final ArjunaContext arjunaContext)
+        {
+            this.soapFault = soapFault ;
+            this.addressingProperties = addressingProperties ;
+            this.arjunaContext = arjunaContext ;
+        }
+    }
+}

Added: labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/wst11/stub/Durable2PCStub.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/wst11/stub/Durable2PCStub.java	                        (rev 0)
+++ labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/wst11/stub/Durable2PCStub.java	2008-01-25 17:18:13 UTC (rev 18124)
@@ -0,0 +1,20 @@
+package com.arjuna.wst11.stub;
+
+import com.arjuna.wst.Durable2PCParticipant;
+import com.arjuna.wst11.stub.ParticipantStub;
+
+import javax.xml.ws.wsaddressing.W3CEndpointReference;
+
+public class Durable2PCStub extends ParticipantStub implements Durable2PCParticipant
+{
+    // default ctor for crash recovery
+    public Durable2PCStub() throws Exception {
+        super(null, true, null);
+    }
+
+    public Durable2PCStub(final String id, final W3CEndpointReference twoPCParticipant)
+        throws Exception
+    {
+        super(id, true, twoPCParticipant) ;
+    }
+}

Added: labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/wst11/stub/ParticipantStub.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/wst11/stub/ParticipantStub.java	                        (rev 0)
+++ labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/wst11/stub/ParticipantStub.java	2008-01-25 17:18:13 UTC (rev 18124)
@@ -0,0 +1,204 @@
+package com.arjuna.wst11.stub;
+
+import com.arjuna.wst.*;
+import com.arjuna.wst.stub.SystemCommunicationException;
+import com.arjuna.wst11.messaging.engines.CoordinatorEngine;
+import com.arjuna.webservices11.wsat.State;
+import com.arjuna.webservices.soap.SoapUtils;
+import com.arjuna.webservices.util.StreamHelper;
+import com.arjuna.webservices.logging.WSTLogger;
+import com.arjuna.ats.arjuna.state.OutputObjectState;
+import com.arjuna.ats.arjuna.state.InputObjectState;
+
+import javax.xml.namespace.QName;
+import javax.xml.stream.XMLStreamWriter;
+import javax.xml.stream.XMLStreamReader;
+import javax.xml.ws.wsaddressing.W3CEndpointReference;
+import javax.xml.transform.stream.StreamSource;
+import java.io.StringWriter;
+import java.io.StringReader;
+
+public class ParticipantStub implements Participant, PersistableParticipant
+{
+    private static final QName QNAME_TWO_PC_PARTICIPANT = new QName("twoPCParticipant") ;
+    private CoordinatorEngine coordinator ;
+
+    public ParticipantStub(final String id, final boolean durable, final W3CEndpointReference twoPCParticipant)
+        throws Exception
+    {
+        coordinator = new CoordinatorEngine(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)
+            {
+                // typically means no response from the remote end.
+                // throw a comm exception to distinguish this case from the
+                // one where the remote end itself threw a SystemException.
+                throw new SystemCommunicationException();
+            }
+            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()) ;
+
+            // n.b. just use toString() for the endpoint -- it uses the writeTo() method which calls a suitable marshaller
+            final StringWriter sw = new StringWriter() ;
+            final XMLStreamWriter writer = SoapUtils.getXMLStreamWriter(sw) ;
+            StreamHelper.writeStartElement(writer, QNAME_TWO_PC_PARTICIPANT) ;
+            String eprefText = coordinator.getParticipant().toString();
+            writer.writeCData(eprefText);
+            StreamHelper.writeEndElement(writer, null, null) ;
+            writer.close() ;
+            sw.close();
+
+            String tmp = writer.toString();
+            String swString = sw.toString();
+            oos.packString(swString) ;
+
+            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() ;
+
+            // this should successfully reverse the save process
+            final XMLStreamReader reader = SoapUtils.getXMLStreamReader(new StringReader(eprValue)) ;
+            StreamHelper.checkNextStartTag(reader, QNAME_TWO_PC_PARTICIPANT) ;
+            String eprefText = reader.getText();
+            StreamSource source = new StreamSource(new StringReader(eprefText));
+            final W3CEndpointReference endpointReference = new W3CEndpointReference(source);
+            coordinator = new CoordinatorEngine(id, durable, endpointReference, State.STATE_PREPARED_SUCCESS) ;
+            return true ;
+        }
+        catch (final Throwable th)
+        {
+            WSTLogger.arjLoggerI18N.error("com.arjuna.wst.stub.Participant11Stub_2", th) ;
+            return false ;
+        }
+    }
+}

Added: labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/wst11/stub/Volatile2PCStub.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/wst11/stub/Volatile2PCStub.java	                        (rev 0)
+++ labs/jbosstm/workspace/adinn/XTSGF/WS-T/dev/src/com/arjuna/wst11/stub/Volatile2PCStub.java	2008-01-25 17:18:13 UTC (rev 18124)
@@ -0,0 +1,15 @@
+package com.arjuna.wst11.stub;
+
+import com.arjuna.wst.Volatile2PCParticipant;
+import com.arjuna.wst11.stub.ParticipantStub;
+
+import javax.xml.ws.wsaddressing.W3CEndpointReference;
+
+public class Volatile2PCStub extends ParticipantStub implements Volatile2PCParticipant
+{
+    public Volatile2PCStub(final String id, final W3CEndpointReference twoPCParticipant)
+        throws Exception
+    {
+        super(id, false, twoPCParticipant) ;
+    }
+}

Modified: labs/jbosstm/workspace/adinn/XTSGF/WSCF/build.xml
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WSCF/build.xml	2008-01-25 17:05:33 UTC (rev 18123)
+++ labs/jbosstm/workspace/adinn/XTSGF/WSCF/build.xml	2008-01-25 17:18:13 UTC (rev 18124)
@@ -150,9 +150,9 @@
 		<copy file="xml/SagasHLSImple.xml"
 		tofile="${com.arjuna.mwlabs.wscf.dest}/com/arjuna/mwlabs/wscf/model/sagas/arjunacore/SagasHLSImple.xml"/>
 		<copy file="xml/TwoPhase11HLSImple.xml"
-		tofile="${com.arjuna.mwlabs.wscf.dest}/com/arjuna/mwlabs/wscf/model/twophase/arjunacore/TwoPhase11HLSImple.xml"/>
+		tofile="${com.arjuna.mwlabs.wscf.dest}/com/arjuna/mwlabs/wscf11/model/twophase/arjunacore/TwoPhaseHLSImple.xml"/>
 		<copy file="xml/Sagas11HLSImple.xml"
-		tofile="${com.arjuna.mwlabs.wscf.dest}/com/arjuna/mwlabs/wscf/model/sagas/arjunacore/Sagas11HLSImple.xml"/>
+		tofile="${com.arjuna.mwlabs.wscf.dest}/com/arjuna/mwlabs/wscf11/model/sagas/arjunacore/SagasHLSImple.xml"/>
 		<copy file="xml/JTAHLSImple.xml"
 		tofile="${com.arjuna.mwlabs.wscf.dest}/com/arjuna/mwlabs/wscf/model/jta/arjunajta/JTAHLSImple.xml"/>
 

Deleted: labs/jbosstm/workspace/adinn/XTSGF/WSCF/classes/com/arjuna/mw/wsc/context/ContextWS.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WSCF/classes/com/arjuna/mw/wsc/context/ContextWS.java	2008-01-25 17:05:33 UTC (rev 18123)
+++ labs/jbosstm/workspace/adinn/XTSGF/WSCF/classes/com/arjuna/mw/wsc/context/ContextWS.java	2008-01-25 17:18:13 UTC (rev 18124)
@@ -1,17 +0,0 @@
-package com.arjuna.mw.wsc.context;
-
-import org.oasis_open.docs.ws_tx.wscoor._2006._06.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 ContextWS
-{
-
-    public CoordinationContextType getCoordinationContext ();
-
-    public void setCoordinationContext (CoordinationContextType cc);
-}

Deleted: labs/jbosstm/workspace/adinn/XTSGF/WSCF/classes/com/arjuna/mw/wsc/deploy/WSCFWSInitialisation.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WSCF/classes/com/arjuna/mw/wsc/deploy/WSCFWSInitialisation.java	2008-01-25 17:05:33 UTC (rev 18123)
+++ labs/jbosstm/workspace/adinn/XTSGF/WSCF/classes/com/arjuna/mw/wsc/deploy/WSCFWSInitialisation.java	2008-01-25 17:18:13 UTC (rev 18124)
@@ -1,80 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. 
- * 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.mw.wsc.deploy;
-
-import com.arjuna.mw.wscf.logging.wscfLogger;
-import com.arjuna.mwlabs.wsc.ContextFactoryMapperWSImple;
-import com.arjuna.services.framework.startup.Sequencer;
-import com.arjuna.wsc.ContextFactoryMapper;
-import com.arjuna.wsc.ContextFactoryMapperWS;
-
-import javax.servlet.ServletContextEvent;
-import javax.servlet.ServletContextListener;
-
-/**
- * Initialise WSCF.
- * @author kevin
- */
-public class WSCFWSInitialisation implements ServletContextListener
-{
-    /**
-     * The context has been initialized.
-     * @param servletContextEvent The servlet context event.
-     *
-     * @message com.arjuna.mw.wsc.deploy.WSCFWSI_1 [com.arjuna.mw.wsc.deploy.WSCFWSI_1] - WSCFWS Initialisation: init failed:
-     */
-    public void contextInitialized(final ServletContextEvent servletContextEvent)
-    {
-        Sequencer.Callback callback = new Sequencer.Callback(Sequencer.SEQUENCE_WSCOOR11, Sequencer.WEBAPP_WSCF11) {
-           public void run() {
-               try
-               {
-                   // no need for this as WSCF init wil already have initialised via wscf.xml
-
-                   // Configuration.initialise("/wscf.xml");
-
-                   final ContextFactoryMapperWS wscfwsImpl = ContextFactoryMapperWS.getFactory() ;
-
-                   wscfwsImpl.setSubordinateContextFactoryMapper(new ContextFactoryMapperWSImple());
-               }
-               catch (Exception exception)
-               {
-                   wscfLogger.arjLoggerI18N.error("com.arjuna.mw.wsc.deploy.WSCFWSI_1", exception);
-               }
-               catch (Error error)
-               {
-                   wscfLogger.arjLoggerI18N.error("com.arjuna.mw.wsc.deploy.WSCFWSI_1", error);
-               }
-           }
-        };
-        // this is the last WSCF callback to be initialised so close the list
-        Sequencer.close(Sequencer.SEQUENCE_WSCOOR11, Sequencer.WEBAPP_WSCF11);
-
-    }
-
-    /**
-     * The context is about to be destroyed.
-     * @param servletContextEvent The servlet context event.
-     */
-    public void contextDestroyed(final ServletContextEvent servletContextEvent)
-    {
-    }
-}
\ No newline at end of file

Added: labs/jbosstm/workspace/adinn/XTSGF/WSCF/classes/com/arjuna/mw/wsc11/context/Context.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WSCF/classes/com/arjuna/mw/wsc11/context/Context.java	                        (rev 0)
+++ labs/jbosstm/workspace/adinn/XTSGF/WSCF/classes/com/arjuna/mw/wsc11/context/Context.java	2008-01-25 17:18:13 UTC (rev 18124)
@@ -0,0 +1,17 @@
+package com.arjuna.mw.wsc11.context;
+
+import org.oasis_open.docs.ws_tx.wscoor._2006._06.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 Context
+{
+
+    public CoordinationContextType getCoordinationContext ();
+
+    public void setCoordinationContext (CoordinationContextType cc);
+}

Added: labs/jbosstm/workspace/adinn/XTSGF/WSCF/classes/com/arjuna/mw/wsc11/deploy/WSCFInitialisation.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WSCF/classes/com/arjuna/mw/wsc11/deploy/WSCFInitialisation.java	                        (rev 0)
+++ labs/jbosstm/workspace/adinn/XTSGF/WSCF/classes/com/arjuna/mw/wsc11/deploy/WSCFInitialisation.java	2008-01-25 17:18:13 UTC (rev 18124)
@@ -0,0 +1,79 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. 
+ * 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.mw.wsc11.deploy;
+
+import com.arjuna.mw.wscf.logging.wscfLogger;
+import com.arjuna.mwlabs.wsc11.ContextFactoryMapperImple;
+import com.arjuna.services.framework.startup.Sequencer;
+import com.arjuna.wsc11.ContextFactoryMapper;
+
+import javax.servlet.ServletContextEvent;
+import javax.servlet.ServletContextListener;
+
+/**
+ * Initialise WSCF.
+ * @author kevin
+ */
+public class WSCFInitialisation implements ServletContextListener
+{
+    /**
+     * The context has been initialized.
+     * @param servletContextEvent The servlet context event.
+     *
+     * @message com.arjuna.mw.wsc.deploy.WSCF11I_1 [com.arjuna.mw.wsc.deploy.WSCF11I_1] - WSCF11 Initialisation: init failed:
+     */
+    public void contextInitialized(final ServletContextEvent servletContextEvent)
+    {
+        Sequencer.Callback callback = new Sequencer.Callback(Sequencer.SEQUENCE_WSCOOR11, Sequencer.WEBAPP_WSCF11) {
+           public void run() {
+               try
+               {
+                   // no need for this as WSCF init wil already have initialised via wscf.xml
+
+                   // Configuration.initialise("/wscf.xml");
+
+                   final ContextFactoryMapper WSCF11Impl = ContextFactoryMapper.getFactory() ;
+
+                   WSCF11Impl.setSubordinateContextFactoryMapper(new ContextFactoryMapperImple());
+               }
+               catch (Exception exception)
+               {
+                   wscfLogger.arjLoggerI18N.error("com.arjuna.mw.wsc.deploy.WSCF11I_1", exception);
+               }
+               catch (Error error)
+               {
+                   wscfLogger.arjLoggerI18N.error("com.arjuna.mw.wsc.deploy.WSCF11I_1", error);
+               }
+           }
+        };
+        // this is the last WSCF callback to be initialised so close the list
+        Sequencer.close(Sequencer.SEQUENCE_WSCOOR11, Sequencer.WEBAPP_WSCF11);
+
+    }
+
+    /**
+     * The context is about to be destroyed.
+     * @param servletContextEvent The servlet context event.
+     */
+    public void contextDestroyed(final ServletContextEvent servletContextEvent)
+    {
+    }
+}
\ No newline at end of file

Modified: labs/jbosstm/workspace/adinn/XTSGF/WSCF/classes/com/arjuna/mw/wscf/common/Environment.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WSCF/classes/com/arjuna/mw/wscf/common/Environment.java	2008-01-25 17:05:33 UTC (rev 18123)
+++ labs/jbosstm/workspace/adinn/XTSGF/WSCF/classes/com/arjuna/mw/wscf/common/Environment.java	2008-01-25 17:18:13 UTC (rev 18124)
@@ -46,7 +46,5 @@
     public static final String TWO_PHASE_CONTEXT = "com.arjuna.mw.wscf.protocols.twophase.context";
     public static final String SAGAS_CONTEXT = "com.arjuna.mw.wscf.protocols.sagas.context";
     
-    public static final String PROTOCOLWS_IMPLEMENTATION = "com.arjuna.mw.wscf11.protocolImplementation";
-    public static final String TWO_PHASEWS_CONTEXT = "com.arjuna.mw.wscf11.protocols.twophase.context";
     public static final String SAGASWS_CONTEXT = "com.arjuna.mw.wscf11.protocols.sagas.context";
 }

Deleted: labs/jbosstm/workspace/adinn/XTSGF/WSCF/classes/com/arjuna/mw/wscf/model/sagas/CoordinatorManager11Factory.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WSCF/classes/com/arjuna/mw/wscf/model/sagas/CoordinatorManager11Factory.java	2008-01-25 17:05:33 UTC (rev 18123)
+++ labs/jbosstm/workspace/adinn/XTSGF/WSCF/classes/com/arjuna/mw/wscf/model/sagas/CoordinatorManager11Factory.java	2008-01-25 17:18:13 UTC (rev 18124)
@@ -1,162 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. 
- * 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: CoordinatorManagerFactory.java,v 1.4 2005/05/19 12:13:23 nmcl Exp $
- */
-
-package com.arjuna.mw.wscf.model.sagas;
-
-import com.arjuna.mw.wscf.logging.wscfLogger;
-
-import com.arjuna.mw.wscf.model.sagas.hls.SagasHLS;
-import com.arjuna.mw.wscf.model.sagas.api.CoordinatorManager;
-
-import com.arjuna.mw.wsas.exceptions.SystemException;
-
-import com.arjuna.mwlabs.wscf.utils.ProtocolLocator;
-
-import com.arjuna.mw.wscf.common.CoordinatorXSD;
-
-import com.arjuna.mw.wscf.protocols.*;
-import com.arjuna.mw.wscf.utils.*;
-
-import com.arjuna.mw.wscf.exceptions.ProtocolNotRegisteredException;
-
-import java.util.HashMap;
-
-import com.arjuna.mwlabs.wscf.model.sagas.arjunacore.Sagas11HLSImple;
-
-/**
- * The factory to return the specific CoordinatorManager implementation.
- *
- * @author Mark Little (mark.little at arjuna.com)
- * @version $Id: CoordinatorManagerFactory.java,v 1.4 2005/05/19 12:13:23 nmcl Exp $
- * @since 1.0.
- */
-
-public class CoordinatorManager11Factory
-{
-
-
-    /**
-     * @exception com.arjuna.mw.wscf.exceptions.ProtocolNotRegisteredException Thrown if the default
-     * protocol is not available.
-     *
-     * @return the CoordinatorManager implementation to use. The default
-     * coordination protocol is used (two-phase commit) with its
-     * associated implementation.
-     *
-     * @message com.arjuna.mw.wscf.model.sagas.CMF11_1 [com.arjuna.mw.wscf.model.sagas.CMF11_1] - Failed to create
-     */
-
-    public static CoordinatorManager coordinatorManager () throws ProtocolNotRegisteredException, SystemException
-    {
-	try
-	{
-	    ProtocolLocator pl = new ProtocolLocator(Sagas11HLSImple.className());
-	    org.w3c.dom.Document doc = pl.getProtocol();
-
-	    if (doc == null)
-	    {
-		wscfLogger.arjLoggerI18N.warn("com.arjuna.mw.wscf.model.sagas.CMF11_1",
-					      new Object[]{Sagas11HLSImple.className()});
-    }
-	    else
-		return coordinatorManager(doc);
-	}
-	catch (Exception ex)
-	{
-	    ex.printStackTrace();
-
-	    throw new SystemException(ex.toString());
-	}
-
-	return null;
-    }
-
-    /**
-     * Obtain a reference to a coordinator that implements the specified
-     * protocol.
-     *
-     * @param protocol The XML definition of the type of
-     * coordination protocol required.
-     *
-     * @exception com.arjuna.mw.wscf.exceptions.ProtocolNotRegisteredException Thrown if the requested
-     * protocol is not available.
-     *
-     * @return the CoordinatorManager implementation to use.
-     */
-
-    /*
-     * Have the type specified in XML. More data may be specified, which
-     * can be passed to the implementation in the same way ObjectName was.
-     */
-
-    public static CoordinatorManager coordinatorManager (org.w3c.dom.Document protocol) throws ProtocolNotRegisteredException, SystemException
-    {
-	try
-	{
-	    synchronized (_implementations)
-	    {
-		org.w3c.dom.Text child = DomUtil.getTextNode(protocol, CoordinatorXSD.coordinatorType);
-		String protocolType = child.getNodeValue();
-		SagasHLS coordHLS = (SagasHLS) _implementations.get(protocolType);
-
-		if (coordHLS == null)
-		{
-		    Object implementation = _protocolManager.getProtocolImplementation(protocol);
-
-		    if (implementation instanceof String)
-		    {
-			Class c = Class.forName((String) implementation);
-
-			coordHLS = (SagasHLS) c.newInstance();
-		    }
-		    else
-			coordHLS = (SagasHLS) implementation;
-
-		    _implementations.put(protocolType, coordHLS);
-		}
-
-		return coordHLS.coordinatorManager();
-	    }
-	}
-	catch (ProtocolNotRegisteredException ex)
-	{
-	    throw ex;
-	}
-	catch (Exception ex)
-	{
-	    throw new SystemException(ex.toString());
-	}
-    }
-
-    private static ProtocolManagerWS _protocolManager = ProtocolRegistryWS.sharedManager();
-    private static HashMap         _implementations = new HashMap();
-
-}
\ No newline at end of file

Deleted: labs/jbosstm/workspace/adinn/XTSGF/WSCF/classes/com/arjuna/mw/wscf/model/sagas/UserCoordinator11Factory.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WSCF/classes/com/arjuna/mw/wscf/model/sagas/UserCoordinator11Factory.java	2008-01-25 17:05:33 UTC (rev 18123)
+++ labs/jbosstm/workspace/adinn/XTSGF/WSCF/classes/com/arjuna/mw/wscf/model/sagas/UserCoordinator11Factory.java	2008-01-25 17:18:13 UTC (rev 18124)
@@ -1,161 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. 
- * 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: UserCoordinatorFactory.java,v 1.4 2005/05/19 12:13:23 nmcl Exp $
- */
-
-package com.arjuna.mw.wscf.model.sagas;
-
-import com.arjuna.mw.wscf.logging.wscfLogger;
-
-import com.arjuna.mw.wscf.model.sagas.hls.SagasHLS;
-import com.arjuna.mw.wscf.model.sagas.api.UserCoordinator;
-
-import com.arjuna.mw.wsas.exceptions.SystemException;
-
-import com.arjuna.mwlabs.wscf.utils.ProtocolLocator;
-
-import com.arjuna.mw.wscf.common.CoordinatorXSD;
-
-import com.arjuna.mw.wscf.protocols.*;
-import com.arjuna.mw.wscf.utils.*;
-
-import com.arjuna.mw.wscf.exceptions.ProtocolNotRegisteredException;
-
-import java.util.HashMap;
-
-import com.arjuna.mwlabs.wscf.model.sagas.arjunacore.Sagas11HLSImple;
-
-/**
- * The factory which returns the UserCoordinator implementation to use.
- *
- * @author Mark Little (mark.little at arjuna.com)
- * @version $Id: UserCoordinatorFactory.java,v 1.4 2005/05/19 12:13:23 nmcl Exp $
- * @since 1.0.
- */
-
-public class UserCoordinator11Factory
-{
-
-    /**
-     * @exception com.arjuna.mw.wscf.exceptions.ProtocolNotRegisteredException Thrown if the default
-     * protocol is not available.
-     *
-     * @return the CoordinatorManager implementation to use. The default
-     * coordination protocol is used (two-phase commit) with its
-     * associated implementation.
-     *
-     * @message com.arjuna.mw.wscf.model.sagas.UCF11_1 [com.arjuna.mw.wscf.model.sagas.UCF11_1] - Failed to create
-     */
-
-    public static UserCoordinator userCoordinator () throws ProtocolNotRegisteredException, SystemException
-    {
-	try
-	{
-	    ProtocolLocator pl = new ProtocolLocator(Sagas11HLSImple.className());
-	    org.w3c.dom.Document doc = pl.getProtocol();
-
-	    if (doc == null)
-	    {
-		wscfLogger.arjLoggerI18N.warn("com.arjuna.mw.wscf.model.sagas.UCF11_1",
-					      new Object[]{Sagas11HLSImple.className()});
-	    }
-	    else
-		return userCoordinator(doc);
-	}
-	catch (Exception ex)
-	{
-	    ex.printStackTrace();
-
-	    throw new SystemException(ex.toString());
-	}
-
-	return null;
-    }
-
-    /**
-     * Obtain a reference to a coordinator that implements the specified
-     * protocol.
-     *
-     * @param protocol The XML definition of the type of
-     * coordination protocol required.
-     *
-     * @exception com.arjuna.mw.wscf.exceptions.ProtocolNotRegisteredException Thrown if the requested
-     * protocol is not available.
-     *
-     * @return the CoordinatorManager implementation to use.
-     */
-
-    /*
-     * Have the type specified in XML. More data may be specified, which
-     * can be passed to the implementation in the same way ObjectName was.
-     */
-
-    public static UserCoordinator userCoordinator (org.w3c.dom.Document protocol) throws ProtocolNotRegisteredException, SystemException
-    {
-	try
-	{
-	    synchronized (_implementations)
-	    {
-		org.w3c.dom.Text child = DomUtil.getTextNode(protocol, CoordinatorXSD.coordinatorType);
-		String protocolType = child.getNodeValue();
-		SagasHLS coordHLS = (SagasHLS) _implementations.get(protocolType);
-
-		if (coordHLS == null)
-		{
-		    Object implementation = _protocolManager.getProtocolImplementation(protocol);
-
-		    if (implementation instanceof String)
-		    {
-			Class c = Class.forName((String) implementation);
-
-			coordHLS = (SagasHLS) c.newInstance();
-		    }
-		    else
-			coordHLS = (SagasHLS) implementation;
-
-		    _implementations.put(protocolType, coordHLS);
-		}
-
-		return coordHLS.userCoordinator();
-	    }
-	}
-	catch (ProtocolNotRegisteredException ex)
-	{
-	    throw ex;
-	}
-	catch (Exception ex)
-	{
-	    throw new SystemException(ex.toString());
-	}
-    }
-
-    private static ProtocolManagerWS _protocolManager = ProtocolRegistryWS.sharedManager();
-    private static HashMap         _implementations = new HashMap();
-
-}
\ No newline at end of file

Deleted: labs/jbosstm/workspace/adinn/XTSGF/WSCF/classes/com/arjuna/mw/wscf/model/twophase/CoordinatorManager11Factory.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WSCF/classes/com/arjuna/mw/wscf/model/twophase/CoordinatorManager11Factory.java	2008-01-25 17:05:33 UTC (rev 18123)
+++ labs/jbosstm/workspace/adinn/XTSGF/WSCF/classes/com/arjuna/mw/wscf/model/twophase/CoordinatorManager11Factory.java	2008-01-25 17:18:13 UTC (rev 18124)
@@ -1,161 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. 
- * 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: CoordinatorManagerFactory.java,v 1.8 2005/05/19 12:13:25 nmcl Exp $
- */
-
-package com.arjuna.mw.wscf.model.twophase;
-
-import com.arjuna.mw.wscf.logging.wscfLogger;
-
-import com.arjuna.mw.wscf.model.twophase.hls.TwoPhaseHLS;
-import com.arjuna.mw.wscf.model.twophase.api.CoordinatorManager;
-
-import com.arjuna.mw.wsas.exceptions.SystemException;
-
-import com.arjuna.mwlabs.wscf.utils.ProtocolLocator;
-
-import com.arjuna.mw.wscf.common.CoordinatorXSD;
-
-import com.arjuna.mw.wscf.protocols.*;
-import com.arjuna.mw.wscf.utils.*;
-
-import com.arjuna.mw.wscf.exceptions.ProtocolNotRegisteredException;
-
-import java.util.HashMap;
-
-import com.arjuna.mwlabs.wscf.model.twophase.arjunacore.TwoPhase11HLSImple;
-
-/**
- * The factory to return the specific CoordinatorManager implementation.
- *
- * @author Mark Little (mark.little at arjuna.com)
- * @version $Id: CoordinatorManagerFactory.java,v 1.8 2005/05/19 12:13:25 nmcl Exp $
- * @since 1.0.
- */
-
-public class CoordinatorManager11Factory
-{
-
-    /**
-     * @exception com.arjuna.mw.wscf.exceptions.ProtocolNotRegisteredException Thrown if the default
-     * protocol is not available.
-     *
-     * @return the CoordinatorManager implementation to use. The default
-     * coordination protocol is used (two-phase commit) with its
-     * associated implementation.
-     *
-     * @message com.arjuna.mw.wscf.model.twophase.CMF11_1 [com.arjuna.mw.wscf.model.twophase.CMF11_1] - Failed to create
-     */
-
-    public static CoordinatorManager coordinatorManager () throws ProtocolNotRegisteredException, SystemException
-    {
-	try
-	{
-	    ProtocolLocator pl = new ProtocolLocator(TwoPhase11HLSImple.className());
-	    org.w3c.dom.Document doc = pl.getProtocol();
-
-	    if (doc == null)
-	    {
-		wscfLogger.arjLoggerI18N.warn("com.arjuna.mw.wscf.model.twophase.CMF11_1",
-					      new Object[]{TwoPhase11HLSImple.className()});
-	    }
-	    else
-		return coordinatorManager(doc);
-	}
-	catch (Exception ex)
-	{
-	    ex.printStackTrace();
-
-	    throw new SystemException(ex.toString());
-	}
-
-	return null;
-    }
-
-    /**
-     * Obtain a reference to a coordinator that implements the specified
-     * protocol.
-     *
-     * @param protocol The XML definition of the type of
-     * coordination protocol required.
-     *
-     * @exception com.arjuna.mw.wscf.exceptions.ProtocolNotRegisteredException Thrown if the requested
-     * protocol is not available.
-     *
-     * @return the CoordinatorManager implementation to use.
-     */
-
-    /*
-     * Have the type specified in XML. More data may be specified, which
-     * can be passed to the implementation in the same way ObjectName was.
-     */
-
-    public static CoordinatorManager coordinatorManager (org.w3c.dom.Document protocol) throws ProtocolNotRegisteredException, SystemException
-    {
-	try
-	{
-	    synchronized (_implementations)
-	    {
-		org.w3c.dom.Text child = DomUtil.getTextNode(protocol, CoordinatorXSD.coordinatorType);
-		String protocolType = child.getNodeValue();
-		TwoPhaseHLS coordHLS = (TwoPhaseHLS) _implementations.get(protocolType);
-
-		if (coordHLS == null)
-		{
-		    Object implementation = _protocolManager.getProtocolImplementation(protocol);
-
-		    if (implementation instanceof String)
-		    {
-			Class c = Class.forName((String) implementation);
-
-			coordHLS = (TwoPhaseHLS) c.newInstance();
-		    }
-		    else
-			coordHLS = (TwoPhaseHLS) implementation;
-
-		    _implementations.put(protocolType, coordHLS);
-		}
-
-		return coordHLS.coordinatorManager();
-	    }
-	}
-	catch (ProtocolNotRegisteredException ex)
-	{
-	    throw ex;
-	}
-	catch (Exception ex)
-	{
-	    throw new SystemException(ex.toString());
-	}
-    }
-
-    private static ProtocolManagerWS _protocolManager = ProtocolRegistryWS.sharedManager();
-    private static HashMap         _implementations = new HashMap();
-
-}
\ No newline at end of file

Deleted: labs/jbosstm/workspace/adinn/XTSGF/WSCF/classes/com/arjuna/mw/wscf/model/twophase/UserCoordinator11Factory.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WSCF/classes/com/arjuna/mw/wscf/model/twophase/UserCoordinator11Factory.java	2008-01-25 17:05:33 UTC (rev 18123)
+++ labs/jbosstm/workspace/adinn/XTSGF/WSCF/classes/com/arjuna/mw/wscf/model/twophase/UserCoordinator11Factory.java	2008-01-25 17:18:13 UTC (rev 18124)
@@ -1,161 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. 
- * 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: UserCoordinatorFactory.java,v 1.6 2005/05/19 12:13:25 nmcl Exp $
- */
-
-package com.arjuna.mw.wscf.model.twophase;
-
-import com.arjuna.mw.wscf.logging.wscfLogger;
-
-import com.arjuna.mw.wscf.model.twophase.hls.TwoPhaseHLS;
-import com.arjuna.mw.wscf.model.twophase.api.UserCoordinator;
-
-import com.arjuna.mw.wsas.exceptions.SystemException;
-
-import com.arjuna.mwlabs.wscf.utils.ProtocolLocator;
-
-import com.arjuna.mw.wscf.common.CoordinatorXSD;
-
-import com.arjuna.mw.wscf.protocols.*;
-import com.arjuna.mw.wscf.utils.*;
-
-import com.arjuna.mw.wscf.exceptions.ProtocolNotRegisteredException;
-
-import java.util.HashMap;
-
-import com.arjuna.mwlabs.wscf.model.twophase.arjunacore.TwoPhaseHLSImple;
-
-/**
- * The factory which returns the UserCoordinator implementation to use.
- *
- * @author Mark Little (mark.little at arjuna.com)
- * @version $Id: UserCoordinatorFactory.java,v 1.6 2005/05/19 12:13:25 nmcl Exp $
- * @since 1.0.
- */
-
-public class UserCoordinator11Factory
-{
-
-    /**
-     * @exception com.arjuna.mw.wscf.exceptions.ProtocolNotRegisteredException Thrown if the default
-     * protocol is not available.
-     *
-     * @return the CoordinatorManager implementation to use. The default
-     * coordination protocol is used (two-phase commit) with its
-     * associated implementation.
-     *
-     * @message com.arjuna.mw.wscf.model.twophase.UCF11_1 [com.arjuna.mw.wscf.model.twophase.UCF11_1] - Failed to create
-     */
-
-    public static UserCoordinator userCoordinator () throws ProtocolNotRegisteredException, SystemException
-    {
-	try
-	{
-	    ProtocolLocator pl = new ProtocolLocator(TwoPhaseHLSImple.className());
-	    org.w3c.dom.Document doc = pl.getProtocol();
-
-	    if (doc == null)
-	    {
-		wscfLogger.arjLoggerI18N.warn("com.arjuna.mw.wscf.model.twophase.UCF11_1",
-					      new Object[]{TwoPhaseHLSImple.className()});
-	    }
-	    else
-		return userCoordinator(doc);
-	}
-	catch (Exception ex)
-	{
-	    ex.printStackTrace();
-
-	    throw new SystemException(ex.toString());
-	}
-
-	return null;
-    }
-
-    /**
-     * Obtain a reference to a coordinator that implements the specified
-     * protocol.
-     *
-     * @param protocol The XML definition of the type of
-     * coordination protocol required.
-     *
-     * @exception com.arjuna.mw.wscf.exceptions.ProtocolNotRegisteredException Thrown if the requested
-     * protocol is not available.
-     *
-     * @return the CoordinatorManager implementation to use.
-     */
-
-    /*
-     * Have the type specified in XML. More data may be specified, which
-     * can be passed to the implementation in the same way ObjectName was.
-     */
-
-    public static UserCoordinator userCoordinator (org.w3c.dom.Document protocol) throws ProtocolNotRegisteredException, SystemException
-    {
-	try
-	{
-	    synchronized (_implementations)
-	    {
-		org.w3c.dom.Text child = DomUtil.getTextNode(protocol, CoordinatorXSD.coordinatorType);
-		String protocolType = child.getNodeValue();
-		TwoPhaseHLS coordHLS = (TwoPhaseHLS) _implementations.get(protocolType);
-
-		if (coordHLS == null)
-		{
-		    Object implementation = _protocolManager.getProtocolImplementation(protocol);
-
-		    if (implementation instanceof String)
-		    {
-			Class c = Class.forName((String) implementation);
-
-			coordHLS = (TwoPhaseHLS) c.newInstance();
-		    }
-		    else
-			coordHLS = (TwoPhaseHLS) implementation;
-
-		    _implementations.put(protocolType, coordHLS);
-		}
-
-		return coordHLS.userCoordinator();
-	    }
-	}
-	catch (ProtocolNotRegisteredException ex)
-	{
-	    throw ex;
-	}
-	catch (Exception ex)
-	{
-	    throw new SystemException(ex.toString());
-	}
-    }
-
-    private static ProtocolManagerWS _protocolManager = ProtocolRegistryWS.sharedManager();
-    private static HashMap         _implementations = new HashMap();
-
-}
\ No newline at end of file

Deleted: labs/jbosstm/workspace/adinn/XTSGF/WSCF/classes/com/arjuna/mw/wscf/protocols/ProtocolManagerWS.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WSCF/classes/com/arjuna/mw/wscf/protocols/ProtocolManagerWS.java	2008-01-25 17:05:33 UTC (rev 18123)
+++ labs/jbosstm/workspace/adinn/XTSGF/WSCF/classes/com/arjuna/mw/wscf/protocols/ProtocolManagerWS.java	2008-01-25 17:18:13 UTC (rev 18124)
@@ -1,447 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. 
- * 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: ProtocolManager.java,v 1.13 2005/05/19 12:13:28 nmcl Exp $
- */
-
-package com.arjuna.mw.wscf.protocols;
-
-import com.arjuna.mw.wscf.common.Environment;
-import com.arjuna.mw.wscf.exceptions.ProtocolAlreadyRegisteredException;
-import com.arjuna.mw.wscf.exceptions.ProtocolNotRegisteredException;
-import com.arjuna.mw.wscf.exceptions.UnknownProtocolImplementationException;
-import com.arjuna.mw.wscf.logging.wscfLogger;
-import com.arjuna.mw.wscf.utils.CoordinationXML;
-import com.arjuna.mwlabs.wscf.protocols.InitializerWS;
-import com.arjuna.mwlabs.wscf.protocols.ProtocolEntry;
-import com.arjuna.mwlabs.wscf.utils.ProtocolLocator;
-
-import java.util.Enumeration;
-import java.util.HashMap;
-import java.util.Properties;
-import java.util.Vector;
-
-/**
- * The ProtocolManager is the way in which protocol implementations may be
- * registered with the system.
- *
- * @author Mark Little (mark.little at arjuna.com)
- * @version $Id: ProtocolManager.java,v 1.13 2005/05/19 12:13:28 nmcl Exp $
- * @since 1.0.
- */
-
-public class ProtocolManagerWS
-{
-
-	/**
-	 * Add a specific protocol implementation to the factory. More than one
-	 * implementation may provide the same protocol. They may differ by
-	 * coordinator-name only.
-	 *
-	 * @param     protocol The XML definition of the protocol.
-	 * @param     className The name of the class that implements the specified
-	 *            protocol.
-	 *
-	 * @exception com.arjuna.mw.wscf.exceptions.ProtocolAlreadyRegisteredException
-	 *                Thrown if the exact same protocol definition has already
-	 *                been registered.
-	 * @exception IllegalArgumentException
-	 *                Thrown if either of the parameters is invalid.
-	 */
-
-	public void addProtocol (org.w3c.dom.Document protocol, Object className)
-			throws ProtocolAlreadyRegisteredException,
-			IllegalArgumentException
-	{
-		if ((protocol == null) || (className == null))
-			throw new IllegalArgumentException();
-
-		if (present(protocol))
-			throw new ProtocolAlreadyRegisteredException();
-		else
-		{
-			ProtocolEntry e = new ProtocolEntry(protocol, className);
-			Vector impls = (Vector) _protocols.get(e.protocolType());
-
-			if (impls == null)
-			{
-				impls = new Vector();
-
-				_protocols.put(e.protocolType(), impls);
-			}
-
-			impls.add(e);
-		}
-	}
-
-	/**
-	 * Replace a specific protocol implementation in the factory.
-	 *
-	 * @param     protocol The XML definition of the protocol.
-	 * @param     className The name of the class that implements the specified
-	 *            protocol.
-	 *
-	 * @exception com.arjuna.mw.wscf.exceptions.ProtocolNotRegisteredException
-	 *                Thrown if the protocol to be removed has not been
-	 *                registered.
-	 * @exception IllegalArgumentException
-	 *                Thrown if either of the parameters is invalid.
-	 */
-
-	public void replaceProtocol (org.w3c.dom.Document protocol, Object className)
-			throws ProtocolNotRegisteredException, IllegalArgumentException
-	{
-		synchronized (this)
-		{
-			CoordinationXML protocolDef = new CoordinationXML(protocol);
-			Vector impls = (Vector) _protocols.get(protocolDef.protocolType());
-			boolean found = false;
-
-			if (impls != null)
-			{
-				for (int i = 0; (i < impls.size()) && !found; i++)
-				{
-					ProtocolEntry entry = (ProtocolEntry) impls.elementAt(i);
-
-					// currently replaces only on type: should be exact match!
-
-					if (sameProtocolType(entry, protocolDef))
-					{
-						impls.remove(entry);
-
-						try
-						{
-							addProtocol(protocol, className);
-						}
-						catch (Exception ex)
-						{
-							throw new IllegalArgumentException(ex.toString());
-						}
-
-						found = true;
-					}
-				}
-			}
-
-			if (!found)
-				throw new ProtocolNotRegisteredException();
-		}
-	}
-
-	/**
-	 * @param     protocol The XML definition of the coordination protocol.
-	 *
-	 * @exception com.arjuna.mw.wscf.exceptions.ProtocolNotRegisteredException
-	 *                Thrown if the requested coordination protocol has not been
-	 *                registered.
-	 * @exception IllegalArgumentException
-	 *                Thrown if the parameter is invalid.
-	 *
-	 * @return The class that implements the specified coordination protocol.
-	 *
-	 * @message com.arjuna.mw.wscf.protocols.ProtocolManagerWS_1
-	 *          [com.arjuna.mw.wscf.protocols.ProtocolManagerWS_1] - Could not
-	 *          find protocol:
-	 */
-
-	public Object getProtocolImplementation (org.w3c.dom.Document protocol)
-			throws ProtocolNotRegisteredException, IllegalArgumentException
-	{
-		/*
-		 * Only checks the coordination-type via the hashtable. Now we need to
-		 * check the coordination-name.
-		 */
-
-		CoordinationXML protocolDef = new CoordinationXML(protocol);
-		Vector impls = (Vector) _protocols.get(protocolDef.protocolType());
-
-		if (impls != null)
-		{
-			for (int i = 0; i < impls.size(); i++)
-			{
-				ProtocolEntry entry = (ProtocolEntry) impls.elementAt(i);
-
-				if (sameProtocolType(entry, protocolDef))
-				{
-					return entry.implementationClass();
-				}
-			}
-		}
-
-		throw new ProtocolNotRegisteredException(
-				wscfLogger.log_mesg.getString("com.arjuna.mw.wscf.protocols.ProtocolManagerWS_1")
-						+ protocolDef.protocolType());
-	}
-
-	/**
-	 * Remove the specified protocol definition from the factory.
-	 *
-	 * @param     protocol The XML definition of the coordination protocol.
-	 *
-	 * @exception com.arjuna.mw.wscf.exceptions.ProtocolNotRegisteredException
-	 *                Thrown if the protocol to be removed has not been
-	 *                registered.
-	 * @exception IllegalArgumentException
-	 *                Thrown if the paramater is invalid (e.g., null).
-	 *
-	 * @return the protocol implementation removed.
-	 */
-
-	public Object removeProtocol (org.w3c.dom.Document protocol)
-			throws ProtocolNotRegisteredException, IllegalArgumentException
-	{
-		CoordinationXML protocolDef = new CoordinationXML(protocol);
-		Vector impls = (Vector) _protocols.get(protocolDef.protocolType());
-
-		if (impls != null)
-		{
-			for (int i = 0; i < impls.size(); i++)
-			{
-				ProtocolEntry entry = (ProtocolEntry) impls.elementAt(i);
-
-				if (sameProtocol(entry, protocolDef))
-				{
-					impls.remove(entry);
-
-					return entry.implementationClass();
-				}
-			}
-		}
-
-		throw new ProtocolNotRegisteredException();
-	}
-
-	/*
-	 * Do we need this?
-	 */
-
-	/**
-	 * Remove the specified coordination protocol implementation class from the
-	 * factory.
-	 *
-	 * @param     className The class to remove.
-	 *
-	 * @exception com.arjuna.mw.wscf.exceptions.UnknownProtocolImplementationException
-	 *                Thrown if the specified implementation class has not been
-	 *                registered.
-	 * @exception IllegalArgumentException
-	 *                Thrown if the parameter is invalid.
-	 *
-	 * @return the protocol implementation removed.
-	 */
-
-	public Object removeProtocolImplementation (Object className)
-			throws UnknownProtocolImplementationException,
-			IllegalArgumentException
-	{
-		throw new UnknownProtocolImplementationException();
-	}
-
-	/**
-	 * Is the document present exactly as it appears, i.e., even the name is the
-	 * same?
-	 *
-	 * @param     protocol The XML definition of the coordination protocol.
-	 *
-	 * @exception IllegalArgumentException
-	 *                Thrown if the parameter is invalid (e.g., null).
-	 *
-	 * @return <code>true</code> if there is an exact match for the specified
-	 *         protocol, <code>false</code> otherwise.
-	 */
-
-	public final boolean present (org.w3c.dom.Document protocol)
-			throws IllegalArgumentException
-	{
-		/*
-		 * Only checks the coordination-type via the hashtable. Now we need to
-		 * check the coordination-name.
-		 */
-
-		boolean found = false;
-
-		CoordinationXML protocolDef = new CoordinationXML(protocol);
-		Vector impls = (Vector) _protocols.get(protocolDef.protocolType());
-
-		if (impls != null)
-		{
-			for (int i = 0; (i < impls.size()) && !found; i++)
-			{
-				ProtocolEntry entry = (ProtocolEntry) impls.elementAt(i);
-
-				if (sameProtocolType(entry, protocolDef))
-					found = true;
-			}
-		}
-
-		return found;
-	}
-
-	/**
-	 * Is the document present but with a different name?
-	 *
-	 * @param     protocol The XML definition of the coordination protocol.
-	 *
-	 * @exception IllegalArgumentException
-	 *                Thrown if the parameter is invalid (e.g., null).
-	 *
-	 * @return <code>true</code> if there is at match for the specified
-	 *         protocol, <code>false</code> otherwise.
-	 */
-
-	public final boolean presentWithDifferentName (org.w3c.dom.Document protocol)
-			throws IllegalArgumentException
-	{
-		/*
-		 * Check the registered protocols and if the types are the same but
-		 * differ by name (essentially who implemented them) then they are not
-		 * identical.
-		 */
-
-		boolean found = false;
-		CoordinationXML protocolDef = new CoordinationXML(protocol);
-		Vector impls = (Vector) _protocols.get(protocolDef.protocolType());
-
-		if (impls != null)
-		{
-			if (protocolDef.protocolName() != null)
-			{
-				for (int i = 0; (i < impls.size()) && !found; i++)
-				{
-					ProtocolEntry entry = (ProtocolEntry) impls.elementAt(i);
-
-					if (sameProtocol(entry, protocolDef))
-						found = true;
-				}
-			}
-			else
-				found = true; // any will do
-		}
-
-		return found;
-	}
-
-	protected ProtocolManagerWS()
-	{
-		initialise();
-	}
-
-	private final boolean sameProtocolType (ProtocolEntry pe, CoordinationXML cx)
-	{
-		if (pe.protocolType() != null)
-		{
-			if (cx.protocolType() != null)
-			{
-				return cx.protocolType().equals(pe.protocolType());
-			}
-		}
-
-		return false;
-	}
-
-	private final boolean sameProtocol (ProtocolEntry pe, CoordinationXML cx)
-	{
-		if (sameProtocolType(pe, cx))
-		{
-			if (pe.protocolName() != null)
-			{
-				if (cx.protocolName() != null)
-					return cx.protocolName().equals(pe.protocolName());
-			}
-		}
-
-		return false;
-	}
-
-	/**
-	 * @message com.arjuna.mw.wscf.protocols.ProtocolManagerWS_2
-	 *          [com.arjuna.mw.wscf.protocols.ProtocolManagerWS_2] - Failed to
-	 *          find document:
-	 */
-
-	private synchronized final void initialise ()
-	{
-		if (_initialised)
-			return;
-		else
-			_initialised = true;
-
-		// TODO sort out configuration!
-
-		try
-		{
-			InitializerWS init = new InitializerWS(this);
-		}
-		catch (Exception ex)
-		{
-			ex.printStackTrace();
-		}
-
-		Properties props = System.getProperties();
-		Enumeration names = props.propertyNames();
-
-		while (names.hasMoreElements())
-		{
-			String name = (String) names.nextElement();
-
-			if (name.startsWith(Environment.PROTOCOLWS_IMPLEMENTATION))
-			{
-				String className = props.getProperty(name);
-
-				try
-				{
-					ProtocolLocator pl = new ProtocolLocator(className);
-					org.w3c.dom.Document doc = pl.getProtocol();
-
-					if (doc == null)
-					{
-						// TODO
-
-						throw new ExceptionInInitializerError(
-								wscfLogger.log_mesg.getString("com.arjuna.mw.wscf.protocols.ProtocolManagerWS_2")
-										+ className);
-					}
-					else
-					{
-						addProtocol(doc, className);
-					}
-				}
-				catch (Exception ex)
-				{
-					ex.printStackTrace();
-
-					throw new ExceptionInInitializerError(ex.toString());
-				}
-			}
-		}
-	}
-
-	private HashMap _protocols = new HashMap();
-	private boolean _initialised = false;
-
-}
\ No newline at end of file

Deleted: labs/jbosstm/workspace/adinn/XTSGF/WSCF/classes/com/arjuna/mw/wscf/protocols/ProtocolRegistryWS.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WSCF/classes/com/arjuna/mw/wscf/protocols/ProtocolRegistryWS.java	2008-01-25 17:05:33 UTC (rev 18123)
+++ labs/jbosstm/workspace/adinn/XTSGF/WSCF/classes/com/arjuna/mw/wscf/protocols/ProtocolRegistryWS.java	2008-01-25 17:18:13 UTC (rev 18124)
@@ -1,57 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. 
- * 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: ProtocolRegistry.java,v 1.2 2003/03/04 12:55:56 nmcl Exp $
- */
-
-package com.arjuna.mw.wscf.protocols;
-
-/**
- * @author Mark Little (mark.little at arjuna.com)
- * @version $Id: ProtocolRegistry.java,v 1.2 2003/03/04 12:55:56 nmcl Exp $
- * @since 1.0.
- */
-
-// TODO we need a separate instance for WSTX
-
-public class ProtocolRegistryWS
-{
-
-    public static ProtocolManagerWS sharedManager ()
-    {
-	return _shared;
-    }
-
-    public static ProtocolManagerWS createManager ()
-    {
-	return new ProtocolManagerWS();
-    }
-
-    private static ProtocolManagerWS _shared = new ProtocolManagerWS();
-
-}
\ No newline at end of file

Added: labs/jbosstm/workspace/adinn/XTSGF/WSCF/classes/com/arjuna/mw/wscf11/common/Environment.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WSCF/classes/com/arjuna/mw/wscf11/common/Environment.java	                        (rev 0)
+++ labs/jbosstm/workspace/adinn/XTSGF/WSCF/classes/com/arjuna/mw/wscf11/common/Environment.java	2008-01-25 17:18:13 UTC (rev 18124)
@@ -0,0 +1,46 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. 
+ * 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: Environment.java,v 1.6 2004/03/15 13:25:01 nmcl Exp $
+ */
+
+package com.arjuna.mw.wscf11.common;
+
+/**
+ *
+ * @author Mark Little (mark.little at arjuna.com)
+ * @version $Id: Environment.java,v 1.6 2004/03/15 13:25:01 nmcl Exp $
+ * @since 1.0.
+ */
+
+public class Environment
+{
+    public static final String PROTOCOL_IMPLEMENTATION = "com.arjuna.mw.wscf11.protocolImplementation";
+    public static final String TWO_PHASE_CONTEXT = "com.arjuna.mw.wscf11.protocols.twophase.context";
+    public static final String SAGAS_CONTEXT = "com.arjuna.mw.wscf11.protocols.sagas.context";
+}
\ No newline at end of file

Added: labs/jbosstm/workspace/adinn/XTSGF/WSCF/classes/com/arjuna/mw/wscf11/model/sagas/CoordinatorManagerFactory.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WSCF/classes/com/arjuna/mw/wscf11/model/sagas/CoordinatorManagerFactory.java	                        (rev 0)
+++ labs/jbosstm/workspace/adinn/XTSGF/WSCF/classes/com/arjuna/mw/wscf11/model/sagas/CoordinatorManagerFactory.java	2008-01-25 17:18:13 UTC (rev 18124)
@@ -0,0 +1,163 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. 
+ * 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: CoordinatorManagerFactory.java,v 1.4 2005/05/19 12:13:23 nmcl Exp $
+ */
+
+package com.arjuna.mw.wscf11.model.sagas;
+
+import com.arjuna.mw.wscf.logging.wscfLogger;
+
+import com.arjuna.mw.wscf.model.sagas.hls.SagasHLS;
+import com.arjuna.mw.wscf.model.sagas.api.CoordinatorManager;
+
+import com.arjuna.mw.wsas.exceptions.SystemException;
+
+import com.arjuna.mwlabs.wscf.utils.ProtocolLocator;
+
+import com.arjuna.mw.wscf.common.CoordinatorXSD;
+
+import com.arjuna.mw.wscf.utils.*;
+
+import com.arjuna.mw.wscf.exceptions.ProtocolNotRegisteredException;
+import com.arjuna.mw.wscf11.protocols.ProtocolManager;
+import com.arjuna.mw.wscf11.protocols.ProtocolRegistry;
+
+import java.util.HashMap;
+
+import com.arjuna.mwlabs.wscf11.model.sagas.arjunacore.SagasHLSImple;
+
+/**
+ * The factory to return the specific CoordinatorManager implementation.
+ *
+ * @author Mark Little (mark.little at arjuna.com)
+ * @version $Id: CoordinatorManagerFactory.java,v 1.4 2005/05/19 12:13:23 nmcl Exp $
+ * @since 1.0.
+ */
+
+public class CoordinatorManagerFactory
+{
+
+
+    /**
+     * @exception com.arjuna.mw.wscf.exceptions.ProtocolNotRegisteredException Thrown if the default
+     * protocol is not available.
+     *
+     * @return the CoordinatorManager implementation to use. The default
+     * coordination protocol is used (two-phase commit) with its
+     * associated implementation.
+     *
+     * @message com.arjuna.mw.wscf.model.sagas.CMF11_1 [com.arjuna.mw.wscf.model.sagas.CMF11_1] - Failed to create
+     */
+
+    public static CoordinatorManager coordinatorManager () throws ProtocolNotRegisteredException, SystemException
+    {
+	try
+	{
+	    ProtocolLocator pl = new ProtocolLocator(SagasHLSImple.className());
+	    org.w3c.dom.Document doc = pl.getProtocol();
+
+	    if (doc == null)
+	    {
+		wscfLogger.arjLoggerI18N.warn("com.arjuna.mw.wscf.model.sagas.CMF11_1",
+					      new Object[]{SagasHLSImple.className()});
+    }
+	    else
+		return coordinatorManager(doc);
+	}
+	catch (Exception ex)
+	{
+	    ex.printStackTrace();
+
+	    throw new SystemException(ex.toString());
+	}
+
+	return null;
+    }
+
+    /**
+     * Obtain a reference to a coordinator that implements the specified
+     * protocol.
+     *
+     * @param protocol The XML definition of the type of
+     * coordination protocol required.
+     *
+     * @exception com.arjuna.mw.wscf.exceptions.ProtocolNotRegisteredException Thrown if the requested
+     * protocol is not available.
+     *
+     * @return the CoordinatorManager implementation to use.
+     */
+
+    /*
+     * Have the type specified in XML. More data may be specified, which
+     * can be passed to the implementation in the same way ObjectName was.
+     */
+
+    public static CoordinatorManager coordinatorManager (org.w3c.dom.Document protocol) throws ProtocolNotRegisteredException, SystemException
+    {
+	try
+	{
+	    synchronized (_implementations)
+	    {
+		org.w3c.dom.Text child = DomUtil.getTextNode(protocol, CoordinatorXSD.coordinatorType);
+		String protocolType = child.getNodeValue();
+		SagasHLS coordHLS = (SagasHLS) _implementations.get(protocolType);
+
+		if (coordHLS == null)
+		{
+		    Object implementation = _protocolManager.getProtocolImplementation(protocol);
+
+		    if (implementation instanceof String)
+		    {
+			Class c = Class.forName((String) implementation);
+
+			coordHLS = (SagasHLS) c.newInstance();
+		    }
+		    else
+			coordHLS = (SagasHLS) implementation;
+
+		    _implementations.put(protocolType, coordHLS);
+		}
+
+		return coordHLS.coordinatorManager();
+	    }
+	}
+	catch (ProtocolNotRegisteredException ex)
+	{
+	    throw ex;
+	}
+	catch (Exception ex)
+	{
+	    throw new SystemException(ex.toString());
+	}
+    }
+
+    private static ProtocolManager _protocolManager = ProtocolRegistry.sharedManager();
+    private static HashMap         _implementations = new HashMap();
+
+}
\ No newline at end of file

Added: labs/jbosstm/workspace/adinn/XTSGF/WSCF/classes/com/arjuna/mw/wscf11/model/sagas/UserCoordinatorFactory.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WSCF/classes/com/arjuna/mw/wscf11/model/sagas/UserCoordinatorFactory.java	                        (rev 0)
+++ labs/jbosstm/workspace/adinn/XTSGF/WSCF/classes/com/arjuna/mw/wscf11/model/sagas/UserCoordinatorFactory.java	2008-01-25 17:18:13 UTC (rev 18124)
@@ -0,0 +1,162 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. 
+ * 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: UserCoordinatorFactory.java,v 1.4 2005/05/19 12:13:23 nmcl Exp $
+ */
+
+package com.arjuna.mw.wscf11.model.sagas;
+
+import com.arjuna.mw.wscf.logging.wscfLogger;
+
+import com.arjuna.mw.wscf.model.sagas.hls.SagasHLS;
+import com.arjuna.mw.wscf.model.sagas.api.UserCoordinator;
+
+import com.arjuna.mw.wsas.exceptions.SystemException;
+
+import com.arjuna.mwlabs.wscf.utils.ProtocolLocator;
+
+import com.arjuna.mw.wscf.common.CoordinatorXSD;
+
+import com.arjuna.mw.wscf.utils.*;
+
+import com.arjuna.mw.wscf.exceptions.ProtocolNotRegisteredException;
+import com.arjuna.mw.wscf11.protocols.ProtocolManager;
+import com.arjuna.mw.wscf11.protocols.ProtocolRegistry;
+
+import java.util.HashMap;
+
+import com.arjuna.mwlabs.wscf11.model.sagas.arjunacore.SagasHLSImple;
+
+/**
+ * The factory which returns the UserCoordinator implementation to use.
+ *
+ * @author Mark Little (mark.little at arjuna.com)
+ * @version $Id: UserCoordinatorFactory.java,v 1.4 2005/05/19 12:13:23 nmcl Exp $
+ * @since 1.0.
+ */
+
+public class UserCoordinatorFactory
+{
+
+    /**
+     * @exception com.arjuna.mw.wscf.exceptions.ProtocolNotRegisteredException Thrown if the default
+     * protocol is not available.
+     *
+     * @return the CoordinatorManager implementation to use. The default
+     * coordination protocol is used (two-phase commit) with its
+     * associated implementation.
+     *
+     * @message com.arjuna.mw.wscf.model.sagas.UCF11_1 [com.arjuna.mw.wscf.model.sagas.UCF11_1] - Failed to create
+     */
+
+    public static UserCoordinator userCoordinator () throws ProtocolNotRegisteredException, SystemException
+    {
+	try
+	{
+	    ProtocolLocator pl = new ProtocolLocator(SagasHLSImple.className());
+	    org.w3c.dom.Document doc = pl.getProtocol();
+
+	    if (doc == null)
+	    {
+		wscfLogger.arjLoggerI18N.warn("com.arjuna.mw.wscf.model.sagas.UCF11_1",
+					      new Object[]{SagasHLSImple.className()});
+	    }
+	    else
+		return userCoordinator(doc);
+	}
+	catch (Exception ex)
+	{
+	    ex.printStackTrace();
+
+	    throw new SystemException(ex.toString());
+	}
+
+	return null;
+    }
+
+    /**
+     * Obtain a reference to a coordinator that implements the specified
+     * protocol.
+     *
+     * @param protocol The XML definition of the type of
+     * coordination protocol required.
+     *
+     * @exception com.arjuna.mw.wscf.exceptions.ProtocolNotRegisteredException Thrown if the requested
+     * protocol is not available.
+     *
+     * @return the CoordinatorManager implementation to use.
+     */
+
+    /*
+     * Have the type specified in XML. More data may be specified, which
+     * can be passed to the implementation in the same way ObjectName was.
+     */
+
+    public static UserCoordinator userCoordinator (org.w3c.dom.Document protocol) throws ProtocolNotRegisteredException, SystemException
+    {
+	try
+	{
+	    synchronized (_implementations)
+	    {
+		org.w3c.dom.Text child = DomUtil.getTextNode(protocol, CoordinatorXSD.coordinatorType);
+		String protocolType = child.getNodeValue();
+		SagasHLS coordHLS = (SagasHLS) _implementations.get(protocolType);
+
+		if (coordHLS == null)
+		{
+		    Object implementation = _protocolManager.getProtocolImplementation(protocol);
+
+		    if (implementation instanceof String)
+		    {
+			Class c = Class.forName((String) implementation);
+
+			coordHLS = (SagasHLS) c.newInstance();
+		    }
+		    else
+			coordHLS = (SagasHLS) implementation;
+
+		    _implementations.put(protocolType, coordHLS);
+		}
+
+		return coordHLS.userCoordinator();
+	    }
+	}
+	catch (ProtocolNotRegisteredException ex)
+	{
+	    throw ex;
+	}
+	catch (Exception ex)
+	{
+	    throw new SystemException(ex.toString());
+	}
+    }
+
+    private static ProtocolManager _protocolManager = ProtocolRegistry.sharedManager();
+    private static HashMap         _implementations = new HashMap();
+
+}
\ No newline at end of file

Added: labs/jbosstm/workspace/adinn/XTSGF/WSCF/classes/com/arjuna/mw/wscf11/model/twophase/CoordinatorManagerFactory.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WSCF/classes/com/arjuna/mw/wscf11/model/twophase/CoordinatorManagerFactory.java	                        (rev 0)
+++ labs/jbosstm/workspace/adinn/XTSGF/WSCF/classes/com/arjuna/mw/wscf11/model/twophase/CoordinatorManagerFactory.java	2008-01-25 17:18:13 UTC (rev 18124)
@@ -0,0 +1,162 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. 
+ * 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: CoordinatorManagerFactory.java,v 1.8 2005/05/19 12:13:25 nmcl Exp $
+ */
+
+package com.arjuna.mw.wscf11.model.twophase;
+
+import com.arjuna.mw.wscf.logging.wscfLogger;
+
+import com.arjuna.mw.wscf.model.twophase.hls.TwoPhaseHLS;
+import com.arjuna.mw.wscf.model.twophase.api.CoordinatorManager;
+
+import com.arjuna.mw.wsas.exceptions.SystemException;
+
+import com.arjuna.mwlabs.wscf.utils.ProtocolLocator;
+
+import com.arjuna.mw.wscf.common.CoordinatorXSD;
+
+import com.arjuna.mw.wscf.utils.*;
+
+import com.arjuna.mw.wscf.exceptions.ProtocolNotRegisteredException;
+import com.arjuna.mw.wscf11.protocols.ProtocolManager;
+import com.arjuna.mw.wscf11.protocols.ProtocolRegistry;
+
+import java.util.HashMap;
+
+import com.arjuna.mwlabs.wscf11.model.twophase.arjunacore.TwoPhaseHLSImple;
+
+/**
+ * The factory to return the specific CoordinatorManager implementation.
+ *
+ * @author Mark Little (mark.little at arjuna.com)
+ * @version $Id: CoordinatorManagerFactory.java,v 1.8 2005/05/19 12:13:25 nmcl Exp $
+ * @since 1.0.
+ */
+
+public class CoordinatorManagerFactory
+{
+
+    /**
+     * @exception com.arjuna.mw.wscf.exceptions.ProtocolNotRegisteredException Thrown if the default
+     * protocol is not available.
+     *
+     * @return the CoordinatorManager implementation to use. The default
+     * coordination protocol is used (two-phase commit) with its
+     * associated implementation.
+     *
+     * @message com.arjuna.mw.wscf.model.twophase.CMF11_1 [com.arjuna.mw.wscf.model.twophase.CMF11_1] - Failed to create
+     */
+
+    public static CoordinatorManager coordinatorManager () throws ProtocolNotRegisteredException, SystemException
+    {
+	try
+	{
+	    ProtocolLocator pl = new ProtocolLocator(TwoPhaseHLSImple.className());
+	    org.w3c.dom.Document doc = pl.getProtocol();
+
+	    if (doc == null)
+	    {
+		wscfLogger.arjLoggerI18N.warn("com.arjuna.mw.wscf.model.twophase.CMF11_1",
+					      new Object[]{TwoPhaseHLSImple.className()});
+	    }
+	    else
+		return coordinatorManager(doc);
+	}
+	catch (Exception ex)
+	{
+	    ex.printStackTrace();
+
+	    throw new SystemException(ex.toString());
+	}
+
+	return null;
+    }
+
+    /**
+     * Obtain a reference to a coordinator that implements the specified
+     * protocol.
+     *
+     * @param protocol The XML definition of the type of
+     * coordination protocol required.
+     *
+     * @exception com.arjuna.mw.wscf.exceptions.ProtocolNotRegisteredException Thrown if the requested
+     * protocol is not available.
+     *
+     * @return the CoordinatorManager implementation to use.
+     */
+
+    /*
+     * Have the type specified in XML. More data may be specified, which
+     * can be passed to the implementation in the same way ObjectName was.
+     */
+
+    public static CoordinatorManager coordinatorManager (org.w3c.dom.Document protocol) throws ProtocolNotRegisteredException, SystemException
+    {
+	try
+	{
+	    synchronized (_implementations)
+	    {
+		org.w3c.dom.Text child = DomUtil.getTextNode(protocol, CoordinatorXSD.coordinatorType);
+		String protocolType = child.getNodeValue();
+		TwoPhaseHLS coordHLS = (TwoPhaseHLS) _implementations.get(protocolType);
+
+		if (coordHLS == null)
+		{
+		    Object implementation = _protocolManager.getProtocolImplementation(protocol);
+
+		    if (implementation instanceof String)
+		    {
+			Class c = Class.forName((String) implementation);
+
+			coordHLS = (TwoPhaseHLS) c.newInstance();
+		    }
+		    else
+			coordHLS = (TwoPhaseHLS) implementation;
+
+		    _implementations.put(protocolType, coordHLS);
+		}
+
+		return coordHLS.coordinatorManager();
+	    }
+	}
+	catch (ProtocolNotRegisteredException ex)
+	{
+	    throw ex;
+	}
+	catch (Exception ex)
+	{
+	    throw new SystemException(ex.toString());
+	}
+    }
+
+    private static ProtocolManager _protocolManager = ProtocolRegistry.sharedManager();
+    private static HashMap         _implementations = new HashMap();
+
+}
\ No newline at end of file

Added: labs/jbosstm/workspace/adinn/XTSGF/WSCF/classes/com/arjuna/mw/wscf11/model/twophase/UserCoordinatorFactory.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WSCF/classes/com/arjuna/mw/wscf11/model/twophase/UserCoordinatorFactory.java	                        (rev 0)
+++ labs/jbosstm/workspace/adinn/XTSGF/WSCF/classes/com/arjuna/mw/wscf11/model/twophase/UserCoordinatorFactory.java	2008-01-25 17:18:13 UTC (rev 18124)
@@ -0,0 +1,162 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. 
+ * 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: UserCoordinatorFactory.java,v 1.6 2005/05/19 12:13:25 nmcl Exp $
+ */
+
+package com.arjuna.mw.wscf11.model.twophase;
+
+import com.arjuna.mw.wscf.logging.wscfLogger;
+
+import com.arjuna.mw.wscf.model.twophase.hls.TwoPhaseHLS;
+import com.arjuna.mw.wscf.model.twophase.api.UserCoordinator;
+
+import com.arjuna.mw.wsas.exceptions.SystemException;
+
+import com.arjuna.mwlabs.wscf.utils.ProtocolLocator;
+
+import com.arjuna.mw.wscf.common.CoordinatorXSD;
+
+import com.arjuna.mw.wscf.utils.*;
+
+import com.arjuna.mw.wscf.exceptions.ProtocolNotRegisteredException;
+import com.arjuna.mw.wscf11.protocols.ProtocolManager;
+import com.arjuna.mw.wscf11.protocols.ProtocolRegistry;
+
+import java.util.HashMap;
+
+import com.arjuna.mwlabs.wscf.model.twophase.arjunacore.TwoPhaseHLSImple;
+
+/**
+ * The factory which returns the UserCoordinator implementation to use.
+ *
+ * @author Mark Little (mark.little at arjuna.com)
+ * @version $Id: UserCoordinatorFactory.java,v 1.6 2005/05/19 12:13:25 nmcl Exp $
+ * @since 1.0.
+ */
+
+public class UserCoordinatorFactory
+{
+
+    /**
+     * @exception com.arjuna.mw.wscf.exceptions.ProtocolNotRegisteredException Thrown if the default
+     * protocol is not available.
+     *
+     * @return the CoordinatorManager implementation to use. The default
+     * coordination protocol is used (two-phase commit) with its
+     * associated implementation.
+     *
+     * @message com.arjuna.mw.wscf.model.twophase.UCF11_1 [com.arjuna.mw.wscf.model.twophase.UCF11_1] - Failed to create
+     */
+
+    public static UserCoordinator userCoordinator () throws ProtocolNotRegisteredException, SystemException
+    {
+	try
+	{
+	    ProtocolLocator pl = new ProtocolLocator(TwoPhaseHLSImple.className());
+	    org.w3c.dom.Document doc = pl.getProtocol();
+
+	    if (doc == null)
+	    {
+		wscfLogger.arjLoggerI18N.warn("com.arjuna.mw.wscf.model.twophase.UCF11_1",
+					      new Object[]{TwoPhaseHLSImple.className()});
+	    }
+	    else
+		return userCoordinator(doc);
+	}
+	catch (Exception ex)
+	{
+	    ex.printStackTrace();
+
+	    throw new SystemException(ex.toString());
+	}
+
+	return null;
+    }
+
+    /**
+     * Obtain a reference to a coordinator that implements the specified
+     * protocol.
+     *
+     * @param protocol The XML definition of the type of
+     * coordination protocol required.
+     *
+     * @exception com.arjuna.mw.wscf.exceptions.ProtocolNotRegisteredException Thrown if the requested
+     * protocol is not available.
+     *
+     * @return the CoordinatorManager implementation to use.
+     */
+
+    /*
+     * Have the type specified in XML. More data may be specified, which
+     * can be passed to the implementation in the same way ObjectName was.
+     */
+
+    public static UserCoordinator userCoordinator (org.w3c.dom.Document protocol) throws ProtocolNotRegisteredException, SystemException
+    {
+	try
+	{
+	    synchronized (_implementations)
+	    {
+		org.w3c.dom.Text child = DomUtil.getTextNode(protocol, CoordinatorXSD.coordinatorType);
+		String protocolType = child.getNodeValue();
+		TwoPhaseHLS coordHLS = (TwoPhaseHLS) _implementations.get(protocolType);
+
+		if (coordHLS == null)
+		{
+		    Object implementation = _protocolManager.getProtocolImplementation(protocol);
+
+		    if (implementation instanceof String)
+		    {
+			Class c = Class.forName((String) implementation);
+
+			coordHLS = (TwoPhaseHLS) c.newInstance();
+		    }
+		    else
+			coordHLS = (TwoPhaseHLS) implementation;
+
+		    _implementations.put(protocolType, coordHLS);
+		}
+
+		return coordHLS.userCoordinator();
+	    }
+	}
+	catch (ProtocolNotRegisteredException ex)
+	{
+	    throw ex;
+	}
+	catch (Exception ex)
+	{
+	    throw new SystemException(ex.toString());
+	}
+    }
+
+    private static ProtocolManager _protocolManager = ProtocolRegistry.sharedManager();
+    private static HashMap         _implementations = new HashMap();
+
+}
\ No newline at end of file

Added: labs/jbosstm/workspace/adinn/XTSGF/WSCF/classes/com/arjuna/mw/wscf11/protocols/ProtocolManager.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WSCF/classes/com/arjuna/mw/wscf11/protocols/ProtocolManager.java	                        (rev 0)
+++ labs/jbosstm/workspace/adinn/XTSGF/WSCF/classes/com/arjuna/mw/wscf11/protocols/ProtocolManager.java	2008-01-25 17:18:13 UTC (rev 18124)
@@ -0,0 +1,447 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. 
+ * 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: ProtocolManager.java,v 1.13 2005/05/19 12:13:28 nmcl Exp $
+ */
+
+package com.arjuna.mw.wscf11.protocols;
+
+import com.arjuna.mw.wscf11.common.Environment;
+import com.arjuna.mw.wscf.exceptions.ProtocolAlreadyRegisteredException;
+import com.arjuna.mw.wscf.exceptions.ProtocolNotRegisteredException;
+import com.arjuna.mw.wscf.exceptions.UnknownProtocolImplementationException;
+import com.arjuna.mw.wscf.logging.wscfLogger;
+import com.arjuna.mw.wscf.utils.CoordinationXML;
+import com.arjuna.mwlabs.wscf11.protocols.Initializer;
+import com.arjuna.mwlabs.wscf.protocols.ProtocolEntry;
+import com.arjuna.mwlabs.wscf.utils.ProtocolLocator;
+
+import java.util.Enumeration;
+import java.util.HashMap;
+import java.util.Properties;
+import java.util.Vector;
+
+/**
+ * The ProtocolManager is the way in which protocol implementations may be
+ * registered with the system.
+ *
+ * @author Mark Little (mark.little at arjuna.com)
+ * @version $Id:$
+ * @since 1.0.
+ */
+
+public class ProtocolManager
+{
+
+	/**
+	 * Add a specific protocol implementation to the factory. More than one
+	 * implementation may provide the same protocol. They may differ by
+	 * coordinator-name only.
+	 *
+	 * @param     protocol The XML definition of the protocol.
+	 * @param     className The name of the class that implements the specified
+	 *            protocol.
+	 *
+	 * @exception com.arjuna.mw.wscf.exceptions.ProtocolAlreadyRegisteredException
+	 *                Thrown if the exact same protocol definition has already
+	 *                been registered.
+	 * @exception IllegalArgumentException
+	 *                Thrown if either of the parameters is invalid.
+	 */
+
+	public void addProtocol (org.w3c.dom.Document protocol, Object className)
+			throws ProtocolAlreadyRegisteredException,
+			IllegalArgumentException
+	{
+		if ((protocol == null) || (className == null))
+			throw new IllegalArgumentException();
+
+		if (present(protocol))
+			throw new ProtocolAlreadyRegisteredException();
+		else
+		{
+			ProtocolEntry e = new ProtocolEntry(protocol, className);
+			Vector impls = (Vector) _protocols.get(e.protocolType());
+
+			if (impls == null)
+			{
+				impls = new Vector();
+
+				_protocols.put(e.protocolType(), impls);
+			}
+
+			impls.add(e);
+		}
+	}
+
+	/**
+	 * Replace a specific protocol implementation in the factory.
+	 *
+	 * @param     protocol The XML definition of the protocol.
+	 * @param     className The name of the class that implements the specified
+	 *            protocol.
+	 *
+	 * @exception com.arjuna.mw.wscf.exceptions.ProtocolNotRegisteredException
+	 *                Thrown if the protocol to be removed has not been
+	 *                registered.
+	 * @exception IllegalArgumentException
+	 *                Thrown if either of the parameters is invalid.
+	 */
+
+	public void replaceProtocol (org.w3c.dom.Document protocol, Object className)
+			throws ProtocolNotRegisteredException, IllegalArgumentException
+	{
+		synchronized (this)
+		{
+			CoordinationXML protocolDef = new CoordinationXML(protocol);
+			Vector impls = (Vector) _protocols.get(protocolDef.protocolType());
+			boolean found = false;
+
+			if (impls != null)
+			{
+				for (int i = 0; (i < impls.size()) && !found; i++)
+				{
+					ProtocolEntry entry = (ProtocolEntry) impls.elementAt(i);
+
+					// currently replaces only on type: should be exact match!
+
+					if (sameProtocolType(entry, protocolDef))
+					{
+						impls.remove(entry);
+
+						try
+						{
+							addProtocol(protocol, className);
+						}
+						catch (Exception ex)
+						{
+							throw new IllegalArgumentException(ex.toString());
+						}
+
+						found = true;
+					}
+				}
+			}
+
+			if (!found)
+				throw new ProtocolNotRegisteredException();
+		}
+	}
+
+	/**
+	 * @param     protocol The XML definition of the coordination protocol.
+	 *
+	 * @exception com.arjuna.mw.wscf.exceptions.ProtocolNotRegisteredException
+	 *                Thrown if the requested coordination protocol has not been
+	 *                registered.
+	 * @exception IllegalArgumentException
+	 *                Thrown if the parameter is invalid.
+	 *
+	 * @return The class that implements the specified coordination protocol.
+	 *
+	 * @message com.arjuna.mw.wscf.protocols.ProtocolManager11_1
+	 *          [com.arjuna.mw.wscf.protocols.ProtocolManager11_1] - Could not
+	 *          find protocol:
+	 */
+
+	public Object getProtocolImplementation (org.w3c.dom.Document protocol)
+			throws ProtocolNotRegisteredException, IllegalArgumentException
+	{
+		/*
+		 * Only checks the coordination-type via the hashtable. Now we need to
+		 * check the coordination-name.
+		 */
+
+		CoordinationXML protocolDef = new CoordinationXML(protocol);
+		Vector impls = (Vector) _protocols.get(protocolDef.protocolType());
+
+		if (impls != null)
+		{
+			for (int i = 0; i < impls.size(); i++)
+			{
+				ProtocolEntry entry = (ProtocolEntry) impls.elementAt(i);
+
+				if (sameProtocolType(entry, protocolDef))
+				{
+					return entry.implementationClass();
+				}
+			}
+		}
+
+		throw new ProtocolNotRegisteredException(
+				wscfLogger.log_mesg.getString("com.arjuna.mw.wscf.protocols.ProtocolManager11_1")
+						+ protocolDef.protocolType());
+	}
+
+	/**
+	 * Remove the specified protocol definition from the factory.
+	 *
+	 * @param     protocol The XML definition of the coordination protocol.
+	 *
+	 * @exception com.arjuna.mw.wscf.exceptions.ProtocolNotRegisteredException
+	 *                Thrown if the protocol to be removed has not been
+	 *                registered.
+	 * @exception IllegalArgumentException
+	 *                Thrown if the paramater is invalid (e.g., null).
+	 *
+	 * @return the protocol implementation removed.
+	 */
+
+	public Object removeProtocol (org.w3c.dom.Document protocol)
+			throws ProtocolNotRegisteredException, IllegalArgumentException
+	{
+		CoordinationXML protocolDef = new CoordinationXML(protocol);
+		Vector impls = (Vector) _protocols.get(protocolDef.protocolType());
+
+		if (impls != null)
+		{
+			for (int i = 0; i < impls.size(); i++)
+			{
+				ProtocolEntry entry = (ProtocolEntry) impls.elementAt(i);
+
+				if (sameProtocol(entry, protocolDef))
+				{
+					impls.remove(entry);
+
+					return entry.implementationClass();
+				}
+			}
+		}
+
+		throw new ProtocolNotRegisteredException();
+	}
+
+	/*
+	 * Do we need this?
+	 */
+
+	/**
+	 * Remove the specified coordination protocol implementation class from the
+	 * factory.
+	 *
+	 * @param     className The class to remove.
+	 *
+	 * @exception com.arjuna.mw.wscf.exceptions.UnknownProtocolImplementationException
+	 *                Thrown if the specified implementation class has not been
+	 *                registered.
+	 * @exception IllegalArgumentException
+	 *                Thrown if the parameter is invalid.
+	 *
+	 * @return the protocol implementation removed.
+	 */
+
+	public Object removeProtocolImplementation (Object className)
+			throws UnknownProtocolImplementationException,
+			IllegalArgumentException
+	{
+		throw new UnknownProtocolImplementationException();
+	}
+
+	/**
+	 * Is the document present exactly as it appears, i.e., even the name is the
+	 * same?
+	 *
+	 * @param     protocol The XML definition of the coordination protocol.
+	 *
+	 * @exception IllegalArgumentException
+	 *                Thrown if the parameter is invalid (e.g., null).
+	 *
+	 * @return <code>true</code> if there is an exact match for the specified
+	 *         protocol, <code>false</code> otherwise.
+	 */
+
+	public final boolean present (org.w3c.dom.Document protocol)
+			throws IllegalArgumentException
+	{
+		/*
+		 * Only checks the coordination-type via the hashtable. Now we need to
+		 * check the coordination-name.
+		 */
+
+		boolean found = false;
+
+		CoordinationXML protocolDef = new CoordinationXML(protocol);
+		Vector impls = (Vector) _protocols.get(protocolDef.protocolType());
+
+		if (impls != null)
+		{
+			for (int i = 0; (i < impls.size()) && !found; i++)
+			{
+				ProtocolEntry entry = (ProtocolEntry) impls.elementAt(i);
+
+				if (sameProtocolType(entry, protocolDef))
+					found = true;
+			}
+		}
+
+		return found;
+	}
+
+	/**
+	 * Is the document present but with a different name?
+	 *
+	 * @param     protocol The XML definition of the coordination protocol.
+	 *
+	 * @exception IllegalArgumentException
+	 *                Thrown if the parameter is invalid (e.g., null).
+	 *
+	 * @return <code>true</code> if there is at match for the specified
+	 *         protocol, <code>false</code> otherwise.
+	 */
+
+	public final boolean presentWithDifferentName (org.w3c.dom.Document protocol)
+			throws IllegalArgumentException
+	{
+		/*
+		 * Check the registered protocols and if the types are the same but
+		 * differ by name (essentially who implemented them) then they are not
+		 * identical.
+		 */
+
+		boolean found = false;
+		CoordinationXML protocolDef = new CoordinationXML(protocol);
+		Vector impls = (Vector) _protocols.get(protocolDef.protocolType());
+
+		if (impls != null)
+		{
+			if (protocolDef.protocolName() != null)
+			{
+				for (int i = 0; (i < impls.size()) && !found; i++)
+				{
+					ProtocolEntry entry = (ProtocolEntry) impls.elementAt(i);
+
+					if (sameProtocol(entry, protocolDef))
+						found = true;
+				}
+			}
+			else
+				found = true; // any will do
+		}
+
+		return found;
+	}
+
+	protected ProtocolManager()
+	{
+		initialise();
+	}
+
+	private final boolean sameProtocolType (ProtocolEntry pe, CoordinationXML cx)
+	{
+		if (pe.protocolType() != null)
+		{
+			if (cx.protocolType() != null)
+			{
+				return cx.protocolType().equals(pe.protocolType());
+			}
+		}
+
+		return false;
+	}
+
+	private final boolean sameProtocol (ProtocolEntry pe, CoordinationXML cx)
+	{
+		if (sameProtocolType(pe, cx))
+		{
+			if (pe.protocolName() != null)
+			{
+				if (cx.protocolName() != null)
+					return cx.protocolName().equals(pe.protocolName());
+			}
+		}
+
+		return false;
+	}
+
+	/**
+	 * @message com.arjuna.mw.wscf.protocols.ProtocolManager11_2
+	 *          [com.arjuna.mw.wscf.protocols.ProtocolManager11_2] - Failed to
+	 *          find document:
+	 */
+
+	private synchronized final void initialise ()
+	{
+		if (_initialised)
+			return;
+		else
+			_initialised = true;
+
+		// TODO sort out configuration!
+
+		try
+		{
+			Initializer init = new Initializer(this);
+		}
+		catch (Exception ex)
+		{
+			ex.printStackTrace();
+		}
+
+		Properties props = System.getProperties();
+		Enumeration names = props.propertyNames();
+
+		while (names.hasMoreElements())
+		{
+			String name = (String) names.nextElement();
+
+			if (name.startsWith(Environment.PROTOCOL_IMPLEMENTATION))
+			{
+				String className = props.getProperty(name);
+
+				try
+				{
+					ProtocolLocator pl = new ProtocolLocator(className);
+					org.w3c.dom.Document doc = pl.getProtocol();
+
+					if (doc == null)
+					{
+						// TODO
+
+						throw new ExceptionInInitializerError(
+								wscfLogger.log_mesg.getString("com.arjuna.mw.wscf.protocols.ProtocolManager11_2")
+										+ className);
+					}
+					else
+					{
+						addProtocol(doc, className);
+					}
+				}
+				catch (Exception ex)
+				{
+					ex.printStackTrace();
+
+					throw new ExceptionInInitializerError(ex.toString());
+				}
+			}
+		}
+	}
+
+	private HashMap _protocols = new HashMap();
+	private boolean _initialised = false;
+
+}
\ No newline at end of file

Added: labs/jbosstm/workspace/adinn/XTSGF/WSCF/classes/com/arjuna/mw/wscf11/protocols/ProtocolRegistry.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WSCF/classes/com/arjuna/mw/wscf11/protocols/ProtocolRegistry.java	                        (rev 0)
+++ labs/jbosstm/workspace/adinn/XTSGF/WSCF/classes/com/arjuna/mw/wscf11/protocols/ProtocolRegistry.java	2008-01-25 17:18:13 UTC (rev 18124)
@@ -0,0 +1,59 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. 
+ * 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:$
+ */
+
+package com.arjuna.mw.wscf11.protocols;
+
+import com.arjuna.mw.wscf11.protocols.ProtocolManager;
+
+/**
+ * @author Mark Little (mark.little at arjuna.com)
+ * @version $Id: ProtocolRegistry.java,v 1.2 2003/03/04 12:55:56 nmcl Exp $
+ * @since 1.0.
+ */
+
+// TODO we need a separate instance for WSTX
+
+public class ProtocolRegistry
+{
+
+    public static ProtocolManager sharedManager ()
+    {
+	return _shared;
+    }
+
+    public static ProtocolManager createManager ()
+    {
+	return new ProtocolManager();
+    }
+
+    private static ProtocolManager _shared = new ProtocolManager();
+
+}
\ No newline at end of file

Deleted: labs/jbosstm/workspace/adinn/XTSGF/WSCF/classes/com/arjuna/mwlabs/wsc/ContextFactoryMapperWSImple.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WSCF/classes/com/arjuna/mwlabs/wsc/ContextFactoryMapperWSImple.java	2008-01-25 17:05:33 UTC (rev 18123)
+++ labs/jbosstm/workspace/adinn/XTSGF/WSCF/classes/com/arjuna/mwlabs/wsc/ContextFactoryMapperWSImple.java	2008-01-25 17:18:13 UTC (rev 18124)
@@ -1,177 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. 
- * 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 com.arjuna.mw.wscf.common.CoordinatorXSD;
-import com.arjuna.mw.wscf.protocols.ProtocolManagerWS;
-import com.arjuna.mw.wscf.protocols.ProtocolRegistryWS;
-import com.arjuna.wsc.ContextFactoryMapperWS;
-import com.arjuna.wsc.ContextFactoryWS;
-
-import javax.xml.parsers.DocumentBuilder;
-import javax.xml.parsers.DocumentBuilderFactory;
-
-/**
- * @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 ContextFactoryMapperWSImple extends ContextFactoryMapperWS
-{
-
-	public ContextFactoryMapperWSImple()
-	{
-		_protocols = ProtocolRegistryWS.createManager();
-	}
-
-	public void addContextFactory (String coordinationTypeURI, ContextFactoryWS contextFactory)
-	{
-		try
-		{
-			_protocols.addProtocol(convert(coordinationTypeURI), contextFactory);
-
-			contextFactory.install(coordinationTypeURI);
-		}
-		catch (Exception ex)
-		{
-			ex.printStackTrace();
-		}
-	}
-
-	public void removeContextFactory (String coordinationTypeURI)
-	{
-		try
-		{
-			ContextFactoryWS contextFactory = (ContextFactoryWS) _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 ContextFactoryWS 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);
-
-				ContextFactoryWS factory = (ContextFactoryWS) c.newInstance();
-
-				_protocols.replaceProtocol(doc, factory);
-
-				return factory;
-			}
-			else
-			{
-				return (ContextFactoryWS) type;
-			}
-		}
-		catch (Exception ex)
-		{
-			ex.printStackTrace();
-		}
-
-		return null;
-	}
-
-	public void setSubordinateContextFactoryMapper (ContextFactoryMapperWS subordinateContextFactoryMapper)
-	{
-	}
-
-	public ContextFactoryMapperWS getSubordinateContextFactoryMapper ()
-	{
-		return null;
-	}
-
-	public void setDefaultContextFactory (ContextFactoryWS defaultContextFactory)
-	{
-	}
-
-	public ContextFactoryWS 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 "comarjunamwlabswsccontextfactorymapperws";
-	}
-
-	private ProtocolManagerWS _protocols;
-
-	private static final String _wscRootElement = "WS-C";
-
-}
\ No newline at end of file

Added: labs/jbosstm/workspace/adinn/XTSGF/WSCF/classes/com/arjuna/mwlabs/wsc11/ContextFactoryMapperImple.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WSCF/classes/com/arjuna/mwlabs/wsc11/ContextFactoryMapperImple.java	                        (rev 0)
+++ labs/jbosstm/workspace/adinn/XTSGF/WSCF/classes/com/arjuna/mwlabs/wsc11/ContextFactoryMapperImple.java	2008-01-25 17:18:13 UTC (rev 18124)
@@ -0,0 +1,177 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. 
+ * 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.wsc11;
+
+import com.arjuna.mw.wscf.common.CoordinatorXSD;
+import com.arjuna.mw.wscf11.protocols.ProtocolManager;
+import com.arjuna.mw.wscf11.protocols.ProtocolRegistry;
+import com.arjuna.wsc11.ContextFactoryMapper;
+import com.arjuna.wsc11.ContextFactory;
+
+import javax.xml.parsers.DocumentBuilder;
+import javax.xml.parsers.DocumentBuilderFactory;
+
+/**
+ * @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 ContextFactoryMapperImple extends ContextFactoryMapper
+{
+
+	public ContextFactoryMapperImple()
+	{
+		_protocols = ProtocolRegistry.createManager();
+	}
+
+	public void addContextFactory (String coordinationTypeURI, ContextFactory contextFactory)
+	{
+		try
+		{
+			_protocols.addProtocol(convert(coordinationTypeURI), contextFactory);
+
+			contextFactory.install(coordinationTypeURI);
+		}
+		catch (Exception ex)
+		{
+			ex.printStackTrace();
+		}
+	}
+
+	public void removeContextFactory (String coordinationTypeURI)
+	{
+		try
+		{
+			ContextFactory contextFactory = (ContextFactory) _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 ContextFactory 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);
+
+				ContextFactory factory = (ContextFactory) c.newInstance();
+
+				_protocols.replaceProtocol(doc, factory);
+
+				return factory;
+			}
+			else
+			{
+				return (ContextFactory) type;
+			}
+		}
+		catch (Exception ex)
+		{
+			ex.printStackTrace();
+		}
+
+		return null;
+	}
+
+	public void setSubordinateContextFactoryMapper (ContextFactoryMapper subordinateContextFactoryMapper)
+	{
+	}
+
+	public ContextFactoryMapper getSubordinateContextFactoryMapper ()
+	{
+		return null;
+	}
+
+	public void setDefaultContextFactory (ContextFactory defaultContextFactory)
+	{
+	}
+
+	public ContextFactory 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 "comarjunamwlabswsccontextfactorymapperws";
+	}
+
+	private ProtocolManager _protocols;
+
+	private static final String _wscRootElement = "WS-C";
+
+}
\ No newline at end of file

Modified: labs/jbosstm/workspace/adinn/XTSGF/WSCF/classes/com/arjuna/mwlabs/wscf/model/sagas/arjunacore/CoordinatorControl.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WSCF/classes/com/arjuna/mwlabs/wscf/model/sagas/arjunacore/CoordinatorControl.java	2008-01-25 17:05:33 UTC (rev 18123)
+++ labs/jbosstm/workspace/adinn/XTSGF/WSCF/classes/com/arjuna/mwlabs/wscf/model/sagas/arjunacore/CoordinatorControl.java	2008-01-25 17:18:13 UTC (rev 18124)
@@ -347,7 +347,7 @@
 	currentCoordinator().participantFaulted(participantId);
     }
     
-    final ACCoordinator currentCoordinator () throws NoCoordinatorException, SystemException
+    public final ACCoordinator currentCoordinator () throws NoCoordinatorException, SystemException
     {
 	ACCoordinator coord = (ACCoordinator) _coordinators.get(currentActivity());
 

Deleted: labs/jbosstm/workspace/adinn/XTSGF/WSCF/classes/com/arjuna/mwlabs/wscf/model/sagas/arjunacore/Sagas11HLSImple.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WSCF/classes/com/arjuna/mwlabs/wscf/model/sagas/arjunacore/Sagas11HLSImple.java	2008-01-25 17:05:33 UTC (rev 18123)
+++ labs/jbosstm/workspace/adinn/XTSGF/WSCF/classes/com/arjuna/mwlabs/wscf/model/sagas/arjunacore/Sagas11HLSImple.java	2008-01-25 17:18:13 UTC (rev 18124)
@@ -1,293 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. 
- * 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: SagasHLSImple.java,v 1.3.4.1 2005/11/22 10:34:09 kconner Exp $
- */
-
-package com.arjuna.mwlabs.wscf.model.sagas.arjunacore;
-
-import com.arjuna.mw.wscf.model.sagas.api.*;
-import com.arjuna.mw.wscf.model.sagas.hls.SagasHLS;
-
-import com.arjuna.mw.wscf.common.Environment;
-
-import com.arjuna.mw.wsas.context.soap.SOAPContext;
-
-import com.arjuna.mw.wscf.common.Qualifier;
-import com.arjuna.mw.wscf.common.CoordinatorId;
-
-import com.arjuna.mw.wscf.api.UserCoordinatorService;
-
-import com.arjuna.mw.wsas.context.Context;
-
-import com.arjuna.mw.wsas.ActivityManagerFactory;
-
-import com.arjuna.mw.wsas.activity.Outcome;
-import com.arjuna.mw.wsas.activity.HLS;
-
-import com.arjuna.mw.wsas.completionstatus.CompletionStatus;
-
-import com.arjuna.mw.wsas.exceptions.SystemException;
-import com.arjuna.mw.wsas.exceptions.WrongStateException;
-import com.arjuna.mw.wsas.exceptions.ProtocolViolationException;
-import com.arjuna.mw.wsas.exceptions.HLSError;
-
-import com.arjuna.mw.wscf.exceptions.*;
-
-/**
- * The ArjunaCore coordination service implementation.
- *
- * @author Mark Little (mark.little at arjuna.com)
- * @version $Id: SagasHLSImple.java,v 1.3.4.1 2005/11/22 10:34:09 kconner Exp $
- * @since 1.0.
- */
-
-public class Sagas11HLSImple implements SagasHLS, UserCoordinatorService
-{
-
-    public Sagas11HLSImple()
-    {
-	try
-	{
-	    ActivityManagerFactory.activityManager().addHLS((HLS) this);
-	}
-	catch (Exception ex)
-	{
-	    throw new HLSError(ex.toString());
-	}
-
-	_coordinatorService = new CoordinatorServiceImple();
-	_coordManager = new CoordinatorControl();
-    }
-
-    public UserCoordinatorService coordinatorService ()
-    {
-	return this;
-    }
-
-    public UserCoordinator userCoordinator ()
-    {
-	return _coordinatorService;
-    }
-
-    public CoordinatorManager coordinatorManager ()
-    {
-	return _coordinatorService;
-    }
-
-    /**
-     * An activity has begun and is active on the current thread.
-     */
-
-    public void begun () throws SystemException
-    {
-	_coordManager.begin();
-    }
-
-    /**
-     * The current activity is completing with the specified completion status.
-     *
-     * @param CompletionStatus cs The completion status to use.
-     *
-     * @return The result of terminating the relationship of this HLS and
-     * the current activity.
-     */
-
-    public Outcome complete (CompletionStatus cs) throws SystemException
-    {
-	return _coordManager.complete(cs);
-    }
-
-    /**
-     * The activity has been suspended.
-     */
-
-    public void suspended () throws SystemException
-    {
-	_coordManager.suspend();
-    }
-
-    /**
-     * The activity has been resumed on the current thread.
-     */
-
-    public void resumed () throws SystemException
-    {
-	_coordManager.resume();
-    }
-
-    /**
-     * The activity has completed and is no longer active on the current
-     * thread.
-     */
-
-    public void completed () throws SystemException
-    {
-	_coordManager.completed();
-    }
-
-    /**
-     * The HLS name.
-     */
-
-    public String identity () throws SystemException
-    {
-	return "Sagas11HLSImple";
-    }
-
-    /**
-     * The activity service maintains a priority ordered list of HLS
-     * implementations. If an HLS wishes to be ordered based on priority
-     * then it can return a non-negative value: the higher the value,
-     * the higher the priority and hence the earlier in the list of HLSes
-     * it will appear (and be used in).
-     *
-     * @return a positive value for the priority for this HLS, or zero/negative
-     * if the order is not important.
-     */
-
-    public int priority () throws SystemException
-    {
-	return 0;
-    }
-
-    /**
-     * Return the context augmentation for this HLS, if any on the current
-     * activity.
-     *
-     * @param ActivityHierarchy current The handle on the current activity
-     * hierarchy. The HLS may use this when determining what information to
-     * place in its context data.
-     *
-     * @return a context object or null if no augmentation is necessary.
-     */
-
-    /*
-     * TODO This needs refactoring. It's true that the context format should
-     * be configurable to allow the same implementation to be used in
-     * different protocols (e.g., 2PC mapping to OTS or original Arjuna could
-     * use the same protocol implementation, but the context formats are
-     * different.) However, is this the best way of doing that?
-     */
-
-    public Context context () throws SystemException
-    {
-        String contextImple = System.getProperty(Environment.SAGASWS_CONTEXT);
-
-        if (contextImple != null) {
-            try {
-                Class c = Class.forName(contextImple);
-                SOAPContext ctx = (SOAPContext) c.newInstance();
-
-                ctx.initialiseContext(_coordManager.currentCoordinator());
-
-                return ctx;
-            } catch (Exception ex) {
-                ex.printStackTrace();
-                throw new SystemException(ex.toString());
-            }
-        } else {
-            throw new SystemException("SAGAS 1.1 context implementation must be specified by setting environment property " + Environment.SAGASWS_CONTEXT);
-        }
-    }
-
-    /**
-     * If the application requires and if the coordination protocol supports
-     * it, then this method can be used to execute a coordination protocol on
-     * the currently enlisted participants at any time prior to the termination
-     * of the coordination scope.
-     *
-     * This implementation only supports coordination at the end of the
-     * activity.
-     *
-     * @param CompletionStatus cs The completion status to use when determining
-     * how to execute the protocol.
-     *
-     * @exception com.arjuna.mw.wsas.exceptions.WrongStateException Thrown if the coordinator is in a state
-     * the does not allow coordination to occur.
-     * @exception com.arjuna.mw.wsas.exceptions.ProtocolViolationException Thrown if the protocol is violated
-     * in some manner during execution.
-     * @exception com.arjuna.mw.wsas.exceptions.SystemException Thrown if any other error occurs.
-     *
-     * @return The result of executing the protocol, or null.
-     */
-
-    public Outcome coordinate (CompletionStatus cs) throws WrongStateException, ProtocolViolationException, SystemException
-    {
-	return _coordManager.coordinate(cs);
-    }
-
-    /**
-     * @exception com.arjuna.mw.wsas.exceptions.SystemException Thrown if any error occurs.
-     *
-     * @return the status of the current coordinator. If there is no
-     * activity associated with the thread then NoActivity
-     * will be returned.
-     *
-     * @see com.arjuna.mw.wsas.status.Status
-     */
-
-    public com.arjuna.mw.wsas.status.Status status () throws SystemException
-    {
-	return _coordManager.status();
-    }
-
-    /**
-     * Not supported by basic ArjunaCore.
-     *
-     * @exception com.arjuna.mw.wsas.exceptions.SystemException Thrown if any error occurs.
-     *
-     * @return the complete list of qualifiers that have been registered with
-     * the current coordinator.
-     */
-
-    public Qualifier[] qualifiers () throws NoCoordinatorException, SystemException
-    {
-	return _coordManager.qualifiers();
-    }
-
-    /**
-     * @exception com.arjuna.mw.wsas.exceptions.SystemException Thrown if any error occurs.
-     *
-     * @return The unique identity of the current coordinator.
-     */
-
-    public CoordinatorId identifier () throws NoCoordinatorException, SystemException
-    {
-	return _coordManager.identifier();
-    }
-
-    public static String className ()
-    {
-    	return Sagas11HLSImple.class.getName();
-    }
-
-    private CoordinatorControl      _coordManager;
-    private CoordinatorServiceImple _coordinatorService;
-
-}
\ No newline at end of file

Modified: labs/jbosstm/workspace/adinn/XTSGF/WSCF/classes/com/arjuna/mwlabs/wscf/model/twophase/arjunacore/CoordinatorControl.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WSCF/classes/com/arjuna/mwlabs/wscf/model/twophase/arjunacore/CoordinatorControl.java	2008-01-25 17:05:33 UTC (rev 18123)
+++ labs/jbosstm/workspace/adinn/XTSGF/WSCF/classes/com/arjuna/mwlabs/wscf/model/twophase/arjunacore/CoordinatorControl.java	2008-01-25 17:18:13 UTC (rev 18124)
@@ -471,7 +471,7 @@
 		}
 	}
 	
-	final ACCoordinator currentCoordinator () throws NoCoordinatorException,
+	public final ACCoordinator currentCoordinator () throws NoCoordinatorException,
 			SystemException
 	{
 		ACCoordinator coord = (ACCoordinator) _coordinators.get(currentActivity());

Deleted: labs/jbosstm/workspace/adinn/XTSGF/WSCF/classes/com/arjuna/mwlabs/wscf/model/twophase/arjunacore/TwoPhase11HLSImple.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WSCF/classes/com/arjuna/mwlabs/wscf/model/twophase/arjunacore/TwoPhase11HLSImple.java	2008-01-25 17:05:33 UTC (rev 18123)
+++ labs/jbosstm/workspace/adinn/XTSGF/WSCF/classes/com/arjuna/mwlabs/wscf/model/twophase/arjunacore/TwoPhase11HLSImple.java	2008-01-25 17:18:13 UTC (rev 18124)
@@ -1,307 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. 
- * 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: TwoPhaseHLSImple.java,v 1.6.4.1 2005/11/22 10:34:18 kconner Exp $
- */
-
-package com.arjuna.mwlabs.wscf.model.twophase.arjunacore;
-
-import com.arjuna.mw.wscf.model.twophase.api.*;
-import com.arjuna.mw.wscf.model.twophase.hls.TwoPhaseHLS;
-
-import com.arjuna.mw.wscf.common.Environment;
-
-import com.arjuna.mw.wsas.context.soap.SOAPContext;
-
-import com.arjuna.mw.wscf.common.Qualifier;
-import com.arjuna.mw.wscf.common.CoordinatorId;
-
-import com.arjuna.mw.wscf.api.UserCoordinatorService;
-
-import com.arjuna.mw.wsas.context.Context;
-
-import com.arjuna.mw.wsas.ActivityManagerFactory;
-
-import com.arjuna.mw.wsas.activity.Outcome;
-import com.arjuna.mw.wsas.activity.HLS;
-
-import com.arjuna.mw.wsas.completionstatus.CompletionStatus;
-
-import com.arjuna.mw.wsas.exceptions.SystemException;
-import com.arjuna.mw.wsas.exceptions.WrongStateException;
-import com.arjuna.mw.wsas.exceptions.ProtocolViolationException;
-import com.arjuna.mw.wsas.exceptions.HLSError;
-
-import com.arjuna.mw.wscf.exceptions.*;
-
-/**
- * The ArjunaCore coordination service implementation.
- *
- * @author Mark Little (mark.little at arjuna.com)
- * @version $Id: TwoPhaseHLSImple.java,v 1.6.4.1 2005/11/22 10:34:18 kconner Exp $
- * @since 1.0.
- */
-
-public class TwoPhase11HLSImple implements TwoPhaseHLS, UserCoordinatorService
-{
-
-	public TwoPhase11HLSImple()
-	{
-		try
-		{
-			ActivityManagerFactory.activityManager().addHLS((HLS) this);
-		}
-		catch (Exception ex)
-		{
-			throw new HLSError(ex.toString());
-		}
-
-		_coordinatorService = new CoordinatorServiceImple();
-		_coordManager = new CoordinatorControl();
-	}
-
-	public UserCoordinatorService coordinatorService ()
-	{
-		return this;
-	}
-
-	public UserCoordinator userCoordinator ()
-	{
-		return _coordinatorService;
-	}
-
-	public CoordinatorManager coordinatorManager ()
-	{
-		return _coordinatorService;
-	}
-
-	/**
-	 * An activity has begun and is active on the current thread.
-	 */
-
-	public void begun () throws SystemException
-	{
-		_coordManager.begin();
-	}
-
-	/**
-	 * The current activity is completing with the specified completion status.
-	 *
-	 * @param CompletionStatus
-	 *            cs The completion status to use.
-	 *
-	 * @return The result of terminating the relationship of this HLS and the
-	 *         current activity.
-	 */
-
-	public Outcome complete (CompletionStatus cs) throws SystemException
-	{
-		return _coordManager.complete(cs);
-	}
-
-	/**
-	 * The activity has been suspended.
-	 */
-
-	public void suspended () throws SystemException
-	{
-		_coordManager.suspend();
-	}
-
-	/**
-	 * The activity has been resumed on the current thread.
-	 */
-
-	public void resumed () throws SystemException
-	{
-		_coordManager.resume();
-	}
-
-	/**
-	 * The activity has completed and is no longer active on the current thread.
-	 */
-
-	public void completed () throws SystemException
-	{
-		_coordManager.completed();
-	}
-
-	/**
-	 * The HLS name.
-	 */
-
-	public String identity () throws SystemException
-	{
-		return "TwoPhaseHLSImple";
-	}
-
-	/**
-	 * The activity service maintains a priority ordered list of HLS
-	 * implementations. If an HLS wishes to be ordered based on priority then it
-	 * can return a non-negative value: the higher the value, the higher the
-	 * priority and hence the earlier in the list of HLSes it will appear (and
-	 * be used in).
-	 *
-	 * @return a positive value for the priority for this HLS, or zero/negative
-	 *         if the order is not important.
-	 */
-
-	public int priority () throws SystemException
-	{
-		return 0;
-	}
-
-	/**
-	 * Return the context augmentation for this HLS, if any on the current
-	 * activity.
-	 *
-	 * @param ActivityHierarchy
-	 *            current The handle on the current activity hierarchy. The HLS
-	 *            may use this when determining what information to place in its
-	 *            context data.
-	 *
-	 * @return a context object or null if no augmentation is necessary.
-	 */
-
-	/*
-	 * TODO This needs refactoring. It's true that the context format should be
-	 * configurable to allow the same implementation to be used in different
-	 * protocols (e.g., 2PC mapping to OTS or original Arjuna could use the same
-	 * protocol implementation, but the context formats are different.) However,
-	 * is this the best way of doing that?
-	 */
-
-	public Context context () throws SystemException
-	{
-		String contextImple = System.getProperty(Environment.TWO_PHASE_CONTEXT);
-
-		if (contextImple != null)
-		{
-			try
-			{
-				Class c = Class.forName(contextImple);
-				SOAPContext ctx = (SOAPContext) c.newInstance();
-
-				ctx.initialiseContext(_coordManager.currentCoordinator());
-
-				return ctx;
-			}
-			catch (Exception ex)
-			{
-				throw new SystemException(ex.toString());
-			}
-		}
-		else
-			return new com.arjuna.mwlabs.wscf.model.twophase.arjunacore.context.soap.ArjunaContextImple(
-					_coordManager.currentCoordinator());
-	}
-
-	/**
-	 * If the application requires and if the coordination protocol supports it,
-	 * then this method can be used to execute a coordination protocol on the
-	 * currently enlisted participants at any time prior to the termination of
-	 * the coordination scope.
-	 *
-	 * This implementation only supports coordination at the end of the
-	 * activity.
-	 *
-	 * @param CompletionStatus
-	 *            cs The completion status to use when determining how to
-	 *            execute the protocol.
-	 *
-	 * @exception com.arjuna.mw.wsas.exceptions.WrongStateException
-	 *                Thrown if the coordinator is in a state the does not allow
-	 *                coordination to occur.
-	 * @exception com.arjuna.mw.wsas.exceptions.ProtocolViolationException
-	 *                Thrown if the protocol is violated in some manner during
-	 *                execution.
-	 * @exception com.arjuna.mw.wsas.exceptions.SystemException
-	 *                Thrown if any other error occurs.
-	 *
-	 * @return The result of executing the protocol, or null.
-	 */
-
-	public Outcome coordinate (CompletionStatus cs) throws WrongStateException,
-			ProtocolViolationException, SystemException
-	{
-		return _coordManager.coordinate(cs);
-	}
-
-	/**
-	 * @exception com.arjuna.mw.wsas.exceptions.SystemException
-	 *                Thrown if any error occurs.
-	 *
-	 * @return the status of the current coordinator. If there is no activity
-	 *         associated with the thread then NoActivity will be returned.
-	 *
-	 * @see com.arjuna.mw.wsas.status.Status
-	 */
-
-	public com.arjuna.mw.wsas.status.Status status () throws SystemException
-	{
-		return _coordManager.status();
-	}
-
-	/**
-	 * Not supported by basic ArjunaCore.
-	 *
-	 * @exception com.arjuna.mw.wsas.exceptions.SystemException
-	 *                Thrown if any error occurs.
-	 *
-	 * @return the complete list of qualifiers that have been registered with
-	 *         the current coordinator.
-	 */
-
-	public Qualifier[] qualifiers () throws NoCoordinatorException,
-			SystemException
-	{
-		return _coordManager.qualifiers();
-	}
-
-	/**
-	 * @exception com.arjuna.mw.wsas.exceptions.SystemException
-	 *                Thrown if any error occurs.
-	 *
-	 * @return The unique identity of the current coordinator.
-	 */
-
-	public CoordinatorId identifier () throws NoCoordinatorException,
-			SystemException
-	{
-		return _coordManager.identifier();
-	}
-
-	public static String className ()
-	{
-		return TwoPhaseHLSImple.class.getName();
-	}
-
-	private CoordinatorControl _coordManager;
-	private CoordinatorServiceImple _coordinatorService;
-
-}
\ No newline at end of file

Deleted: labs/jbosstm/workspace/adinn/XTSGF/WSCF/classes/com/arjuna/mwlabs/wscf/protocols/InitializerWS.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WSCF/classes/com/arjuna/mwlabs/wscf/protocols/InitializerWS.java	2008-01-25 17:05:33 UTC (rev 18123)
+++ labs/jbosstm/workspace/adinn/XTSGF/WSCF/classes/com/arjuna/mwlabs/wscf/protocols/InitializerWS.java	2008-01-25 17:18:13 UTC (rev 18124)
@@ -1,99 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. 
- * 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: Initializer.java,v 1.7 2005/05/19 12:13:39 nmcl Exp $
- */
-
-package com.arjuna.mwlabs.wscf.protocols;
-
-import com.arjuna.mw.wsas.exceptions.SystemException;
-import com.arjuna.mw.wscf.logging.wscfLogger;
-import com.arjuna.mw.wscf.protocols.ProtocolManager;
-import com.arjuna.mw.wscf.protocols.ProtocolManagerWS;
-import com.arjuna.mwlabs.wscf.utils.ProtocolLocator;
-
-/**
- * Register all of the default coordination protocols with the system.
- *
- * @author Mark Little (mark.little at arjuna.com)
- * @version $Id: Initializer.java,v 1.7 2005/05/19 12:13:39 nmcl Exp $
- * @since 1.0.
- */
-
-public class InitializerWS
-{
-
-    public InitializerWS(ProtocolManagerWS manager) throws SystemException
-    {
-	_manager = null;
-
-	try
-	{
-	    com.arjuna.mw.wsas.utils.Configuration.initialise("/wscf11.xml");
-	}
-	catch (java.io.FileNotFoundException ex)
-	{
-	}
-	catch (Exception ex)
-	{
-	}
-    }
-
-    /**
-     * @message com.arjuna.mwlabs.wscf.protocols.InitializerWS_1 [com.arjuna.mwlabs.wscf.protocols.InitializerWS_1] - Failed to create:
-     */
-
-    private final void addProtocol (String impl) throws SystemException
-    {
-	try
-	{
-	    // add in ArjunaCore support
-
-	    ProtocolLocator pl = new ProtocolLocator(impl);
-	    org.w3c.dom.Document doc = pl.getProtocol();
-
-	    if (doc == null)
-	    {
-		throw new SystemException(wscfLogger.log_mesg.getString("com.arjuna.mwlabs.wscf.protocols.InitializerWS_1")+impl);
-	    }
-	    else
-	    {
-		_manager.addProtocol(doc, impl);
-	    }
-	}
-	catch (Exception ex)
-	{
-	    ex.printStackTrace();
-
-	    throw new SystemException(ex.toString());
-	}
-    }
-
-    private ProtocolManager _manager;
-
-}
\ No newline at end of file

Added: labs/jbosstm/workspace/adinn/XTSGF/WSCF/classes/com/arjuna/mwlabs/wscf11/model/sagas/arjunacore/SagasHLSImple.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WSCF/classes/com/arjuna/mwlabs/wscf11/model/sagas/arjunacore/SagasHLSImple.java	                        (rev 0)
+++ labs/jbosstm/workspace/adinn/XTSGF/WSCF/classes/com/arjuna/mwlabs/wscf11/model/sagas/arjunacore/SagasHLSImple.java	2008-01-25 17:18:13 UTC (rev 18124)
@@ -0,0 +1,291 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. 
+ * 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: SagasHLSImple.java,v 1.3.4.1 2005/11/22 10:34:09 kconner Exp $
+ */
+
+package com.arjuna.mwlabs.wscf11.model.sagas.arjunacore;
+
+import com.arjuna.mw.wscf.model.sagas.api.*;
+import com.arjuna.mw.wscf.model.sagas.hls.SagasHLS;
+
+import com.arjuna.mw.wscf11.common.Environment;
+
+import com.arjuna.mw.wsas.context.soap.SOAPContext;
+
+import com.arjuna.mw.wscf.common.Qualifier;
+import com.arjuna.mw.wscf.common.CoordinatorId;
+
+import com.arjuna.mw.wscf.api.UserCoordinatorService;
+
+import com.arjuna.mw.wsas.context.Context;
+
+import com.arjuna.mw.wsas.ActivityManagerFactory;
+
+import com.arjuna.mw.wsas.activity.Outcome;
+import com.arjuna.mw.wsas.activity.HLS;
+
+import com.arjuna.mw.wsas.completionstatus.CompletionStatus;
+
+import com.arjuna.mw.wsas.exceptions.SystemException;
+import com.arjuna.mw.wsas.exceptions.WrongStateException;
+import com.arjuna.mw.wsas.exceptions.ProtocolViolationException;
+import com.arjuna.mw.wsas.exceptions.HLSError;
+
+import com.arjuna.mw.wscf.exceptions.*;
+import com.arjuna.mwlabs.wscf.model.sagas.arjunacore.CoordinatorServiceImple;
+import com.arjuna.mwlabs.wscf.model.sagas.arjunacore.CoordinatorControl;
+
+/**
+ * The ArjunaCore coordination service implementation.
+ *
+ * @author Mark Little (mark.little at arjuna.com)
+ * @version $Id: SagasHLSImple.java,v 1.3.4.1 2005/11/22 10:34:09 kconner Exp $
+ * @since 1.0.
+ */
+
+public class SagasHLSImple implements SagasHLS, UserCoordinatorService
+{
+
+    public SagasHLSImple()
+    {
+	try
+	{
+	    ActivityManagerFactory.activityManager().addHLS((HLS) this);
+	}
+	catch (Exception ex)
+	{
+	    throw new HLSError(ex.toString());
+	}
+
+	_coordinatorService = new CoordinatorServiceImple();
+	_coordManager = new CoordinatorControl();
+    }
+
+    public UserCoordinatorService coordinatorService ()
+    {
+	return this;
+    }
+
+    public UserCoordinator userCoordinator ()
+    {
+	return _coordinatorService;
+    }
+
+    public CoordinatorManager coordinatorManager ()
+    {
+	return _coordinatorService;
+    }
+
+    /**
+     * An activity has begun and is active on the current thread.
+     */
+
+    public void begun () throws SystemException
+    {
+	_coordManager.begin();
+    }
+
+    /**
+     * The current activity is completing with the specified completion status.
+     *
+     * @param cs The completion status to use.
+     *
+     * @return The result of terminating the relationship of this HLS and
+     * the current activity.
+     */
+
+    public Outcome complete (CompletionStatus cs) throws SystemException
+    {
+	return _coordManager.complete(cs);
+    }
+
+    /**
+     * The activity has been suspended.
+     */
+
+    public void suspended () throws SystemException
+    {
+	_coordManager.suspend();
+    }
+
+    /**
+     * The activity has been resumed on the current thread.
+     */
+
+    public void resumed () throws SystemException
+    {
+	_coordManager.resume();
+    }
+
+    /**
+     * The activity has completed and is no longer active on the current
+     * thread.
+     */
+
+    public void completed () throws SystemException
+    {
+	_coordManager.completed();
+    }
+
+    /**
+     * The HLS name.
+     */
+
+    public String identity () throws SystemException
+    {
+	return "SagasHLSImple";
+    }
+
+    /**
+     * The activity service maintains a priority ordered list of HLS
+     * implementations. If an HLS wishes to be ordered based on priority
+     * then it can return a non-negative value: the higher the value,
+     * the higher the priority and hence the earlier in the list of HLSes
+     * it will appear (and be used in).
+     *
+     * @return a positive value for the priority for this HLS, or zero/negative
+     * if the order is not important.
+     */
+
+    public int priority () throws SystemException
+    {
+	return 0;
+    }
+
+    /**
+     * Return the context augmentation for this HLS, if any on the current
+     * activity.
+     *
+     * @return a context object or null if no augmentation is necessary.
+     */
+
+    /*
+     * TODO This needs refactoring. It's true that the context format should
+     * be configurable to allow the same implementation to be used in
+     * different protocols (e.g., 2PC mapping to OTS or original Arjuna could
+     * use the same protocol implementation, but the context formats are
+     * different.) However, is this the best way of doing that?
+     */
+
+    public Context context () throws SystemException
+    {
+        String contextImple = System.getProperty(Environment.SAGAS_CONTEXT);
+
+        if (contextImple != null) {
+            try {
+                Class c = Class.forName(contextImple);
+                SOAPContext ctx = (SOAPContext) c.newInstance();
+
+                ctx.initialiseContext(_coordManager.currentCoordinator());
+
+                return ctx;
+            } catch (Exception ex) {
+                ex.printStackTrace();
+                throw new SystemException(ex.toString());
+            }
+        } else {
+            throw new SystemException("SAGAS 1.1 context implementation must be specified by setting environment property " + Environment.SAGAS_CONTEXT);
+        }
+    }
+
+    /**
+     * If the application requires and if the coordination protocol supports
+     * it, then this method can be used to execute a coordination protocol on
+     * the currently enlisted participants at any time prior to the termination
+     * of the coordination scope.
+     *
+     * This implementation only supports coordination at the end of the
+     * activity.
+     *
+     * @param cs The completion status to use when determining
+     * how to execute the protocol.
+     *
+     * @exception com.arjuna.mw.wsas.exceptions.WrongStateException Thrown if the coordinator is in a state
+     * the does not allow coordination to occur.
+     * @exception com.arjuna.mw.wsas.exceptions.ProtocolViolationException Thrown if the protocol is violated
+     * in some manner during execution.
+     * @exception com.arjuna.mw.wsas.exceptions.SystemException Thrown if any other error occurs.
+     *
+     * @return The result of executing the protocol, or null.
+     */
+
+    public Outcome coordinate (CompletionStatus cs) throws WrongStateException, ProtocolViolationException, SystemException
+    {
+	return _coordManager.coordinate(cs);
+    }
+
+    /**
+     * @exception com.arjuna.mw.wsas.exceptions.SystemException Thrown if any error occurs.
+     *
+     * @return the status of the current coordinator. If there is no
+     * activity associated with the thread then NoActivity
+     * will be returned.
+     *
+     * @see com.arjuna.mw.wsas.status.Status
+     */
+
+    public com.arjuna.mw.wsas.status.Status status () throws SystemException
+    {
+	return _coordManager.status();
+    }
+
+    /**
+     * Not supported by basic ArjunaCore.
+     *
+     * @exception com.arjuna.mw.wsas.exceptions.SystemException Thrown if any error occurs.
+     *
+     * @return the complete list of qualifiers that have been registered with
+     * the current coordinator.
+     */
+
+    public Qualifier[] qualifiers () throws NoCoordinatorException, SystemException
+    {
+	return _coordManager.qualifiers();
+    }
+
+    /**
+     * @exception com.arjuna.mw.wsas.exceptions.SystemException Thrown if any error occurs.
+     *
+     * @return The unique identity of the current coordinator.
+     */
+
+    public CoordinatorId identifier () throws NoCoordinatorException, SystemException
+    {
+	return _coordManager.identifier();
+    }
+
+    public static String className ()
+    {
+    	return SagasHLSImple.class.getName();
+    }
+
+    private CoordinatorControl      _coordManager;
+    private CoordinatorServiceImple _coordinatorService;
+
+}
\ No newline at end of file

Added: labs/jbosstm/workspace/adinn/XTSGF/WSCF/classes/com/arjuna/mwlabs/wscf11/model/twophase/arjunacore/TwoPhaseHLSImple.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WSCF/classes/com/arjuna/mwlabs/wscf11/model/twophase/arjunacore/TwoPhaseHLSImple.java	                        (rev 0)
+++ labs/jbosstm/workspace/adinn/XTSGF/WSCF/classes/com/arjuna/mwlabs/wscf11/model/twophase/arjunacore/TwoPhaseHLSImple.java	2008-01-25 17:18:13 UTC (rev 18124)
@@ -0,0 +1,296 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. 
+ * 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: TwoPhaseHLSImple.java,v 1.6.4.1 2005/11/22 10:34:18 kconner Exp $
+ */
+
+package com.arjuna.mwlabs.wscf11.model.twophase.arjunacore;
+
+import com.arjuna.mw.wscf.model.twophase.api.*;
+import com.arjuna.mw.wscf.model.twophase.hls.TwoPhaseHLS;
+
+import com.arjuna.mw.wscf11.common.Environment;
+
+import com.arjuna.mw.wsas.context.soap.SOAPContext;
+
+import com.arjuna.mw.wscf.common.Qualifier;
+import com.arjuna.mw.wscf.common.CoordinatorId;
+
+import com.arjuna.mw.wscf.api.UserCoordinatorService;
+
+import com.arjuna.mw.wsas.context.Context;
+
+import com.arjuna.mw.wsas.ActivityManagerFactory;
+
+import com.arjuna.mw.wsas.activity.Outcome;
+import com.arjuna.mw.wsas.activity.HLS;
+
+import com.arjuna.mw.wsas.completionstatus.CompletionStatus;
+
+import com.arjuna.mw.wsas.exceptions.SystemException;
+import com.arjuna.mw.wsas.exceptions.WrongStateException;
+import com.arjuna.mw.wsas.exceptions.ProtocolViolationException;
+import com.arjuna.mw.wsas.exceptions.HLSError;
+
+import com.arjuna.mw.wscf.exceptions.*;
+import com.arjuna.mwlabs.wscf.model.twophase.arjunacore.CoordinatorServiceImple;
+import com.arjuna.mwlabs.wscf.model.twophase.arjunacore.CoordinatorControl;
+
+/**
+ * The ArjunaCore coordination service implementation.
+ *
+ * @author Mark Little (mark.little at arjuna.com)
+ * @version $Id: TwoPhaseHLSImple.java,v 1.6.4.1 2005/11/22 10:34:18 kconner Exp $
+ * @since 1.0.
+ */
+
+public class TwoPhaseHLSImple implements TwoPhaseHLS, UserCoordinatorService
+{
+
+	public TwoPhaseHLSImple()
+	{
+		try
+		{
+			ActivityManagerFactory.activityManager().addHLS((HLS) this);
+		}
+		catch (Exception ex)
+		{
+			throw new HLSError(ex.toString());
+		}
+
+		_coordinatorService = new CoordinatorServiceImple();
+		_coordManager = new CoordinatorControl();
+	}
+
+	public UserCoordinatorService coordinatorService ()
+	{
+		return this;
+	}
+
+	public UserCoordinator userCoordinator ()
+	{
+		return _coordinatorService;
+	}
+
+	public CoordinatorManager coordinatorManager ()
+	{
+		return _coordinatorService;
+	}
+
+	/**
+	 * An activity has begun and is active on the current thread.
+	 */
+
+	public void begun () throws SystemException
+	{
+		_coordManager.begin();
+	}
+
+	/**
+	 * The current activity is completing with the specified completion status.
+	 *
+	 * @param cs The completion status to use.
+	 *
+	 * @return The result of terminating the relationship of this HLS and the
+	 *         current activity.
+	 */
+
+	public Outcome complete (CompletionStatus cs) throws SystemException
+	{
+		return _coordManager.complete(cs);
+	}
+
+	/**
+	 * The activity has been suspended.
+	 */
+
+	public void suspended () throws SystemException
+	{
+		_coordManager.suspend();
+	}
+
+	/**
+	 * The activity has been resumed on the current thread.
+	 */
+
+	public void resumed () throws SystemException
+	{
+		_coordManager.resume();
+	}
+
+	/**
+	 * The activity has completed and is no longer active on the current thread.
+	 */
+
+	public void completed () throws SystemException
+	{
+		_coordManager.completed();
+	}
+
+	/**
+	 * The HLS name.
+	 */
+
+	public String identity () throws SystemException
+	{
+		return "TwoPhaseHLSImple";
+	}
+
+	/**
+	 * The activity service maintains a priority ordered list of HLS
+	 * implementations. If an HLS wishes to be ordered based on priority then it
+	 * can return a non-negative value: the higher the value, the higher the
+	 * priority and hence the earlier in the list of HLSes it will appear (and
+	 * be used in).
+	 *
+	 * @return a positive value for the priority for this HLS, or zero/negative
+	 *         if the order is not important.
+	 */
+
+	public int priority () throws SystemException
+	{
+		return 0;
+	}
+
+	/**
+	 * Return the context augmentation for this HLS, if any on the current
+	 * activity.
+	 *
+	 * @return a context object or null if no augmentation is necessary.
+	 */
+
+	/*
+	 * TODO This needs refactoring. It's true that the context format should be
+	 * configurable to allow the same implementation to be used in different
+	 * protocols (e.g., 2PC mapping to OTS or original Arjuna could use the same
+	 * protocol implementation, but the context formats are different.) However,
+	 * is this the best way of doing that?
+	 */
+
+	public Context context () throws SystemException
+	{
+		String contextImple = System.getProperty(Environment.TWO_PHASE_CONTEXT);
+
+		if (contextImple != null){
+			try {
+				Class c = Class.forName(contextImple);
+				SOAPContext ctx = (SOAPContext) c.newInstance();
+
+				ctx.initialiseContext(_coordManager.currentCoordinator());
+
+				return ctx;
+			} catch (Exception ex) {
+				throw new SystemException(ex.toString());
+			}
+		} else {
+            throw new SystemException("Two Phase 1.1 context implementation must be specified by setting environment property " + Environment.TWO_PHASE_CONTEXT);
+        }
+    }
+	/**
+	 * If the application requires and if the coordination protocol supports it,
+	 * then this method can be used to execute a coordination protocol on the
+	 * currently enlisted participants at any time prior to the termination of
+	 * the coordination scope.
+	 *
+	 * This implementation only supports coordination at the end of the
+	 * activity.
+	 *
+	 * @param cs The completion status to use when determining how to
+	 *            execute the protocol.
+	 *
+	 * @exception com.arjuna.mw.wsas.exceptions.WrongStateException
+	 *                Thrown if the coordinator is in a state the does not allow
+	 *                coordination to occur.
+	 * @exception com.arjuna.mw.wsas.exceptions.ProtocolViolationException
+	 *                Thrown if the protocol is violated in some manner during
+	 *                execution.
+	 * @exception com.arjuna.mw.wsas.exceptions.SystemException
+	 *                Thrown if any other error occurs.
+	 *
+	 * @return The result of executing the protocol, or null.
+	 */
+
+	public Outcome coordinate (CompletionStatus cs) throws WrongStateException,
+			ProtocolViolationException, SystemException
+	{
+		return _coordManager.coordinate(cs);
+	}
+
+	/**
+	 * @exception com.arjuna.mw.wsas.exceptions.SystemException
+	 *                Thrown if any error occurs.
+	 *
+	 * @return the status of the current coordinator. If there is no activity
+	 *         associated with the thread then NoActivity will be returned.
+	 *
+	 * @see com.arjuna.mw.wsas.status.Status
+	 */
+
+	public com.arjuna.mw.wsas.status.Status status () throws SystemException
+	{
+		return _coordManager.status();
+	}
+
+	/**
+	 * Not supported by basic ArjunaCore.
+	 *
+	 * @exception com.arjuna.mw.wsas.exceptions.SystemException
+	 *                Thrown if any error occurs.
+	 *
+	 * @return the complete list of qualifiers that have been registered with
+	 *         the current coordinator.
+	 */
+
+	public Qualifier[] qualifiers () throws NoCoordinatorException,
+			SystemException
+	{
+		return _coordManager.qualifiers();
+	}
+
+	/**
+	 * @exception com.arjuna.mw.wsas.exceptions.SystemException
+	 *                Thrown if any error occurs.
+	 *
+	 * @return The unique identity of the current coordinator.
+	 */
+
+	public CoordinatorId identifier () throws NoCoordinatorException,
+			SystemException
+	{
+		return _coordManager.identifier();
+	}
+
+	public static String className ()
+	{
+		return TwoPhaseHLSImple.class.getName();
+	}
+
+	private CoordinatorControl _coordManager;
+	private CoordinatorServiceImple _coordinatorService;
+
+}
\ No newline at end of file

Added: labs/jbosstm/workspace/adinn/XTSGF/WSCF/classes/com/arjuna/mwlabs/wscf11/protocols/Initializer.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WSCF/classes/com/arjuna/mwlabs/wscf11/protocols/Initializer.java	                        (rev 0)
+++ labs/jbosstm/workspace/adinn/XTSGF/WSCF/classes/com/arjuna/mwlabs/wscf11/protocols/Initializer.java	2008-01-25 17:18:13 UTC (rev 18124)
@@ -0,0 +1,98 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. 
+ * 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: Initializer.java,v 1.7 2005/05/19 12:13:39 nmcl Exp $
+ */
+
+package com.arjuna.mwlabs.wscf11.protocols;
+
+import com.arjuna.mw.wsas.exceptions.SystemException;
+import com.arjuna.mw.wscf.logging.wscfLogger;
+import com.arjuna.mw.wscf11.protocols.ProtocolManager;
+import com.arjuna.mwlabs.wscf.utils.ProtocolLocator;
+
+/**
+ * Register all of the default coordination protocols with the system.
+ *
+ * @author Mark Little (mark.little at arjuna.com)
+ * @version $Id: Initializer.java,v 1.7 2005/05/19 12:13:39 nmcl Exp $
+ * @since 1.0.
+ */
+
+public class Initializer
+{
+
+    public Initializer(ProtocolManager manager) throws SystemException
+    {
+	_manager = null;
+
+	try
+	{
+	    com.arjuna.mw.wsas.utils.Configuration.initialise("/wscf11.xml");
+	}
+	catch (java.io.FileNotFoundException ex)
+	{
+	}
+	catch (Exception ex)
+	{
+	}
+    }
+
+    /**
+     * @message com.arjuna.mwlabs.wscf.protocols.Initializer11_1 [com.arjuna.mwlabs.wscf.protocols.Initializer11_1] - Failed to create:
+     */
+
+    private final void addProtocol (String impl) throws SystemException
+    {
+	try
+	{
+	    // add in ArjunaCore support
+
+	    ProtocolLocator pl = new ProtocolLocator(impl);
+	    org.w3c.dom.Document doc = pl.getProtocol();
+
+	    if (doc == null)
+	    {
+		throw new SystemException(wscfLogger.log_mesg.getString("com.arjuna.mwlabs.wscf.protocols.Initializer11_1")+impl);
+	    }
+	    else
+	    {
+		_manager.addProtocol(doc, impl);
+	    }
+	}
+	catch (Exception ex)
+	{
+	    ex.printStackTrace();
+
+	    throw new SystemException(ex.toString());
+	}
+    }
+
+    private com.arjuna.mw.wscf.protocols.ProtocolManager _manager;
+
+}
\ No newline at end of file

Modified: labs/jbosstm/workspace/adinn/XTSGF/WSCF/config/wscf11.xml
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WSCF/config/wscf11.xml	2008-01-25 17:05:33 UTC (rev 18123)
+++ labs/jbosstm/workspace/adinn/XTSGF/WSCF/config/wscf11.xml	2008-01-25 17:18:13 UTC (rev 18124)
@@ -22,21 +22,21 @@
 <wscf-config>
 	<properties>
         <property name="com.arjuna.mw.wscf11.protocols.twophase.context"
-        value="com.arjuna.mwlabs.wst.at.context.ArjunaContextWSImple"/>
+        value="com.arjuna.mwlabs.wst11.at.context.ArjunaContextImple"/>
         <property name="com.arjuna.mw.wscf11.protocols.sagas.context"
-        value="com.arjuna.mwlabs.wst.ba.context.ArjunaContextWSImple"/>
+        value="com.arjuna.mwlabs.wst11.ba.context.ArjunaContextImple"/>
 	    <property
 	    name="com.arjuna.mw.wscf11.protocolImplementation1"
-	    value="com.arjuna.mwlabs.wscf.model.twophase.arjunacore.TwoPhase11HLSImple"/>
+	    value="com.arjuna.mwlabs.wscf11.model.twophase.arjunacore.TwoPhaseHLSImple"/>
 	    <property
 	    name="com.arjuna.mw.wscf11.protocolImplementation2"
-	    value="com.arjuna.mwlabs.wscf.model.sagas.arjunacore.Sagas11HLSImple"/>
+	    value="com.arjuna.mwlabs.wscf11.model.sagas.arjunacore.SagasHLSImple"/>
         <property
         name="com.arjuna.mw.wscf11.protocolImplementation3"
-        value="com.arjuna.mwlabs.wst.at.ContextFactoryWSImple"/>
+        value="com.arjuna.mwlabs.wst11.at.ContextFactoryImple"/>
         <property
         name="com.arjuna.mw.wscf11.protocolImplementation4"
-        value="com.arjuna.mwlabs.wst.ba.ContextFactoryWSImple"/>
+        value="com.arjuna.mwlabs.wst11.ba.ContextFactoryImple"/>
 
 	    <property
 	    name="com.arjuna.ats.arjuna.objectstore.objectStoreDir"

Modified: labs/jbosstm/workspace/adinn/XTSGF/WSCF/xml/wscf11_web-app.xml
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WSCF/xml/wscf11_web-app.xml	2008-01-25 17:05:33 UTC (rev 18123)
+++ labs/jbosstm/workspace/adinn/XTSGF/WSCF/xml/wscf11_web-app.xml	2008-01-25 17:18:13 UTC (rev 18124)
@@ -27,6 +27,6 @@
     <description>Arjuna WS-CF11</description>
 
     <listener>
-        <listener-class>com.arjuna.mw.wsc.deploy.WSCFWSInitialisation</listener-class>
+        <listener-class>com.arjuna.mw.wsc11.deploy.WSCFInitialisation</listener-class>
     </listener>
 </web-app>

Modified: labs/jbosstm/workspace/adinn/XTSGF/WSTX/build.xml
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WSTX/build.xml	2008-01-25 17:05:33 UTC (rev 18123)
+++ labs/jbosstm/workspace/adinn/XTSGF/WSTX/build.xml	2008-01-25 17:18:13 UTC (rev 18124)
@@ -159,9 +159,9 @@
 		tofile="${com.arjuna.mwlabs.wstx.dest}/com/arjuna/mwlabs/wst/ba/ContextFactoryImple.xml"/>
 
         <copy file="xml/AtomicTransaction11.xml"
-		tofile="${com.arjuna.mwlabs.wstx.dest}/com/arjuna/mwlabs/wst/at/ContextFactoryWSImple.xml"/>
+		tofile="${com.arjuna.mwlabs.wstx.dest}/com/arjuna/mwlabs/wst11/at/ContextFactoryImple.xml"/>
 		<copy file="xml/BusinessActivity11.xml"
-		tofile="${com.arjuna.mwlabs.wstx.dest}/com/arjuna/mwlabs/wst/ba/ContextFactoryWSImple.xml"/>
+		tofile="${com.arjuna.mwlabs.wstx.dest}/com/arjuna/mwlabs/wst11/ba/ContextFactoryImple.xml"/>
 
 <!--
 		<jar jarfile="${com.arjuna.mwlabs.wstx.jar.dest}/${com.arjuna.mwlabs.ts.modulename}.jar"

Deleted: labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mw/wst/BusinessActivity11Manager.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mw/wst/BusinessActivity11Manager.java	2008-01-25 17:05:33 UTC (rev 18123)
+++ labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mw/wst/BusinessActivity11Manager.java	2008-01-25 17:18:13 UTC (rev 18124)
@@ -1,128 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. 
- * 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.*;
-
-/**
- * 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 BAParticipantManagerWS 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 BAParticipantManagerWS 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;
-    
-}

Deleted: labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mw/wst/BusinessActivityManager11Factory.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mw/wst/BusinessActivityManager11Factory.java	2008-01-25 17:05:33 UTC (rev 18123)
+++ labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mw/wst/BusinessActivityManager11Factory.java	2008-01-25 17:18:13 UTC (rev 18124)
@@ -1,41 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. 
- * 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 BusinessActivityManager11Factory
-{
-    public static BusinessActivity11Manager businessActivityManager ()
-    {
-        return BusinessActivity11Manager.getBusinessActivityManager() ;
-	}
-}
\ No newline at end of file

Deleted: labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mw/wst/TransactionManager11.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mw/wst/TransactionManager11.java	2008-01-25 17:05:33 UTC (rev 18123)
+++ labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mw/wst/TransactionManager11.java	2008-01-25 17:18:13 UTC (rev 18124)
@@ -1,141 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. 
- * 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: TransactionManager.java,v 1.10.6.1 2005/11/22 10:36:06 kconner Exp $
- */
-
-package com.arjuna.mw.wst;
-
-import com.arjuna.wst.*;
-
-import com.arjuna.wsc.AlreadyRegisteredException;
-
-/**
- * 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).
- *
- * 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: TransactionManager.java,v 1.10.6.1 2005/11/22 10:36:06 kconner Exp $
- * @since XTS 1.0.
- */
-
-public abstract class TransactionManager11
-{
-    /**
-     * The manager.
-     */
-    private static TransactionManager11 TRANSACTION_MANAGER ;
-
-    /**
-     * Get the transaction manager.
-     * @return The transaction manager.
-     */
-    public static synchronized TransactionManager11 getTransactionManager()
-    {
-        return TRANSACTION_MANAGER ;
-    }
-
-    /**
-     * Set the transaction manager.
-     * @param manager The transaction manager.
-     */
-    public static synchronized void setTransactionManager(final TransactionManager11 manager)
-    {
-        TRANSACTION_MANAGER = manager ;
-    }
-
-    /**
-     * Enlist the specified participant with current transaction such that it
-     * will participate in the Volatile 2PC protocol; a unique identifier for
-     * the participant is also required. If there is no transaction associated
-     * with the invoking thread then the UnknownTransactionException exception
-     * is thrown. If the coordinator already has a participant enrolled with
-     * the same identifier, then AlreadyRegisteredException will be thrown. If
-     * the transaction is not in a state where participants can be enrolled
-     * (e.g., it is terminating) then WrongStateException will be thrown.
-     */
-    public abstract void enlistForVolatileTwoPhase(final Volatile2PCParticipant pzp, final String id)
-        throws WrongStateException, UnknownTransactionException, AlreadyRegisteredException, SystemException;
-
-    /**
-     * Enlist the specified participant with current transaction such that it
-     * will participate in the 2PC protocol; a unique identifier for the
-     * participant is also required. If there is no transaction associated with
-     * the invoking thread then the UnknownTransactionException exception is
-     * thrown. If the coordinator already has a participant enrolled with the
-     * same identifier, then AlreadyRegisteredException will be thrown. If the
-     * transaction is not in a state where participants can be enrolled (e.g.,
-     * it is terminating) then WrongStateException will be thrown.
-     */
-    public abstract void enlistForDurableTwoPhase(final Durable2PCParticipant tpp, final String id)
-        throws WrongStateException, UnknownTransactionException, AlreadyRegisteredException, SystemException;
-
-    public abstract int replay () throws 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;
-}
\ No newline at end of file

Deleted: labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mw/wst/TransactionManager11Factory.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mw/wst/TransactionManager11Factory.java	2008-01-25 17:05:33 UTC (rev 18123)
+++ labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mw/wst/TransactionManager11Factory.java	2008-01-25 17:18:13 UTC (rev 18124)
@@ -1,41 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. 
- * 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: TransactionManagerFactory.java,v 1.8.8.1 2005/11/22 10:36:05 kconner Exp $
- */
-
-package com.arjuna.mw.wst;
-
-
-public class TransactionManager11Factory
-{
-    public static TransactionManager11 transactionManager ()
-    {
-    	return TransactionManager11.getTransactionManager() ;
-    }
-}
\ No newline at end of file

Deleted: labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mw/wst/UserBusinessActivity11.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mw/wst/UserBusinessActivity11.java	2008-01-25 17:05:33 UTC (rev 18123)
+++ labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mw/wst/UserBusinessActivity11.java	2008-01-25 17:18:13 UTC (rev 18124)
@@ -1,126 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. 
- * 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: UserBusinessActivity.java,v 1.4.6.1 2005/11/22 10:36:06 kconner Exp $
- */
-
-package com.arjuna.mw.wst;
-
-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 BAs to be started and terminated.
- * The messaging layer converts the messages into calls on this.
- *
- * Importantly, a UserBusinessActivity does not represent a specific
- * transaction, but rather is responsible for providing access to an implicit
- * per-thread  transaction context; it is similar to the UserTransaction in
- * the JTA specification. Therefore, all of the UserTransaction methods
- * implicitly act on the current thread of control.
- *
- * @author Mark Little (mark.little at arjuna.com)
- * @version $Id: UserBusinessActivity.java,v 1.4.6.1 2005/11/22 10:36:06 kconner Exp $
- * @since XTS 1.0.
- */
-
-public abstract class UserBusinessActivity11
-{
-    /**
-     * The user business activity.
-     */
-    private static UserBusinessActivity11 USER_BUSINESS_ACTIVITY ;
-
-    /**
-     * Get the user business activity.
-     * @return The user business activity.
-     */
-    public static synchronized UserBusinessActivity11 getUserBusinessActivity()
-    {
-        return USER_BUSINESS_ACTIVITY ;
-    }
-
-    /**
-     * Set the user business activity.
-     * @param userBusinessActivity The user business activity.
-     */
-    public static synchronized void setUserBusinessActivity(final UserBusinessActivity11 userBusinessActivity)
-    {
-        USER_BUSINESS_ACTIVITY = userBusinessActivity ;
-    }
-
-    public static final int ATOMIC_OUTCOME = 0;
-    public static final int MIXED_OUTCOME = 1;
-
-    /**
-     * Start a new business activity with atomic outcome.
-     * If one is already associated with this thread
-     * then the WrongStateException will be thrown. Upon success, this
-     * operation associates the newly created transaction with the current
-     * thread.
-     */
-    public abstract void begin()
-        throws WrongStateException, SystemException;
-
-    /**
-     * Start a new BA with atomic outcome and the specified timeout as
-     * its lifetime.
-     * If one is already associated with this thread then the
-     * WrongStateException will be thrown.
-     */
-    public abstract void begin(final int timeout)
-        throws WrongStateException, SystemException;
-
-    /**
-     * The BA is normally terminated by the close method. This signals to
-     * all registered participants that the BA has ended and no compensation
-     * is required.
-     */
-    public abstract void close()
-        throws TransactionRolledBackException, UnknownTransactionException, SystemException;
-
-    /**
-     * If the BA must undo its work then the cancel method is used. Any
-     * participants that can compensate are forced to do so.
-     */
-    public abstract void cancel()
-        throws UnknownTransactionException, SystemException;
-
-    /**
-     * If participants have registered for the BusinessAgreementWithComplete
-     * protocol then they will be expecting the application to inform them
-     * when all work intended for them has been sent (and responded to). The
-     * complete method is used for this purpose.
-     */
-    public abstract void complete()
-        throws UnknownTransactionException, SystemException;
-
-    public abstract String transactionIdentifier();
-}
\ No newline at end of file

Deleted: labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mw/wst/UserBusinessActivity11Factory.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mw/wst/UserBusinessActivity11Factory.java	2008-01-25 17:05:33 UTC (rev 18123)
+++ labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mw/wst/UserBusinessActivity11Factory.java	2008-01-25 17:18:13 UTC (rev 18124)
@@ -1,42 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. 
- * 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: UserBusinessActivityFactory.java,v 1.4.8.1 2005/11/22 10:36:05 kconner Exp $
- */
-
-package com.arjuna.mw.wst;
-
-import com.arjuna.mw.wst.UserBusinessActivity;
-
-public class UserBusinessActivity11Factory
-{
-    public static UserBusinessActivity11 userBusinessActivity ()
-    {
-        return UserBusinessActivity11.getUserBusinessActivity() ;
-	}
-}
\ No newline at end of file

Deleted: labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mw/wst/UserTransaction11.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mw/wst/UserTransaction11.java	2008-01-25 17:05:33 UTC (rev 18123)
+++ labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mw/wst/UserTransaction11.java	2008-01-25 17:18:13 UTC (rev 18124)
@@ -1,118 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. 
- * 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: UserTransaction.java,v 1.8.4.1 2005/11/22 10:36:05 kconner Exp $
- */
-
-package com.arjuna.mw.wst;
-
-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.
- * Importantly, a UserTransaction does not represent a specific transaction,
- * but rather is responsible for providing access to an implicit per-thread
- * transaction context; it is similar to the UserTransaction in the JTA
- * specification. Therefore, all of the UserTransaction methods implicitly act
- * on the current thread of control.
- *
- * @author Mark Little (mark.little at arjuna.com)
- * @version $Id: UserTransaction.java,v 1.8.4.1 2005/11/22 10:36:05 kconner Exp $
- * @since XTS 1.0.
- */
-
-public abstract class UserTransaction11
-{
-    /**
-     * The transaction.
-     */
-    private static UserTransaction11 USER_TRANSACTION ;
-
-    /**
-     * Get the user transaction.
-     * @return the user transaction.
-     */
-    public static synchronized UserTransaction11 getUserTransaction()
-    {
-        return USER_TRANSACTION ;
-    }
-
-    /**
-     * Set the user transaction.
-     * @param userTransaction The user transaction.
-     */
-    public static synchronized void setUserTransaction(final UserTransaction11 userTransaction)
-    {
-        USER_TRANSACTION = userTransaction ;
-    }
-
-    /**
-     * Start a new transaction. If one is already associated with this thread
-     * then the WrongStateException will be thrown. Upon success, this
-     * operation associates the newly created transaction with the current
-     * thread.
-     */
-    public abstract void begin()
-        throws WrongStateException, SystemException;
-
-    /**
-     * Start a new transaction with the specified timeout as its lifetime.
-     * If one is already associated with this thread then the
-     * WrongStateException will be thrown.
-     */
-    public abstract void begin(final int timeout)
-        throws WrongStateException, SystemException;
-
-    /**
-     * The transaction is committed by the commit method. This will execute
-     * the PhaseZero, 2PC and OutcomeNotification protocols prior to returning.
-     * If there is no transaction associated with the invoking thread then
-     * UnknownTransactionException is thrown. If the transaction ultimately
-     * rolls back then the TransactionRolledBackException is thrown. When
-     * complete, this operation disassociates the transaction from the current
-     * thread such that it becomes associated with no transaction.
-     */
-    public abstract void commit()
-        throws TransactionRolledBackException, UnknownTransactionException, SecurityException, SystemException;
-
-    /**
-     * The rollback operation will terminate the transaction and return
-     * normally if it succeeded, while throwing an appropriate exception if it
-     * didn't. If there is no transaction associated with the invoking thread
-     * then UnknownTransactionException is thrown.
-     */
-    public abstract void rollback()
-        throws UnknownTransactionException, SecurityException, SystemException;
-
-    public abstract String transactionIdentifier ();
-}
\ No newline at end of file

Deleted: labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mw/wst/UserTransaction11Factory.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mw/wst/UserTransaction11Factory.java	2008-01-25 17:05:33 UTC (rev 18123)
+++ labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mw/wst/UserTransaction11Factory.java	2008-01-25 17:18:13 UTC (rev 18124)
@@ -1,41 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. 
- * 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: UserTransactionFactory.java,v 1.9.8.1 2005/11/22 10:36:05 kconner Exp $
- */
-
-package com.arjuna.mw.wst;
-
-
-public class UserTransaction11Factory
-{
-    public static UserTransaction11 userTransaction ()
-    {
-        return UserTransaction11.getUserTransaction() ;
-    }
-}
\ No newline at end of file

Deleted: labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mw/wst/client/JaxBaseHeaderContextProcessorWS.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mw/wst/client/JaxBaseHeaderContextProcessorWS.java	2008-01-25 17:05:33 UTC (rev 18123)
+++ labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mw/wst/client/JaxBaseHeaderContextProcessorWS.java	2008-01-25 17:18:13 UTC (rev 18124)
@@ -1,232 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2007, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags.
- * 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) 2007,
- * @author JBoss Inc.
- */
-package com.arjuna.mw.wst.client;
-
-import com.arjuna.mw.wsc.context.ContextWS;
-import com.arjuna.mw.wst.*;
-import com.arjuna.mw.wst.common.CoordinationContextHelperWS;
-import com.arjuna.mw.wst.common.SOAPUtil;
-import com.arjuna.mw.wstx.logging.wstxLogger;
-import com.arjuna.webservices.wsat.AtomicTransactionWSConstants;
-import com.arjuna.webservices.wsba.BusinessActivityWSConstants;
-import com.arjuna.webservices.wscoor.CoordinationConstantsWS;
-import org.oasis_open.docs.ws_tx.wscoor._2006._06.CoordinationContextType;
-
-import javax.xml.soap.*;
-import java.util.Iterator;
-
-/**
- * Common base class for classes used to perform
- * WS-Transaction context manipulation on SOAP messages.
- *
- * @message com.arjuna.mw.wst.client.JaxHCPWS_1 [com.arjuna.mw.wst.client.JaxHCPWS_1] - Error in:
- * @message com.arjuna.mw.wst.client.JaxHCPWS_2 [com.arjuna.mw.wst.client.JacHCP_2] - Stack trace:
- */
-class JaxBaseHeaderContextProcessorWS
-{
-    /**
-     * Handle the request.
-     * @param soapMessage The current message context.
-     */
-
-    public boolean handleOutboundMessage(final SOAPMessage soapMessage)
-    {
-        if (soapMessage == null)
-        {
-            return true ;
-        }
-
-        try
-        {
-            /*
-             * There should either be an Atomic Transaction *or* a Business Activity
-             * associated with the thread.
-             */
-            final TransactionManager transactionManager = TransactionManagerFactory.transactionManager() ;
-            final BusinessActivity11Manager businessActivityManager = BusinessActivityManager11Factory.businessActivityManager() ;
-
-            final ContextWS atContext ;
-            if (transactionManager != null)
-            {
-                final com.arjuna.mwlabs.wst.at.context.TxContextWSImple txContext =
-                    (com.arjuna.mwlabs.wst.at.context.TxContextWSImple)transactionManager.currentTransaction() ;
-                atContext = (txContext == null ? null : txContext.context()) ;
-            }
-            else
-            {
-                atContext = null ;
-            }
-
-            final ContextWS baContext ;
-            if (businessActivityManager != null)
-            {
-                final com.arjuna.mwlabs.wst.ba.context.TxContextWSImple txContext =
-                    (com.arjuna.mwlabs.wst.ba.context.TxContextWSImple)businessActivityManager.currentTransaction() ;
-                baContext = (txContext == null ? null : txContext.context()) ;
-            }
-            else
-            {
-                baContext = null ;
-            }
-
-            final CoordinationContextType coordinationContext ;
-            if (atContext != null)
-            {
-                coordinationContext = atContext.getCoordinationContext() ;
-            }
-            else if (baContext != null)
-            {
-                coordinationContext = baContext.getCoordinationContext() ;
-            }
-            else
-            {
-                coordinationContext = null ;
-            }
-
-            if (coordinationContext != null)
-            {
-                final SOAPEnvelope env = soapMessage.getSOAPPart().getEnvelope() ;
-                SOAPHeader header = env.getHeader() ;
-                if (header == null)
-                {
-                    header = env.addHeader() ;
-                }
-                final Name name = env.createName(CoordinationConstantsWS.WSCOOR_ELEMENT_COORDINATION_CONTEXT, CoordinationConstantsWS.WSCOOR_PREFIX, CoordinationConstantsWS.WSCOOR_NAMESPACE) ;
-                final SOAPHeaderElement headerElement = header.addHeaderElement(name) ;
-                headerElement.addNamespaceDeclaration(CoordinationConstantsWS.WSCOOR_PREFIX, CoordinationConstantsWS.WSCOOR_NAMESPACE) ;
-                headerElement.setMustUnderstand(true) ;
-                CoordinationContextHelperWS.serialise(coordinationContext, headerElement) ;
-            }
-        }
-        catch (final Throwable th)
-        {
-	    wstxLogger.arjLoggerI18N.warn("com.arjuna.mw.wst.client.JaxHCPWS_1",
-					  new Object[]{"com.arjuna.mw.wst.client.JaxBaseHeaderContextProcessorWS.handleRequest()"});
-
-	    wstxLogger.arjLoggerI18N.warn("com.arjuna.mw.wst.client.JaxHCPWS_2",
-					  new Object[]{th});
-
-            th.printStackTrace(System.err) ;
-        }
-
-        return true ;
-    }
-
-    /**
-     * Resume the current transaction.
-     *
-     * @message com.arjuna.mw.wst.client.JaxHCPWS_3 [com.arjuna.mw.wst.client.JaxHCPWS_3] - Unknown context type:
-     */
-
-    protected void resumeTransaction(final SOAPMessage soapMessage)
-    {
-        if (soapMessage != null)
-        {
-            try
-            {
-                final SOAPEnvelope soapEnvelope = soapMessage.getSOAPPart().getEnvelope() ;
-                final SOAPHeaderElement soapHeaderElement = getHeaderElement(soapEnvelope, CoordinationConstantsWS.WSCOOR_NAMESPACE, CoordinationConstantsWS.WSCOOR_ELEMENT_COORDINATION_CONTEXT) ;
-
-                if (soapHeaderElement != null)
-                {
-                    final CoordinationContextType cc = CoordinationContextHelperWS.deserialise(soapHeaderElement) ;
-                    if (cc != null)
-                    {
-                        final String coordinationType = cc.getCoordinationType() ;
-                        if (AtomicTransactionWSConstants.WSAT_PROTOCOL.equals(coordinationType))
-                        {
-                            final TxContext txContext = new com.arjuna.mwlabs.wst.at.context.TxContextWSImple(cc) ;
-                            TransactionManagerFactory.transactionManager().resume(txContext) ;
-                        }
-                        else if (BusinessActivityWSConstants.WSBA_PROTOCOL_ATOMIC_OUTCOME.equals(coordinationType))
-                        {
-                            final TxContext txContext = new com.arjuna.mwlabs.wst.ba.context.TxContextWSImple(cc);
-                            BusinessActivityManager11Factory.businessActivityManager().resume(txContext) ;
-                        }
-                        else
-                        {
-            			    wstxLogger.arjLoggerI18N.warn("com.arjuna.mw.wst.client.JaxHCPWS_1",
-    			                new Object[]{"com.arjuna.mw.wst.client.JaxBaseHeaderContextProcessorWS.resumeTransaction()"});
-
-            			    wstxLogger.arjLoggerI18N.warn("com.arjuna.mw.wst.client.JaxHCPWS_3",
-                                new Object[]{coordinationType});
-                        }
-                    }
-                }
-            }
-            catch (final Throwable th)
-            {
-        		wstxLogger.arjLoggerI18N.warn("com.arjuna.mw.wst.client.JaxHCPWS_1",
-                    new Object[]{"com.arjuna.mw.wst.client.JaxBaseHeaderContextProcessorWS.resumeTransaction()"});
-
-        		wstxLogger.arjLoggerI18N.warn("com.arjuna.mw.wst.client.JaxHCPWS_2",
-                    new Object[]{th});
-            }
-        }
-    }
-
-    /**
-     * Retrieve the first header matching the uri and name.
-     * @param soapEnvelope The soap envelope containing the header.
-     * @param uri The uri of the header element.
-     * @param name The name of the header element.
-     * @return The header element or null if not found.
-     */
-    private SOAPHeaderElement getHeaderElement(final SOAPEnvelope soapEnvelope, final String uri, final String name)
-        throws SOAPException
-    {
-        final SOAPHeader soapHeader = soapEnvelope.getHeader() ;
-        if (soapHeader != null)
-        {
-            final Iterator headerIter = SOAPUtil.getChildElements(soapHeader) ;
-            while(headerIter.hasNext())
-            {
-                final SOAPHeaderElement current = (SOAPHeaderElement)headerIter.next() ;
-                final Name currentName = current.getElementName() ;
-                if ((currentName != null) &&
-                    match(name, currentName.getLocalName()) &&
-                    match(uri, currentName.getURI()))
-                {
-                    return current ;
-                }
-            }
-        }
-        return null ;
-    }
-
-    /**
-     * Do the two references match?
-     * @param lhs The first reference.
-     * @param rhs The second reference.
-     * @return true if the references are both null or if they are equal.
-     */
-    private boolean match(final Object lhs, final Object rhs)
-    {
-        if (lhs == null)
-        {
-            return (rhs == null) ;
-        }
-        else
-        {
-            return lhs.equals(rhs) ;
-        }
-    }
-}
\ No newline at end of file

Deleted: labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mw/wst/client/JaxWSHeaderContextProcessorWS.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mw/wst/client/JaxWSHeaderContextProcessorWS.java	2008-01-25 17:05:33 UTC (rev 18123)
+++ labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mw/wst/client/JaxWSHeaderContextProcessorWS.java	2008-01-25 17:18:13 UTC (rev 18124)
@@ -1,119 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2007, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags.
- * 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) 2007,
- * @author JBoss Inc.
- */
-package com.arjuna.mw.wst.client;
-
-import com.arjuna.webservices.wscoor.CoordinationConstantsWS;
-
-import javax.xml.namespace.QName;
-import javax.xml.soap.SOAPMessage;
-import javax.xml.ws.handler.MessageContext;
-import javax.xml.ws.handler.soap.SOAPHandler;
-import javax.xml.ws.handler.soap.SOAPMessageContext;
-import java.util.HashSet;
-import java.util.Set;
-
-/**
- * The class is used to perform WS-Transaction context insertion
- * and extraction for application level SOAP messages using JaxWS.
- * This is the client side version.
- */
-public class JaxWSHeaderContextProcessorWS extends JaxBaseHeaderContextProcessorWS implements SOAPHandler<SOAPMessageContext>
-{
-    /**
-     * Process a message. Determines if it is inbound or outbound and dispatches accordingly.
-     *
-     * @param msgContext
-     * @return true
-     */
-    public boolean handleMessage(SOAPMessageContext msgContext)
-    {
-        Boolean outbound = (Boolean)msgContext.get(MessageContext.MESSAGE_OUTBOUND_PROPERTY);
-        if (outbound == null)
-            throw new IllegalStateException("Cannot obtain required property: " + MessageContext.MESSAGE_OUTBOUND_PROPERTY);
-
-        return outbound ? handleOutbound(msgContext) : handleInbound(msgContext);
-    }
-
-    /**
-     * Tidy up the Transaction/Thread association.
-     *
-     * @param messageContext
-     * @return true
-     */
-    public boolean handleFault(SOAPMessageContext messageContext)
-    {
-        final SOAPMessageContext soapMessageContext = (SOAPMessageContext)messageContext ;
-        final SOAPMessage soapMessage = soapMessageContext.getMessage() ;
-
-        resumeTransaction(soapMessage);
-        return true;
-    }
-
-    public void close(MessageContext messageContext)
-    {
-    }
-
-    /**
-     * Gets the header blocks that can be processed by this Handler instance.
-     */
-    public Set<QName> getHeaders()
-    {
-        Set<QName> headerSet = new HashSet<QName>();
-        headerSet.add(new QName(CoordinationConstantsWS.WSCOOR_NAMESPACE, CoordinationConstantsWS.WSCOOR_ELEMENT_COORDINATION_CONTEXT));
-
-        return headerSet;
-    }
-
-    /**
-     * Sets the header blocks that can be processed by this Handler instance.
-     * Note: this impl ignores this function's args as the values are hardcoded.
-     */
-    public void setHeaders(Set headers)
-    {
-    }
-
-    /**
-     * Tidy up the Transaction/Thread association before control is returned to the user.
-     *
-     * @param messageContext
-     * @return true
-     */
-    protected boolean handleInbound(SOAPMessageContext messageContext)
-    {
-        final SOAPMessage soapMessage = messageContext.getMessage() ;
-
-        resumeTransaction(soapMessage);
-        return true ;
-    }
-
-    /**
-     * Process the tx thread context and attach serialized version as msg header
-     *
-     * @param messageContext
-     * @return true
-     */
-    protected boolean handleOutbound(SOAPMessageContext messageContext)
-    {
-        final SOAPMessage soapMessage = messageContext.getMessage() ;
-
-        return handleOutboundMessage(soapMessage);
-    }
-}
\ No newline at end of file

Deleted: labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mw/wst/common/CoordinationContextHelperWS.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mw/wst/common/CoordinationContextHelperWS.java	2008-01-25 17:05:33 UTC (rev 18123)
+++ labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mw/wst/common/CoordinationContextHelperWS.java	2008-01-25 17:18:13 UTC (rev 18124)
@@ -1,76 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. 
- * 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.mw.wst.common;
-
-import org.oasis_open.docs.ws_tx.wscoor._2006._06.CoordinationContextType;
-import org.w3c.dom.Element;
-
-import javax.xml.bind.JAXBContext;
-import javax.xml.bind.JAXBException;
-import javax.xml.bind.Marshaller;
-import javax.xml.bind.Unmarshaller;
-import javax.xml.stream.XMLStreamException;
-
-/**
- * Helper class for serialising Coordination Contexts into SOAP headers.
- * @author kevin
- */
-public class CoordinationContextHelperWS
-{
-   /**
-     * Deserialise a coordination context from a DOM SOAP Header Element.
-     * @param headerElement The SOAP header element to deserialise.
-     * @return The coordination context.
-     * @throws javax.xml.stream.XMLStreamException for errors during parsing.
-     */
-    public static CoordinationContextType deserialise(final Element headerElement)
-        throws JAXBException
-    {
-        try {
-            JAXBContext jaxbContext = JAXBContext.newInstance("org.oasis_open.docs.ws_tx.wscoor._2006._06");
-            Unmarshaller unmarshaller;
-            unmarshaller = jaxbContext.createUnmarshaller();
-            CoordinationContextType coordinationContextType = unmarshaller.unmarshal(headerElement.getFirstChild(), CoordinationContextType.class).getValue();
-
-            return coordinationContextType;
-        } catch (JAXBException jaxbe) {
-            return null;
-        }
-    }
-
-    /**
-      * Deserialise a coordination context from a DOM SOAP Header Element.
-      * @param headerElement The SOAP header element to deserialise.
-      * @return The coordination context.
-      * @throws javax.xml.stream.XMLStreamException for errors during parsing.
-      */
-    public static void serialise(final CoordinationContextType  coordinationContextType, Element headerElement)
-        throws JAXBException
-    {
-        try {
-            JAXBContext jaxbContext = JAXBContext.newInstance("org.oasis_open.docs.ws_tx.wscoor._2006._06");
-            Marshaller marshaller;
-            marshaller = jaxbContext.createMarshaller();
-            marshaller.marshal(coordinationContextType, headerElement);
-        } catch (JAXBException jaxbe) {
-        }
-    }
-}
\ No newline at end of file

Deleted: labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mw/wst/deploy/WSTXWSInitialisation.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mw/wst/deploy/WSTXWSInitialisation.java	2008-01-25 17:05:33 UTC (rev 18123)
+++ labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mw/wst/deploy/WSTXWSInitialisation.java	2008-01-25 17:18:13 UTC (rev 18124)
@@ -1,197 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. 
- * 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.mw.wst.deploy;
-
-import com.arjuna.mw.wsas.utils.Configuration;
-import com.arjuna.mw.wst.*;
-import com.arjuna.mw.wstx.logging.wstxLogger;
-import com.arjuna.services.framework.startup.Sequencer;
-import com.arjuna.webservices.util.ClassLoaderHelper;
-import org.w3c.dom.Document;
-import org.w3c.dom.Element;
-import org.w3c.dom.Node;
-import org.w3c.dom.NodeList;
-
-import javax.servlet.ServletContextEvent;
-import javax.servlet.ServletContextListener;
-import javax.xml.parsers.DocumentBuilder;
-import javax.xml.parsers.DocumentBuilderFactory;
-import java.io.FileNotFoundException;
-import java.io.InputStream;
-import java.text.MessageFormat;
-
-/**
- * Initialise WSTX.
- * @author kevin
- */
-public class WSTXWSInitialisation implements ServletContextListener
-{
-    /**
-     * The name of the WS-T configuration.
-     */
-    private static final String WS_T11_CONFIG = "/wst11.xml" ;
-
-    /**
-     * The context has been initialized.
-     * @param servletContextEvent The servlet context event.
-     *
-     * @message com.arjuna.mw.wst.deploy.WSTXWSI_1 [com.arjuna.mw.wst.deploy.WSTXWSI_1] - WSTX Initialisation: init failed:
-     */
-    public void contextInitialized(final ServletContextEvent servletContextEvent)
-    {
-        final WSTXWSInitialisation listener = this;
-
-        Sequencer.Callback callback = new Sequencer.Callback(Sequencer.SEQUENCE_WSCOOR11, Sequencer.WEBAPP_WSTX11) {
-           public void run() {
-               try
-               {
-                   Configuration.initialise("/wstx11.xml");
-
-                   listener.configure();
-                   // Start recovery
-//            RecoveryManager.manager() ;
-               }
-               catch (Exception exception)
-               {
-                   wstxLogger.arjLoggerI18N.error("com.arjuna.mw.wst.deploy.WSTXWSI_1", exception);
-               }
-               catch (Error error)
-               {
-                   wstxLogger.arjLoggerI18N.error("com.arjuna.mw.wst.deploy.WSTXWSI_21", error);
-               }
-           }
-        };
-        // this is the last WST callback to be initialised so close the list
-        Sequencer.close(Sequencer.SEQUENCE_WSCOOR11, Sequencer.WEBAPP_WSTX11);
-    }
-
-    /**
-     * Configure WS-T.
-     *
-     * @message com.arjuna.mw.wst.deploy.WSTXWSI_21 [com.arjuna.mw.wst.deploy.WSTXWSI_21] - {0} not found.
-     * @message com.arjuna.mw.wst.deploy.WSTXWSI_22 [com.arjuna.mw.wst.deploy.WSTXWSI_22] - Failed to create document: {0}
-     * @message com.arjuna.mw.wst.deploy.WSTXWSI_23 [com.arjuna.mw.wst.deploy.WSTXWSI_23] - Missing WSTX Initialisation
-     */
-    private void configure()
-        throws Exception
-    {
-        // mostly original JNDI binder code.  Should be tidied up.
-        final InputStream is = ClassLoaderHelper.getResourceAsStream(getClass(), WS_T11_CONFIG) ;
-
-        if (is == null)
-        {
-            final String pattern = wstxLogger.log_mesg.getString("com.arjuna.mw.wst.deploy.WSTXWSI_21") ;
-            throw new FileNotFoundException(MessageFormat.format(pattern, new Object[] {WS_T11_CONFIG}));
-        }
-
-        final DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance() ;
-        final DocumentBuilder builder = factory.newDocumentBuilder() ;
-        final Document doc = builder.parse(is);
-
-        if (doc == null)
-        {
-            final String pattern = wstxLogger.log_mesg.getString("com.arjuna.mw.wst.deploy.WSTXWSI_22") ;
-            throw new FileNotFoundException(MessageFormat.format(pattern, new Object[] {WS_T11_CONFIG}));
-        }
-
-        final Element docElem = doc.getDocumentElement() ;
-        final String userTx = getService(docElem, "UserTransaction") ;
-        final String txManager = getService(docElem, "TransactionManager") ;
-        final String userBa = getService(docElem, "UserBusinessActivity") ;
-        final String baManager = getService(docElem, "BusinessActivityManager") ;
-
-        if ((userTx == null) || (txManager == null) || (userBa == null) || (baManager == null))
-        {
-            throw new FileNotFoundException(wstxLogger.log_mesg.getString("com.arjuna.mw.wst.deploy.WSTXWSI_23"));
-        }
-        UserTransaction11.setUserTransaction((UserTransaction11)ClassLoaderHelper.forName(getClass(), userTx).newInstance()) ;
-        TransactionManager11.setTransactionManager((TransactionManager11)ClassLoaderHelper.forName(getClass(), txManager).newInstance()) ;
-        UserBusinessActivity11.setUserBusinessActivity((UserBusinessActivity11)ClassLoaderHelper.forName(getClass(), userBa).newInstance()) ;
-        // we only have one choice for the 1.1 business activity manager
-        // BusinessActivity11Manager.setBusinessActivityManager(BusinessActivity11ManagerImple.class.newInstance());
-        BusinessActivity11Manager.setBusinessActivityManager((BusinessActivity11Manager)ClassLoaderHelper.forName(getClass(), baManager).newInstance());
-    }
-
-    /**
-     * Get the specified service.
-     * @param root The root element.
-     * @param name The name of the service.
-     * @return The service name or null if not present.
-     */
-    private static String getService(final Node root, final String name)
-    {
-        final NodeList children = root.getChildNodes();
-
-        for (int i = 0; i < children.getLength(); i++)
-        {
-            final Node item = children.item(i) ;
-
-            if ("service".equals(item.getNodeName()))
-            {
-                final Element type = (Element)item;
-
-                if (name.equals(type.getAttribute("name")))
-                {
-                    return getImplementation(type);
-                }
-            }
-        }
-
-        return null;
-    }
-
-    /**
-     * Get the specified service.
-     * @param service The service element.
-     * @return The service name or null if not present.
-     */
-    private static String getImplementation(final Node service)
-    {
-        final NodeList children = service.getChildNodes();
-
-        for (int i = 0; i < children.getLength(); i++)
-        {
-            final Node item = children.item(i);
-
-            if ("parameter".equals(item.getNodeName()))
-            {
-                final Element type = (Element)item;
-
-                if ("className".equals(type.getAttribute("name")))
-                {
-                    return type.getAttribute("value");
-                }
-            }
-        }
-
-        return null;
-    }
-
-
-    /**
-     * The context is about to be destroyed.
-     * @param servletContextEvent The servlet context event.
-     */
-    public void contextDestroyed(final ServletContextEvent servletContextEvent)
-    {
-//        RecoveryManager.manager().stop() ;
-    }
-}
\ No newline at end of file

Deleted: labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mw/wst/service/JaxBaseHeaderContextProcessorWS.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mw/wst/service/JaxBaseHeaderContextProcessorWS.java	2008-01-25 17:05:33 UTC (rev 18123)
+++ labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mw/wst/service/JaxBaseHeaderContextProcessorWS.java	2008-01-25 17:18:13 UTC (rev 18124)
@@ -1,187 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2007, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags.
- * 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) 2007,
- * @author JBoss Inc.
- */
-package com.arjuna.mw.wst.service;
-
-import com.arjuna.mw.wst.*;
-import com.arjuna.mw.wst.common.CoordinationContextHelperWS;
-import com.arjuna.mw.wst.common.SOAPUtil;
-import com.arjuna.mw.wstx.logging.wstxLogger;
-import com.arjuna.webservices.wsat.AtomicTransactionWSConstants;
-import com.arjuna.webservices.wsba.BusinessActivityWSConstants;
-import com.arjuna.webservices.wscoor.CoordinationConstantsWS;
-import org.oasis_open.docs.ws_tx.wscoor._2006._06.CoordinationContextType;
-
-import javax.xml.soap.*;
-import java.util.Iterator;
-
-/**
- * Common base class for classes used to perform
- * WS-Transaction context manipulation on SOAP messages.
- *
- * @message com.arjuna.mw.wst.service.JaxHCPWS_1 [com.arjuna.mw.wst.service.JaxHCPWS_1] - Error in:
- * @message com.arjuna.mw.wst.service.JaxHCPWS_2 [com.arjuna.mw.wst.service.JaxHCPWS_2] - Stack trace:
- * @message com.arjuna.mw.wst.service.JaxHCPWS_3 [com.arjuna.mw.wst.service.JaxHCPWS_3] - Unknown context type:
- */
-class JaxBaseHeaderContextProcessorWS
-{
-    /**
-     * Handle the request.
-     * @param soapMessage The current message context.
-     */
-    protected boolean handleInboundMessage(final SOAPMessage soapMessage)
-    {
-        if (soapMessage != null)
-        {
-            try
-            {
-                final SOAPEnvelope soapEnvelope = soapMessage.getSOAPPart().getEnvelope() ;
-                final SOAPHeader soapHeader = soapEnvelope.getHeader() ;
-                final SOAPHeaderElement soapHeaderElement = getHeaderElement(soapHeader, CoordinationConstantsWS.WSCOOR_NAMESPACE, CoordinationConstantsWS.WSCOOR_ELEMENT_COORDINATION_CONTEXT) ;
-
-                if (soapHeaderElement != null)
-                {
-                    final CoordinationContextType cc = CoordinationContextHelperWS.deserialise(soapHeaderElement) ;
-                    final String coordinationType = cc.getCoordinationType();
-                    if (AtomicTransactionWSConstants.WSAT_PROTOCOL.equals(coordinationType))
-                    {
-                        final TxContext txContext = new com.arjuna.mwlabs.wst.at.context.TxContextWSImple(cc) ;
-                        TransactionManagerFactory.transactionManager().resume(txContext) ;
-                        clearMustUnderstand(soapHeader, soapHeaderElement) ;
-                    }
-                    else if (BusinessActivityWSConstants.WSBA_PROTOCOL_ATOMIC_OUTCOME.equals(coordinationType))
-                    {
-                        final TxContext txContext = new com.arjuna.mwlabs.wst.ba.context.TxContextWSImple(cc);
-                        BusinessActivityManagerFactory.businessActivityManager().resume(txContext) ;
-                        clearMustUnderstand(soapHeader, soapHeaderElement) ;
-                    }
-                    else
-                    {
-                        wstxLogger.arjLoggerI18N.warn("com.arjuna.mw.wst.service.JaxHCPWS_1",
-                                new Object[]{"com.arjuna.mw.wst.service.JaxBaseHeaderContextProcessorWS.handleRequest(MessageContext context)"});
-
-                        wstxLogger.arjLoggerI18N.warn("com.arjuna.mw.wst.service.JaxHCPWS_3",
-                                new Object[]{coordinationType});
-                    }
-                }
-            }
-            catch (final Throwable th)
-            {
-                wstxLogger.arjLoggerI18N.warn("com.arjuna.mw.wst.service.JaxHCPWS_1",
-                        new Object[]{"com.arjuna.mw.wst.service.JaxBaseHeaderContextProcessorWS.handleRequest(MessageContext context)"});
-
-                wstxLogger.arjLoggerI18N.warn("com.arjuna.mw.wst.service.JaxHCPWS_2",
-                        new Object[]{th});
-            }
-        }
-        return true ;
-    }
-
-    /**
-     * Suspend the current transaction.
-     */
-    protected void suspendTransaction()
-    {
-        try
-        {
-            /*
-             * There should either be an Atomic Transaction *or* a Business Activity
-             * associated with the thread.
-             */
-            final TransactionManager transactionManager = TransactionManagerFactory.transactionManager() ;
-            final BusinessActivityManager businessActivityManager = BusinessActivityManagerFactory.businessActivityManager() ;
-
-            if (transactionManager != null)
-            {
-                transactionManager.suspend() ;
-            }
-
-            if (businessActivityManager != null)
-            {
-                businessActivityManager.suspend() ;
-            }
-        }
-        catch (final Throwable th)
-        {
-            wstxLogger.arjLoggerI18N.warn("com.arjuna.mw.wst.service.JaxHCPWS_1",
-                    new Object[]{"com.arjuna.mw.wst.service.JaxBaseHeaderContextProcessorWS.suspendTransaction()"});
-
-            wstxLogger.arjLoggerI18N.warn("com.arjuna.mw.wst.service.JaxHCPWS_2",
-                    new Object[]{th});
-
-            th.printStackTrace(System.err) ;
-        }
-    }
-
-    /**
-     * Clear the soap MustUnderstand.
-     * @param soapHeader The SOAP header.
-     * @param soapHeaderElement The SOAP header element.
-     */
-    private void clearMustUnderstand(final SOAPHeader soapHeader, final SOAPHeaderElement soapHeaderElement)
-            throws SOAPException
-    {
-        final Name headerName = soapHeader.getElementName() ;
-
-        final SOAPFactory factory = SOAPFactory.newInstance() ;
-        final Name attributeName = factory.createName("mustUnderstand", headerName.getPrefix(), headerName.getURI()) ;
-
-        soapHeaderElement.removeAttribute(attributeName) ;
-    }
-
-    private SOAPHeaderElement getHeaderElement(final SOAPHeader soapHeader, final String uri, final String name)
-            throws SOAPException
-    {
-        if (soapHeader != null)
-        {
-            final Iterator headerIter = SOAPUtil.getChildElements(soapHeader) ;
-            while(headerIter.hasNext())
-            {
-                final SOAPHeaderElement current = (SOAPHeaderElement)headerIter.next() ;
-                final Name currentName = current.getElementName() ;
-                if ((currentName != null) &&
-                        match(name, currentName.getLocalName()) &&
-                        match(uri, currentName.getURI()))
-                {
-                    return current ;
-                }
-            }
-        }
-        return null ;
-    }
-
-    /**
-     * Do the two references match?
-     * @param lhs The first reference.
-     * @param rhs The second reference.
-     * @return true if the references are both null or if they are equal.
-     */
-    private boolean match(final Object lhs, final Object rhs)
-    {
-        if (lhs == null)
-        {
-            return (rhs == null) ;
-        }
-        else
-        {
-            return lhs.equals(rhs) ;
-        }
-    }
-}
\ No newline at end of file

Deleted: labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mw/wst/service/JaxWSHeaderContextProcessorWS.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mw/wst/service/JaxWSHeaderContextProcessorWS.java	2008-01-25 17:05:33 UTC (rev 18123)
+++ labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mw/wst/service/JaxWSHeaderContextProcessorWS.java	2008-01-25 17:18:13 UTC (rev 18124)
@@ -1,116 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2007, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags.
- * 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) 2007,
- * @author JBoss Inc.
- */
-package com.arjuna.mw.wst.service;
-
-import com.arjuna.webservices.wscoor.CoordinationConstantsWS;
-
-import javax.xml.namespace.QName;
-import javax.xml.soap.SOAPMessage;
-import javax.xml.ws.handler.MessageContext;
-import javax.xml.ws.handler.soap.SOAPHandler;
-import javax.xml.ws.handler.soap.SOAPMessageContext;
-import java.util.HashSet;
-import java.util.Set;
-
-/**
- * The class is used to perform WS-Transaction context insertion
- * and extraction for application level SOAP messages using JaxWS.
- * This is the server side version.
- */
-public class JaxWSHeaderContextProcessorWS extends JaxBaseHeaderContextProcessorWS implements SOAPHandler<SOAPMessageContext>
-{
-    /**
-     * Process a message. Determines if it is inbound or outbound and dispatches accordingly.
-     *
-     * @param msgContext
-     * @return true
-     */
-    public boolean handleMessage(SOAPMessageContext msgContext)
-    {
-        Boolean outbound = (Boolean)msgContext.get(MessageContext.MESSAGE_OUTBOUND_PROPERTY);
-        if (outbound == null)
-            throw new IllegalStateException("Cannot obtain required property: " + MessageContext.MESSAGE_OUTBOUND_PROPERTY);
-
-        return outbound ? handleOutbound(msgContext) : handleInbound(msgContext);
-    }
-
-    /**
-     * Tidy up the Transaction/Thread association before faults are thrown back to the client.
-     *
-     * @param messageContext
-     * @return true
-     */
-    public boolean handleFault(SOAPMessageContext messageContext)
-    {
-        suspendTransaction() ;
-        return true;
-    }
-
-    public void close(MessageContext messageContext)
-    {
-    }
-
-    /**
-     * Gets the header blocks that can be processed by this Handler instance.
-     */
-    public Set<QName> getHeaders()
-    {
-        Set<QName> headerSet = new HashSet<QName>();
-        headerSet.add(new QName(CoordinationConstantsWS.WSCOOR_NAMESPACE, CoordinationConstantsWS.WSCOOR_ELEMENT_COORDINATION_CONTEXT));
-
-        return headerSet;
-    }
-
-    /**
-     * Sets the header blocks that can be processed by this Handler instance.
-     * Note: this impl ignores this function's args as the values are hardcoded.
-     */
-    public void setHeaders(Set headers)
-    {
-    }
-
-
-    /**
-     * Process the tx context header that is attached to the received message.
-     *
-     * @param msgContext
-     * @return true
-     */
-    protected boolean handleInbound(SOAPMessageContext msgContext)
-    {
-        final SOAPMessageContext soapMessageContext = (SOAPMessageContext)msgContext ;
-        final SOAPMessage soapMessage = soapMessageContext.getMessage() ;
-
-        return handleInboundMessage(soapMessage);
-    }
-
-    /**
-     * Tidy up the Transaction/Thread association before response is returned to the client.
-     *
-     * @param messageContext The current message context.
-     * @return true
-     */
-    protected boolean handleOutbound(SOAPMessageContext messageContext)
-    {
-        suspendTransaction() ;
-        return true;
-    }
-}
\ No newline at end of file

Added: labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mw/wst11/BusinessActivityManager.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mw/wst11/BusinessActivityManager.java	                        (rev 0)
+++ labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mw/wst11/BusinessActivityManager.java	2008-01-25 17:18:13 UTC (rev 18124)
@@ -0,0 +1,130 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. 
+ * 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.wst11;
+
+import com.arjuna.wsc.AlreadyRegisteredException;
+import com.arjuna.wst.*;
+import com.arjuna.wst11.BAParticipantManager;
+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.
+ *
+ * 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 BusinessActivityManager
+{
+    /**
+     * The manager.
+     */
+    private static BusinessActivityManager MANAGER ;
+    
+    /**
+     * Get the business activity manager.
+     * @return The business activity manager.
+     */
+    public static synchronized BusinessActivityManager getBusinessActivityManager()
+    {
+        return MANAGER ;
+    }
+    
+    /**
+     * Set the business activity manager.
+     * @param manager The business activity manager.
+     */
+    public static synchronized void setBusinessActivityManager(final BusinessActivityManager manager)
+    {
+        MANAGER = manager ;
+    }
+
+    /**
+     * Enlist a participant for the BusinessAgreement protocol.
+     *
+     * @return the BAParticipantManager for this transaction.
+     */
+    public abstract BAParticipantManager 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 BAParticipantManager 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;
+    
+}

Added: labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mw/wst11/BusinessActivityManagerFactory.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mw/wst11/BusinessActivityManagerFactory.java	                        (rev 0)
+++ labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mw/wst11/BusinessActivityManagerFactory.java	2008-01-25 17:18:13 UTC (rev 18124)
@@ -0,0 +1,41 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. 
+ * 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.wst11;
+
+
+public class BusinessActivityManagerFactory
+{
+    public static BusinessActivityManager businessActivityManager ()
+    {
+        return BusinessActivityManager.getBusinessActivityManager() ;
+	}
+}
\ No newline at end of file

Added: labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mw/wst11/TransactionManager.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mw/wst11/TransactionManager.java	                        (rev 0)
+++ labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mw/wst11/TransactionManager.java	2008-01-25 17:18:13 UTC (rev 18124)
@@ -0,0 +1,142 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. 
+ * 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: TransactionManager.java,v 1.10.6.1 2005/11/22 10:36:06 kconner Exp $
+ */
+
+package com.arjuna.mw.wst11;
+
+import com.arjuna.wst.*;
+
+import com.arjuna.wsc.AlreadyRegisteredException;
+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).
+ *
+ * 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: TransactionManager.java,v 1.10.6.1 2005/11/22 10:36:06 kconner Exp $
+ * @since XTS 1.0.
+ */
+
+public abstract class TransactionManager
+{
+    /**
+     * The manager.
+     */
+    private static TransactionManager TRANSACTION_MANAGER ;
+
+    /**
+     * Get the transaction manager.
+     * @return The transaction manager.
+     */
+    public static synchronized TransactionManager getTransactionManager()
+    {
+        return TRANSACTION_MANAGER ;
+    }
+
+    /**
+     * Set the transaction manager.
+     * @param manager The transaction manager.
+     */
+    public static synchronized void setTransactionManager(final TransactionManager manager)
+    {
+        TRANSACTION_MANAGER = manager ;
+    }
+
+    /**
+     * Enlist the specified participant with current transaction such that it
+     * will participate in the Volatile 2PC protocol; a unique identifier for
+     * the participant is also required. If there is no transaction associated
+     * with the invoking thread then the UnknownTransactionException exception
+     * is thrown. If the coordinator already has a participant enrolled with
+     * the same identifier, then AlreadyRegisteredException will be thrown. If
+     * the transaction is not in a state where participants can be enrolled
+     * (e.g., it is terminating) then WrongStateException will be thrown.
+     */
+    public abstract void enlistForVolatileTwoPhase(final Volatile2PCParticipant pzp, final String id)
+        throws WrongStateException, UnknownTransactionException, AlreadyRegisteredException, SystemException;
+
+    /**
+     * Enlist the specified participant with current transaction such that it
+     * will participate in the 2PC protocol; a unique identifier for the
+     * participant is also required. If there is no transaction associated with
+     * the invoking thread then the UnknownTransactionException exception is
+     * thrown. If the coordinator already has a participant enrolled with the
+     * same identifier, then AlreadyRegisteredException will be thrown. If the
+     * transaction is not in a state where participants can be enrolled (e.g.,
+     * it is terminating) then WrongStateException will be thrown.
+     */
+    public abstract void enlistForDurableTwoPhase(final Durable2PCParticipant tpp, final String id)
+        throws WrongStateException, UnknownTransactionException, AlreadyRegisteredException, SystemException;
+
+    public abstract int replay () throws 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;
+}
\ No newline at end of file

Added: labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mw/wst11/TransactionManagerFactory.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mw/wst11/TransactionManagerFactory.java	                        (rev 0)
+++ labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mw/wst11/TransactionManagerFactory.java	2008-01-25 17:18:13 UTC (rev 18124)
@@ -0,0 +1,41 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. 
+ * 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: TransactionManagerFactory.java,v 1.8.8.1 2005/11/22 10:36:05 kconner Exp $
+ */
+
+package com.arjuna.mw.wst11;
+
+
+public class TransactionManagerFactory
+{
+    public static TransactionManager transactionManager ()
+    {
+    	return TransactionManager.getTransactionManager() ;
+    }
+}
\ No newline at end of file

Added: labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mw/wst11/UserBusinessActivity.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mw/wst11/UserBusinessActivity.java	                        (rev 0)
+++ labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mw/wst11/UserBusinessActivity.java	2008-01-25 17:18:13 UTC (rev 18124)
@@ -0,0 +1,126 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. 
+ * 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: UserBusinessActivity.java,v 1.4.6.1 2005/11/22 10:36:06 kconner Exp $
+ */
+
+package com.arjuna.mw.wst11;
+
+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 BAs to be started and terminated.
+ * The messaging layer converts the messages into calls on this.
+ *
+ * Importantly, a UserBusinessActivity does not represent a specific
+ * transaction, but rather is responsible for providing access to an implicit
+ * per-thread  transaction context; it is similar to the UserTransaction in
+ * the JTA specification. Therefore, all of the UserTransaction methods
+ * implicitly act on the current thread of control.
+ *
+ * @author Mark Little (mark.little at arjuna.com)
+ * @version $Id: UserBusinessActivity.java,v 1.4.6.1 2005/11/22 10:36:06 kconner Exp $
+ * @since XTS 1.0.
+ */
+
+public abstract class UserBusinessActivity
+{
+    /**
+     * The user business activity.
+     */
+    private static UserBusinessActivity USER_BUSINESS_ACTIVITY ;
+
+    /**
+     * Get the user business activity.
+     * @return The user business activity.
+     */
+    public static synchronized UserBusinessActivity getUserBusinessActivity()
+    {
+        return USER_BUSINESS_ACTIVITY ;
+    }
+
+    /**
+     * Set the user business activity.
+     * @param userBusinessActivity The user business activity.
+     */
+    public static synchronized void setUserBusinessActivity(final UserBusinessActivity userBusinessActivity)
+    {
+        USER_BUSINESS_ACTIVITY = userBusinessActivity ;
+    }
+
+    public static final int ATOMIC_OUTCOME = 0;
+    public static final int MIXED_OUTCOME = 1;
+
+    /**
+     * Start a new business activity with atomic outcome.
+     * If one is already associated with this thread
+     * then the WrongStateException will be thrown. Upon success, this
+     * operation associates the newly created transaction with the current
+     * thread.
+     */
+    public abstract void begin()
+        throws WrongStateException, SystemException;
+
+    /**
+     * Start a new BA with atomic outcome and the specified timeout as
+     * its lifetime.
+     * If one is already associated with this thread then the
+     * WrongStateException will be thrown.
+     */
+    public abstract void begin(final int timeout)
+        throws WrongStateException, SystemException;
+
+    /**
+     * The BA is normally terminated by the close method. This signals to
+     * all registered participants that the BA has ended and no compensation
+     * is required.
+     */
+    public abstract void close()
+        throws TransactionRolledBackException, UnknownTransactionException, SystemException;
+
+    /**
+     * If the BA must undo its work then the cancel method is used. Any
+     * participants that can compensate are forced to do so.
+     */
+    public abstract void cancel()
+        throws UnknownTransactionException, SystemException;
+
+    /**
+     * If participants have registered for the BusinessAgreementWithComplete
+     * protocol then they will be expecting the application to inform them
+     * when all work intended for them has been sent (and responded to). The
+     * complete method is used for this purpose.
+     */
+    public abstract void complete()
+        throws UnknownTransactionException, SystemException;
+
+    public abstract String transactionIdentifier();
+}
\ No newline at end of file

Added: labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mw/wst11/UserBusinessActivityFactory.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mw/wst11/UserBusinessActivityFactory.java	                        (rev 0)
+++ labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mw/wst11/UserBusinessActivityFactory.java	2008-01-25 17:18:13 UTC (rev 18124)
@@ -0,0 +1,42 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. 
+ * 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: UserBusinessActivityFactory.java,v 1.4.8.1 2005/11/22 10:36:05 kconner Exp $
+ */
+
+package com.arjuna.mw.wst11;
+
+import com.arjuna.mw.wst11.UserBusinessActivity;
+
+public class UserBusinessActivityFactory
+{
+    public static UserBusinessActivity userBusinessActivity ()
+    {
+        return UserBusinessActivity.getUserBusinessActivity() ;
+	}
+}
\ No newline at end of file

Added: labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mw/wst11/UserTransaction.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mw/wst11/UserTransaction.java	                        (rev 0)
+++ labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mw/wst11/UserTransaction.java	2008-01-25 17:18:13 UTC (rev 18124)
@@ -0,0 +1,118 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. 
+ * 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: UserTransaction.java,v 1.8.4.1 2005/11/22 10:36:05 kconner Exp $
+ */
+
+package com.arjuna.mw.wst11;
+
+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.
+ * Importantly, a UserTransaction does not represent a specific transaction,
+ * but rather is responsible for providing access to an implicit per-thread
+ * transaction context; it is similar to the UserTransaction in the JTA
+ * specification. Therefore, all of the UserTransaction methods implicitly act
+ * on the current thread of control.
+ *
+ * @author Mark Little (mark.little at arjuna.com)
+ * @version $Id: UserTransaction.java,v 1.8.4.1 2005/11/22 10:36:05 kconner Exp $
+ * @since XTS 1.0.
+ */
+
+public abstract class UserTransaction
+{
+    /**
+     * The transaction.
+     */
+    private static UserTransaction USER_TRANSACTION ;
+
+    /**
+     * Get the user transaction.
+     * @return the user transaction.
+     */
+    public static synchronized UserTransaction getUserTransaction()
+    {
+        return USER_TRANSACTION ;
+    }
+
+    /**
+     * Set the user transaction.
+     * @param userTransaction The user transaction.
+     */
+    public static synchronized void setUserTransaction(final UserTransaction userTransaction)
+    {
+        USER_TRANSACTION = userTransaction ;
+    }
+
+    /**
+     * Start a new transaction. If one is already associated with this thread
+     * then the WrongStateException will be thrown. Upon success, this
+     * operation associates the newly created transaction with the current
+     * thread.
+     */
+    public abstract void begin()
+        throws WrongStateException, SystemException;
+
+    /**
+     * Start a new transaction with the specified timeout as its lifetime.
+     * If one is already associated with this thread then the
+     * WrongStateException will be thrown.
+     */
+    public abstract void begin(final int timeout)
+        throws WrongStateException, SystemException;
+
+    /**
+     * The transaction is committed by the commit method. This will execute
+     * the PhaseZero, 2PC and OutcomeNotification protocols prior to returning.
+     * If there is no transaction associated with the invoking thread then
+     * UnknownTransactionException is thrown. If the transaction ultimately
+     * rolls back then the TransactionRolledBackException is thrown. When
+     * complete, this operation disassociates the transaction from the current
+     * thread such that it becomes associated with no transaction.
+     */
+    public abstract void commit()
+        throws TransactionRolledBackException, UnknownTransactionException, SecurityException, SystemException;
+
+    /**
+     * The rollback operation will terminate the transaction and return
+     * normally if it succeeded, while throwing an appropriate exception if it
+     * didn't. If there is no transaction associated with the invoking thread
+     * then UnknownTransactionException is thrown.
+     */
+    public abstract void rollback()
+        throws UnknownTransactionException, SecurityException, SystemException;
+
+    public abstract String transactionIdentifier ();
+}
\ No newline at end of file

Added: labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mw/wst11/UserTransactionFactory.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mw/wst11/UserTransactionFactory.java	                        (rev 0)
+++ labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mw/wst11/UserTransactionFactory.java	2008-01-25 17:18:13 UTC (rev 18124)
@@ -0,0 +1,41 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. 
+ * 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: UserTransactionFactory.java,v 1.9.8.1 2005/11/22 10:36:05 kconner Exp $
+ */
+
+package com.arjuna.mw.wst11;
+
+
+public class UserTransactionFactory
+{
+    public static UserTransaction userTransaction ()
+    {
+        return UserTransaction.getUserTransaction() ;
+    }
+}
\ No newline at end of file

Added: labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mw/wst11/client/JaxBaseHeaderContextProcessor.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mw/wst11/client/JaxBaseHeaderContextProcessor.java	                        (rev 0)
+++ labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mw/wst11/client/JaxBaseHeaderContextProcessor.java	2008-01-25 17:18:13 UTC (rev 18124)
@@ -0,0 +1,234 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2007, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags.
+ * 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) 2007,
+ * @author JBoss Inc.
+ */
+package com.arjuna.mw.wst11.client;
+
+import com.arjuna.mw.wsc11.context.Context;
+import com.arjuna.mw.wst.*;
+import com.arjuna.mw.wst11.common.CoordinationContextHelper;
+import com.arjuna.mw.wst11.BusinessActivityManagerFactory;
+import com.arjuna.mw.wst.common.SOAPUtil;
+import com.arjuna.mw.wstx.logging.wstxLogger;
+import com.arjuna.webservices11.wsat.AtomicTransactionConstants;
+import com.arjuna.webservices11.wsba.BusinessActivityConstants;
+import com.arjuna.webservices11.wscoor.CoordinationConstants;
+import com.arjuna.mwlabs.wst11.at.context.TxContextImple;
+import org.oasis_open.docs.ws_tx.wscoor._2006._06.CoordinationContextType;
+
+import javax.xml.soap.*;
+import java.util.Iterator;
+
+/**
+ * Common base class for classes used to perform
+ * WS-Transaction context manipulation on SOAP messages.
+ *
+ * @message com.arjuna.mw.wst.client.JaxHC11P_1 [com.arjuna.mw.wst.client.JaxHC11P_1] - Error in:
+ * @message com.arjuna.mw.wst.client.JaxHC11P_2 [com.arjuna.mw.wst.client.JacHCP_2] - Stack trace:
+ */
+class JaxBaseHeaderContextProcessor
+{
+    /**
+     * Handle the request.
+     * @param soapMessage The current message context.
+     */
+
+    public boolean handleOutboundMessage(final SOAPMessage soapMessage)
+    {
+        if (soapMessage == null)
+        {
+            return true ;
+        }
+
+        try
+        {
+            /*
+             * There should either be an Atomic Transaction *or* a Business Activity
+             * associated with the thread.
+             */
+            final TransactionManager transactionManager = TransactionManagerFactory.transactionManager() ;
+            final com.arjuna.mw.wst11.BusinessActivityManager businessActivityManager = BusinessActivityManagerFactory.businessActivityManager() ;
+
+            final Context atContext ;
+            if (transactionManager != null)
+            {
+                final TxContextImple txContext =
+                    (TxContextImple)transactionManager.currentTransaction() ;
+                atContext = (txContext == null ? null : txContext.context()) ;
+            }
+            else
+            {
+                atContext = null ;
+            }
+
+            final Context baContext ;
+            if (businessActivityManager != null)
+            {
+                final com.arjuna.mwlabs.wst11.ba.context.TxContextImple txContext =
+                    (com.arjuna.mwlabs.wst11.ba.context.TxContextImple)businessActivityManager.currentTransaction() ;
+                baContext = (txContext == null ? null : txContext.context()) ;
+            }
+            else
+            {
+                baContext = null ;
+            }
+
+            final CoordinationContextType coordinationContext ;
+            if (atContext != null)
+            {
+                coordinationContext = atContext.getCoordinationContext() ;
+            }
+            else if (baContext != null)
+            {
+                coordinationContext = baContext.getCoordinationContext() ;
+            }
+            else
+            {
+                coordinationContext = null ;
+            }
+
+            if (coordinationContext != null)
+            {
+                final SOAPEnvelope env = soapMessage.getSOAPPart().getEnvelope() ;
+                SOAPHeader header = env.getHeader() ;
+                if (header == null)
+                {
+                    header = env.addHeader() ;
+                }
+                final Name name = env.createName(CoordinationConstants.WSCOOR_ELEMENT_COORDINATION_CONTEXT, CoordinationConstants.WSCOOR_PREFIX, CoordinationConstants.WSCOOR_NAMESPACE) ;
+                final SOAPHeaderElement headerElement = header.addHeaderElement(name) ;
+                headerElement.addNamespaceDeclaration(CoordinationConstants.WSCOOR_PREFIX, CoordinationConstants.WSCOOR_NAMESPACE) ;
+                headerElement.setMustUnderstand(true) ;
+                CoordinationContextHelper.serialise(coordinationContext, headerElement) ;
+            }
+        }
+        catch (final Throwable th)
+        {
+	    wstxLogger.arjLoggerI18N.warn("com.arjuna.mw.wst.client.JaxHC11P_1",
+					  new Object[]{"com.arjuna.mw.wst11.client.JaxBaseHeaderContextProcessor.handleRequest()"});
+
+	    wstxLogger.arjLoggerI18N.warn("com.arjuna.mw.wst.client.JaxHC11P_2",
+					  new Object[]{th});
+
+            th.printStackTrace(System.err) ;
+        }
+
+        return true ;
+    }
+
+    /**
+     * Resume the current transaction.
+     *
+     * @message com.arjuna.mw.wst.client.JaxHC11P_3 [com.arjuna.mw.wst.client.JaxHC11P_3] - Unknown context type:
+     */
+
+    protected void resumeTransaction(final SOAPMessage soapMessage)
+    {
+        if (soapMessage != null)
+        {
+            try
+            {
+                final SOAPEnvelope soapEnvelope = soapMessage.getSOAPPart().getEnvelope() ;
+                final SOAPHeaderElement soapHeaderElement = getHeaderElement(soapEnvelope, CoordinationConstants.WSCOOR_NAMESPACE, CoordinationConstants.WSCOOR_ELEMENT_COORDINATION_CONTEXT) ;
+
+                if (soapHeaderElement != null)
+                {
+                    final CoordinationContextType cc = CoordinationContextHelper.deserialise(soapHeaderElement) ;
+                    if (cc != null)
+                    {
+                        final String coordinationType = cc.getCoordinationType() ;
+                        if (AtomicTransactionConstants.WSAT_PROTOCOL.equals(coordinationType))
+                        {
+                            final TxContext txContext = new TxContextImple(cc) ;
+                            TransactionManagerFactory.transactionManager().resume(txContext) ;
+                        }
+                        else if (BusinessActivityConstants.WSBA_PROTOCOL_ATOMIC_OUTCOME.equals(coordinationType))
+                        {
+                            final TxContext txContext = new com.arjuna.mwlabs.wst11.ba.context.TxContextImple(cc);
+                            BusinessActivityManagerFactory.businessActivityManager().resume(txContext) ;
+                        }
+                        else
+                        {
+            			    wstxLogger.arjLoggerI18N.warn("com.arjuna.mw.wst.client.JaxHC11P_1",
+    			                new Object[]{"com.arjuna.mw.wst11.client.JaxBaseHeaderContextProcessor.resumeTransaction()"});
+
+            			    wstxLogger.arjLoggerI18N.warn("com.arjuna.mw.wst.client.JaxHC11P_3",
+                                new Object[]{coordinationType});
+                        }
+                    }
+                }
+            }
+            catch (final Throwable th)
+            {
+        		wstxLogger.arjLoggerI18N.warn("com.arjuna.mw.wst.client.JaxHC11P_1",
+                    new Object[]{"com.arjuna.mw.wst11.client.JaxBaseHeaderContextProcessor.resumeTransaction()"});
+
+        		wstxLogger.arjLoggerI18N.warn("com.arjuna.mw.wst.client.JaxHC11P_2",
+                    new Object[]{th});
+            }
+        }
+    }
+
+    /**
+     * Retrieve the first header matching the uri and name.
+     * @param soapEnvelope The soap envelope containing the header.
+     * @param uri The uri of the header element.
+     * @param name The name of the header element.
+     * @return The header element or null if not found.
+     */
+    private SOAPHeaderElement getHeaderElement(final SOAPEnvelope soapEnvelope, final String uri, final String name)
+        throws SOAPException
+    {
+        final SOAPHeader soapHeader = soapEnvelope.getHeader() ;
+        if (soapHeader != null)
+        {
+            final Iterator headerIter = SOAPUtil.getChildElements(soapHeader) ;
+            while(headerIter.hasNext())
+            {
+                final SOAPHeaderElement current = (SOAPHeaderElement)headerIter.next() ;
+                final Name currentName = current.getElementName() ;
+                if ((currentName != null) &&
+                    match(name, currentName.getLocalName()) &&
+                    match(uri, currentName.getURI()))
+                {
+                    return current ;
+                }
+            }
+        }
+        return null ;
+    }
+
+    /**
+     * Do the two references match?
+     * @param lhs The first reference.
+     * @param rhs The second reference.
+     * @return true if the references are both null or if they are equal.
+     */
+    private boolean match(final Object lhs, final Object rhs)
+    {
+        if (lhs == null)
+        {
+            return (rhs == null) ;
+        }
+        else
+        {
+            return lhs.equals(rhs) ;
+        }
+    }
+}
\ No newline at end of file

Added: labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mw/wst11/client/JaxWSHeaderContextProcessor.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mw/wst11/client/JaxWSHeaderContextProcessor.java	                        (rev 0)
+++ labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mw/wst11/client/JaxWSHeaderContextProcessor.java	2008-01-25 17:18:13 UTC (rev 18124)
@@ -0,0 +1,120 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2007, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags.
+ * 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) 2007,
+ * @author JBoss Inc.
+ */
+package com.arjuna.mw.wst11.client;
+
+import com.arjuna.webservices11.wscoor.CoordinationConstants;
+import com.arjuna.mw.wst11.client.JaxBaseHeaderContextProcessor;
+
+import javax.xml.namespace.QName;
+import javax.xml.soap.SOAPMessage;
+import javax.xml.ws.handler.MessageContext;
+import javax.xml.ws.handler.soap.SOAPHandler;
+import javax.xml.ws.handler.soap.SOAPMessageContext;
+import java.util.HashSet;
+import java.util.Set;
+
+/**
+ * The class is used to perform WS-Transaction context insertion
+ * and extraction for application level SOAP messages using JaxWS.
+ * This is the client side version.
+ */
+public class JaxWSHeaderContextProcessor extends JaxBaseHeaderContextProcessor implements SOAPHandler<SOAPMessageContext>
+{
+    /**
+     * Process a message. Determines if it is inbound or outbound and dispatches accordingly.
+     *
+     * @param msgContext
+     * @return true
+     */
+    public boolean handleMessage(SOAPMessageContext msgContext)
+    {
+        Boolean outbound = (Boolean)msgContext.get(MessageContext.MESSAGE_OUTBOUND_PROPERTY);
+        if (outbound == null)
+            throw new IllegalStateException("Cannot obtain required property: " + MessageContext.MESSAGE_OUTBOUND_PROPERTY);
+
+        return outbound ? handleOutbound(msgContext) : handleInbound(msgContext);
+    }
+
+    /**
+     * Tidy up the Transaction/Thread association.
+     *
+     * @param messageContext
+     * @return true
+     */
+    public boolean handleFault(SOAPMessageContext messageContext)
+    {
+        final SOAPMessageContext soapMessageContext = (SOAPMessageContext)messageContext ;
+        final SOAPMessage soapMessage = soapMessageContext.getMessage() ;
+
+        resumeTransaction(soapMessage);
+        return true;
+    }
+
+    public void close(MessageContext messageContext)
+    {
+    }
+
+    /**
+     * Gets the header blocks that can be processed by this Handler instance.
+     */
+    public Set<QName> getHeaders()
+    {
+        Set<QName> headerSet = new HashSet<QName>();
+        headerSet.add(new QName(CoordinationConstants.WSCOOR_NAMESPACE, CoordinationConstants.WSCOOR_ELEMENT_COORDINATION_CONTEXT));
+
+        return headerSet;
+    }
+
+    /**
+     * Sets the header blocks that can be processed by this Handler instance.
+     * Note: this impl ignores this function's args as the values are hardcoded.
+     */
+    public void setHeaders(Set headers)
+    {
+    }
+
+    /**
+     * Tidy up the Transaction/Thread association before control is returned to the user.
+     *
+     * @param messageContext
+     * @return true
+     */
+    protected boolean handleInbound(SOAPMessageContext messageContext)
+    {
+        final SOAPMessage soapMessage = messageContext.getMessage() ;
+
+        resumeTransaction(soapMessage);
+        return true ;
+    }
+
+    /**
+     * Process the tx thread context and attach serialized version as msg header
+     *
+     * @param messageContext
+     * @return true
+     */
+    protected boolean handleOutbound(SOAPMessageContext messageContext)
+    {
+        final SOAPMessage soapMessage = messageContext.getMessage() ;
+
+        return handleOutboundMessage(soapMessage);
+    }
+}
\ No newline at end of file

Added: labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mw/wst11/common/CoordinationContextHelper.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mw/wst11/common/CoordinationContextHelper.java	                        (rev 0)
+++ labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mw/wst11/common/CoordinationContextHelper.java	2008-01-25 17:18:13 UTC (rev 18124)
@@ -0,0 +1,76 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. 
+ * 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.mw.wst11.common;
+
+import org.oasis_open.docs.ws_tx.wscoor._2006._06.CoordinationContextType;
+import org.w3c.dom.Element;
+
+import javax.xml.bind.JAXBContext;
+import javax.xml.bind.JAXBException;
+import javax.xml.bind.Marshaller;
+import javax.xml.bind.Unmarshaller;
+import javax.xml.stream.XMLStreamException;
+
+/**
+ * Helper class for serialising Coordination Contexts into SOAP headers.
+ * @author kevin
+ */
+public class CoordinationContextHelper
+{
+   /**
+     * Deserialise a coordination context from a DOM SOAP Header Element.
+     * @param headerElement The SOAP header element to deserialise.
+     * @return The coordination context.
+     * @throws javax.xml.stream.XMLStreamException for errors during parsing.
+     */
+    public static CoordinationContextType deserialise(final Element headerElement)
+        throws JAXBException
+    {
+        try {
+            JAXBContext jaxbContext = JAXBContext.newInstance("org.oasis_open.docs.ws_tx.wscoor._2006._06");
+            Unmarshaller unmarshaller;
+            unmarshaller = jaxbContext.createUnmarshaller();
+            CoordinationContextType coordinationContextType = unmarshaller.unmarshal(headerElement.getFirstChild(), CoordinationContextType.class).getValue();
+
+            return coordinationContextType;
+        } catch (JAXBException jaxbe) {
+            return null;
+        }
+    }
+
+    /**
+      * Deserialise a coordination context from a DOM SOAP Header Element.
+      * @param headerElement The SOAP header element to deserialise.
+      * @return The coordination context.
+      * @throws javax.xml.stream.XMLStreamException for errors during parsing.
+      */
+    public static void serialise(final CoordinationContextType  coordinationContextType, Element headerElement)
+        throws JAXBException
+    {
+        try {
+            JAXBContext jaxbContext = JAXBContext.newInstance("org.oasis_open.docs.ws_tx.wscoor._2006._06");
+            Marshaller marshaller;
+            marshaller = jaxbContext.createMarshaller();
+            marshaller.marshal(coordinationContextType, headerElement);
+        } catch (JAXBException jaxbe) {
+        }
+    }
+}
\ No newline at end of file

Added: labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mw/wst11/common/Environment.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mw/wst11/common/Environment.java	                        (rev 0)
+++ labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mw/wst11/common/Environment.java	2008-01-25 17:18:13 UTC (rev 18124)
@@ -0,0 +1,42 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. 
+ * 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: Environment.java,v 1.6 2004/09/09 08:48:48 kconner Exp $
+ */
+
+package com.arjuna.mw.wst11.common;
+
+/**
+ */
+
+public interface Environment
+{
+
+    public static final String COORDINATOR_URL = "com.arjuna.mw.wst11.coordinatorURL";
+
+}
\ No newline at end of file

Added: labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mw/wst11/deploy/WSTXInitialisation.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mw/wst11/deploy/WSTXInitialisation.java	                        (rev 0)
+++ labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mw/wst11/deploy/WSTXInitialisation.java	2008-01-25 17:18:13 UTC (rev 18124)
@@ -0,0 +1,200 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. 
+ * 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.mw.wst11.deploy;
+
+import com.arjuna.mw.wsas.utils.Configuration;
+import com.arjuna.mw.wstx.logging.wstxLogger;
+import com.arjuna.mw.wst11.BusinessActivityManager;
+import com.arjuna.mw.wst11.TransactionManager;
+import com.arjuna.mw.wst11.UserBusinessActivity;
+import com.arjuna.mw.wst11.UserTransaction;
+import com.arjuna.services.framework.startup.Sequencer;
+import com.arjuna.webservices.util.ClassLoaderHelper;
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
+
+import javax.servlet.ServletContextEvent;
+import javax.servlet.ServletContextListener;
+import javax.xml.parsers.DocumentBuilder;
+import javax.xml.parsers.DocumentBuilderFactory;
+import java.io.FileNotFoundException;
+import java.io.InputStream;
+import java.text.MessageFormat;
+
+/**
+ * Initialise WSTX.
+ * @author kevin
+ */
+public class WSTXInitialisation implements ServletContextListener
+{
+    /**
+     * The name of the WS-T configuration.
+     */
+    private static final String WS_T11_CONFIG = "/wst11.xml" ;
+
+    /**
+     * The context has been initialized.
+     * @param servletContextEvent The servlet context event.
+     *
+     * @message com.arjuna.mw.wst.deploy.WSTX11I_1 [com.arjuna.mw.wst.deploy.WSTX11I_1] - WSTX11 Initialisation: init failed:
+     */
+    public void contextInitialized(final ServletContextEvent servletContextEvent)
+    {
+        final WSTXInitialisation listener = this;
+
+        Sequencer.Callback callback = new Sequencer.Callback(Sequencer.SEQUENCE_WSCOOR11, Sequencer.WEBAPP_WSTX11) {
+           public void run() {
+               try
+               {
+                   Configuration.initialise("/wstx11.xml");
+
+                   listener.configure();
+                   // Start recovery
+//            RecoveryManager.manager() ;
+               }
+               catch (Exception exception)
+               {
+                   wstxLogger.arjLoggerI18N.error("com.arjuna.mw.wst.deploy.WSTX11I_1", exception);
+               }
+               catch (Error error)
+               {
+                   wstxLogger.arjLoggerI18N.error("com.arjuna.mw.wst.deploy.WSTX11I_21", error);
+               }
+           }
+        };
+        // this is the last WST callback to be initialised so close the list
+        Sequencer.close(Sequencer.SEQUENCE_WSCOOR11, Sequencer.WEBAPP_WSTX11);
+    }
+
+    /**
+     * Configure WS-T.
+     *
+     * @message com.arjuna.mw.wst.deploy.WSTX11I_21 [com.arjuna.mw.wst.deploy.WSTX11I_21] - {0} not found.
+     * @message com.arjuna.mw.wst.deploy.WSTX11I_22 [com.arjuna.mw.wst.deploy.WSTX11I_22] - Failed to create document: {0}
+     * @message com.arjuna.mw.wst.deploy.WSTX11I_23 [com.arjuna.mw.wst.deploy.WSTX11I_23] - Missing WSTX Initialisation
+     */
+    private void configure()
+        throws Exception
+    {
+        // mostly original JNDI binder code.  Should be tidied up.
+        final InputStream is = ClassLoaderHelper.getResourceAsStream(getClass(), WS_T11_CONFIG) ;
+
+        if (is == null)
+        {
+            final String pattern = wstxLogger.log_mesg.getString("com.arjuna.mw.wst.deploy.WSTX11I_21") ;
+            throw new FileNotFoundException(MessageFormat.format(pattern, new Object[] {WS_T11_CONFIG}));
+        }
+
+        final DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance() ;
+        final DocumentBuilder builder = factory.newDocumentBuilder() ;
+        final Document doc = builder.parse(is);
+
+        if (doc == null)
+        {
+            final String pattern = wstxLogger.log_mesg.getString("com.arjuna.mw.wst.deploy.WSTX11I_22") ;
+            throw new FileNotFoundException(MessageFormat.format(pattern, new Object[] {WS_T11_CONFIG}));
+        }
+
+        final Element docElem = doc.getDocumentElement() ;
+        final String userTx = getService(docElem, "UserTransaction") ;
+        final String txManager = getService(docElem, "TransactionManager") ;
+        final String userBa = getService(docElem, "UserBusinessActivity") ;
+        final String baManager = getService(docElem, "BusinessActivityManager") ;
+
+        if ((userTx == null) || (txManager == null) || (userBa == null) || (baManager == null))
+        {
+            throw new FileNotFoundException(wstxLogger.log_mesg.getString("com.arjuna.mw.wst.deploy.WSTX11I_23"));
+        }
+        UserTransaction.setUserTransaction((UserTransaction)ClassLoaderHelper.forName(getClass(), userTx).newInstance()) ;
+        TransactionManager.setTransactionManager((TransactionManager)ClassLoaderHelper.forName(getClass(), txManager).newInstance()) ;
+        UserBusinessActivity.setUserBusinessActivity((UserBusinessActivity)ClassLoaderHelper.forName(getClass(), userBa).newInstance()) ;
+        // we only have one choice for the 1.1 business activity manager
+        // BusinessActivityManager.setBusinessActivityManager(BusinessActivityManagerImple.class.newInstance());
+        BusinessActivityManager.setBusinessActivityManager((BusinessActivityManager)ClassLoaderHelper.forName(getClass(), baManager).newInstance());
+    }
+
+    /**
+     * Get the specified service.
+     * @param root The root element.
+     * @param name The name of the service.
+     * @return The service name or null if not present.
+     */
+    private static String getService(final Node root, final String name)
+    {
+        final NodeList children = root.getChildNodes();
+
+        for (int i = 0; i < children.getLength(); i++)
+        {
+            final Node item = children.item(i) ;
+
+            if ("service".equals(item.getNodeName()))
+            {
+                final Element type = (Element)item;
+
+                if (name.equals(type.getAttribute("name")))
+                {
+                    return getImplementation(type);
+                }
+            }
+        }
+
+        return null;
+    }
+
+    /**
+     * Get the specified service.
+     * @param service The service element.
+     * @return The service name or null if not present.
+     */
+    private static String getImplementation(final Node service)
+    {
+        final NodeList children = service.getChildNodes();
+
+        for (int i = 0; i < children.getLength(); i++)
+        {
+            final Node item = children.item(i);
+
+            if ("parameter".equals(item.getNodeName()))
+            {
+                final Element type = (Element)item;
+
+                if ("className".equals(type.getAttribute("name")))
+                {
+                    return type.getAttribute("value");
+                }
+            }
+        }
+
+        return null;
+    }
+
+
+    /**
+     * The context is about to be destroyed.
+     * @param servletContextEvent The servlet context event.
+     */
+    public void contextDestroyed(final ServletContextEvent servletContextEvent)
+    {
+//        RecoveryManager.manager().stop() ;
+    }
+}
\ No newline at end of file

Added: labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mw/wst11/service/JaxBaseHeaderContextProcessor.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mw/wst11/service/JaxBaseHeaderContextProcessor.java	                        (rev 0)
+++ labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mw/wst11/service/JaxBaseHeaderContextProcessor.java	2008-01-25 17:18:13 UTC (rev 18124)
@@ -0,0 +1,188 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2007, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags.
+ * 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) 2007,
+ * @author JBoss Inc.
+ */
+package com.arjuna.mw.wst11.service;
+
+import com.arjuna.mw.wst.*;
+import com.arjuna.mw.wst11.common.CoordinationContextHelper;
+import com.arjuna.mw.wst.common.SOAPUtil;
+import com.arjuna.mw.wstx.logging.wstxLogger;
+import com.arjuna.webservices11.wsat.AtomicTransactionConstants;
+import com.arjuna.webservices11.wsba.BusinessActivityConstants;
+import com.arjuna.webservices11.wscoor.CoordinationConstants;
+import com.arjuna.mwlabs.wst11.at.context.TxContextImple;
+import org.oasis_open.docs.ws_tx.wscoor._2006._06.CoordinationContextType;
+
+import javax.xml.soap.*;
+import java.util.Iterator;
+
+/**
+ * Common base class for classes used to perform
+ * WS-Transaction context manipulation on SOAP messages.
+ *
+ * @message com.arjuna.mw.wst.service.JaxHC11P_1 [com.arjuna.mw.wst.service.JaxHC11P_1] - Error in:
+ * @message com.arjuna.mw.wst.service.JaxHC11P_2 [com.arjuna.mw.wst.service.JaxHC11P_2] - Stack trace:
+ * @message com.arjuna.mw.wst.service.JaxHC11P_3 [com.arjuna.mw.wst.service.JaxHC11P_3] - Unknown context type:
+ */
+class JaxBaseHeaderContextProcessor
+{
+    /**
+     * Handle the request.
+     * @param soapMessage The current message context.
+     */
+    protected boolean handleInboundMessage(final SOAPMessage soapMessage)
+    {
+        if (soapMessage != null)
+        {
+            try
+            {
+                final SOAPEnvelope soapEnvelope = soapMessage.getSOAPPart().getEnvelope() ;
+                final SOAPHeader soapHeader = soapEnvelope.getHeader() ;
+                final SOAPHeaderElement soapHeaderElement = getHeaderElement(soapHeader, CoordinationConstants.WSCOOR_NAMESPACE, CoordinationConstants.WSCOOR_ELEMENT_COORDINATION_CONTEXT) ;
+
+                if (soapHeaderElement != null)
+                {
+                    final CoordinationContextType cc = CoordinationContextHelper.deserialise(soapHeaderElement) ;
+                    final String coordinationType = cc.getCoordinationType();
+                    if (AtomicTransactionConstants.WSAT_PROTOCOL.equals(coordinationType))
+                    {
+                        final TxContext txContext = new TxContextImple(cc) ;
+                        TransactionManagerFactory.transactionManager().resume(txContext) ;
+                        clearMustUnderstand(soapHeader, soapHeaderElement) ;
+                    }
+                    else if (BusinessActivityConstants.WSBA_PROTOCOL_ATOMIC_OUTCOME.equals(coordinationType))
+                    {
+                        final TxContext txContext = new com.arjuna.mwlabs.wst11.ba.context.TxContextImple(cc);
+                        BusinessActivityManagerFactory.businessActivityManager().resume(txContext) ;
+                        clearMustUnderstand(soapHeader, soapHeaderElement) ;
+                    }
+                    else
+                    {
+                        wstxLogger.arjLoggerI18N.warn("com.arjuna.mw.wst.service.JaxHC11P_1",
+                                new Object[]{"com.arjuna.mw.wst11.service.JaxBaseHeaderContextProcessor.handleRequest(MessageContext context)"});
+
+                        wstxLogger.arjLoggerI18N.warn("com.arjuna.mw.wst.service.JaxHC11P_3",
+                                new Object[]{coordinationType});
+                    }
+                }
+            }
+            catch (final Throwable th)
+            {
+                wstxLogger.arjLoggerI18N.warn("com.arjuna.mw.wst.service.JaxHC11P_1",
+                        new Object[]{"com.arjuna.mw.wst11.service.JaxBaseHeaderContextProcessor.handleRequest(MessageContext context)"});
+
+                wstxLogger.arjLoggerI18N.warn("com.arjuna.mw.wst.service.JaxHC11P_2",
+                        new Object[]{th});
+            }
+        }
+        return true ;
+    }
+
+    /**
+     * Suspend the current transaction.
+     */
+    protected void suspendTransaction()
+    {
+        try
+        {
+            /*
+             * There should either be an Atomic Transaction *or* a Business Activity
+             * associated with the thread.
+             */
+            final TransactionManager transactionManager = TransactionManagerFactory.transactionManager() ;
+            final BusinessActivityManager businessActivityManager = BusinessActivityManagerFactory.businessActivityManager() ;
+
+            if (transactionManager != null)
+            {
+                transactionManager.suspend() ;
+            }
+
+            if (businessActivityManager != null)
+            {
+                businessActivityManager.suspend() ;
+            }
+        }
+        catch (final Throwable th)
+        {
+            wstxLogger.arjLoggerI18N.warn("com.arjuna.mw.wst.service.JaxHC11P_1",
+                    new Object[]{"com.arjuna.mw.wst11.service.JaxBaseHeaderContextProcessor.suspendTransaction()"});
+
+            wstxLogger.arjLoggerI18N.warn("com.arjuna.mw.wst.service.JaxHC11P_2",
+                    new Object[]{th});
+
+            th.printStackTrace(System.err) ;
+        }
+    }
+
+    /**
+     * Clear the soap MustUnderstand.
+     * @param soapHeader The SOAP header.
+     * @param soapHeaderElement The SOAP header element.
+     */
+    private void clearMustUnderstand(final SOAPHeader soapHeader, final SOAPHeaderElement soapHeaderElement)
+            throws SOAPException
+    {
+        final Name headerName = soapHeader.getElementName() ;
+
+        final SOAPFactory factory = SOAPFactory.newInstance() ;
+        final Name attributeName = factory.createName("mustUnderstand", headerName.getPrefix(), headerName.getURI()) ;
+
+        soapHeaderElement.removeAttribute(attributeName) ;
+    }
+
+    private SOAPHeaderElement getHeaderElement(final SOAPHeader soapHeader, final String uri, final String name)
+            throws SOAPException
+    {
+        if (soapHeader != null)
+        {
+            final Iterator headerIter = SOAPUtil.getChildElements(soapHeader) ;
+            while(headerIter.hasNext())
+            {
+                final SOAPHeaderElement current = (SOAPHeaderElement)headerIter.next() ;
+                final Name currentName = current.getElementName() ;
+                if ((currentName != null) &&
+                        match(name, currentName.getLocalName()) &&
+                        match(uri, currentName.getURI()))
+                {
+                    return current ;
+                }
+            }
+        }
+        return null ;
+    }
+
+    /**
+     * Do the two references match?
+     * @param lhs The first reference.
+     * @param rhs The second reference.
+     * @return true if the references are both null or if they are equal.
+     */
+    private boolean match(final Object lhs, final Object rhs)
+    {
+        if (lhs == null)
+        {
+            return (rhs == null) ;
+        }
+        else
+        {
+            return lhs.equals(rhs) ;
+        }
+    }
+}
\ No newline at end of file

Added: labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mw/wst11/service/JaxWSHeaderContextProcessor.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mw/wst11/service/JaxWSHeaderContextProcessor.java	                        (rev 0)
+++ labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mw/wst11/service/JaxWSHeaderContextProcessor.java	2008-01-25 17:18:13 UTC (rev 18124)
@@ -0,0 +1,117 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2007, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags.
+ * 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) 2007,
+ * @author JBoss Inc.
+ */
+package com.arjuna.mw.wst11.service;
+
+import com.arjuna.webservices11.wscoor.CoordinationConstants;
+import com.arjuna.mw.wst11.service.JaxBaseHeaderContextProcessor;
+
+import javax.xml.namespace.QName;
+import javax.xml.soap.SOAPMessage;
+import javax.xml.ws.handler.MessageContext;
+import javax.xml.ws.handler.soap.SOAPHandler;
+import javax.xml.ws.handler.soap.SOAPMessageContext;
+import java.util.HashSet;
+import java.util.Set;
+
+/**
+ * The class is used to perform WS-Transaction context insertion
+ * and extraction for application level SOAP messages using JaxWS.
+ * This is the server side version.
+ */
+public class JaxWSHeaderContextProcessor extends JaxBaseHeaderContextProcessor implements SOAPHandler<SOAPMessageContext>
+{
+    /**
+     * Process a message. Determines if it is inbound or outbound and dispatches accordingly.
+     *
+     * @param msgContext
+     * @return true
+     */
+    public boolean handleMessage(SOAPMessageContext msgContext)
+    {
+        Boolean outbound = (Boolean)msgContext.get(MessageContext.MESSAGE_OUTBOUND_PROPERTY);
+        if (outbound == null)
+            throw new IllegalStateException("Cannot obtain required property: " + MessageContext.MESSAGE_OUTBOUND_PROPERTY);
+
+        return outbound ? handleOutbound(msgContext) : handleInbound(msgContext);
+    }
+
+    /**
+     * Tidy up the Transaction/Thread association before faults are thrown back to the client.
+     *
+     * @param messageContext
+     * @return true
+     */
+    public boolean handleFault(SOAPMessageContext messageContext)
+    {
+        suspendTransaction() ;
+        return true;
+    }
+
+    public void close(MessageContext messageContext)
+    {
+    }
+
+    /**
+     * Gets the header blocks that can be processed by this Handler instance.
+     */
+    public Set<QName> getHeaders()
+    {
+        Set<QName> headerSet = new HashSet<QName>();
+        headerSet.add(new QName(CoordinationConstants.WSCOOR_NAMESPACE, CoordinationConstants.WSCOOR_ELEMENT_COORDINATION_CONTEXT));
+
+        return headerSet;
+    }
+
+    /**
+     * Sets the header blocks that can be processed by this Handler instance.
+     * Note: this impl ignores this function's args as the values are hardcoded.
+     */
+    public void setHeaders(Set headers)
+    {
+    }
+
+
+    /**
+     * Process the tx context header that is attached to the received message.
+     *
+     * @param msgContext
+     * @return true
+     */
+    protected boolean handleInbound(SOAPMessageContext msgContext)
+    {
+        final SOAPMessageContext soapMessageContext = (SOAPMessageContext)msgContext ;
+        final SOAPMessage soapMessage = soapMessageContext.getMessage() ;
+
+        return handleInboundMessage(soapMessage);
+    }
+
+    /**
+     * Tidy up the Transaction/Thread association before response is returned to the client.
+     *
+     * @param messageContext The current message context.
+     * @return true
+     */
+    protected boolean handleOutbound(SOAPMessageContext messageContext)
+    {
+        suspendTransaction() ;
+        return true;
+    }
+}
\ No newline at end of file

Deleted: labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mwlabs/wst/at/ContextFactoryWSImple.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mwlabs/wst/at/ContextFactoryWSImple.java	2008-01-25 17:05:33 UTC (rev 18123)
+++ labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mwlabs/wst/at/ContextFactoryWSImple.java	2008-01-25 17:18:13 UTC (rev 18124)
@@ -1,285 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. 
- * 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.at;
-
-import com.arjuna.mw.wsas.exceptions.NoActivityException;
-import com.arjuna.mw.wsas.exceptions.SystemException;
-import com.arjuna.mw.wscf.model.twophase.CoordinatorManager11Factory;
-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.at.context.ArjunaContextWSImple;
-import com.arjuna.mwlabs.wst.at.participants.CleanupSynchronizationWS;
-import com.arjuna.webservices.ServiceRegistryWS;
-import com.arjuna.webservices.wsarj.InstanceIdentifierWS;
-import com.arjuna.webservices.wsarj.ArjunaConstants;
-import com.arjuna.webservices.wsat.AtomicTransactionWSConstants;
-import com.arjuna.webservices.wscoor.CoordinationConstantsWS;
-import com.arjuna.wsc.ContextFactoryWS;
-import com.arjuna.wsc.InvalidCreateParametersException;
-import com.arjuna.wsc.InvalidProtocolException;
-import org.oasis_open.docs.ws_tx.wscoor._2006._06.CoordinationContext;
-import org.oasis_open.docs.ws_tx.wscoor._2006._06.CoordinationContextType;
-import org.oasis_open.docs.ws_tx.wscoor._2006._06.Expires;
-import org.w3c.dom.Element;
-
-import javax.xml.ws.wsaddressing.W3CEndpointReference;
-import javax.xml.ws.wsaddressing.W3CEndpointReferenceBuilder;
-import javax.xml.soap.SOAPFactory;
-import javax.xml.soap.Name;
-import javax.xml.soap.SOAPElement;
-import javax.xml.soap.SOAPException;
-
-public class ContextFactoryWSImple implements ContextFactoryWS, LocalFactory
-{
-	public ContextFactoryWSImple()
-	{
-		try
-		{
-			_coordManager = CoordinatorManager11Factory.coordinatorManager();
-
-            _theRegistrar = new RegistrarWSImple();
-		}
-		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 com.arjuna.wsc.InvalidCreateParametersException
-	 *             if a parameter passed is invalid this activity identifier.
-	 *
-	 * @message com.arjuna.mwlabs.wst.at.ContextFactoryImpleWS_1
-	 *          [com.arjuna.mwlabs.wst.at.ContextFactoryImpleWS_1] - Invalid type
-	 *          URI: < {0} , {1} >
-	 * @message com.arjuna.mwlabs.wst.at.ContextFactoryImpleWS_3
-	 *          [com.arjuna.mwlabs.wst.at.ContextFactoryImpleWS_3] - Invalid type
-	 *          URI:
-	 */
-
-	public CoordinationContext create (final String coordinationTypeURI, final Long expires,
-            final CoordinationContextType currentContext)
-			throws InvalidCreateParametersException
-	{
-		if (coordinationTypeURI.equals(AtomicTransactionWSConstants.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 ArjunaContextWSImple arjunaContext = ArjunaContextWSImple.getContext() ;
-                final ServiceRegistryWS serviceRegistry = ServiceRegistryWS.getRegistry() ;
-                final String registrationCoordinatorURI = serviceRegistry.getServiceURI(CoordinationConstantsWS.REGISTRATION_SERVICE_NAME) ;
-
-                final CoordinationContext coordinationContext = new CoordinationContext() ;
-                coordinationContext.setCoordinationType(coordinationTypeURI);
-                CoordinationContextType.Identifier identifier = new CoordinationContextType.Identifier();
-                identifier.setValue("urn:"+arjunaContext.getTransactionIdentifier());
-                coordinationContext.setIdentifier(identifier) ;
-                final int transactionExpires = arjunaContext.getTransactionExpires();
-                if (transactionExpires > 0)
-                {
-                    Expires expiresInstance = new Expires();
-                    expiresInstance.setValue(transactionExpires);
-                    coordinationContext.setExpires(expiresInstance);
-                }
-                W3CEndpointReference registrationCoordinator = getRegistrationCoordinator(registrationCoordinatorURI, arjunaContext);
-                coordinationContext.setRegistrationService(registrationCoordinator) ;
-
-				/*
-				 * Now add the registrar for this specific coordinator to the
-				 * mapper.
-				 */
-
-				_coordManager.enlistSynchronization(new CleanupSynchronizationWS(_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 (NoActivityException ex)
-			{
-				ex.printStackTrace();
-
-				throw new InvalidCreateParametersException();
-			}
-			catch (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.at.ContextFactoryImpleWS_1", new Object[]
-			{ AtomicTransactionWSConstants.WSAT_PROTOCOL, coordinationTypeURI });
-
-			throw new InvalidCreateParametersException(
-					wstxLogger.log_mesg.getString("com.arjuna.mwlabs.wst.at.ContextFactoryImpleWS_3")
-							+ " < "
-							+ AtomicTransactionWSConstants.WSAT_PROTOCOL
-							+ ", "
-							+ coordinationTypeURI + " >");
-		}
-
-		return null;
-	}
-
-    private static W3CEndpointReference getRegistrationCoordinator(String registrationCoordinatorURI, ArjunaContextWSImple arjunaContext) {
-        final W3CEndpointReferenceBuilder builder = new W3CEndpointReferenceBuilder();
-        builder.serviceName(CoordinationConstantsWS.REGISTRATION_SERVICE_QNAME);
-        builder.endpointName(CoordinationConstantsWS.REGISTRATION_ENDPOINT_QNAME);
-        // strictly we shouldn't need to set the address because we are in the same web app as the
-        // coordinator but we have to as the W3CEndpointReference implementation is incomplete
-        builder.address(registrationCoordinatorURI);
-        InstanceIdentifierWS.setEndpointInstanceIdentifier(builder, arjunaContext.getTransactionIdentifier());
-        W3CEndpointReference registrationCoordinator = builder.build();
-        return registrationCoordinator;
-    }
-
-    /**
-	 * 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 CleanupSynchronizationWS(subordinateTransaction.get_uid().stringForm(), _theRegistrar));
-
-			_theRegistrar.associate(subordinateTransaction);
-
-			return subordinateTransaction;
-		}
-		catch (Exception ex)
-		{
-			throw new SystemException(ex.toString());
-		}
-	}
-
-	public final RegistrarWSImple registrar ()
-	{
-		return _theRegistrar;
-	}
-
-	private CoordinatorManager _coordManager;
-	private RegistrarWSImple _theRegistrar;
-}
\ No newline at end of file

Deleted: labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mwlabs/wst/at/ContextWSImple.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mwlabs/wst/at/ContextWSImple.java	2008-01-25 17:05:33 UTC (rev 18123)
+++ labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mwlabs/wst/at/ContextWSImple.java	2008-01-25 17:18:13 UTC (rev 18124)
@@ -1,50 +0,0 @@
-package com.arjuna.mwlabs.wst.at;
-
-import com.arjuna.mw.wsc.context.ContextWS;
-import org.oasis_open.docs.ws_tx.wscoor._2006._06.CoordinationContextType;
-
-/*
- * this is created and managed using a JaxWS coordination context but it will interconvert to an old style context
- * on demand, allowing interoperation between JaxWS based activator/ergistrator and the old style
- * BA/AT participant services
- */
-
-public class ContextWSImple implements ContextWS
-{
-
-	public ContextWSImple(final CoordinationContextType ctx)
-	{
-		_coordContext = ctx;
-    }
-
-	public boolean equals (Object obj)
-	{
-		if (obj instanceof ContextWSImple)
-		{
-			ContextWSImple ci = (ContextWSImple) obj;
-
-			return ci.getCoordinationContext().getIdentifier().getValue().equals(_coordContext.getIdentifier().getValue());
-		}
-		else
-			return false;
-	}
-
-	public String toString ()
-	{
-		// return DomUtil.nodeAsString(toXML());
-
-		return "AtomicTransactionIdentifier: " + _coordContext.getIdentifier().getValue();
-	}
-
-    public CoordinationContextType getCoordinationContext()
-    {
-        return _coordContext;
-    }
-
-    public void setCoordinationContext(CoordinationContextType cc)
-    {
-        _coordContext = cc;
-    }
-
-    private CoordinationContextType _coordContext;
-}

Deleted: labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mwlabs/wst/at/RegistrarWSImple.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mwlabs/wst/at/RegistrarWSImple.java	2008-01-25 17:05:33 UTC (rev 18123)
+++ labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mwlabs/wst/at/RegistrarWSImple.java	2008-01-25 17:18:13 UTC (rev 18124)
@@ -1,300 +0,0 @@
-package com.arjuna.mwlabs.wst.at;
-
-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.CoordinatorManager11Factory;
-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.at.participants.CompletionCoordinatorWSImple;
-import com.arjuna.mwlabs.wst.at.participants.DurableTwoPhaseCommitParticipant;
-import com.arjuna.mwlabs.wst.at.participants.VolatileTwoPhaseCommitParticipant;
-import com.arjuna.webservices.ServiceRegistryWS;
-import com.arjuna.webservices.wsarj.InstanceIdentifierWS;
-import com.arjuna.webservices.wsat.AtomicTransactionConstants;
-import com.arjuna.webservices.wsat.AtomicTransactionWSConstants;
-import com.arjuna.webservices.wsat.processors.CompletionCoordinatorProcessorWS;
-import com.arjuna.wsc.*;
-import com.arjuna.wst.CompletionCoordinatorParticipantWS;
-import com.arjuna.wst.stub.Durable2PCStubWS;
-import com.arjuna.wst.stub.Volatile2PCStubWS;
-
-import javax.xml.ws.wsaddressing.W3CEndpointReference;
-import javax.xml.ws.wsaddressing.W3CEndpointReferenceBuilder;
-import java.util.HashMap;
-
-public class RegistrarWSImple implements RegistrarWS
-{
-	public RegistrarWSImple()
-        throws ProtocolNotRegisteredException, SystemException
-    {
-		_coordManager = CoordinatorManager11Factory.coordinatorManager();
-
-		// register with mapper using tx id as protocol identifier.
-        final RegistrarMapperWS mapper = RegistrarMapperWS.getFactory() ;
-
-		mapper.addRegistrar(AtomicTransactionWSConstants.WSAT_SUB_PROTOCOL_DURABLE_2PC, this);
-		mapper.addRegistrar(AtomicTransactionWSConstants.WSAT_SUB_PROTOCOL_VOLATILE_2PC, this);
-		mapper.addRegistrar(AtomicTransactionWSConstants.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 protocolIdentifier
-	 *            the protocol identifier
-	 */
-
-	public void install (final String protocolIdentifier)
-	{
-	}
-
-	/**
-	 * Registers the interest of participant in a particular protocol.
-	 *
-	 * @param participantProtocolService
-	 *            the address of the participant protocol service
-	 * @param protocolIdentifier
-	 *            the protocol identifier
-	 *
-	 * @return the PortReference of the coordinator protocol service
-	 *
-	 * @throws com.arjuna.wsc.AlreadyRegisteredException
-     *             if the participant is already registered for this
-	 *             coordination protocol under this activity identifier
-	 * @throws com.arjuna.wsc.InvalidProtocolException
-     *             if the coordination protocol is not supported
-	 * @throws com.arjuna.wsc.InvalidStateException
-     *             if the state of the coordinator no longer allows registration
-	 *             for this coordination protocol
-	 * @throws com.arjuna.wsc.NoActivityException
-     *             if the activity does not exist.
-	 *
-	 * @message com.arjuna.mwlabs.wst.at.RegistrarWSImple_1
-	 *          [com.arjuna.mwlabs.wst.at.RegistrarWSImple_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 W3CEndpointReference register(final W3CEndpointReference participantProtocolService,
-        final String protocolIdentifier, final InstanceIdentifierWS instanceIdentifier)
-			throws AlreadyRegisteredException, 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 (SystemException ex)
-		{
-			throw new InvalidProtocolException();
-		}
-
-		// TODO check for AlreadyRegisteredException
-
-		if (AtomicTransactionWSConstants.WSAT_SUB_PROTOCOL_DURABLE_2PC.equals(protocolIdentifier))
-		{
-			// enlist participant that wraps the requester URI.
-			final String participantId = "D" + new Uid().stringForm();
-
-			try
-			{
-                final Durable2PCStubWS participantStub = new Durable2PCStubWS(participantId, participantProtocolService) ;
-				_coordManager.enlistParticipant(new DurableTwoPhaseCommitParticipant(participantStub, participantId));
-
-				_coordManager.suspend();
-
-				return getCoordinator(participantId) ;
-			}
-			catch (Exception ex)
-			{
-				throw new InvalidStateException();
-			}
-		}
-		else if (AtomicTransactionWSConstants.WSAT_SUB_PROTOCOL_VOLATILE_2PC.equals(protocolIdentifier))
-		{
-			// enlist participant that wraps the requester URI.
-			final String participantId = "V" + new Uid().stringForm();
-
-			try
-			{
-                final Volatile2PCStubWS participantStub = new Volatile2PCStubWS(participantId, participantProtocolService) ;
-				_coordManager.enlistSynchronization(new VolatileTwoPhaseCommitParticipant(participantStub)) ;
-
-				_coordManager.suspend();
-
-				return getCoordinator(participantId) ;
-			}
-			catch (Exception ex)
-			{
-				throw new InvalidStateException();
-			}
-		}
-		else if (AtomicTransactionWSConstants.WSAT_SUB_PROTOCOL_COMPLETION.equals(protocolIdentifier))
-		{
-			try
-			{
-                final CompletionCoordinatorParticipantWS participant = new CompletionCoordinatorWSImple(_coordManager, hier, true, participantProtocolService) ;
-                CompletionCoordinatorProcessorWS.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.at.RegistrarWSImple_1", new Object[]
-			{ AtomicTransactionWSConstants.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 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 W3CEndpointReference registerWithSubordinate(final SubordinateCoordinator theTx,
-        final W3CEndpointReference participantProtocolService, final String protocolIdentifier)
-			throws AlreadyRegisteredException, InvalidProtocolException,
-			InvalidStateException, NoActivityException
-    {
-		if (AtomicTransactionWSConstants.WSAT_SUB_PROTOCOL_DURABLE_2PC.equals(protocolIdentifier))
-		{
-			// enlist participant that wraps the requester URI.
-            final String participantId = "D" + new Uid().stringForm();
-
-            try
-            {
-                final Durable2PCStubWS participantStub = new Durable2PCStubWS(participantId, participantProtocolService) ;
-                theTx.enlistParticipant(new DurableTwoPhaseCommitParticipant(participantStub, participantId));
-
-                return getCoordinator(participantId) ;
-            }
-            catch (Exception ex)
-            {
-                throw new InvalidStateException();
-            }
-		}
-		else if (AtomicTransactionWSConstants.WSAT_SUB_PROTOCOL_VOLATILE_2PC.equals(protocolIdentifier))
-		{
-			// enlist participant that wraps the requester URI.
-            final String participantId = "V" + new Uid().stringForm();
-
-            try
-            {
-                final Volatile2PCStubWS participantStub = new Volatile2PCStubWS(participantId, participantProtocolService) ;
-                theTx.enlistSynchronization(new VolatileTwoPhaseCommitParticipant(participantStub)) ;
-
-                return getCoordinator(participantId) ;
-            }
-            catch (Exception ex)
-            {
-                throw new InvalidStateException();
-            }
-		}
-		else if (AtomicTransactionWSConstants.WSAT_SUB_PROTOCOL_COMPLETION.equals(protocolIdentifier))
-		{
-			// not allowed for subordinate transactions!
-
-			throw new InvalidStateException();
-		}
-		else
-		{
-			wstxLogger.arjLoggerI18N.warn("com.arjuna.mwlabs.wst.at.RegistrarWSImple_1", new Object[]
-			{ AtomicTransactionWSConstants.WSAT_PROTOCOL, protocolIdentifier });
-
-			throw new InvalidProtocolException();
-		}
-	}
-
-    private W3CEndpointReference getCompletionCoordinator(final InstanceIdentifierWS instanceIdentifier)
-    {
-        W3CEndpointReferenceBuilder builder = new W3CEndpointReferenceBuilder();
-        String address = ServiceRegistryWS.getRegistry().getServiceURI(AtomicTransactionWSConstants.COMPLETION_COORDINATOR_SERVICE_NAME);
-        builder.serviceName(AtomicTransactionWSConstants.COMPLETION_COORDINATOR_SERVICE_QNAME);
-        builder.endpointName(AtomicTransactionWSConstants.COMPLETION_COORDINATOR_PORT_QNAME);
-        builder.address(address);
-        InstanceIdentifierWS.setEndpointInstanceIdentifier(builder, instanceIdentifier);
-        return builder.build();
-    }
-
-    private W3CEndpointReference getCoordinator(final String participantId)
-    {
-        W3CEndpointReferenceBuilder builder = new W3CEndpointReferenceBuilder();
-        String address = ServiceRegistryWS.getRegistry().getServiceURI(AtomicTransactionWSConstants.COORDINATOR_SERVICE_NAME);
-        builder.serviceName(AtomicTransactionWSConstants.COORDINATOR_SERVICE_QNAME);
-        builder.endpointName(AtomicTransactionWSConstants.COORDINATOR_PORT_QNAME);
-        builder.address(address);
-        InstanceIdentifierWS.setEndpointInstanceIdentifier(builder, participantId);
-        return builder.build();
-    }
-
-	private CoordinatorManager _coordManager = null;
-	private HashMap _hierarchies = new HashMap();
-}

Deleted: labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mwlabs/wst/at/context/ArjunaContextWSImple.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mwlabs/wst/at/context/ArjunaContextWSImple.java	2008-01-25 17:05:33 UTC (rev 18123)
+++ labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mwlabs/wst/at/context/ArjunaContextWSImple.java	2008-01-25 17:18:13 UTC (rev 18124)
@@ -1,259 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. 
- * 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: ArjunaContextImple.java,v 1.11.4.1 2005/11/22 10:36:15 kconner Exp $
- */
-
-package com.arjuna.mwlabs.wst.at.context;
-
-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.wsat.AtomicTransactionWSConstants;
-import com.arjuna.webservices.wscoor.CoordinationConstantsWS;
-import org.w3c.dom.Element;
-
-import javax.xml.parsers.DocumentBuilder;
-
-/**
- * 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 ArjunaContextWSImple implements SOAPContext
-{
-
-	public ArjunaContextWSImple()
-	{
-		_context = null;
-	}
-
-	public ArjunaContextWSImple(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)
-	{
-		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 IllegalArgumentException();
-		}
-	}
-
-    /**
-     * @return the context document object.
-     */
-    private synchronized Element context()
-    {
-        // TODO - work out which bits of this we can do using JAXB
-        // TODO - sort out expires etc
-
-        if (_context == null)
-        {
-            DocumentBuilder builder = 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.
-                 */
-
-                Element identifier = doc.createElement("wsu:"+_identifier);
-                identifier.appendChild(doc.createTextNode(_identifierValues[0]));
-
-                _context.appendChild(identifier);
-
-                Element expires = doc.createElement("wsu:"+_expires);
-                expires.appendChild(doc.createTextNode(Integer.toString(_expiresValues[0])));
-
-                _context.appendChild(expires);
-
-                Element coordinationType = doc.createElement("wscoor:" + _coordinationType);
-                coordinationType.appendChild(doc.createTextNode(AtomicTransactionWSConstants.WSAT_PROTOCOL));
-
-                _context.appendChild(coordinationType);
-
-                /*
-                 * Now let's do the optional stuff.
-                 */
-                final int depth = _identifierValues.length ;
-                if (depth > 1)
-                {
-                    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 ArjunaContextWSImple.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.at.context.ArjunaContextWSImple_1 [com.arjuna.mwlabs.wst.at.context.ArjunaContextWSImple_1] - ignoring context: 
-     */
-    public static ArjunaContextWSImple getContext()
-    {
-        ContextManager cxman = new ContextManager();
-        Context[] contexts = cxman.contexts();
-
-        for (int i = 0; i < contexts.length; i++)
-        {
-            if (contexts[i].identifier().equals(ArjunaContextWSImple.class.getName()))
-            {
-                if (contexts[i] instanceof ArjunaContextWSImple)
-                {
-                    return (ArjunaContextWSImple)contexts[i] ;
-                }
-                else
-                {
-                    wstxLogger.arjLoggerI18N.warn("com.arjuna.mwlabs.wst.at.context.ArjunaContextWSImple_1",
-                            new Object[]{contexts[i]});
-                }
-                break;
-            }
-        }
-        return null ;
-    }
-
-	private Element _context;
-    private String[] _identifierValues ;
-    private int[] _expiresValues ;
-
-	private static final String _wscoorNamespace = CoordinationConstantsWS.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 = CoordinationConstantsWS.WSCOOR_ELEMENT_COORDINATION_CONTEXT;
-	private static final String _identifier = CoordinationConstantsWS.WSCOOR_ELEMENT_IDENTIFIER;
-	private static final String _expires = CoordinationConstantsWS.WSCOOR_ELEMENT_EXPIRES;
-    private static final String _coordinationType = CoordinationConstantsWS.WSCOOR_ELEMENT_COORDINATION_TYPE;
-}
\ No newline at end of file

Deleted: labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mwlabs/wst/at/context/TxContextWSImple.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mwlabs/wst/at/context/TxContextWSImple.java	2008-01-25 17:05:33 UTC (rev 18123)
+++ labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mwlabs/wst/at/context/TxContextWSImple.java	2008-01-25 17:18:13 UTC (rev 18124)
@@ -1,96 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. 
- * 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.at.context;
-
-import com.arjuna.mw.wsc.context.ContextWS;
-import com.arjuna.mw.wst.TxContext;
-import com.arjuna.mwlabs.wst.at.ContextWSImple;
-import org.oasis_open.docs.ws_tx.wscoor._2006._06.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 TxContextWSImple implements TxContext
-{
-
-	public TxContextWSImple(CoordinationContextType ctx)
-	{
-		_context = new ContextWSImple(ctx);
-	}
-
-	public TxContextWSImple(ContextWS 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 ContextWS context ()
-	{
-		return _context;
-	}
-
-	public String toString ()
-	{
-		return _context.toString();
-	}
-
-	private ContextWS _context;
-
-}
\ No newline at end of file

Deleted: labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mwlabs/wst/at/participants/CleanupSynchronizationWS.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mwlabs/wst/at/participants/CleanupSynchronizationWS.java	2008-01-25 17:05:33 UTC (rev 18123)
+++ labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mwlabs/wst/at/participants/CleanupSynchronizationWS.java	2008-01-25 17:18:13 UTC (rev 18124)
@@ -1,78 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. 
- * 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.at.participants;
-
-import com.arjuna.mwlabs.wst.at.RegistrarWSImple;
-
-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 CleanupSynchronizationWS implements Synchronization
-{
-
-	public CleanupSynchronizationWS(String cleanupId, RegistrarWSImple 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 RegistrarWSImple _theRegistrar;
-
-}
\ No newline at end of file

Deleted: labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mwlabs/wst/at/participants/CompletionCoordinatorWSImple.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mwlabs/wst/at/participants/CompletionCoordinatorWSImple.java	2008-01-25 17:05:33 UTC (rev 18123)
+++ labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mwlabs/wst/at/participants/CompletionCoordinatorWSImple.java	2008-01-25 17:18:13 UTC (rev 18124)
@@ -1,33 +0,0 @@
-package com.arjuna.mwlabs.wst.at.participants;
-
-import com.arjuna.mw.wscf.model.twophase.api.CoordinatorManager;
-import com.arjuna.mw.wsas.activity.ActivityHierarchy;
-
-import javax.xml.ws.wsaddressing.W3CEndpointReference;
-
-/**
- * Created by IntelliJ IDEA.
- * User: adinn
- * Date: Oct 30, 2007
- * Time: 2:37:26 PM
- * To change this template use File | Settings | File Templates.
- */
-
-/**
- *
- */
-public class CompletionCoordinatorWSImple extends CompletionCoordinatorImple implements com.arjuna.wst.CompletionCoordinatorParticipantWS
-{
-    private W3CEndpointReference participant;
-
-    public CompletionCoordinatorWSImple(CoordinatorManager cm, ActivityHierarchy hier, final boolean deactivate, W3CEndpointReference participant)
-    {
-        super(cm, hier, deactivate);
-        this.participant = participant;
-    }
-
-    public W3CEndpointReference getParticipant()
-    {
-        return participant;
-    }
-}

Deleted: labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mwlabs/wst/at/remote/TransactionManagerWSImple.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mwlabs/wst/at/remote/TransactionManagerWSImple.java	2008-01-25 17:05:33 UTC (rev 18123)
+++ labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mwlabs/wst/at/remote/TransactionManagerWSImple.java	2008-01-25 17:18:13 UTC (rev 18124)
@@ -1,217 +0,0 @@
-package com.arjuna.mwlabs.wst.at.remote;
-
-import com.arjuna.mw.wst.TransactionManager11;
-import com.arjuna.mw.wst.TxContext;
-import com.arjuna.mw.wstx.logging.wstxLogger;
-import com.arjuna.mwlabs.wst.at.context.TxContextWSImple;
-import com.arjuna.webservices.ServiceRegistryWS;
-import com.arjuna.webservices.SoapFault;
-import com.arjuna.webservices.wsarj.InstanceIdentifierWS;
-import com.arjuna.webservices.wsat.AtomicTransactionWSConstants;
-import com.arjuna.webservices.wsat.processors.ParticipantProcessorWS;
-import com.arjuna.wsc.*;
-import com.arjuna.wsc.messaging.MessageIdWS;
-import com.arjuna.wst.*;
-import com.arjuna.wst.messaging.engines.ParticipantEngineWS;
-import org.oasis_open.docs.ws_tx.wscoor._2006._06.CoordinationContextType;
-
-import javax.xml.namespace.QName;
-import javax.xml.ws.wsaddressing.W3CEndpointReference;
-import javax.xml.ws.wsaddressing.W3CEndpointReferenceBuilder;
-
-/**
- * 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 TransactionManagerWSImple extends TransactionManager11
-{
-	public TransactionManagerWSImple()
-	{
-	}
-
-	public void enlistForDurableTwoPhase (Durable2PCParticipant tpp, String id)
-			throws WrongStateException, UnknownTransactionException,
-            AlreadyRegisteredException, SystemException
-    {
-		try
-		{
-			final W3CEndpointReference coordinator = registerParticipant(getParticipant(id), AtomicTransactionWSConstants.WSAT_SUB_PROTOCOL_DURABLE_2PC);
-
-			ParticipantProcessorWS.getProcessor().activateParticipant(new ParticipantEngineWS(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 W3CEndpointReference coordinator = registerParticipant(getParticipant(id), AtomicTransactionWSConstants.WSAT_SUB_PROTOCOL_VOLATILE_2PC);
-
-			ParticipantProcessorWS.getProcessor().activateParticipant(new ParticipantEngineWS(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.at.remote.TransactionManagerWSImple_1
-	 *          [com.arjuna.mwlabs.wst.at.remote.TransactionManagerWSImple_1] -
-	 *          Not implemented!
-	 */
-
-	public int replay () throws SystemException
-	{
-		throw new SystemException(
-				wstxLogger.log_mesg.getString("com.arjuna.mwlabs.wst.at.remote.TransactionManagerWSImple_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 W3CEndpointReference enlistForCompletion (final W3CEndpointReference participantEndpoint)
-			throws WrongStateException, UnknownTransactionException,
-			AlreadyRegisteredException, SystemException
-	{
-		try
-		{
-			TxContextWSImple currentTx = (TxContextWSImple) _ctxManager.currentTransaction();
-
-			if (currentTx == null)
-				throw new com.arjuna.wsc.NoActivityException();
-
-			return registerParticipant(participantEndpoint, AtomicTransactionWSConstants.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 W3CEndpointReference getParticipant(final String id)
-    {
-        final QName serviceName = AtomicTransactionWSConstants.PARTICIPANT_SERVICE_QNAME;
-        final QName endpointName = AtomicTransactionWSConstants.PARTICIPANT_PORT_QNAME;
-        final String address = ServiceRegistryWS.getRegistry().getServiceURI(AtomicTransactionWSConstants.PARTICIPANT_SERVICE_NAME);
-        W3CEndpointReferenceBuilder builder = new W3CEndpointReferenceBuilder();
-        builder.serviceName(serviceName);
-        builder.endpointName(endpointName);
-        builder.address(address);
-        InstanceIdentifierWS.setEndpointInstanceIdentifier(builder, id);
-        return builder.build();
-    }
-
-	private final W3CEndpointReference registerParticipant (final W3CEndpointReference participant, final String protocol)
-			throws InvalidProtocolException, InvalidStateException, NoActivityException, SystemException
-	{
-		TxContextWSImple currentTx = null;
-
-		try
-		{
-			currentTx = (TxContextWSImple) _ctxManager.suspend();
-
-			if (currentTx == null)
-				throw new NoActivityException();
-
-            final CoordinationContextType coordinationContext = currentTx.context().getCoordinationContext() ;
-            final String messageId = MessageIdWS.getMessageId() ;
-
-            return RegistrationCoordinatorWS.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();
-
-}

Deleted: labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mwlabs/wst/at/remote/UserTransactionWSImple.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mwlabs/wst/at/remote/UserTransactionWSImple.java	2008-01-25 17:05:33 UTC (rev 18123)
+++ labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mwlabs/wst/at/remote/UserTransactionWSImple.java	2008-01-25 17:18:13 UTC (rev 18124)
@@ -1,380 +0,0 @@
-package com.arjuna.mwlabs.wst.at.remote;
-
-import com.arjuna.mw.wst.TransactionManager11;
-import com.arjuna.mw.wst.UserTransaction11;
-import com.arjuna.mw.wst.common.Environment;
-import com.arjuna.mw.wstx.logging.wstxLogger;
-import com.arjuna.mwlabs.wst.at.ContextWSImple;
-import com.arjuna.mwlabs.wst.at.context.TxContextWSImple;
-import com.arjuna.webservices.ServiceRegistryWS;
-import com.arjuna.webservices.SoapFault;
-import com.arjuna.webservices.wsarj.InstanceIdentifierWS;
-import com.arjuna.webservices.wsat.AtomicTransactionWSConstants;
-import com.arjuna.webservices.wscoor.CoordinationConstantsWS;
-import com.arjuna.wsc.ActivationCoordinatorWS;
-import com.arjuna.wsc.InvalidCreateParametersException;
-import com.arjuna.wsc.messaging.MessageIdWS;
-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.CompletionStubWS;
-import org.oasis_open.docs.ws_tx.wscoor._2006._06.CoordinationContextType;
-
-import javax.xml.namespace.QName;
-import javax.xml.ws.wsaddressing.W3CEndpointReference;
-import javax.xml.ws.wsaddressing.W3CEndpointReferenceBuilder;
-import java.util.Hashtable;
-
-/**
- * @message com.arjuna.mwlabs.wst.at.remote.UserTransactionWSImple__2
- *          [com.arjuna.mwlabs.wst.at.remote.UserTransactionWSImple__2] - Received
- *          context is null!
- */
-public class UserTransactionWSImple extends UserTransaction11
-{
-
-	public UserTransactionWSImple()
-	{
-		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 ServiceRegistryWS serviceRegistry = ServiceRegistryWS.getRegistry() ;
-                _activationCoordinatorService = serviceRegistry.getServiceURI(CoordinationConstantsWS.ACTIVATION_SERVICE_NAME) ;
-			}
-		}
-		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();
-
-			com.arjuna.mw.wsc.context.ContextWS ctx = startTransaction(timeout);
-
-			_ctxManager.resume(new TxContextWSImple(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 (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
-		{
-			TransactionManagerWSImple tm = (TransactionManagerWSImple) TransactionManager11.getTransactionManager();
-
-            final TxContextWSImple txContext = (TxContextWSImple) tm.currentTransaction();
-            final String id = txContext.identifier();
-            final W3CEndpointReference completionCoordinator = tm.enlistForCompletion(getCompletionParticipant(id));
-
-			_completionCoordinators.put(id, completionCoordinator);
-		}
-		catch (com.arjuna.wsc.AlreadyRegisteredException ex)
-		{
-			throw new SystemException(ex.toString());
-		}
-	}
-
-    private final com.arjuna.mw.wsc.context.ContextWS startTransaction(int timeout)
-			throws com.arjuna.wsc.InvalidCreateParametersException,
-			SystemException
-	{
-		try
-		{
-            // TODO: tricks for per app _activationCoordinatorService config, perhaps:
-            //InputStream inputStream = Thread.currentThread().getContextClassLoader().getResourceAsStream("/foo.properties");
-
-
-            final Long expires = (timeout > 0 ? new Long(timeout) : null) ;
-            final String messageId = MessageIdWS.getMessageId() ;
-            final CoordinationContextType coordinationContext = ActivationCoordinatorWS.createCoordinationContext(
-                    _activationCoordinatorService, messageId, AtomicTransactionWSConstants.WSAT_PROTOCOL, expires, null) ;
-            if (coordinationContext == null)
-            {
-                throw new SystemException(
-                    wstxLogger.log_mesg.getString("com.arjuna.mwlabs.wst.at.remote.UserTransactionWSImple__2"));
-            }
-            return new ContextWSImple(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
-	{
-		TxContextWSImple ctx = null;
-		String id = null;
-
-		try
-		{
-			ctx = (TxContextWSImple) _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 W3CEndpointReference completionCoordinator = (W3CEndpointReference) _completionCoordinators.get(id);
-
-			if (completionCoordinator == null)
-				throw new SecurityException();
-
-			CompletionStubWS completionStub = new CompletionStubWS(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
-	{
-		TxContextWSImple ctx = null;
-		String id = null;
-
-		try
-		{
-			ctx = (TxContextWSImple) _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).
-			 */
-
-			W3CEndpointReference completionCoordinator = (W3CEndpointReference) _completionCoordinators.get(id);
-
-			if (completionCoordinator == null)
-				throw new SecurityException();
-
-			CompletionStubWS completionStub = new CompletionStubWS(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);
-		}
-	}
-
-    /**
-     * Create an endpoint for the local participant service labelled with the current context id which can be passed
-     * to the registration service and handed on to the registered coordinator to call back to this transaction
-     * @param id the current transaction context identifier
-     * @return
-     */
-    private W3CEndpointReference getCompletionParticipant(final String id)
-    {
-        final QName serviceName = AtomicTransactionWSConstants.COMPLETION_INITIATOR_SERVICE_QNAME;
-        final QName endpointName = AtomicTransactionWSConstants.COMPLETION_INITIATOR_PORT_QNAME;
-        final String address = ServiceRegistryWS.getRegistry().getServiceURI(AtomicTransactionWSConstants.COMPLETION_INITIATOR_SERVICE_NAME);
-        W3CEndpointReferenceBuilder builder = new W3CEndpointReferenceBuilder();
-        builder.serviceName(serviceName);
-        builder.endpointName(endpointName);
-        builder.address(address);
-        InstanceIdentifierWS.setEndpointInstanceIdentifier(builder, id);
-        return builder.build();
-    }
-
-	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();
-}

Deleted: labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mwlabs/wst/ba/BusinessActivityTerminatorWSImple.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mwlabs/wst/ba/BusinessActivityTerminatorWSImple.java	2008-01-25 17:05:33 UTC (rev 18123)
+++ labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mwlabs/wst/ba/BusinessActivityTerminatorWSImple.java	2008-01-25 17:18:13 UTC (rev 18124)
@@ -1,216 +0,0 @@
-package com.arjuna.mwlabs.wst.ba;
-
-import com.arjuna.mw.wsas.activity.ActivityHierarchy;
-import com.arjuna.mw.wscf.exceptions.ProtocolNotRegisteredException;
-import com.arjuna.mw.wscf.model.sagas.CoordinatorManager11Factory;
-import com.arjuna.mw.wscf.model.sagas.api.CoordinatorManager;
-import com.arjuna.webservices.wsarjtx.processors.TerminationCoordinatorProcessor;
-import com.arjuna.webservices.wsarjtx.processors.TerminationCoordinatorProcessorWS;
-import com.arjuna.wst.BusinessActivityTerminatorWS;
-import com.arjuna.wst.SystemException;
-import com.arjuna.wst.TransactionRolledBackException;
-import com.arjuna.wst.UnknownTransactionException;
-
-import javax.xml.ws.wsaddressing.W3CEndpointReference;
-
-/**
- * Local business activity terminator which can be used to close a business activity from the terminator
- * side.
- */
-public class BusinessActivityTerminatorWSImple
-        implements BusinessActivityTerminatorWS
-{
-    private W3CEndpointReference participantEndpoint;
-
-    /**
-     * create a business activity terminator for use on the server side with an empty participant endpoint
-     * which gets set at registration time
-     * @throws SystemException
-     */
-    public BusinessActivityTerminatorWSImple()
-            throws SystemException
-    {
-        try
-        {
-            _coordManager = CoordinatorManager11Factory.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());
-        }
-
-        participantEndpoint = null;
-    }
-
-    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
-        {
-            TerminationCoordinatorProcessorWS.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
-	{
-        TerminationCoordinatorProcessorWS.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;
-	}
-    }
-
-    /**
-     * update the business activity terminator with an endpoint supplied at registration time
-     *
-     * @param participantEndpoint
-     */
-    public void setEndpoint(W3CEndpointReference participantEndpoint)
-    {
-        this.participantEndpoint = participantEndpoint;
-    }
-
-    /**
-     * retrieve the participant endpoint associated with this business activity terminator
-     * 
-     * @return
-     */
-    public W3CEndpointReference getEndpoint()
-    {
-        return participantEndpoint;
-    }
-
-    private CoordinatorManager _coordManager = null;
-    private ActivityHierarchy _hier = null;
-}

Deleted: labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mwlabs/wst/ba/ContextFactoryWSImple.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mwlabs/wst/ba/ContextFactoryWSImple.java	2008-01-25 17:05:33 UTC (rev 18123)
+++ labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mwlabs/wst/ba/ContextFactoryWSImple.java	2008-01-25 17:18:13 UTC (rev 18124)
@@ -1,226 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. 
- * 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.ba;
-
-import com.arjuna.mw.wscf.model.sagas.CoordinatorManager11Factory;
-import com.arjuna.mw.wscf.model.sagas.api.CoordinatorManager;
-import com.arjuna.mw.wstx.logging.wstxLogger;
-import com.arjuna.mwlabs.wst.ba.context.ArjunaContextWSImple;
-import com.arjuna.webservices.ServiceRegistryWS;
-import com.arjuna.webservices.wsarj.InstanceIdentifierWS;
-import com.arjuna.webservices.wsarjtx.processors.TerminationCoordinatorProcessorWS;
-import com.arjuna.webservices.wsba.BusinessActivityWSConstants;
-import com.arjuna.webservices.wscoor.CoordinationConstantsWS;
-import com.arjuna.wsc.ContextFactoryWS;
-import com.arjuna.wsc.InvalidCreateParametersException;
-import com.arjuna.wst.BusinessActivityTerminatorWS;
-import org.oasis_open.docs.ws_tx.wscoor._2006._06.CoordinationContext;
-import org.oasis_open.docs.ws_tx.wscoor._2006._06.CoordinationContextType;
-import org.oasis_open.docs.ws_tx.wscoor._2006._06.Expires;
-
-import javax.xml.ws.wsaddressing.W3CEndpointReference;
-import javax.xml.ws.wsaddressing.W3CEndpointReferenceBuilder;
-
-public class ContextFactoryWSImple implements ContextFactoryWS
-{
-
-    public ContextFactoryWSImple()
-    {
-        try
-        {
-            _coordManager = CoordinatorManager11Factory.coordinatorManager();
-
-            _theRegistrar = new RegistrarWSImple();
-        }
-        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 com.arjuna.wsc.InvalidCreateParametersException if a parameter passed is invalid
-     *         this activity identifier.
-     *
-     * @message com.arjuna.mwlabs.wst.ba.ContextFactoryWSImple_1 [com.arjuna.mwlabs.wst.ba.ContextFactoryWSImple_1] - Invalid type URI: < {0} , {1} >
-     * @message com.arjuna.mwlabs.wst.ba.ContextFactoryWSImple_3 [com.arjuna.mwlabs.wst.ba.ContextFactoryWSImple_3] - Invalid type URI:
-     */
-
-    public CoordinationContext create (final String coordinationTypeURI,
-            final Long expires, final CoordinationContextType currentContext)
-        throws InvalidCreateParametersException
-    {
-        if (BusinessActivityWSConstants.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 ArjunaContextWSImple arjunaContext = ArjunaContextWSImple.getContext() ;
-            final ServiceRegistryWS serviceRegistry = ServiceRegistryWS.getRegistry() ;
-            final String registrationCoordinatorURI = serviceRegistry.getServiceURI(CoordinationConstantsWS.REGISTRATION_SERVICE_NAME) ;
-
-            final CoordinationContext coordinationContext = new CoordinationContext() ;
-            coordinationContext.setCoordinationType(coordinationTypeURI) ;
-            CoordinationContextType.Identifier identifier = new CoordinationContextType.Identifier();
-            identifier.setValue("urn:"+arjunaContext.getTransactionIdentifier());
-            coordinationContext.setIdentifier(identifier) ;
-            final int transactionExpires = arjunaContext.getTransactionExpires() ;
-            if (transactionExpires > 0)
-            {
-                Expires expiresInstance = new Expires();
-                expiresInstance.setValue(transactionExpires);
-                coordinationContext.setExpires(expiresInstance);
-            }
-            final W3CEndpointReference registrationCoordinator = getRegistrationCoordinator(registrationCoordinatorURI, arjunaContext);
-            coordinationContext.setRegistrationService(registrationCoordinator) ;
-
-            String transactionIdentifier = arjunaContext.getTransactionIdentifier();
-            BusinessActivityTerminatorWS terminator = new BusinessActivityTerminatorWSImple();
-            TerminationCoordinatorProcessorWS.getProcessor().activateParticipant(terminator, transactionIdentifier);
-
-    		_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.ba.ContextFactoryWSImple_1",
-					  new Object[]{BusinessActivityWSConstants.WSBA_PROTOCOL_ATOMIC_OUTCOME, coordinationTypeURI});
-
-	    throw new InvalidCreateParametersException(wstxLogger.log_mesg.getString("com.arjuna.mwlabs.wst.ba.ContextFactoryWSImple_3")+" < "+BusinessActivityWSConstants.WSBA_PROTOCOL_ATOMIC_OUTCOME+", "+coordinationTypeURI+" >");
-	}
-
-	return null;
-    }
-
-    private static W3CEndpointReference getRegistrationCoordinator(String registrationCoordinatorURI, ArjunaContextWSImple arjunaContext) {
-        final W3CEndpointReferenceBuilder builder = new W3CEndpointReferenceBuilder();
-        builder.serviceName(CoordinationConstantsWS.REGISTRATION_SERVICE_QNAME);
-        builder.endpointName(CoordinationConstantsWS.REGISTRATION_ENDPOINT_QNAME);
-        // strictly we shouldn't need to set the address because we are in the same web app as the
-        // coordinator but we have to as the W3CEndpointReference implementation is incomplete
-        builder.address(registrationCoordinatorURI);
-        InstanceIdentifierWS.setEndpointInstanceIdentifier(builder, arjunaContext.getTransactionIdentifier());
-        W3CEndpointReference registrationCoordinator = builder.build();
-        return registrationCoordinator;
-    }
-
-    /**
-     * 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 (String coordinationTypeURI)
-    {
-	// we don't use this as one implementation is registered per type
-    }
-
-    public final RegistrarWSImple registrar ()
-    {
-        return _theRegistrar;
-    }
-
-    private CoordinatorManager                   _coordManager;
-    private RegistrarWSImple                       _theRegistrar;
-
-}
\ No newline at end of file

Deleted: labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mwlabs/wst/ba/ContextWSImple.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mwlabs/wst/ba/ContextWSImple.java	2008-01-25 17:05:33 UTC (rev 18123)
+++ labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mwlabs/wst/ba/ContextWSImple.java	2008-01-25 17:18:13 UTC (rev 18124)
@@ -1,72 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. 
- * 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.ba;
-
-import org.oasis_open.docs.ws_tx.wscoor._2006._06.CoordinationContextType;
-
-
-public class ContextWSImple implements com.arjuna.mw.wsc.context.ContextWS
-{
-    public ContextWSImple(CoordinationContextType ctx)
-    {
-        _coordContext = ctx;
-    }
-
-    public boolean equals (Object obj)
-    {
-        if (obj instanceof ContextImple)
-        {
-    	    ContextWSImple ci = (ContextWSImple) 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;
-}
\ No newline at end of file

Deleted: labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mwlabs/wst/ba/RegistrarWSImple.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mwlabs/wst/ba/RegistrarWSImple.java	2008-01-25 17:05:33 UTC (rev 18123)
+++ labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mwlabs/wst/ba/RegistrarWSImple.java	2008-01-25 17:18:13 UTC (rev 18124)
@@ -1,276 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. 
- * 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.ba;
-
-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.CoordinatorManager11Factory;
-import com.arjuna.mw.wscf.model.sagas.api.CoordinatorManager;
-import com.arjuna.mw.wstx.logging.wstxLogger;
-import com.arjuna.mwlabs.wst.ba.participants.BusinessAgreementWithCoordinatorCompletionWSImple;
-import com.arjuna.mwlabs.wst.ba.participants.BusinessAgreementWithParticipantCompletionWSImple;
-import com.arjuna.webservices.ServiceRegistryWS;
-import com.arjuna.webservices.wsarj.InstanceIdentifierWS;
-import com.arjuna.webservices.wsarjtx.ArjunaTXConstants;
-import com.arjuna.webservices.wsarjtx.ArjunaTXWSConstants;
-import com.arjuna.webservices.wsarjtx.processors.TerminationCoordinatorProcessorWS;
-import com.arjuna.webservices.wsba.BusinessActivityWSConstants;
-import com.arjuna.wsc.*;
-import com.arjuna.wst.BusinessActivityTerminatorWS;
-import com.arjuna.wst.messaging.engines.CoordinatorCompletionCoordinatorEngineWS;
-import com.arjuna.wst.messaging.engines.ParticipantCompletionCoordinatorEngineWS;
-import com.arjuna.wst.stub.BusinessAgreementWithCoordinatorCompletionStubWS;
-import com.arjuna.wst.stub.BusinessAgreementWithParticipantCompletionStubWS;
-
-import javax.xml.namespace.QName;
-import javax.xml.ws.wsaddressing.W3CEndpointReference;
-import javax.xml.ws.wsaddressing.W3CEndpointReferenceBuilder;
-import java.util.HashMap;
-
-public class RegistrarWSImple implements RegistrarWS
-{
-
-	public RegistrarWSImple() throws ProtocolNotRegisteredException,
-			SystemException
-	{
-		_coordManager = CoordinatorManager11Factory.coordinatorManager();
-
-		// register with mapper using tx id as protocol identifier.
-		final RegistrarMapperWS mapper = RegistrarMapperWS.getFactory();
-
-		mapper.addRegistrar(
-			BusinessActivityWSConstants.WSBA_SUB_PROTOCOL_PARTICIPANT_COMPLETION, this);
-		mapper.addRegistrar(
-			BusinessActivityWSConstants.WSBA_SUB_PROTOCOL_COORDINATOR_COMPLETION, this);
-		mapper.addRegistrar(ArjunaTXConstants.WSARJTX_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 protocolIdentifier
-	 *            the protocol identifier
-	 */
-
-	public void install (String protocolIdentifier)
-	{
-	}
-
-	/**
-	 * Registers the interest of participant in a particular protocol.
-	 *
-	 * @param participantProtocolService
-	 *            the address of the participant protocol service
-	 * @param protocolIdentifier
-	 *            the protocol identifier
-	 *
-	 * @return the PortReference of the coordinator protocol service
-	 *
-	 * @throws com.arjuna.wsc.AlreadyRegisteredException
-	 *             if the participant is already registered for this
-	 *             coordination protocol under this activity identifier
-	 * @throws com.arjuna.wsc.InvalidProtocolException
-	 *             if the coordination protocol is not supported
-	 * @throws com.arjuna.wsc.InvalidStateException
-	 *             if the state of the coordinator no longer allows registration
-	 *             for this coordination protocol
-	 * @throws com.arjuna.wsc.NoActivityException
-	 *             if the activity does not exist.
-	 *
-	 * @message com.arjuna.mwlabs.wst.ba.RegistrarWSImple_1
-	 *          [com.arjuna.mwlabs.wst.ba.RegistrarWSImple_1] - Invalid type URI: < {0} , {1} >
-	 */
-
-	public W3CEndpointReference register (
-			final W3CEndpointReference participantProtocolService,
-			final String protocolIdentifier,
-			final InstanceIdentifierWS instanceIdentifier)
-			throws AlreadyRegisteredException, 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 (SystemException ex)
-		{
-			throw new InvalidProtocolException();
-		}
-
-		// TODO check for AlreadyRegisteredException
-
-		if (BusinessActivityWSConstants.WSBA_SUB_PROTOCOL_PARTICIPANT_COMPLETION
-				.equals(protocolIdentifier))
-		{
-			// enlist participant that wraps the requester URI.
-			final String id = new Uid().stringForm();
-
-			try
-			{
-                final ParticipantCompletionCoordinatorEngineWS engine = new ParticipantCompletionCoordinatorEngineWS(id, participantProtocolService) ;
-				BusinessAgreementWithParticipantCompletionWSImple participant = new BusinessAgreementWithParticipantCompletionWSImple(
-						new BusinessAgreementWithParticipantCompletionStubWS(engine), id);
-                engine.setCoordinator(participant.participantManager()) ;
-
-				_coordManager.enlistParticipant(participant);
-
-				_coordManager.suspend();
-
-				return getParticipantManager(
-                        BusinessActivityWSConstants.PARTICIPANT_COMPLETION_COORDINATOR_SERVICE_QNAME,
-                        BusinessActivityWSConstants.PARTICIPANT_COMPLETION_COORDINATOR_PORT_QNAME,
-                        ServiceRegistryWS.getRegistry().getServiceURI(BusinessActivityWSConstants.PARTICIPANT_COMPLETION_COORDINATOR_SERVICE_NAME),
-						id);
-			}
-			catch (Exception ex)
-			{
-				throw new InvalidStateException();
-			}
-		}
-		else
-			if (BusinessActivityWSConstants.WSBA_SUB_PROTOCOL_COORDINATOR_COMPLETION
-					.equals(protocolIdentifier))
-			{
-				final String id = new Uid().stringForm();
-				try
-				{
-                    final CoordinatorCompletionCoordinatorEngineWS engine = new CoordinatorCompletionCoordinatorEngineWS(id, participantProtocolService) ;
-					BusinessAgreementWithCoordinatorCompletionWSImple participant = new BusinessAgreementWithCoordinatorCompletionWSImple(
-							new BusinessAgreementWithCoordinatorCompletionStubWS(engine), id);
-                    engine.setCoordinator(participant.participantManager()) ;
-
-					_coordManager.enlistParticipant(participant);
-
-					_coordManager.suspend();
-
-					return getParticipantManager(
-                            BusinessActivityWSConstants.COORDINATOR_COMPLETION_COORDINATOR_SERVICE_QNAME,
-							BusinessActivityWSConstants.COORDINATOR_COMPLETION_COORDINATOR_PORT_QNAME,
-                            ServiceRegistryWS.getRegistry().getServiceURI(BusinessActivityWSConstants.COORDINATOR_COMPLETION_COORDINATOR_SERVICE_NAME),
-							id);
-				}
-				catch (Exception ex)
-				{
-					throw new InvalidStateException();
-				}
-			}
-			else
-				if (ArjunaTXConstants.WSARJTX_PROTOCOL_TERMINATION.equals(protocolIdentifier))
-				{
-                    /*
-                     * update the server side terminator with the participant end point
-                     */
-                    BusinessActivityTerminatorWSImple terminator;
-                    terminator = (BusinessActivityTerminatorWSImple)TerminationCoordinatorProcessorWS.getProcessor().getParticipant(instanceIdentifier);
-                    terminator.setEndpoint(participantProtocolService);
-                    
-                    try
-					{
-                        return getParticipantManager(
-                                ArjunaTXWSConstants.TERMINATION_COORDINATOR_SERVICE_QNAME,
-								ArjunaTXWSConstants.TERMINATION_COORDINATOR_PORT_QNAME,
-                                ServiceRegistryWS.getRegistry().getServiceURI(ArjunaTXWSConstants.TERMINATION_COORDINATOR_SERVICE_NAME),
-                                instanceIdentifier.getInstanceIdentifier());
-					}
-					catch (Exception ex)
-					{
-						throw new InvalidStateException();
-					}
-				}
-				else
-				{
-					wstxLogger.arjLoggerI18N
-							.warn(
-									"com.arjuna.mwlabs.wst.ba.RegistrarWSImple_1",
-									new Object[] { BusinessActivityWSConstants.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 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 W3CEndpointReference getParticipantManager (final QName serviceName, final QName endpointName, final String address, final String id)
-	{
-        W3CEndpointReferenceBuilder builder = new W3CEndpointReferenceBuilder();
-        builder.serviceName(serviceName);
-        builder.endpointName(endpointName);
-        builder.address(address);
-        InstanceIdentifierWS.setEndpointInstanceIdentifier(builder, id);
-        return builder.build();
-	}
-
-	private CoordinatorManager _coordManager = null;
-
-	private HashMap _hierarchies = new HashMap();
-}
\ No newline at end of file

Deleted: labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mwlabs/wst/ba/context/ArjunaContextWSImple.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mwlabs/wst/ba/context/ArjunaContextWSImple.java	2008-01-25 17:05:33 UTC (rev 18123)
+++ labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mwlabs/wst/ba/context/ArjunaContextWSImple.java	2008-01-25 17:18:13 UTC (rev 18124)
@@ -1,261 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. 
- * 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: ArjunaContextImple.java,v 1.6.6.1 2005/11/22 10:36:16 kconner Exp $
- */
-
-package com.arjuna.mwlabs.wst.ba.context;
-
-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.wsba.BusinessActivityWSConstants;
-import com.arjuna.webservices.wscoor.CoordinationConstantsWS;
-import org.w3c.dom.Element;
-
-import javax.xml.parsers.DocumentBuilder;
-
-/**
- * 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.6.6.1 2005/11/22 10:36:16 kconner Exp $
- */
-
-public class ArjunaContextWSImple implements SOAPContext
-{
-
-    public ArjunaContextWSImple()
-    {
-        _context = null;
-    }
-
-    public ArjunaContextWSImple(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)
-    {
-    	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 IllegalArgumentException();
-    	}
-    }
-
-    /**
-     * @return the context document object.
-     */
-    private synchronized Element context()
-    {
-        // TODO - work out which bits of this we can do using JAXB
-        // TODO - sort out expires etc
-
-        if (_context == null)
-        {
-            DocumentBuilder builder = 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.
-                 */
-
-                Element identifier = doc.createElement("wsu:"+_identifier);
-                identifier.appendChild(doc.createTextNode(_identifierValues[0]));
-
-                _context.appendChild(identifier);
-
-                Element expires = doc.createElement("wsu:"+_expires);
-                expires.appendChild(doc.createTextNode(Integer.toString(_expiresValues[0])));
-
-                _context.appendChild(expires);
-
-                Element coordinationType = doc.createElement("wscoor:" + _coordinationType);
-                coordinationType.appendChild(doc.createTextNode(BusinessActivityWSConstants.WSBA_PROTOCOL_ATOMIC_OUTCOME));
-
-                _context.appendChild(coordinationType);
-
-                /*
-                 * Now let's do the optional stuff.
-                 */
-                final int depth = _identifierValues.length ;
-                if (depth > 1)
-                {
-                    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 ArjunaContextWSImple.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.ba.context.ArjunaContextWSImple_1 [com.arjuna.mwlabs.wst.ba.context.ArjunaContextWSImple_1] - ignoring context:
-     */
-    public static ArjunaContextWSImple getContext()
-    {
-        ContextManager cxman = new ContextManager();
-        Context[] contexts = cxman.contexts();
-
-        for (int i = 0; i < contexts.length; i++)
-        {
-            if (contexts[i].identifier().equals(ArjunaContextWSImple.class.getName()))
-            {
-                if (contexts[i] instanceof ArjunaContextWSImple)
-                {
-                    return (ArjunaContextWSImple)contexts[i] ;
-                }
-                else
-                {
-                    wstxLogger.arjLoggerI18N.warn("com.arjuna.mwlabs.wst.ba.context.ArjunaContextWSImple_1",
-                            new Object[]{contexts[i]});
-                }
-                break;
-            }
-        }
-        return null ;
-    }
-
-    private Element _context;
-    private String[] _identifierValues ;
-    private int[] _expiresValues ;
-
-    private static final String _wscoorNamespace = CoordinationConstantsWS.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 = CoordinationConstantsWS.WSCOOR_ELEMENT_COORDINATION_CONTEXT;
-    private static final String _identifier = CoordinationConstantsWS.WSCOOR_ELEMENT_IDENTIFIER;
-    private static final String _expires = CoordinationConstantsWS.WSCOOR_ELEMENT_EXPIRES;
-    private static final String _coordinationType = CoordinationConstantsWS.WSCOOR_ELEMENT_COORDINATION_TYPE;
-
-}
\ No newline at end of file

Deleted: labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mwlabs/wst/ba/context/TxContextWSImple.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mwlabs/wst/ba/context/TxContextWSImple.java	2008-01-25 17:05:33 UTC (rev 18123)
+++ labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mwlabs/wst/ba/context/TxContextWSImple.java	2008-01-25 17:18:13 UTC (rev 18124)
@@ -1,95 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. 
- * 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.ba.context;
-
-import com.arjuna.mw.wst.TxContext;
-import com.arjuna.mwlabs.wst.ba.ContextWSImple;
-import org.oasis_open.docs.ws_tx.wscoor._2006._06.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 TxContextWSImple implements TxContext
-{
-
-    public TxContextWSImple(CoordinationContextType ctx)
-    {
-        _context = new ContextWSImple(ctx);
-    }
-
-    public TxContextWSImple(com.arjuna.mw.wsc.context.ContextWS context)
-    {
-        _context = context;
-    }
-
-    public boolean valid ()
-    {
-    	return (_context != null) ;
-    }
-
-    public boolean equals (Object obj)
-    {
-    	if (obj instanceof TxContextWSImple)
-    	{
-    	    TxContextWSImple compare = (TxContextWSImple) 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 com.arjuna.mw.wsc.context.ContextWS context ()
-    {
-        return _context;
-    }
-
-    public String toString ()
-    {
-        return _context.toString();
-    }
-
-    private com.arjuna.mw.wsc.context.ContextWS _context;
-
-}
\ No newline at end of file

Deleted: labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mwlabs/wst/ba/participants/BusinessAgreementWithCoordinatorCompletionWSImple.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mwlabs/wst/ba/participants/BusinessAgreementWithCoordinatorCompletionWSImple.java	2008-01-25 17:05:33 UTC (rev 18123)
+++ labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mwlabs/wst/ba/participants/BusinessAgreementWithCoordinatorCompletionWSImple.java	2008-01-25 17:18:13 UTC (rev 18124)
@@ -1,80 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. 
- * 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.ba.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 BusinessAgreementWithCoordinatorCompletionWSImple extends
-		BusinessAgreementWithParticipantCompletionWSImple implements
-		com.arjuna.mw.wscf.model.sagas.participants.ParticipantWithComplete
-{
-
-	public BusinessAgreementWithCoordinatorCompletionWSImple(
-			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();
-	}
-}
\ No newline at end of file

Deleted: labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mwlabs/wst/ba/participants/BusinessAgreementWithParticipantCompletionWSImple.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mwlabs/wst/ba/participants/BusinessAgreementWithParticipantCompletionWSImple.java	2008-01-25 17:05:33 UTC (rev 18123)
+++ labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mwlabs/wst/ba/participants/BusinessAgreementWithParticipantCompletionWSImple.java	2008-01-25 17:18:13 UTC (rev 18124)
@@ -1,228 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. 
- * 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.ba.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.util.PersistableParticipantHelper;
-import com.arjuna.wst.BusinessAgreementWithParticipantCompletionParticipant;
-
-// TODO crash recovery (for EVERYTHING!!)
-
-// TODO re-architect!!
-
-/**
- * @author Mark Little (mark.little at arjuna.com)
- * @version $Id: BusinessAgreementWithParticipantCompletionWSImple.java,v 1.1.2.2
- *          2004/08/09 12:34:26 nmcl Exp $
- * @since 1.0.
- */
-
-public class BusinessAgreementWithParticipantCompletionWSImple implements
-		com.arjuna.mw.wscf.model.sagas.participants.Participant
-{
-//
-	public BusinessAgreementWithParticipantCompletionWSImple(
-			BusinessAgreementWithParticipantCompletionParticipant resource,
-			String id)
-	{
-		_resource = resource;
-		_identifier = id;
-		_baParticipantManager = new com.arjuna.mwlabs.wst.ba.remote.BAParticipantManagerWSImple(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 com.arjuna.mw.wscf.exceptions.InvalidParticipantException
-	 *                Thrown if the participant identity is invalid.
-	 * @exception com.arjuna.mw.wsas.exceptions.WrongStateException
-	 *                Thrown if the participant is in an invalid state.
-	 * @exception com.arjuna.mw.wsas.exceptions.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 com.arjuna.wst.BAParticipantManagerWS 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 com.arjuna.wst.BAParticipantManagerWS _baParticipantManager = null;
-
-}
\ No newline at end of file

Deleted: labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mwlabs/wst/ba/remote/BAParticipantManagerWSImple.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mwlabs/wst/ba/remote/BAParticipantManagerWSImple.java	2008-01-25 17:05:33 UTC (rev 18123)
+++ labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mwlabs/wst/ba/remote/BAParticipantManagerWSImple.java	2008-01-25 17:18:13 UTC (rev 18124)
@@ -1,202 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. 
- * 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.ba.remote;
-
-import com.arjuna.mw.wsas.activity.ActivityHierarchy;
-import com.arjuna.mw.wsas.exceptions.InvalidActivityException;
-import com.arjuna.mw.wscf.model.sagas.CoordinatorManager11Factory;
-import com.arjuna.mw.wscf.model.sagas.api.CoordinatorManager;
-import com.arjuna.wst.SystemException;
-import com.arjuna.wst.UnknownTransactionException;
-import com.arjuna.wst.WrongStateException;
-
-import javax.xml.namespace.QName;
-
-/**
- * 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 BAParticipantManagerWSImple implements com.arjuna.wst.BAParticipantManagerWS
-{
-
-    public BAParticipantManagerWSImple(String participantId)
-    {
-	try
-	{
-	    _coordManager = CoordinatorManager11Factory.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 (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 (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);
-
-        // fail means faulted as far as the coordinator manager is concerned
-            _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 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;
-
-}
\ No newline at end of file

Deleted: labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mwlabs/wst/ba/remote/BusinessActivity11ManagerImple.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mwlabs/wst/ba/remote/BusinessActivity11ManagerImple.java	2008-01-25 17:05:33 UTC (rev 18123)
+++ labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mwlabs/wst/ba/remote/BusinessActivity11ManagerImple.java	2008-01-25 17:18:13 UTC (rev 18124)
@@ -1,213 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. 
- * 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.ba.remote;
-
-import com.arjuna.mw.wst.BusinessActivity11Manager;
-import com.arjuna.mw.wst.TxContext;
-import com.arjuna.mwlabs.wst.ba.context.TxContextWSImple;
-import com.arjuna.webservices.ServiceRegistryWS;
-import com.arjuna.webservices.SoapFault;
-import com.arjuna.webservices.wsarj.InstanceIdentifierWS;
-import com.arjuna.webservices.wsba.BusinessActivityWSConstants;
-import com.arjuna.webservices.wsba.processors.CoordinatorCompletionParticipantProcessorWS;
-import com.arjuna.webservices.wsba.processors.ParticipantCompletionParticipantProcessorWS;
-import com.arjuna.wsc.AlreadyRegisteredException;
-import com.arjuna.wsc.RegistrationCoordinatorWS;
-import com.arjuna.wsc.messaging.MessageIdWS;
-import com.arjuna.wst.*;
-import com.arjuna.wst.messaging.engines.CoordinatorCompletionParticipantEngineWS;
-import com.arjuna.wst.messaging.engines.ParticipantCompletionParticipantEngineWS;
-import com.arjuna.wst.stub.BACoordinatorCompletionParticipantManagerStubWS;
-import com.arjuna.wst.stub.BAParticipantCompletionParticipantManagerStubWS;
-import org.oasis_open.docs.ws_tx.wscoor._2006._06.CoordinationContextType;
-
-import javax.xml.namespace.QName;
-import javax.xml.ws.wsaddressing.W3CEndpointReference;
-import javax.xml.ws.wsaddressing.W3CEndpointReferenceBuilder;
-
-/**
- * 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 BusinessActivity11ManagerImple extends BusinessActivity11Manager
-{
-    public BusinessActivity11ManagerImple()
-    {
-    }
-
-    public BAParticipantManagerWS enlistForBusinessAgreementWithParticipantCompletion (BusinessAgreementWithParticipantCompletionParticipant bap, String id)
-        throws WrongStateException, UnknownTransactionException, AlreadyRegisteredException, SystemException
-    {
-        final QName service = BusinessActivityWSConstants.PARTICIPANT_COMPLETION_PARTICIPANT_SERVICE_QNAME;
-        final QName endpoint = BusinessActivityWSConstants.PARTICIPANT_COMPLETION_PARTICIPANT_PORT_QNAME;
-        final String address = ServiceRegistryWS.getRegistry().getServiceURI(BusinessActivityWSConstants.PARTICIPANT_COMPLETION_PARTICIPANT_SERVICE_NAME);
-        final W3CEndpointReference participant = getParticipant(service, endpoint, address, id) ;
-    	try
-    	{
-            W3CEndpointReference baPMEndpoint = registerParticipant(participant, BusinessActivityWSConstants.WSBA_SUB_PROTOCOL_PARTICIPANT_COMPLETION);
-            final ParticipantCompletionParticipantEngineWS engine = new ParticipantCompletionParticipantEngineWS(id, baPMEndpoint, bap) ;
-            ParticipantCompletionParticipantProcessorWS.getProcessor().activateParticipant(engine, id) ;
-
-            return new BAParticipantCompletionParticipantManagerStubWS(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 BAParticipantManagerWS enlistForBusinessAgreementWithCoordinatorCompletion (BusinessAgreementWithCoordinatorCompletionParticipant bawcp, String id) throws WrongStateException, UnknownTransactionException, AlreadyRegisteredException, SystemException
-    {
-        final QName service = BusinessActivityWSConstants.COORDINATOR_COMPLETION_PARTICIPANT_SERVICE_QNAME;
-        final QName endpoint = BusinessActivityWSConstants.COORDINATOR_COMPLETION_PARTICIPANT_PORT_QNAME;
-        final String address = ServiceRegistryWS.getRegistry().getServiceURI(BusinessActivityWSConstants.COORDINATOR_COMPLETION_PARTICIPANT_SERVICE_NAME);
-        final W3CEndpointReference participant = getParticipant(service, endpoint, address, id) ;
-    	try
-    	{
-    	    W3CEndpointReference baPMEndpoint = registerParticipant(participant, BusinessActivityWSConstants.WSBA_SUB_PROTOCOL_COORDINATOR_COMPLETION);
-            final CoordinatorCompletionParticipantEngineWS engine = new CoordinatorCompletionParticipantEngineWS(id, baPMEndpoint, bawcp) ;
-            CoordinatorCompletionParticipantProcessorWS.getProcessor().activateParticipant(engine, id) ;
-
-            return new BACoordinatorCompletionParticipantManagerStubWS(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 W3CEndpointReference registerParticipant(final W3CEndpointReference participant, final String protocol)
-        throws com.arjuna.wsc.InvalidProtocolException, com.arjuna.wsc.InvalidStateException, com.arjuna.wsc.NoActivityException, SystemException
-    {
-    	TxContextWSImple currentTx = null;
-
-    	try
-    	{
-    	    currentTx = (TxContextWSImple) _ctxManager.currentTransaction();
-
-    	    if (currentTx == null)
-        		throw new com.arjuna.wsc.NoActivityException();
-
-            final CoordinationContextType coordinationContext = currentTx.context().getCoordinationContext() ;
-            final String messageId = MessageIdWS.getMessageId() ;
-            return RegistrationCoordinatorWS.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 W3CEndpointReference getParticipant(final QName service, final QName endpoint, final String address, final String id)
-    {
-        final W3CEndpointReferenceBuilder builder = new W3CEndpointReferenceBuilder();
-        builder.serviceName(service);
-        builder.endpointName(endpoint);
-        builder.address(address);
-        InstanceIdentifierWS.setEndpointInstanceIdentifier(builder, id);
-        return builder.build();
-    }
-
-    private ContextManager _ctxManager = new ContextManager();
-}
\ No newline at end of file

Deleted: labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mwlabs/wst/ba/remote/UserBusinessActivityWSImple.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mwlabs/wst/ba/remote/UserBusinessActivityWSImple.java	2008-01-25 17:05:33 UTC (rev 18123)
+++ labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mwlabs/wst/ba/remote/UserBusinessActivityWSImple.java	2008-01-25 17:18:13 UTC (rev 18124)
@@ -1,330 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. 
- * 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: UserBusinessActivityWSImple.java,v 1.10.4.1 2005/11/22 10:36:07 kconner Exp $
- */
-
-package com.arjuna.mwlabs.wst.ba.remote;
-
-import com.arjuna.mw.wst.UserBusinessActivity11;
-import com.arjuna.mw.wst.common.Environment;
-import com.arjuna.mw.wstx.logging.wstxLogger;
-import com.arjuna.mwlabs.wst.ba.ContextWSImple;
-import com.arjuna.mwlabs.wst.ba.context.TxContextWSImple;
-import com.arjuna.webservices.ServiceRegistryWS;
-import com.arjuna.webservices.SoapFault;
-import com.arjuna.webservices.wsarj.InstanceIdentifierWS;
-import com.arjuna.webservices.wsarjtx.ArjunaTXConstants;
-import com.arjuna.webservices.wsarjtx.ArjunaTXWSConstants;
-import com.arjuna.webservices.wsba.BusinessActivityWSConstants;
-import com.arjuna.webservices.wscoor.CoordinationConstantsWS;
-import com.arjuna.wsc.ActivationCoordinatorWS;
-import com.arjuna.wsc.InvalidCreateParametersException;
-import com.arjuna.wsc.RegistrationCoordinatorWS;
-import com.arjuna.wsc.messaging.MessageIdWS;
-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.BusinessActivityTerminatorStubWS;
-import org.oasis_open.docs.ws_tx.wscoor._2006._06.CoordinationContextType;
-
-import javax.xml.namespace.QName;
-import javax.xml.ws.wsaddressing.W3CEndpointReference;
-import javax.xml.ws.wsaddressing.W3CEndpointReferenceBuilder;
-
-/**
- * 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.ba.remote.UserBusinessActivityWSImple_1 [com.arjuna.mwlabs.wst.ba.remote.UserBusinessActivityWSImple_1] - Invalid address.
- * @message com.arjuna.mwlabs.wst.ba.remote.UserBusinessActivityWSImple_2 [com.arjuna.mwlabs.wst.ba.remote.UserBusinessActivityWSImple_2] - Received context is null!
- * @message com.arjuna.mwlabs.wst.ba.remote.UserBusinessActivityWSImple_3 [com.arjuna.mwlabs.wst.ba.remote.UserBusinessActivityWSImple_3] - No termination context!
- */
-
-public class UserBusinessActivityWSImple extends UserBusinessActivity11
-{
-    public UserBusinessActivityWSImple()
-    {
-        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 ServiceRegistryWS serviceRegistry = ServiceRegistryWS.getRegistry() ;
-                _activationCoordinatorService = serviceRegistry.getServiceURI(CoordinationConstantsWS.ACTIVATION_SERVICE_NAME) ;
-            }
-        }
-        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();
-
-    	    com.arjuna.mw.wsc.context.ContextWS ctx = startTransaction(timeout);
-
-    	    _ctxManager.resume(new TxContextWSImple(ctx));
-    	}
-    	catch (InvalidCreateParametersException ex)
-    	{
-    	    tidyup();
-
-    	    throw new SystemException(ex.toString());
-    	}
-    	catch (UnknownTransactionException ex)
-    	{
-    	    tidyup();
-
-    	    throw new SystemException(ex.toString());
-    	}
-    	catch (SystemException ex)
-    	{
-    	    tidyup();
-
-    	    throw ex;
-    	}
-    }
-
-    public void close () throws TransactionRolledBackException, UnknownTransactionException, SystemException
-    {
-    	TxContextWSImple ctx = null;
-
-    	try
-    	{
-    	    ctx = (TxContextWSImple) _ctxManager.suspend();
-
-            final String id = ctx.identifier() ;
-            final W3CEndpointReference terminatorCoordinator = getTerminationCoordinator(ctx) ;
-
-    	    BusinessActivityTerminatorStubWS terminatorStub = new BusinessActivityTerminatorStubWS(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
-    {
-    	TxContextWSImple ctx = null;
-
-    	try
-    	{
-            ctx = (TxContextWSImple) _ctxManager.suspend();
-
-            final String id = ctx.identifier() ;
-            final W3CEndpointReference terminatorCoordinator = getTerminationCoordinator(ctx) ;
-
-            BusinessActivityTerminatorStubWS terminatorStub = new BusinessActivityTerminatorStubWS(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 TxContextWSImple ctx = ((TxContextWSImple) _ctxManager.currentTransaction()) ;
-            final String id = ctx.identifier() ;
-            final W3CEndpointReference terminatorCoordinator = getTerminationCoordinator(ctx) ;
-
-            BusinessActivityTerminatorStubWS terminatorStub = new BusinessActivityTerminatorStubWS(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 (SystemException ex)
-    	{
-    	    return "Unknown";
-    	}
-    	catch (NullPointerException ex)
-    	{
-    	    return "Unknown";
-    	}
-    }
-
-    public String toString ()
-    {
-    	return transactionIdentifier();
-    }
-
-    private final com.arjuna.mw.wsc.context.ContextWS startTransaction (int timeout) throws InvalidCreateParametersException, SystemException
-    {
-        try
-        {
-            final Long expires = (timeout > 0 ? new Long(timeout) : null) ;
-            final String messageId = MessageIdWS.getMessageId() ;
-            final CoordinationContextType coordinationContext = ActivationCoordinatorWS.createCoordinationContext(
-                    _activationCoordinatorService, messageId, BusinessActivityWSConstants.WSBA_PROTOCOL_ATOMIC_OUTCOME, expires, null) ;
-            if (coordinationContext == null)
-            {
-                throw new SystemException(
-                    wstxLogger.log_mesg.getString("com.arjuna.mwlabs.wst.ba.remote.UserBusinessActivityWSImple_2"));
-            }
-            return new ContextWSImple(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 W3CEndpointReference getTerminationCoordinator(final TxContextWSImple ctx)
-        throws SystemException
-    {
-        final CoordinationContextType coordinationContext = ctx.context().getCoordinationContext() ;
-        final String messageId = MessageIdWS.getMessageId() ;
-        try
-        {
-            return RegistrationCoordinatorWS.register(coordinationContext, messageId,
-                getParticipantProtocolService(ctx.identifier()), ArjunaTXConstants.WSARJTX_PROTOCOL_TERMINATION) ;
-        }
-        catch (final Throwable th)
-        {
-            throw new SystemException(wstxLogger.log_mesg.getString("com.arjuna.mwlabs.wst.ba.remote.UserBusinessActivityWSImple_3"));
-        }
-    }
-
-    private W3CEndpointReference getParticipantProtocolService(final String id)
-    {
-        // final SoapRegistry soapRegistry = SoapRegistry.getRegistry() ;
-        // final String serviceURI = soapRegistry.getServiceURI(ArjunaTXConstants.SERVICE_TERMINATION_PARTICIPANT) ;
-        final QName serviceId = ArjunaTXWSConstants.TERMINATION_PARTICIPANT_SERVICE_QNAME;
-        final QName endpointId = ArjunaTXWSConstants.TERMINATION_PARTICIPANT_PORT_QNAME;
-        final String address = ServiceRegistryWS.getRegistry().getServiceURI(ArjunaTXWSConstants.TERMINATION_PARTICIPANT_SERVICE_NAME);
-        W3CEndpointReferenceBuilder builder = new W3CEndpointReferenceBuilder();
-        builder.serviceName(serviceId);
-        builder.endpointName(endpointId);
-        builder.address(address);
-        InstanceIdentifierWS.setEndpointInstanceIdentifier(builder, id) ;
-        return builder.build();
-    }
-
-    private final void tidyup ()
-    {
-    	try
-    	{
-    	    _ctxManager.suspend();
-    	}
-    	catch (Exception ex)
-    	{
-    	    ex.printStackTrace();
-    	}
-    }
-
-    private ContextManager _ctxManager = new ContextManager();
-    private String _activationCoordinatorService;
-}
\ No newline at end of file

Added: labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mwlabs/wst11/at/ContextFactoryImple.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mwlabs/wst11/at/ContextFactoryImple.java	                        (rev 0)
+++ labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mwlabs/wst11/at/ContextFactoryImple.java	2008-01-25 17:18:13 UTC (rev 18124)
@@ -0,0 +1,280 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. 
+ * 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.wst11.at;
+
+import com.arjuna.mw.wsas.exceptions.NoActivityException;
+import com.arjuna.mw.wsas.exceptions.SystemException;
+import com.arjuna.mw.wscf11.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.wst11.at.context.ArjunaContextImple;
+import com.arjuna.mwlabs.wst11.at.participants.CleanupSynchronization;
+import com.arjuna.mwlabs.wst11.at.RegistrarImple;
+import com.arjuna.webservices11.wsat.AtomicTransactionConstants;
+import com.arjuna.webservices11.wsarj.InstanceIdentifier;
+import com.arjuna.webservices11.wscoor.CoordinationConstants;
+import com.arjuna.webservices11.ServiceRegistry;
+import com.arjuna.wsc11.ContextFactory;
+import com.arjuna.wsc.InvalidCreateParametersException;
+import com.arjuna.wsc.InvalidProtocolException;
+import org.oasis_open.docs.ws_tx.wscoor._2006._06.CoordinationContext;
+import org.oasis_open.docs.ws_tx.wscoor._2006._06.CoordinationContextType;
+import org.oasis_open.docs.ws_tx.wscoor._2006._06.Expires;
+
+import javax.xml.ws.wsaddressing.W3CEndpointReference;
+import javax.xml.ws.wsaddressing.W3CEndpointReferenceBuilder;
+
+public class ContextFactoryImple implements ContextFactory, 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 com.arjuna.wsc.InvalidCreateParametersException
+	 *             if a parameter passed is invalid this activity identifier.
+	 *
+	 * @message com.arjuna.mwlabs.wst.at.Context11FactoryImple_1
+	 *          [com.arjuna.mwlabs.wst.at.Context11FactoryImple_1] - Invalid type
+	 *          URI: < {0} , {1} >
+	 * @message com.arjuna.mwlabs.wst.at.Context11FactoryImple_3
+	 *          [com.arjuna.mwlabs.wst.at.Context11FactoryImple_3] - Invalid type
+	 *          URI:
+	 */
+
+	public CoordinationContext 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 ArjunaContextImple arjunaContext = ArjunaContextImple.getContext() ;
+                final ServiceRegistry serviceRegistry = ServiceRegistry.getRegistry() ;
+                final String registrationCoordinatorURI = serviceRegistry.getServiceURI(CoordinationConstants.REGISTRATION_SERVICE_NAME) ;
+
+                final CoordinationContext coordinationContext = new CoordinationContext() ;
+                coordinationContext.setCoordinationType(coordinationTypeURI);
+                CoordinationContextType.Identifier identifier = new CoordinationContextType.Identifier();
+                identifier.setValue("urn:"+arjunaContext.getTransactionIdentifier());
+                coordinationContext.setIdentifier(identifier) ;
+                final int transactionExpires = arjunaContext.getTransactionExpires();
+                if (transactionExpires > 0)
+                {
+                    Expires expiresInstance = new Expires();
+                    expiresInstance.setValue(transactionExpires);
+                    coordinationContext.setExpires(expiresInstance);
+                }
+                W3CEndpointReference registrationCoordinator = getRegistrationCoordinator(registrationCoordinatorURI, arjunaContext);
+                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 (NoActivityException ex)
+			{
+				ex.printStackTrace();
+
+				throw new InvalidCreateParametersException();
+			}
+			catch (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.at.Context11FactoryImple_1", new Object[]
+			{ AtomicTransactionConstants.WSAT_PROTOCOL, coordinationTypeURI });
+
+			throw new InvalidCreateParametersException(
+					wstxLogger.log_mesg.getString("com.arjuna.mwlabs.wst.at.Context11FactoryImple_3")
+							+ " < "
+							+ AtomicTransactionConstants.WSAT_PROTOCOL
+							+ ", "
+							+ coordinationTypeURI + " >");
+		}
+
+		return null;
+	}
+
+    private static W3CEndpointReference getRegistrationCoordinator(String registrationCoordinatorURI, ArjunaContextImple arjunaContext) {
+        final W3CEndpointReferenceBuilder builder = new W3CEndpointReferenceBuilder();
+        builder.serviceName(CoordinationConstants.REGISTRATION_SERVICE_QNAME);
+        builder.endpointName(CoordinationConstants.REGISTRATION_ENDPOINT_QNAME);
+        // strictly we shouldn't need to set the address because we are in the same web app as the
+        // coordinator but we have to as the W3CEndpointReference implementation is incomplete
+        builder.address(registrationCoordinatorURI);
+        InstanceIdentifier.setEndpointInstanceIdentifier(builder, arjunaContext.getTransactionIdentifier());
+        W3CEndpointReference registrationCoordinator = builder.build();
+        return registrationCoordinator;
+    }
+
+    /**
+	 * 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;
+}
\ No newline at end of file

Added: labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mwlabs/wst11/at/ContextImple.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mwlabs/wst11/at/ContextImple.java	                        (rev 0)
+++ labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mwlabs/wst11/at/ContextImple.java	2008-01-25 17:18:13 UTC (rev 18124)
@@ -0,0 +1,50 @@
+package com.arjuna.mwlabs.wst11.at;
+
+import com.arjuna.mw.wsc11.context.Context;
+import org.oasis_open.docs.ws_tx.wscoor._2006._06.CoordinationContextType;
+
+/*
+ * this is created and managed using a JaxWS coordination context but it will interconvert to an old style context
+ * on demand, allowing interoperation between JaxWS based activator/ergistrator and the old style
+ * BA/AT participant services
+ */
+
+public class ContextImple implements Context
+{
+
+	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 String toString ()
+	{
+		// return DomUtil.nodeAsString(toXML());
+
+		return "AtomicTransactionIdentifier: " + _coordContext.getIdentifier().getValue();
+	}
+
+    public CoordinationContextType getCoordinationContext()
+    {
+        return _coordContext;
+    }
+
+    public void setCoordinationContext(CoordinationContextType cc)
+    {
+        _coordContext = cc;
+    }
+
+    private CoordinationContextType _coordContext;
+}

Added: labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mwlabs/wst11/at/RegistrarImple.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mwlabs/wst11/at/RegistrarImple.java	                        (rev 0)
+++ labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mwlabs/wst11/at/RegistrarImple.java	2008-01-25 17:18:13 UTC (rev 18124)
@@ -0,0 +1,301 @@
+package com.arjuna.mwlabs.wst11.at;
+
+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.wscf11.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.wst11.at.participants.CompletionCoordinatorImple;
+import com.arjuna.mwlabs.wst.at.participants.DurableTwoPhaseCommitParticipant;
+import com.arjuna.mwlabs.wst.at.participants.VolatileTwoPhaseCommitParticipant;
+import com.arjuna.webservices11.wsat.processors.CompletionCoordinatorProcessor;
+import com.arjuna.webservices11.wsat.AtomicTransactionConstants;
+import com.arjuna.webservices11.wsarj.InstanceIdentifier;
+import com.arjuna.webservices11.ServiceRegistry;
+import com.arjuna.wsc.*;
+import com.arjuna.wst11.CompletionCoordinatorParticipant;
+import com.arjuna.wst11.stub.Durable2PCStub;
+import com.arjuna.wst11.stub.Volatile2PCStub;
+import com.arjuna.wsc11.RegistrarMapper;
+import com.arjuna.wsc11.Registrar;
+
+import javax.xml.ws.wsaddressing.W3CEndpointReference;
+import javax.xml.ws.wsaddressing.W3CEndpointReferenceBuilder;
+import java.util.HashMap;
+
+public class RegistrarImple implements Registrar
+{
+	public RegistrarImple()
+        throws ProtocolNotRegisteredException, SystemException
+    {
+		_coordManager = CoordinatorManagerFactory.coordinatorManager();
+
+		// register with mapper using tx id as protocol identifier.
+        final com.arjuna.wsc11.RegistrarMapper mapper = RegistrarMapper.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 protocolIdentifier
+	 *            the protocol identifier
+	 */
+
+	public void install (final String protocolIdentifier)
+	{
+	}
+
+	/**
+	 * Registers the interest of participant in a particular protocol.
+	 *
+	 * @param participantProtocolService
+	 *            the address of the participant protocol service
+	 * @param protocolIdentifier
+	 *            the protocol identifier
+	 *
+	 * @return the PortReference of the coordinator protocol service
+	 *
+	 * @throws com.arjuna.wsc.AlreadyRegisteredException
+     *             if the participant is already registered for this
+	 *             coordination protocol under this activity identifier
+	 * @throws com.arjuna.wsc.InvalidProtocolException
+     *             if the coordination protocol is not supported
+	 * @throws com.arjuna.wsc.InvalidStateException
+     *             if the state of the coordinator no longer allows registration
+	 *             for this coordination protocol
+	 * @throws com.arjuna.wsc.NoActivityException
+     *             if the activity does not exist.
+	 *
+	 * @message com.arjuna.mwlabs.wst.at.Registrar11Imple_1
+	 *          [com.arjuna.mwlabs.wst.at.Registrar11Imple_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 W3CEndpointReference register(final W3CEndpointReference participantProtocolService,
+        final String protocolIdentifier, final InstanceIdentifier instanceIdentifier)
+			throws AlreadyRegisteredException, 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 (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 Durable2PCStub participantStub = new Durable2PCStub(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 Volatile2PCStub participantStub = new Volatile2PCStub(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, participantProtocolService) ;
+                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.at.Registrar11Imple_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 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 W3CEndpointReference registerWithSubordinate(final SubordinateCoordinator theTx,
+        final W3CEndpointReference participantProtocolService, final String protocolIdentifier)
+			throws AlreadyRegisteredException, 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 Durable2PCStub participantStub = new Durable2PCStub(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 Volatile2PCStub participantStub = new Volatile2PCStub(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.at.Registrar11Imple_1", new Object[]
+			{ AtomicTransactionConstants.WSAT_PROTOCOL, protocolIdentifier });
+
+			throw new InvalidProtocolException();
+		}
+	}
+
+    private W3CEndpointReference getCompletionCoordinator(final InstanceIdentifier instanceIdentifier)
+    {
+        W3CEndpointReferenceBuilder builder = new W3CEndpointReferenceBuilder();
+        String address = ServiceRegistry.getRegistry().getServiceURI(AtomicTransactionConstants.COMPLETION_COORDINATOR_SERVICE_NAME);
+        builder.serviceName(AtomicTransactionConstants.COMPLETION_COORDINATOR_SERVICE_QNAME);
+        builder.endpointName(AtomicTransactionConstants.COMPLETION_COORDINATOR_PORT_QNAME);
+        builder.address(address);
+        InstanceIdentifier.setEndpointInstanceIdentifier(builder, instanceIdentifier);
+        return builder.build();
+    }
+
+    private W3CEndpointReference getCoordinator(final String participantId)
+    {
+        W3CEndpointReferenceBuilder builder = new W3CEndpointReferenceBuilder();
+        String address = ServiceRegistry.getRegistry().getServiceURI(AtomicTransactionConstants.COORDINATOR_SERVICE_NAME);
+        builder.serviceName(AtomicTransactionConstants.COORDINATOR_SERVICE_QNAME);
+        builder.endpointName(AtomicTransactionConstants.COORDINATOR_PORT_QNAME);
+        builder.address(address);
+        InstanceIdentifier.setEndpointInstanceIdentifier(builder, participantId);
+        return builder.build();
+    }
+
+	private CoordinatorManager _coordManager = null;
+	private HashMap _hierarchies = new HashMap();
+}

Added: labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mwlabs/wst11/at/context/ArjunaContextImple.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mwlabs/wst11/at/context/ArjunaContextImple.java	                        (rev 0)
+++ labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mwlabs/wst11/at/context/ArjunaContextImple.java	2008-01-25 17:18:13 UTC (rev 18124)
@@ -0,0 +1,259 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. 
+ * 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: ArjunaContextImple.java,v 1.11.4.1 2005/11/22 10:36:15 kconner Exp $
+ */
+
+package com.arjuna.mwlabs.wst11.at.context;
+
+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.webservices11.wsat.AtomicTransactionConstants;
+import com.arjuna.webservices11.wscoor.CoordinationConstants;
+import org.w3c.dom.Element;
+
+import javax.xml.parsers.DocumentBuilder;
+
+/**
+ * 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 ArjunaContextImple implements SOAPContext
+{
+
+	public ArjunaContextImple()
+	{
+		_context = null;
+	}
+
+	public ArjunaContextImple(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)
+	{
+		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 IllegalArgumentException();
+		}
+	}
+
+    /**
+     * @return the context document object.
+     */
+    private synchronized Element context()
+    {
+        // TODO - work out which bits of this we can do using JAXB
+        // TODO - sort out expires etc
+
+        if (_context == null)
+        {
+            DocumentBuilder builder = 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.
+                 */
+
+                Element identifier = doc.createElement("wsu:"+_identifier);
+                identifier.appendChild(doc.createTextNode(_identifierValues[0]));
+
+                _context.appendChild(identifier);
+
+                Element expires = doc.createElement("wsu:"+_expires);
+                expires.appendChild(doc.createTextNode(Integer.toString(_expiresValues[0])));
+
+                _context.appendChild(expires);
+
+                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)
+                {
+                    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 ArjunaContextImple.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.at.context.ArjunaContext11Imple_1 [com.arjuna.mwlabs.wst.at.context.ArjunaContext11Imple_1] - ignoring context:
+     */
+    public static ArjunaContextImple getContext()
+    {
+        ContextManager cxman = new ContextManager();
+        Context[] contexts = cxman.contexts();
+
+        for (int i = 0; i < contexts.length; i++)
+        {
+            if (contexts[i].identifier().equals(ArjunaContextImple.class.getName()))
+            {
+                if (contexts[i] instanceof ArjunaContextImple)
+                {
+                    return (ArjunaContextImple)contexts[i] ;
+                }
+                else
+                {
+                    wstxLogger.arjLoggerI18N.warn("com.arjuna.mwlabs.wst.at.context.ArjunaContext11Imple_1",
+                            new Object[]{contexts[i]});
+                }
+                break;
+            }
+        }
+        return null ;
+    }
+
+	private 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;
+    private static final String _coordinationType = CoordinationConstants.WSCOOR_ELEMENT_COORDINATION_TYPE;
+}
\ No newline at end of file

Added: labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mwlabs/wst11/at/context/TxContextImple.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mwlabs/wst11/at/context/TxContextImple.java	                        (rev 0)
+++ labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mwlabs/wst11/at/context/TxContextImple.java	2008-01-25 17:18:13 UTC (rev 18124)
@@ -0,0 +1,96 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. 
+ * 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.wst11.at.context;
+
+import com.arjuna.mw.wsc11.context.Context;
+import com.arjuna.mw.wst.TxContext;
+import com.arjuna.mwlabs.wst11.at.ContextImple;
+import org.oasis_open.docs.ws_tx.wscoor._2006._06.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(Context context)
+	{
+		_context = context;
+	}
+
+	public boolean valid ()
+	{
+		return (_context != null) ;
+	}
+
+	public boolean equals (Object obj)
+	{
+		if (obj instanceof com.arjuna.mwlabs.wst.at.context.TxContextImple)
+		{
+			com.arjuna.mwlabs.wst.at.context.TxContextImple compare = (com.arjuna.mwlabs.wst.at.context.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 Context context ()
+	{
+		return _context;
+	}
+
+	public String toString ()
+	{
+		return _context.toString();
+	}
+
+	private Context _context;
+
+}
\ No newline at end of file

Added: labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mwlabs/wst11/at/participants/CleanupSynchronization.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mwlabs/wst11/at/participants/CleanupSynchronization.java	                        (rev 0)
+++ labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mwlabs/wst11/at/participants/CleanupSynchronization.java	2008-01-25 17:18:13 UTC (rev 18124)
@@ -0,0 +1,78 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. 
+ * 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.wst11.at.participants;
+
+import com.arjuna.mwlabs.wst11.at.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;
+
+}
\ No newline at end of file

Added: labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mwlabs/wst11/at/participants/CompletionCoordinatorImple.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mwlabs/wst11/at/participants/CompletionCoordinatorImple.java	                        (rev 0)
+++ labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mwlabs/wst11/at/participants/CompletionCoordinatorImple.java	2008-01-25 17:18:13 UTC (rev 18124)
@@ -0,0 +1,34 @@
+package com.arjuna.mwlabs.wst11.at.participants;
+
+import com.arjuna.mw.wscf.model.twophase.api.CoordinatorManager;
+import com.arjuna.mw.wsas.activity.ActivityHierarchy;
+import com.arjuna.wst11.CompletionCoordinatorParticipant;
+
+import javax.xml.ws.wsaddressing.W3CEndpointReference;
+
+/**
+ * Created by IntelliJ IDEA.
+ * User: adinn
+ * Date: Oct 30, 2007
+ * Time: 2:37:26 PM
+ * To change this template use File | Settings | File Templates.
+ */
+
+/**
+ *
+ */
+public class CompletionCoordinatorImple extends com.arjuna.mwlabs.wst.at.participants.CompletionCoordinatorImple implements CompletionCoordinatorParticipant
+{
+    private W3CEndpointReference participant;
+
+    public CompletionCoordinatorImple(CoordinatorManager cm, ActivityHierarchy hier, final boolean deactivate, W3CEndpointReference participant)
+    {
+        super(cm, hier, deactivate);
+        this.participant = participant;
+    }
+
+    public W3CEndpointReference getParticipant()
+    {
+        return participant;
+    }
+}

Added: labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mwlabs/wst11/at/remote/TransactionManagerImple.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mwlabs/wst11/at/remote/TransactionManagerImple.java	                        (rev 0)
+++ labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mwlabs/wst11/at/remote/TransactionManagerImple.java	2008-01-25 17:18:13 UTC (rev 18124)
@@ -0,0 +1,218 @@
+package com.arjuna.mwlabs.wst11.at.remote;
+
+import com.arjuna.mw.wst11.TransactionManager;
+import com.arjuna.mw.wst.TxContext;
+import com.arjuna.mw.wstx.logging.wstxLogger;
+import com.arjuna.mwlabs.wst11.at.context.TxContextImple;
+import com.arjuna.mwlabs.wst.at.remote.ContextManager;
+import com.arjuna.webservices11.wsat.processors.ParticipantProcessor;
+import com.arjuna.webservices11.wsat.AtomicTransactionConstants;
+import com.arjuna.webservices.SoapFault;
+import com.arjuna.webservices11.wsarj.InstanceIdentifier;
+import com.arjuna.webservices11.ServiceRegistry;
+import com.arjuna.wsc.*;
+import com.arjuna.wsc11.messaging.MessageId;
+import com.arjuna.wst.*;
+import com.arjuna.wst11.messaging.engines.ParticipantEngine;
+import org.oasis_open.docs.ws_tx.wscoor._2006._06.CoordinationContextType;
+
+import javax.xml.namespace.QName;
+import javax.xml.ws.wsaddressing.W3CEndpointReference;
+import javax.xml.ws.wsaddressing.W3CEndpointReferenceBuilder;
+
+/**
+ * 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 W3CEndpointReference coordinator = registerParticipant(getParticipant(id), AtomicTransactionConstants.WSAT_SUB_PROTOCOL_DURABLE_2PC);
+
+			ParticipantProcessor.getProcessor().activateParticipant(new ParticipantEngine(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 W3CEndpointReference coordinator = registerParticipant(getParticipant(id), AtomicTransactionConstants.WSAT_SUB_PROTOCOL_VOLATILE_2PC);
+
+			ParticipantProcessor.getProcessor().activateParticipant(new ParticipantEngine(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.at.remote.Transaction11ManagerImple_1
+	 *          [com.arjuna.mwlabs.wst.at.remote.Transaction11ManagerImple_1] -
+	 *          Not implemented!
+	 */
+
+	public int replay () throws SystemException
+	{
+		throw new SystemException(
+				wstxLogger.log_mesg.getString("com.arjuna.mwlabs.wst.at.remote.Transaction11ManagerImple_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 W3CEndpointReference enlistForCompletion (final W3CEndpointReference 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 W3CEndpointReference getParticipant(final String id)
+    {
+        final QName serviceName = AtomicTransactionConstants.PARTICIPANT_SERVICE_QNAME;
+        final QName endpointName = AtomicTransactionConstants.PARTICIPANT_PORT_QNAME;
+        final String address = ServiceRegistry.getRegistry().getServiceURI(AtomicTransactionConstants.PARTICIPANT_SERVICE_NAME);
+        W3CEndpointReferenceBuilder builder = new W3CEndpointReferenceBuilder();
+        builder.serviceName(serviceName);
+        builder.endpointName(endpointName);
+        builder.address(address);
+        InstanceIdentifier.setEndpointInstanceIdentifier(builder, id);
+        return builder.build();
+    }
+
+	private final W3CEndpointReference registerParticipant (final W3CEndpointReference participant, final String protocol)
+			throws InvalidProtocolException, InvalidStateException, NoActivityException, SystemException
+	{
+		TxContextImple currentTx = null;
+
+		try
+		{
+			currentTx = (TxContextImple) _ctxManager.suspend();
+
+			if (currentTx == null)
+				throw new NoActivityException();
+
+            final CoordinationContextType coordinationContext = currentTx.context().getCoordinationContext() ;
+            final String messageId = MessageId.getMessageId() ;
+
+            return com.arjuna.wsc11.RegistrationCoordinator.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();
+
+}

Added: labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mwlabs/wst11/at/remote/UserTransactionImple.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mwlabs/wst11/at/remote/UserTransactionImple.java	                        (rev 0)
+++ labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mwlabs/wst11/at/remote/UserTransactionImple.java	2008-01-25 17:18:13 UTC (rev 18124)
@@ -0,0 +1,383 @@
+package com.arjuna.mwlabs.wst11.at.remote;
+
+import com.arjuna.mw.wst11.TransactionManager;
+import com.arjuna.mw.wst11.UserTransaction;
+import com.arjuna.mw.wst11.common.Environment;
+import com.arjuna.mw.wstx.logging.wstxLogger;
+import com.arjuna.mw.wsc11.context.Context;
+import com.arjuna.mwlabs.wst11.at.ContextImple;
+import com.arjuna.mwlabs.wst11.at.remote.TransactionManagerImple;
+import com.arjuna.mwlabs.wst11.at.context.TxContextImple;
+import com.arjuna.mwlabs.wst.at.remote.ContextManager;
+import com.arjuna.webservices11.wsat.AtomicTransactionConstants;
+import com.arjuna.webservices.SoapFault;
+import com.arjuna.webservices11.wsarj.InstanceIdentifier;
+import com.arjuna.webservices11.wscoor.CoordinationConstants;
+import com.arjuna.webservices11.ServiceRegistry;
+import com.arjuna.wsc11.ActivationCoordinator;
+import com.arjuna.wsc.InvalidCreateParametersException;
+import com.arjuna.wsc11.messaging.MessageId;
+import com.arjuna.wst.SystemException;
+import com.arjuna.wst.TransactionRolledBackException;
+import com.arjuna.wst.UnknownTransactionException;
+import com.arjuna.wst.WrongStateException;
+import com.arjuna.wst11.stub.CompletionStub;
+import org.oasis_open.docs.ws_tx.wscoor._2006._06.CoordinationContextType;
+
+import javax.xml.namespace.QName;
+import javax.xml.ws.wsaddressing.W3CEndpointReference;
+import javax.xml.ws.wsaddressing.W3CEndpointReferenceBuilder;
+import java.util.Hashtable;
+
+/**
+ * @message com.arjuna.mwlabs.wst.at.remote.UserTransaction11Imple__2
+ *          [com.arjuna.mwlabs.wst.at.remote.UserTransaction11Imple__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 ServiceRegistry serviceRegistry = ServiceRegistry.getRegistry() ;
+                _activationCoordinatorService = serviceRegistry.getServiceURI(CoordinationConstants.ACTIVATION_SERVICE_NAME) ;
+			}
+		}
+		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();
+
+			Context 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 (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 TxContextImple txContext = (TxContextImple) tm.currentTransaction();
+            final String id = txContext.identifier();
+            final W3CEndpointReference completionCoordinator = tm.enlistForCompletion(getCompletionParticipant(id));
+
+			_completionCoordinators.put(id, completionCoordinator);
+		}
+		catch (com.arjuna.wsc.AlreadyRegisteredException ex)
+		{
+			throw new SystemException(ex.toString());
+		}
+	}
+
+    private final Context startTransaction(int timeout)
+			throws com.arjuna.wsc.InvalidCreateParametersException,
+			SystemException
+	{
+		try
+		{
+            // TODO: tricks for per app _activationCoordinatorService config, perhaps:
+            //InputStream inputStream = Thread.currentThread().getContextClassLoader().getResourceAsStream("/foo.properties");
+
+
+            final Long expires = (timeout > 0 ? new Long(timeout) : null) ;
+            final String messageId = MessageId.getMessageId() ;
+            final CoordinationContextType coordinationContext = ActivationCoordinator.createCoordinationContext(
+                    _activationCoordinatorService, messageId, AtomicTransactionConstants.WSAT_PROTOCOL, expires, null) ;
+            if (coordinationContext == null)
+            {
+                throw new SystemException(
+                    wstxLogger.log_mesg.getString("com.arjuna.mwlabs.wst.at.remote.UserTransaction11Imple__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 W3CEndpointReference completionCoordinator = (W3CEndpointReference) _completionCoordinators.get(id);
+
+			if (completionCoordinator == null)
+				throw new SecurityException();
+
+			CompletionStub completionStub = new CompletionStub(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).
+			 */
+
+			W3CEndpointReference completionCoordinator = (W3CEndpointReference) _completionCoordinators.get(id);
+
+			if (completionCoordinator == null)
+				throw new SecurityException();
+
+			CompletionStub completionStub = new CompletionStub(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);
+		}
+	}
+
+    /**
+     * Create an endpoint for the local participant service labelled with the current context id which can be passed
+     * to the registration service and handed on to the registered coordinator to call back to this transaction
+     * @param id the current transaction context identifier
+     * @return
+     */
+    private W3CEndpointReference getCompletionParticipant(final String id)
+    {
+        final QName serviceName = AtomicTransactionConstants.COMPLETION_INITIATOR_SERVICE_QNAME;
+        final QName endpointName = AtomicTransactionConstants.COMPLETION_INITIATOR_PORT_QNAME;
+        final String address = ServiceRegistry.getRegistry().getServiceURI(AtomicTransactionConstants.COMPLETION_INITIATOR_SERVICE_NAME);
+        W3CEndpointReferenceBuilder builder = new W3CEndpointReferenceBuilder();
+        builder.serviceName(serviceName);
+        builder.endpointName(endpointName);
+        builder.address(address);
+        InstanceIdentifier.setEndpointInstanceIdentifier(builder, id);
+        return builder.build();
+    }
+
+	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();
+}

Added: labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mwlabs/wst11/ba/BusinessActivityTerminatorImple.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mwlabs/wst11/ba/BusinessActivityTerminatorImple.java	                        (rev 0)
+++ labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mwlabs/wst11/ba/BusinessActivityTerminatorImple.java	2008-01-25 17:18:13 UTC (rev 18124)
@@ -0,0 +1,215 @@
+package com.arjuna.mwlabs.wst11.ba;
+
+import com.arjuna.mw.wsas.activity.ActivityHierarchy;
+import com.arjuna.mw.wscf.exceptions.ProtocolNotRegisteredException;
+import com.arjuna.mw.wscf11.model.sagas.CoordinatorManagerFactory;
+import com.arjuna.mw.wscf.model.sagas.api.CoordinatorManager;
+import com.arjuna.webservices11.wsarjtx.processors.TerminationCoordinatorProcessor;
+import com.arjuna.wst11.BusinessActivityTerminator;
+import com.arjuna.wst.SystemException;
+import com.arjuna.wst.TransactionRolledBackException;
+import com.arjuna.wst.UnknownTransactionException;
+
+import javax.xml.ws.wsaddressing.W3CEndpointReference;
+
+/**
+ * Local business activity terminator which can be used to close a business activity from the terminator
+ * side.
+ */
+public class BusinessActivityTerminatorImple
+        implements BusinessActivityTerminator
+{
+    private W3CEndpointReference participantEndpoint;
+
+    /**
+     * create a business activity terminator for use on the server side with an empty participant endpoint
+     * which gets set at registration time
+     * @throws SystemException
+     */
+    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());
+        }
+
+        participantEndpoint = null;
+    }
+
+    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;
+	}
+    }
+
+    /**
+     * update the business activity terminator with an endpoint supplied at registration time
+     *
+     * @param participantEndpoint
+     */
+    public void setEndpoint(W3CEndpointReference participantEndpoint)
+    {
+        this.participantEndpoint = participantEndpoint;
+    }
+
+    /**
+     * retrieve the participant endpoint associated with this business activity terminator
+     * 
+     * @return
+     */
+    public W3CEndpointReference getEndpoint()
+    {
+        return participantEndpoint;
+    }
+
+    private CoordinatorManager _coordManager = null;
+    private ActivityHierarchy _hier = null;
+}

Added: labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mwlabs/wst11/ba/ContextFactoryImple.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mwlabs/wst11/ba/ContextFactoryImple.java	                        (rev 0)
+++ labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mwlabs/wst11/ba/ContextFactoryImple.java	2008-01-25 17:18:13 UTC (rev 18124)
@@ -0,0 +1,228 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. 
+ * 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.wst11.ba;
+
+import com.arjuna.mw.wscf11.model.sagas.CoordinatorManagerFactory;
+import com.arjuna.mw.wscf.model.sagas.api.CoordinatorManager;
+import com.arjuna.mw.wstx.logging.wstxLogger;
+import com.arjuna.mwlabs.wst11.ba.context.ArjunaContextImple;
+import com.arjuna.mwlabs.wst11.ba.RegistrarImple;
+import com.arjuna.mwlabs.wst11.ba.BusinessActivityTerminatorImple;
+import com.arjuna.webservices11.wsarj.InstanceIdentifier;
+import com.arjuna.webservices11.wscoor.CoordinationConstants;
+import com.arjuna.webservices11.wsarjtx.processors.TerminationCoordinatorProcessor;
+import com.arjuna.webservices11.wsba.BusinessActivityConstants;
+import com.arjuna.webservices11.ServiceRegistry;
+import com.arjuna.wsc11.ContextFactory;
+import com.arjuna.wsc.InvalidCreateParametersException;
+import com.arjuna.wst11.BusinessActivityTerminator;
+import org.oasis_open.docs.ws_tx.wscoor._2006._06.CoordinationContext;
+import org.oasis_open.docs.ws_tx.wscoor._2006._06.CoordinationContextType;
+import org.oasis_open.docs.ws_tx.wscoor._2006._06.Expires;
+
+import javax.xml.ws.wsaddressing.W3CEndpointReference;
+import javax.xml.ws.wsaddressing.W3CEndpointReferenceBuilder;
+
+public class ContextFactoryImple implements ContextFactory
+{
+
+    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 com.arjuna.wsc.InvalidCreateParametersException if a parameter passed is invalid
+     *         this activity identifier.
+     *
+     * @message com.arjuna.mwlabs.wst.ba.Context11FactoryImple_1 [com.arjuna.mwlabs.wst.ba.Context11FactoryImple_1] - Invalid type URI: < {0} , {1} >
+     * @message com.arjuna.mwlabs.wst.ba.Context11FactoryImple_3 [com.arjuna.mwlabs.wst.ba.Context11FactoryImple_3] - Invalid type URI:
+     */
+
+    public CoordinationContext 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 ArjunaContextImple arjunaContext = ArjunaContextImple.getContext() ;
+            final ServiceRegistry serviceRegistry = ServiceRegistry.getRegistry() ;
+            final String registrationCoordinatorURI = serviceRegistry.getServiceURI(CoordinationConstants.REGISTRATION_SERVICE_NAME) ;
+
+            final CoordinationContext coordinationContext = new CoordinationContext() ;
+            coordinationContext.setCoordinationType(coordinationTypeURI) ;
+            CoordinationContextType.Identifier identifier = new CoordinationContextType.Identifier();
+            identifier.setValue("urn:"+arjunaContext.getTransactionIdentifier());
+            coordinationContext.setIdentifier(identifier) ;
+            final int transactionExpires = arjunaContext.getTransactionExpires() ;
+            if (transactionExpires > 0)
+            {
+                Expires expiresInstance = new Expires();
+                expiresInstance.setValue(transactionExpires);
+                coordinationContext.setExpires(expiresInstance);
+            }
+            final W3CEndpointReference registrationCoordinator = getRegistrationCoordinator(registrationCoordinatorURI, arjunaContext);
+            coordinationContext.setRegistrationService(registrationCoordinator) ;
+
+            String transactionIdentifier = arjunaContext.getTransactionIdentifier();
+            BusinessActivityTerminator terminator = new BusinessActivityTerminatorImple();
+            TerminationCoordinatorProcessor.getProcessor().activateParticipant(terminator, transactionIdentifier);
+
+    		_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.ba.Context11FactoryImple_1",
+					  new Object[]{BusinessActivityConstants.WSBA_PROTOCOL_ATOMIC_OUTCOME, coordinationTypeURI});
+
+	    throw new InvalidCreateParametersException(wstxLogger.log_mesg.getString("com.arjuna.mwlabs.wst.ba.Context11FactoryImple_3")+" < "+ BusinessActivityConstants.WSBA_PROTOCOL_ATOMIC_OUTCOME+", "+coordinationTypeURI+" >");
+	}
+
+	return null;
+    }
+
+    private static W3CEndpointReference getRegistrationCoordinator(String registrationCoordinatorURI, ArjunaContextImple arjunaContext) {
+        final W3CEndpointReferenceBuilder builder = new W3CEndpointReferenceBuilder();
+        builder.serviceName(CoordinationConstants.REGISTRATION_SERVICE_QNAME);
+        builder.endpointName(CoordinationConstants.REGISTRATION_ENDPOINT_QNAME);
+        // strictly we shouldn't need to set the address because we are in the same web app as the
+        // coordinator but we have to as the W3CEndpointReference implementation is incomplete
+        builder.address(registrationCoordinatorURI);
+        InstanceIdentifier.setEndpointInstanceIdentifier(builder, arjunaContext.getTransactionIdentifier());
+        W3CEndpointReference registrationCoordinator = builder.build();
+        return registrationCoordinator;
+    }
+
+    /**
+     * 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 (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;
+
+}
\ No newline at end of file

Added: labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mwlabs/wst11/ba/ContextImple.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mwlabs/wst11/ba/ContextImple.java	                        (rev 0)
+++ labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mwlabs/wst11/ba/ContextImple.java	2008-01-25 17:18:13 UTC (rev 18124)
@@ -0,0 +1,73 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. 
+ * 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.wst11.ba;
+
+import org.oasis_open.docs.ws_tx.wscoor._2006._06.CoordinationContextType;
+import com.arjuna.mw.wsc11.context.Context;
+
+
+public class ContextImple implements Context
+{
+    public ContextImple(CoordinationContextType ctx)
+    {
+        _coordContext = ctx;
+    }
+
+    public boolean equals (Object obj)
+    {
+        if (obj instanceof com.arjuna.mwlabs.wst.ba.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;
+}
\ No newline at end of file

Added: labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mwlabs/wst11/ba/RegistrarImple.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mwlabs/wst11/ba/RegistrarImple.java	                        (rev 0)
+++ labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mwlabs/wst11/ba/RegistrarImple.java	2008-01-25 17:18:13 UTC (rev 18124)
@@ -0,0 +1,276 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. 
+ * 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.wst11.ba;
+
+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.wscf11.model.sagas.CoordinatorManagerFactory;
+import com.arjuna.mw.wscf.model.sagas.api.CoordinatorManager;
+import com.arjuna.mw.wstx.logging.wstxLogger;
+import com.arjuna.mwlabs.wst11.ba.participants.BusinessAgreementWithCoordinatorCompletionImple;
+import com.arjuna.mwlabs.wst11.ba.participants.BusinessAgreementWithParticipantCompletionImple;
+import com.arjuna.mwlabs.wst11.ba.BusinessActivityTerminatorImple;
+import com.arjuna.webservices11.wsba.BusinessActivityConstants;
+import com.arjuna.webservices11.wsarjtx.ArjunaTXConstants;
+import com.arjuna.webservices11.wsarj.InstanceIdentifier;
+import com.arjuna.webservices11.wsarjtx.processors.TerminationCoordinatorProcessor;
+import com.arjuna.webservices11.ServiceRegistry;
+import com.arjuna.wsc.*;
+import com.arjuna.wst11.messaging.engines.CoordinatorCompletionCoordinatorEngine;
+import com.arjuna.wst11.messaging.engines.ParticipantCompletionCoordinatorEngine;
+import com.arjuna.wst11.stub.BusinessAgreementWithCoordinatorCompletionStub;
+import com.arjuna.wst11.stub.BusinessAgreementWithParticipantCompletionStub;
+import com.arjuna.wsc11.RegistrarMapper;
+
+import javax.xml.namespace.QName;
+import javax.xml.ws.wsaddressing.W3CEndpointReference;
+import javax.xml.ws.wsaddressing.W3CEndpointReferenceBuilder;
+import java.util.HashMap;
+
+public class RegistrarImple implements com.arjuna.wsc11.Registrar
+{
+
+	public RegistrarImple() throws ProtocolNotRegisteredException,
+			SystemException
+	{
+		_coordManager = CoordinatorManagerFactory.coordinatorManager();
+
+		// register with mapper using tx id as protocol identifier.
+		final RegistrarMapper mapper = RegistrarMapper.getFactory();
+
+		mapper.addRegistrar(
+			BusinessActivityConstants.WSBA_SUB_PROTOCOL_PARTICIPANT_COMPLETION, this);
+		mapper.addRegistrar(
+			BusinessActivityConstants.WSBA_SUB_PROTOCOL_COORDINATOR_COMPLETION, this);
+		mapper.addRegistrar(com.arjuna.webservices.wsarjtx.ArjunaTXConstants.WSARJTX_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 protocolIdentifier
+	 *            the protocol identifier
+	 */
+
+	public void install (String protocolIdentifier)
+	{
+	}
+
+	/**
+	 * Registers the interest of participant in a particular protocol.
+	 *
+	 * @param participantProtocolService
+	 *            the address of the participant protocol service
+	 * @param protocolIdentifier
+	 *            the protocol identifier
+	 *
+	 * @return the PortReference of the coordinator protocol service
+	 *
+	 * @throws com.arjuna.wsc.AlreadyRegisteredException
+	 *             if the participant is already registered for this
+	 *             coordination protocol under this activity identifier
+	 * @throws com.arjuna.wsc.InvalidProtocolException
+	 *             if the coordination protocol is not supported
+	 * @throws com.arjuna.wsc.InvalidStateException
+	 *             if the state of the coordinator no longer allows registration
+	 *             for this coordination protocol
+	 * @throws com.arjuna.wsc.NoActivityException
+	 *             if the activity does not exist.
+	 *
+	 * @message com.arjuna.mwlabs.wst.ba.Registrar11Imple_1
+	 *          [com.arjuna.mwlabs.wst.ba.Registrar11Imple_1] - Invalid type URI: < {0} , {1} >
+	 */
+
+	public W3CEndpointReference register (
+			final W3CEndpointReference participantProtocolService,
+			final String protocolIdentifier,
+			final InstanceIdentifier instanceIdentifier)
+			throws AlreadyRegisteredException, 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 (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 ParticipantCompletionCoordinatorEngine engine = new ParticipantCompletionCoordinatorEngine(id, participantProtocolService) ;
+				BusinessAgreementWithParticipantCompletionImple participant = new BusinessAgreementWithParticipantCompletionImple(
+						new BusinessAgreementWithParticipantCompletionStub(engine), id);
+                engine.setCoordinator(participant.participantManager()) ;
+
+				_coordManager.enlistParticipant(participant);
+
+				_coordManager.suspend();
+
+				return getParticipantManager(
+                        BusinessActivityConstants.PARTICIPANT_COMPLETION_COORDINATOR_SERVICE_QNAME,
+                        BusinessActivityConstants.PARTICIPANT_COMPLETION_COORDINATOR_PORT_QNAME,
+                        ServiceRegistry.getRegistry().getServiceURI(BusinessActivityConstants.PARTICIPANT_COMPLETION_COORDINATOR_SERVICE_NAME),
+						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 CoordinatorCompletionCoordinatorEngine engine = new CoordinatorCompletionCoordinatorEngine(id, participantProtocolService) ;
+					BusinessAgreementWithCoordinatorCompletionImple participant = new BusinessAgreementWithCoordinatorCompletionImple(
+							new BusinessAgreementWithCoordinatorCompletionStub(engine), id);
+                    engine.setCoordinator(participant.participantManager()) ;
+
+					_coordManager.enlistParticipant(participant);
+
+					_coordManager.suspend();
+
+					return getParticipantManager(
+                            BusinessActivityConstants.COORDINATOR_COMPLETION_COORDINATOR_SERVICE_QNAME,
+							BusinessActivityConstants.COORDINATOR_COMPLETION_COORDINATOR_PORT_QNAME,
+                            ServiceRegistry.getRegistry().getServiceURI(BusinessActivityConstants.COORDINATOR_COMPLETION_COORDINATOR_SERVICE_NAME),
+							id);
+				}
+				catch (Exception ex)
+				{
+					throw new InvalidStateException();
+				}
+			}
+			else
+				if (com.arjuna.webservices.wsarjtx.ArjunaTXConstants.WSARJTX_PROTOCOL_TERMINATION.equals(protocolIdentifier))
+				{
+                    /*
+                     * update the server side terminator with the participant end point
+                     */
+                    BusinessActivityTerminatorImple terminator;
+                    terminator = (BusinessActivityTerminatorImple) TerminationCoordinatorProcessor.getProcessor().getParticipant(instanceIdentifier);
+                    terminator.setEndpoint(participantProtocolService);
+                    
+                    try
+					{
+                        return getParticipantManager(
+                                ArjunaTXConstants.TERMINATION_COORDINATOR_SERVICE_QNAME,
+								ArjunaTXConstants.TERMINATION_COORDINATOR_PORT_QNAME,
+                                ServiceRegistry.getRegistry().getServiceURI(ArjunaTXConstants.TERMINATION_COORDINATOR_SERVICE_NAME),
+                                instanceIdentifier.getInstanceIdentifier());
+					}
+					catch (Exception ex)
+					{
+						throw new InvalidStateException();
+					}
+				}
+				else
+				{
+					wstxLogger.arjLoggerI18N
+							.warn(
+									"com.arjuna.mwlabs.wst.ba.Registrar11Imple_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 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 W3CEndpointReference getParticipantManager (final QName serviceName, final QName endpointName, final String address, final String id)
+	{
+        W3CEndpointReferenceBuilder builder = new W3CEndpointReferenceBuilder();
+        builder.serviceName(serviceName);
+        builder.endpointName(endpointName);
+        builder.address(address);
+        InstanceIdentifier.setEndpointInstanceIdentifier(builder, id);
+        return builder.build();
+	}
+
+	private CoordinatorManager _coordManager = null;
+
+	private HashMap _hierarchies = new HashMap();
+}
\ No newline at end of file

Added: labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mwlabs/wst11/ba/context/ArjunaContextImple.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mwlabs/wst11/ba/context/ArjunaContextImple.java	                        (rev 0)
+++ labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mwlabs/wst11/ba/context/ArjunaContextImple.java	2008-01-25 17:18:13 UTC (rev 18124)
@@ -0,0 +1,261 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. 
+ * 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: ArjunaContextImple.java,v 1.6.6.1 2005/11/22 10:36:16 kconner Exp $
+ */
+
+package com.arjuna.mwlabs.wst11.ba.context;
+
+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.webservices11.wsba.BusinessActivityConstants;
+import com.arjuna.webservices11.wscoor.CoordinationConstants;
+import org.w3c.dom.Element;
+
+import javax.xml.parsers.DocumentBuilder;
+
+/**
+ * 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.6.6.1 2005/11/22 10:36:16 kconner Exp $
+ */
+
+public class ArjunaContextImple implements SOAPContext
+{
+
+    public ArjunaContextImple()
+    {
+        _context = null;
+    }
+
+    public ArjunaContextImple(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)
+    {
+    	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 IllegalArgumentException();
+    	}
+    }
+
+    /**
+     * @return the context document object.
+     */
+    private synchronized Element context()
+    {
+        // TODO - work out which bits of this we can do using JAXB
+        // TODO - sort out expires etc
+
+        if (_context == null)
+        {
+            DocumentBuilder builder = 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.
+                 */
+
+                Element identifier = doc.createElement("wsu:"+_identifier);
+                identifier.appendChild(doc.createTextNode(_identifierValues[0]));
+
+                _context.appendChild(identifier);
+
+                Element expires = doc.createElement("wsu:"+_expires);
+                expires.appendChild(doc.createTextNode(Integer.toString(_expiresValues[0])));
+
+                _context.appendChild(expires);
+
+                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)
+                {
+                    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 ArjunaContextImple.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.ba.context.ArjunaContext11Imple_1 [com.arjuna.mwlabs.wst.ba.context.ArjunaContext11Imple_1] - ignoring context:
+     */
+    public static ArjunaContextImple getContext()
+    {
+        ContextManager cxman = new ContextManager();
+        Context[] contexts = cxman.contexts();
+
+        for (int i = 0; i < contexts.length; i++)
+        {
+            if (contexts[i].identifier().equals(ArjunaContextImple.class.getName()))
+            {
+                if (contexts[i] instanceof ArjunaContextImple)
+                {
+                    return (ArjunaContextImple)contexts[i] ;
+                }
+                else
+                {
+                    wstxLogger.arjLoggerI18N.warn("com.arjuna.mwlabs.wst.ba.context.ArjunaContext11Imple_1",
+                            new Object[]{contexts[i]});
+                }
+                break;
+            }
+        }
+        return null ;
+    }
+
+    private 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;
+    private static final String _coordinationType = CoordinationConstants.WSCOOR_ELEMENT_COORDINATION_TYPE;
+
+}
\ No newline at end of file

Added: labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mwlabs/wst11/ba/context/TxContextImple.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mwlabs/wst11/ba/context/TxContextImple.java	                        (rev 0)
+++ labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mwlabs/wst11/ba/context/TxContextImple.java	2008-01-25 17:18:13 UTC (rev 18124)
@@ -0,0 +1,96 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. 
+ * 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.wst11.ba.context;
+
+import com.arjuna.mw.wst.TxContext;
+import com.arjuna.mw.wsc11.context.Context;
+import com.arjuna.mwlabs.wst11.ba.ContextImple;
+import org.oasis_open.docs.ws_tx.wscoor._2006._06.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(Context 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 Context context ()
+    {
+        return _context;
+    }
+
+    public String toString ()
+    {
+        return _context.toString();
+    }
+
+    private Context _context;
+
+}
\ No newline at end of file

Added: labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mwlabs/wst11/ba/participants/BusinessAgreementWithCoordinatorCompletionImple.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mwlabs/wst11/ba/participants/BusinessAgreementWithCoordinatorCompletionImple.java	                        (rev 0)
+++ labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mwlabs/wst11/ba/participants/BusinessAgreementWithCoordinatorCompletionImple.java	2008-01-25 17:18:13 UTC (rev 18124)
@@ -0,0 +1,81 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. 
+ * 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.wst11.ba.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;
+import com.arjuna.mwlabs.wst11.ba.participants.BusinessAgreementWithParticipantCompletionImple;
+
+/**
+ * @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();
+	}
+}
\ No newline at end of file

Added: labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mwlabs/wst11/ba/participants/BusinessAgreementWithParticipantCompletionImple.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mwlabs/wst11/ba/participants/BusinessAgreementWithParticipantCompletionImple.java	                        (rev 0)
+++ labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mwlabs/wst11/ba/participants/BusinessAgreementWithParticipantCompletionImple.java	2008-01-25 17:18:13 UTC (rev 18124)
@@ -0,0 +1,230 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. 
+ * 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.wst11.ba.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.util.PersistableParticipantHelper;
+import com.arjuna.mwlabs.wst11.ba.remote.BAParticipantManagerImple;
+import com.arjuna.wst.BusinessAgreementWithParticipantCompletionParticipant;
+import com.arjuna.wst11.BAParticipantManager;
+
+// 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 com.arjuna.mw.wscf.exceptions.InvalidParticipantException
+	 *                Thrown if the participant identity is invalid.
+	 * @exception com.arjuna.mw.wsas.exceptions.WrongStateException
+	 *                Thrown if the participant is in an invalid state.
+	 * @exception com.arjuna.mw.wsas.exceptions.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 BAParticipantManager 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 BAParticipantManager _baParticipantManager = null;
+
+}
\ No newline at end of file

Added: labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mwlabs/wst11/ba/remote/BAParticipantManagerImple.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mwlabs/wst11/ba/remote/BAParticipantManagerImple.java	                        (rev 0)
+++ labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mwlabs/wst11/ba/remote/BAParticipantManagerImple.java	2008-01-25 17:18:13 UTC (rev 18124)
@@ -0,0 +1,203 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. 
+ * 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.wst11.ba.remote;
+
+import com.arjuna.mw.wsas.activity.ActivityHierarchy;
+import com.arjuna.mw.wsas.exceptions.InvalidActivityException;
+import com.arjuna.mw.wscf11.model.sagas.CoordinatorManagerFactory;
+import com.arjuna.mw.wscf.model.sagas.api.CoordinatorManager;
+import com.arjuna.wst.SystemException;
+import com.arjuna.wst.UnknownTransactionException;
+import com.arjuna.wst.WrongStateException;
+import com.arjuna.wst11.BAParticipantManager;
+
+import javax.xml.namespace.QName;
+
+/**
+ * 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 BAParticipantManager
+{
+
+    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 (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 (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);
+
+        // fail means faulted as far as the coordinator manager is concerned
+            _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 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;
+
+}
\ No newline at end of file

Added: labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mwlabs/wst11/ba/remote/BusinessActivityManagerImple.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mwlabs/wst11/ba/remote/BusinessActivityManagerImple.java	                        (rev 0)
+++ labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mwlabs/wst11/ba/remote/BusinessActivityManagerImple.java	2008-01-25 17:18:13 UTC (rev 18124)
@@ -0,0 +1,215 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. 
+ * 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.wst11.ba.remote;
+
+import com.arjuna.mw.wst11.BusinessActivityManager;
+import com.arjuna.mw.wst.TxContext;
+import com.arjuna.mwlabs.wst11.ba.context.TxContextImple;
+import com.arjuna.mwlabs.wst.ba.remote.ContextManager;
+import com.arjuna.webservices11.wsba.BusinessActivityConstants;
+import com.arjuna.webservices11.wsba.processors.CoordinatorCompletionParticipantProcessor;
+import com.arjuna.webservices11.wsba.processors.ParticipantCompletionParticipantProcessor;
+import com.arjuna.webservices.SoapFault;
+import com.arjuna.webservices11.wsarj.InstanceIdentifier;
+import com.arjuna.webservices11.ServiceRegistry;
+import com.arjuna.wsc.AlreadyRegisteredException;
+import com.arjuna.wsc11.RegistrationCoordinator;
+import com.arjuna.wsc11.messaging.MessageId;
+import com.arjuna.wst.*;
+import com.arjuna.wst11.messaging.engines.CoordinatorCompletionParticipantEngine;
+import com.arjuna.wst11.messaging.engines.ParticipantCompletionParticipantEngine;
+import com.arjuna.wst11.stub.BACoordinatorCompletionParticipantManagerStub;
+import com.arjuna.wst11.stub.BAParticipantCompletionParticipantManagerStub;
+import com.arjuna.wst11.BAParticipantManager;
+import org.oasis_open.docs.ws_tx.wscoor._2006._06.CoordinationContextType;
+
+import javax.xml.namespace.QName;
+import javax.xml.ws.wsaddressing.W3CEndpointReference;
+import javax.xml.ws.wsaddressing.W3CEndpointReferenceBuilder;
+
+/**
+ * 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 BusinessActivityManager
+{
+    public BusinessActivityManagerImple()
+    {
+    }
+
+    public BAParticipantManager enlistForBusinessAgreementWithParticipantCompletion (BusinessAgreementWithParticipantCompletionParticipant bap, String id)
+        throws WrongStateException, UnknownTransactionException, AlreadyRegisteredException, SystemException
+    {
+        final QName service = BusinessActivityConstants.PARTICIPANT_COMPLETION_PARTICIPANT_SERVICE_QNAME;
+        final QName endpoint = BusinessActivityConstants.PARTICIPANT_COMPLETION_PARTICIPANT_PORT_QNAME;
+        final String address = ServiceRegistry.getRegistry().getServiceURI(BusinessActivityConstants.PARTICIPANT_COMPLETION_PARTICIPANT_SERVICE_NAME);
+        final W3CEndpointReference participant = getParticipant(service, endpoint, address, id) ;
+    	try
+    	{
+            W3CEndpointReference baPMEndpoint = registerParticipant(participant, BusinessActivityConstants.WSBA_SUB_PROTOCOL_PARTICIPANT_COMPLETION);
+            final ParticipantCompletionParticipantEngine engine = new ParticipantCompletionParticipantEngine(id, baPMEndpoint, bap) ;
+            ParticipantCompletionParticipantProcessor.getProcessor().activateParticipant(engine, id) ;
+
+            return new BAParticipantCompletionParticipantManagerStub(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 com.arjuna.wst11.BAParticipantManager enlistForBusinessAgreementWithCoordinatorCompletion (BusinessAgreementWithCoordinatorCompletionParticipant bawcp, String id) throws WrongStateException, UnknownTransactionException, AlreadyRegisteredException, SystemException
+    {
+        final QName service = BusinessActivityConstants.COORDINATOR_COMPLETION_PARTICIPANT_SERVICE_QNAME;
+        final QName endpoint = BusinessActivityConstants.COORDINATOR_COMPLETION_PARTICIPANT_PORT_QNAME;
+        final String address = ServiceRegistry.getRegistry().getServiceURI(BusinessActivityConstants.COORDINATOR_COMPLETION_PARTICIPANT_SERVICE_NAME);
+        final W3CEndpointReference participant = getParticipant(service, endpoint, address, id) ;
+    	try
+    	{
+    	    W3CEndpointReference baPMEndpoint = registerParticipant(participant, BusinessActivityConstants.WSBA_SUB_PROTOCOL_COORDINATOR_COMPLETION);
+            final CoordinatorCompletionParticipantEngine engine = new CoordinatorCompletionParticipantEngine(id, baPMEndpoint, bawcp) ;
+            CoordinatorCompletionParticipantProcessor.getProcessor().activateParticipant(engine, id) ;
+
+            return new BACoordinatorCompletionParticipantManagerStub(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 W3CEndpointReference registerParticipant(final W3CEndpointReference 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 = MessageId.getMessageId() ;
+            return RegistrationCoordinator.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 W3CEndpointReference getParticipant(final QName service, final QName endpoint, final String address, final String id)
+    {
+        final W3CEndpointReferenceBuilder builder = new W3CEndpointReferenceBuilder();
+        builder.serviceName(service);
+        builder.endpointName(endpoint);
+        builder.address(address);
+        InstanceIdentifier.setEndpointInstanceIdentifier(builder, id);
+        return builder.build();
+    }
+
+    private ContextManager _ctxManager = new ContextManager();
+}
\ No newline at end of file

Added: labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mwlabs/wst11/ba/remote/UserBusinessActivityImple.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mwlabs/wst11/ba/remote/UserBusinessActivityImple.java	                        (rev 0)
+++ labs/jbosstm/workspace/adinn/XTSGF/WSTX/classes/com/arjuna/mwlabs/wst11/ba/remote/UserBusinessActivityImple.java	2008-01-25 17:18:13 UTC (rev 18124)
@@ -0,0 +1,331 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. 
+ * 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.wst11.ba.remote;
+
+import com.arjuna.mw.wst11.UserBusinessActivity;
+import com.arjuna.mw.wst11.common.Environment;
+import com.arjuna.mw.wstx.logging.wstxLogger;
+import com.arjuna.mw.wsc11.context.Context;
+import com.arjuna.mwlabs.wst11.ba.ContextImple;
+import com.arjuna.mwlabs.wst11.ba.context.TxContextImple;
+import com.arjuna.mwlabs.wst.ba.remote.ContextManager;
+import com.arjuna.webservices11.wsba.BusinessActivityConstants;
+import com.arjuna.webservices11.wsarjtx.ArjunaTXConstants;
+import com.arjuna.webservices.SoapFault;
+import com.arjuna.webservices11.wsarj.InstanceIdentifier;
+import com.arjuna.webservices11.wscoor.CoordinationConstants;
+import com.arjuna.webservices11.ServiceRegistry;
+import com.arjuna.wsc11.ActivationCoordinator;
+import com.arjuna.wsc.InvalidCreateParametersException;
+import com.arjuna.wsc11.RegistrationCoordinator;
+import com.arjuna.wsc11.messaging.MessageId;
+import com.arjuna.wst.SystemException;
+import com.arjuna.wst.TransactionRolledBackException;
+import com.arjuna.wst.UnknownTransactionException;
+import com.arjuna.wst.WrongStateException;
+import com.arjuna.wst11.stub.BusinessActivityTerminatorStub;
+import org.oasis_open.docs.ws_tx.wscoor._2006._06.CoordinationContextType;
+
+import javax.xml.namespace.QName;
+import javax.xml.ws.wsaddressing.W3CEndpointReference;
+import javax.xml.ws.wsaddressing.W3CEndpointReferenceBuilder;
+
+/**
+ * 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.ba.remote.UserBusinessActivity11Imple_1 [com.arjuna.mwlabs.wst.ba.remote.UserBusinessActivity11Imple_1] - Invalid address.
+ * @message com.arjuna.mwlabs.wst.ba.remote.UserBusinessActivity11Imple_2 [com.arjuna.mwlabs.wst.ba.remote.UserBusinessActivity11Imple_2] - Received context is null!
+ * @message com.arjuna.mwlabs.wst.ba.remote.UserBusinessActivity11Imple_3 [com.arjuna.mwlabs.wst.ba.remote.UserBusinessActivity11Imple_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 ServiceRegistry serviceRegistry = ServiceRegistry.getRegistry() ;
+                _activationCoordinatorService = serviceRegistry.getServiceURI(CoordinationConstants.ACTIVATION_SERVICE_NAME) ;
+            }
+        }
+        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();
+
+    	    Context ctx = startTransaction(timeout);
+
+    	    _ctxManager.resume(new TxContextImple(ctx));
+    	}
+    	catch (InvalidCreateParametersException ex)
+    	{
+    	    tidyup();
+
+    	    throw new SystemException(ex.toString());
+    	}
+    	catch (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 W3CEndpointReference terminatorCoordinator = getTerminationCoordinator(ctx) ;
+
+    	    BusinessActivityTerminatorStub terminatorStub = new BusinessActivityTerminatorStub(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 W3CEndpointReference terminatorCoordinator = getTerminationCoordinator(ctx) ;
+
+            BusinessActivityTerminatorStub terminatorStub = new BusinessActivityTerminatorStub(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 W3CEndpointReference terminatorCoordinator = getTerminationCoordinator(ctx) ;
+
+            BusinessActivityTerminatorStub terminatorStub = new BusinessActivityTerminatorStub(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 (SystemException ex)
+    	{
+    	    return "Unknown";
+    	}
+    	catch (NullPointerException ex)
+    	{
+    	    return "Unknown";
+    	}
+    }
+
+    public String toString ()
+    {
+    	return transactionIdentifier();
+    }
+
+    private final Context startTransaction (int timeout) throws InvalidCreateParametersException, SystemException
+    {
+        try
+        {
+            final Long expires = (timeout > 0 ? new Long(timeout) : null) ;
+            final String messageId = MessageId.getMessageId() ;
+            final CoordinationContextType coordinationContext = ActivationCoordinator.createCoordinationContext(
+                    _activationCoordinatorService, messageId, BusinessActivityConstants.WSBA_PROTOCOL_ATOMIC_OUTCOME, expires, null) ;
+            if (coordinationContext == null)
+            {
+                throw new SystemException(
+                    wstxLogger.log_mesg.getString("com.arjuna.mwlabs.wst.ba.remote.UserBusinessActivity11Imple_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 W3CEndpointReference getTerminationCoordinator(final TxContextImple ctx)
+        throws SystemException
+    {
+        final CoordinationContextType coordinationContext = ctx.context().getCoordinationContext() ;
+        final String messageId = MessageId.getMessageId() ;
+        try
+        {
+            return RegistrationCoordinator.register(coordinationContext, messageId,
+                getParticipantProtocolService(ctx.identifier()), com.arjuna.webservices.wsarjtx.ArjunaTXConstants.WSARJTX_PROTOCOL_TERMINATION) ;
+        }
+        catch (final Throwable th)
+        {
+            throw new SystemException(wstxLogger.log_mesg.getString("com.arjuna.mwlabs.wst.ba.remote.UserBusinessActivity11Imple_3"));
+        }
+    }
+
+    private W3CEndpointReference getParticipantProtocolService(final String id)
+    {
+        // final SoapRegistry soapRegistry = SoapRegistry.getRegistry() ;
+        // final String serviceURI = soapRegistry.getServiceURI(ArjunaTXConstants.SERVICE_TERMINATION_PARTICIPANT) ;
+        final QName serviceId = ArjunaTXConstants.TERMINATION_PARTICIPANT_SERVICE_QNAME;
+        final QName endpointId = ArjunaTXConstants.TERMINATION_PARTICIPANT_PORT_QNAME;
+        final String address = ServiceRegistry.getRegistry().getServiceURI(ArjunaTXConstants.TERMINATION_PARTICIPANT_SERVICE_NAME);
+        W3CEndpointReferenceBuilder builder = new W3CEndpointReferenceBuilder();
+        builder.serviceName(serviceId);
+        builder.endpointName(endpointId);
+        builder.address(address);
+        InstanceIdentifier.setEndpointInstanceIdentifier(builder, id) ;
+        return builder.build();
+    }
+
+    private final void tidyup ()
+    {
+    	try
+    	{
+    	    _ctxManager.suspend();
+    	}
+    	catch (Exception ex)
+    	{
+    	    ex.printStackTrace();
+    	}
+    }
+
+    private ContextManager _ctxManager = new ContextManager();
+    private String _activationCoordinatorService;
+}
\ No newline at end of file

Modified: labs/jbosstm/workspace/adinn/XTSGF/WSTX/config/wst11.xml
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WSTX/config/wst11.xml	2008-01-25 17:05:33 UTC (rev 18123)
+++ labs/jbosstm/workspace/adinn/XTSGF/WSTX/config/wst11.xml	2008-01-25 17:18:13 UTC (rev 18124)
@@ -21,28 +21,18 @@
 <deployment>
 	<service name="UserTransaction">
 		<parameter name="className"
-		value="com.arjuna.mwlabs.wst.at.remote.UserTransactionWSImple"/>
-
-		<!-- <parameter name="className"
-	value="com.arjuna.mwlabs.wst.at.local.UserTransactionImple"/ -->
-
+		value="com.arjuna.mwlabs.wst11.at.remote.UserTransactionImple"/>
 	</service>
 	<service name="TransactionManager">
 		<parameter name="className"
-		value="com.arjuna.mwlabs.wst.at.remote.TransactionManagerWSImple"/>
-		<!-- parameter name="className"
-		value="com.arjuna.mwlabs.wst.at.local.TransactionManagerImple"/ -->
+		value="com.arjuna.mwlabs.wst11.at.remote.TransactionManagerImple"/>
 	</service>
 	<service name="UserBusinessActivity">
 		<parameter name="className"
-		value="com.arjuna.mwlabs.wst.ba.remote.UserBusinessActivityWSImple"/>
-		<!-- parameter name="className"
-		value="com.arjuna.mwlabs.wst.ba.local.UserBusinessActivityImple"/ -->
+		value="com.arjuna.mwlabs.wst11.ba.remote.UserBusinessActivityImple"/>
 	</service>
 	<service name="BusinessActivityManager">
 		<parameter name="className"
-		value="com.arjuna.mwlabs.wst.ba.remote.BusinessActivity11ManagerImple"/>
-		<!-- parameter name="className"
-		value="com.arjuna.mwlabs.wst.ba.local.BusinessActivityManagerImple"/ -->
+		value="com.arjuna.mwlabs.wst11.ba.remote.BusinessActivityManagerImple"/>
 	</service>
 </deployment>

Modified: labs/jbosstm/workspace/adinn/XTSGF/WSTX/config/wstx11.xml
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WSTX/config/wstx11.xml	2008-01-25 17:05:33 UTC (rev 18123)
+++ labs/jbosstm/workspace/adinn/XTSGF/WSTX/config/wstx11.xml	2008-01-25 17:18:13 UTC (rev 18124)
@@ -22,28 +22,21 @@
 <wstx-config>
 	<properties>
 	    <property name="com.arjuna.mw.wscf11.protocols.twophase.context"
-	    value="com.arjuna.mwlabs.wst.at.context.ArjunaContextWSImple"/>
+	    value="com.arjuna.mwlabs.wst11.at.context.ArjunaContextImple"/>
 	    <property name="com.arjuna.mw.wscf11.protocols.sagas.context"
-	    value="com.arjuna.mwlabs.wst.ba.context.ArjunaContextWSImple"/>
-	    <property
-	    name="com.arjuna.mw.wscf11.protocolImplementation1"
-	    value="com.arjuna.mwlabs.wscf.model.twophase.arjunacore.TwoPhaseHLSImple"/>
-	    <property
-	    name="com.arjuna.mw.wscf11.protocolImplementation2"
-	    value="com.arjuna.mwlabs.wst.at.ContextFactoryImple"/>
-	    <property
-	    name="com.arjuna.mw.wscf11.protocolImplementation3"
-	    value="com.arjuna.mwlabs.wscf.model.sagas.arjunacore.SagasHLSImple"/>
+	    value="com.arjuna.mwlabs.wst11.ba.context.ArjunaContextImple"/>
         <property
-        name="com.arjuna.mw.wscf11.protocolImplementation4"
-        value="com.arjuna.mwlabs.wst.ba.ContextFactoryImple"/>
-
+        name="com.arjuna.mw.wscf11.protocolImplementation1"
+        value="com.arjuna.mwlabs.wscf11.model.twophase.arjunacore.TwoPhaseHLSImple"/>
         <property
-        name="com.arjuna.mw.wscfws.protocolImplementation1"
-        value="com.arjuna.mwlabs.wst.at.ContextFactoryWSImple"/>
+        name="com.arjuna.mw.wscf11.protocolImplementation2"
+        value="com.arjuna.mwlabs.wscf11.model.sagas.arjunacore.SagasHLSImple"/>
         <property
-        name="com.arjuna.mw.wscfws.protocolImplementation2"
-        value="com.arjuna.mwlabs.wst.ba.ContextFactoryWSImple"/>
+        name="com.arjuna.mw.wscf11.protocolImplementation3"
+        value="com.arjuna.mwlabs.wst11.at.ContextFactoryImple"/>
+        <property
+        name="com.arjuna.mw.wscf11.protocolImplementation4"
+        value="com.arjuna.mwlabs.wst11.ba.ContextFactoryImple"/>
 
 	    <property
 	    name="com.arjuna.ats.arjuna.objectstore.objectStoreDir"

Modified: labs/jbosstm/workspace/adinn/XTSGF/WSTX/xml/wstx_web-app11.xml
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/WSTX/xml/wstx_web-app11.xml	2008-01-25 17:05:33 UTC (rev 18123)
+++ labs/jbosstm/workspace/adinn/XTSGF/WSTX/xml/wstx_web-app11.xml	2008-01-25 17:18:13 UTC (rev 18124)
@@ -27,6 +27,6 @@
     <description>Arjuna WS-TX11</description>
 
     <listener>
-        <listener-class>com.arjuna.mw.wst.deploy.WSTXWSInitialisation</listener-class>
+        <listener-class>com.arjuna.mw.wst11.deploy.WSTXInitialisation</listener-class>
     </listener>
 </web-app>

Modified: labs/jbosstm/workspace/adinn/XTSGF/demo/dd/jboss/context-handlers11.xml
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/demo/dd/jboss/context-handlers11.xml	2008-01-25 17:05:33 UTC (rev 18123)
+++ labs/jbosstm/workspace/adinn/XTSGF/demo/dd/jboss/context-handlers11.xml	2008-01-25 17:18:13 UTC (rev 18124)
@@ -7,7 +7,7 @@
     <handler-chain>
 	<handler>
 		<handler-name>ContextHandler</handler-name>
-		<handler-class>com.arjuna.mw.wst.service.JaxWSHeaderContextProcessorWS</handler-class>
+		<handler-class>com.arjuna.mw.wst11.service.JaxWSHeaderContextProcessor</handler-class>
 	</handler>
     </handler-chain>
 </handler-chains>

Added: labs/jbosstm/workspace/adinn/XTSGF/demo/dd/jboss/wst11.xml
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/demo/dd/jboss/wst11.xml	                        (rev 0)
+++ labs/jbosstm/workspace/adinn/XTSGF/demo/dd/jboss/wst11.xml	2008-01-25 17:18:13 UTC (rev 18124)
@@ -0,0 +1,48 @@
+<!--
+  JBoss, Home of Professional Open Source
+  Copyright 2006, Red Hat Middleware LLC, and individual contributors
+  as indicated by the @author tags. 
+  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.
+-->
+<deployment>
+	<service name="UserTransaction">
+		<parameter name="className"
+		value="com.arjuna.mwlabs.wst11.at.remote.UserTransactionImple"/>
+
+		<!-- <parameter name="className"
+	value="com.arjuna.mwlabs.wst.at.local.UserTransactionImple"/ -->
+
+	</service>
+	<service name="TransactionManager">
+		<parameter name="className"
+		value="com.arjuna.mwlabs.wst11.at.remote.TransactionManagerImple"/>
+		<!-- parameter name="className"
+		value="com.arjuna.mwlabs.wst.at.local.TransactionManagerImple"/ -->
+	</service>
+	<service name="UserBusinessActivity">
+		<parameter name="className"
+		value="com.arjuna.mwlabs.wst11.ba.remote.UserBusinessActivityImple"/>
+		<!-- parameter name="className"
+		value="com.arjuna.mwlabs.wst.ba.local.UserBusinessActivityImple"/ -->
+	</service>
+	<service name="BusinessActivityManager">
+		<parameter name="className"
+		value="com.arjuna.mwlabs.wst11.ba.remote.BusinessActivityManagerImple"/>
+		<!-- parameter name="className"
+		value="com.arjuna.mwlabs.wst.ba.local.BusinessActivityManagerImple"/ -->
+	</service>
+</deployment>

Modified: labs/jbosstm/workspace/adinn/XTSGF/demo/src/com/jboss/jbosstm/xts/demo/client/BasicClient.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/demo/src/com/jboss/jbosstm/xts/demo/client/BasicClient.java	2008-01-25 17:05:33 UTC (rev 18123)
+++ labs/jbosstm/workspace/adinn/XTSGF/demo/src/com/jboss/jbosstm/xts/demo/client/BasicClient.java	2008-01-25 17:18:13 UTC (rev 18124)
@@ -29,11 +29,11 @@
 
 package com.jboss.jbosstm.xts.demo.client;
 
-import com.arjuna.mw.wst.UserBusinessActivity11;
-import com.arjuna.mw.wst.UserBusinessActivity11Factory;
-import com.arjuna.mw.wst.UserTransaction11;
-import com.arjuna.mw.wst.UserTransaction11Factory;
-import com.arjuna.mw.wst.client.JaxWSHeaderContextProcessorWS;
+import com.arjuna.mw.wst11.UserBusinessActivity;
+import com.arjuna.mw.wst11.UserBusinessActivityFactory;
+import com.arjuna.mw.wst11.UserTransaction;
+import com.arjuna.mw.wst11.UserTransactionFactory;
+import com.arjuna.mw.wst11.client.JaxWSHeaderContextProcessor;
 import com.arjuna.wst.TransactionRolledBackException;
 import com.jboss.jbosstm.xts.demo.restaurant.IRestaurantService;
 import com.jboss.jbosstm.xts.demo.restaurant.IRestaurantServiceBA;
@@ -330,7 +330,7 @@
      */
     private void configureClientHandler(BindingProvider bindingProvider)
     {
-        Handler handler = new JaxWSHeaderContextProcessorWS();
+        Handler handler = new JaxWSHeaderContextProcessor();
         List<Handler> handlers = Collections.singletonList(handler);
         bindingProvider.getBinding().setHandlerChain(handlers);
     }
@@ -481,7 +481,7 @@
     {
         System.out.println("CLIENT: obtaining userTransaction...");
 
-        UserTransaction11 ut = UserTransaction11Factory.userTransaction();
+        UserTransaction ut = UserTransactionFactory.userTransaction();
 
         System.out.println("CLIENT: starting the transaction...");
 
@@ -520,7 +520,7 @@
     {
         System.out.println("CLIENT: obtaining userBusinessActivity...");
 
-        UserBusinessActivity11 uba = UserBusinessActivity11Factory.userBusinessActivity();
+        UserBusinessActivity uba = UserBusinessActivityFactory.userBusinessActivity();
 
         System.out.println("CLIENT: starting the transaction...");
 

Modified: labs/jbosstm/workspace/adinn/XTSGF/demo/src/com/jboss/jbosstm/xts/demo/services/restaurant/RestaurantServiceAT.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/demo/src/com/jboss/jbosstm/xts/demo/services/restaurant/RestaurantServiceAT.java	2008-01-25 17:05:33 UTC (rev 18123)
+++ labs/jbosstm/workspace/adinn/XTSGF/demo/src/com/jboss/jbosstm/xts/demo/services/restaurant/RestaurantServiceAT.java	2008-01-25 17:18:13 UTC (rev 18124)
@@ -30,8 +30,8 @@
 package com.jboss.jbosstm.xts.demo.services.restaurant;
 
 import com.arjuna.ats.arjuna.common.Uid;
-import com.arjuna.mw.wst.TransactionManager11Factory;
-import com.arjuna.mw.wst.UserTransaction11Factory;
+import com.arjuna.mw.wst11.TransactionManagerFactory;
+import com.arjuna.mw.wst11.UserTransactionFactory;
 import com.jboss.jbosstm.xts.demo.restaurant.IRestaurantService;
 
 import javax.jws.HandlerChain;
@@ -73,7 +73,7 @@
         try
         {
             // get the transaction context of this thread:
-            transactionId = UserTransaction11Factory.userTransaction().toString();
+            transactionId = UserTransactionFactory.userTransaction().toString();
             System.out.println("RestaurantServiceAT transaction id =" + transactionId);
 
             if (!restaurantManager.knowsAbout(transactionId))
@@ -81,7 +81,7 @@
                 System.out.println("RestaurantServiceAT - enrolling...");
                 // enlist the Participant for this service:
                 RestaurantParticipantAT restaurantParticipant = new RestaurantParticipantAT(transactionId);
-                TransactionManager11Factory.transactionManager().enlistForDurableTwoPhase(restaurantParticipant, new Uid().toString());
+                TransactionManagerFactory.transactionManager().enlistForDurableTwoPhase(restaurantParticipant, new Uid().toString());
             }
         }
         catch (Exception e)

Modified: labs/jbosstm/workspace/adinn/XTSGF/demo/src/com/jboss/jbosstm/xts/demo/services/restaurant/RestaurantServiceBA.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/demo/src/com/jboss/jbosstm/xts/demo/services/restaurant/RestaurantServiceBA.java	2008-01-25 17:05:33 UTC (rev 18123)
+++ labs/jbosstm/workspace/adinn/XTSGF/demo/src/com/jboss/jbosstm/xts/demo/services/restaurant/RestaurantServiceBA.java	2008-01-25 17:18:13 UTC (rev 18124)
@@ -30,9 +30,9 @@
 package com.jboss.jbosstm.xts.demo.services.restaurant;
 
 import com.arjuna.ats.arjuna.common.Uid;
-import com.arjuna.mw.wst.BusinessActivityManager11Factory;
-import com.arjuna.mw.wst.BusinessActivity11Manager;
-import com.arjuna.wst.BAParticipantManagerWS;
+import com.arjuna.mw.wst11.BusinessActivityManagerFactory;
+import com.arjuna.mw.wst11.BusinessActivityManager;
+import com.arjuna.wst11.BAParticipantManager;
 import com.arjuna.wst.SystemException;
 import com.jboss.jbosstm.xts.demo.restaurant.IRestaurantServiceBA;
 
@@ -70,7 +70,7 @@
         RestaurantView restaurantView = RestaurantView.getSingletonInstance();
         RestaurantManager restaurantManager = RestaurantManager.getSingletonInstance();
 
-        BusinessActivity11Manager activityManager = BusinessActivityManager11Factory.businessActivityManager();
+        BusinessActivityManager activityManager = BusinessActivityManagerFactory.businessActivityManager();
 
         // get the transaction context of this thread:
         String transactionId = null;
@@ -107,7 +107,7 @@
 
             RestaurantParticipantBA restaurantParticipant = new RestaurantParticipantBA(transactionId, how_many);
             // enlist the Participant for this service:
-            BAParticipantManagerWS participantManager = null;
+            BAParticipantManager participantManager = null;
             try
             {
                 participantManager = activityManager.enlistForBusinessAgreementWithParticipantCompletion(restaurantParticipant, new Uid().toString());

Modified: labs/jbosstm/workspace/adinn/XTSGF/demo/src/com/jboss/jbosstm/xts/demo/services/taxi/TaxiServiceAT.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/demo/src/com/jboss/jbosstm/xts/demo/services/taxi/TaxiServiceAT.java	2008-01-25 17:05:33 UTC (rev 18123)
+++ labs/jbosstm/workspace/adinn/XTSGF/demo/src/com/jboss/jbosstm/xts/demo/services/taxi/TaxiServiceAT.java	2008-01-25 17:18:13 UTC (rev 18124)
@@ -30,8 +30,8 @@
 package com.jboss.jbosstm.xts.demo.services.taxi;
 
 import com.arjuna.ats.arjuna.common.Uid;
-import com.arjuna.mw.wst.TransactionManager11Factory;
-import com.arjuna.mw.wst.UserTransaction11Factory;
+import com.arjuna.mw.wst11.TransactionManagerFactory;
+import com.arjuna.mw.wst11.UserTransactionFactory;
 import com.jboss.jbosstm.xts.demo.taxi.ITaxiService;
 
 import javax.jws.WebService;
@@ -68,7 +68,7 @@
         try
         {
             // get the transaction context of this thread:
-            transactionId = UserTransaction11Factory.userTransaction().toString();
+            transactionId = UserTransactionFactory.userTransaction().toString();
             System.out.println("TaxiServiceAT transaction id =" + transactionId);
 
             if (!taxiManager.knowsAbout(transactionId))
@@ -76,7 +76,7 @@
                 System.out.println("TaxiServiceAT - enrolling...");
                 // enlist the Participant for this service:
                 TaxiParticipantAT taxiParticipant = new TaxiParticipantAT(transactionId);
-                TransactionManager11Factory.transactionManager().enlistForDurableTwoPhase(taxiParticipant, new Uid().toString());
+                TransactionManagerFactory.transactionManager().enlistForDurableTwoPhase(taxiParticipant, new Uid().toString());
             }
         }
         catch (Exception e)

Modified: labs/jbosstm/workspace/adinn/XTSGF/demo/src/com/jboss/jbosstm/xts/demo/services/taxi/TaxiServiceBA.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/demo/src/com/jboss/jbosstm/xts/demo/services/taxi/TaxiServiceBA.java	2008-01-25 17:05:33 UTC (rev 18123)
+++ labs/jbosstm/workspace/adinn/XTSGF/demo/src/com/jboss/jbosstm/xts/demo/services/taxi/TaxiServiceBA.java	2008-01-25 17:18:13 UTC (rev 18124)
@@ -30,9 +30,9 @@
 package com.jboss.jbosstm.xts.demo.services.taxi;
 
 import com.arjuna.ats.arjuna.common.Uid;
-import com.arjuna.mw.wst.BusinessActivityManager11Factory;
-import com.arjuna.mw.wst.BusinessActivity11Manager;
-import com.arjuna.wst.BAParticipantManagerWS;
+import com.arjuna.mw.wst11.BusinessActivityManagerFactory;
+import com.arjuna.mw.wst11.BusinessActivityManager;
+import com.arjuna.wst11.BAParticipantManager;
 import com.arjuna.wst.SystemException;
 import com.jboss.jbosstm.xts.demo.taxi.ITaxiServiceBA;
 
@@ -70,7 +70,7 @@
         TaxiView taxiView = TaxiView.getSingletonInstance();
         TaxiManager taxiManager = TaxiManager.getSingletonInstance();
 
-        BusinessActivity11Manager activityManager = BusinessActivityManager11Factory.businessActivityManager();
+        BusinessActivityManager activityManager = BusinessActivityManagerFactory.businessActivityManager();
 
         // get the transaction context of this thread:
         String transactionId = null;
@@ -105,7 +105,7 @@
             // it worked, so now we need a participant enlisted in case of compensation:
             TaxiParticipantBA taxiParticipant = new TaxiParticipantBA(transactionId);
             // enlist the Participant for this service:
-            BAParticipantManagerWS participantManager = null;
+            BAParticipantManager participantManager = null;
             try
             {
                 participantManager = activityManager.enlistForBusinessAgreementWithParticipantCompletion(taxiParticipant, new Uid().toString());

Modified: labs/jbosstm/workspace/adinn/XTSGF/demo/src/com/jboss/jbosstm/xts/demo/services/theatre/TheatreServiceAT.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/demo/src/com/jboss/jbosstm/xts/demo/services/theatre/TheatreServiceAT.java	2008-01-25 17:05:33 UTC (rev 18123)
+++ labs/jbosstm/workspace/adinn/XTSGF/demo/src/com/jboss/jbosstm/xts/demo/services/theatre/TheatreServiceAT.java	2008-01-25 17:18:13 UTC (rev 18124)
@@ -30,8 +30,8 @@
 package com.jboss.jbosstm.xts.demo.services.theatre;
 
 import com.arjuna.ats.arjuna.common.Uid;
-import com.arjuna.mw.wst.TransactionManager11Factory;
-import com.arjuna.mw.wst.UserTransaction11Factory;
+import com.arjuna.mw.wst11.TransactionManagerFactory;
+import com.arjuna.mw.wst11.UserTransactionFactory;
 import com.jboss.jbosstm.xts.demo.theatre.ITheatreService;
 
 import javax.jws.WebService;
@@ -76,7 +76,7 @@
         try
         {
             // get the transaction context of this thread:
-            transactionId = UserTransaction11Factory.userTransaction().toString();
+            transactionId = UserTransactionFactory.userTransaction().toString();
             System.out.println("TheatreServiceAT transaction id =" + transactionId);
 
             if (!theatreManager.knowsAbout(transactionId))
@@ -84,7 +84,7 @@
                 System.out.println("theatreService - enrolling...");
                 // enlist the Participant for this service:
                 TheatreParticipantAT theatreParticipant = new TheatreParticipantAT(transactionId);
-                TransactionManager11Factory.transactionManager().enlistForDurableTwoPhase(theatreParticipant, new Uid().toString());
+                TransactionManagerFactory.transactionManager().enlistForDurableTwoPhase(theatreParticipant, new Uid().toString());
             }
         }
         catch (Exception e)

Modified: labs/jbosstm/workspace/adinn/XTSGF/demo/src/com/jboss/jbosstm/xts/demo/services/theatre/TheatreServiceBA.java
===================================================================
--- labs/jbosstm/workspace/adinn/XTSGF/demo/src/com/jboss/jbosstm/xts/demo/services/theatre/TheatreServiceBA.java	2008-01-25 17:05:33 UTC (rev 18123)
+++ labs/jbosstm/workspace/adinn/XTSGF/demo/src/com/jboss/jbosstm/xts/demo/services/theatre/TheatreServiceBA.java	2008-01-25 17:18:13 UTC (rev 18124)
@@ -30,9 +30,9 @@
 package com.jboss.jbosstm.xts.demo.services.theatre;
 
 import com.arjuna.ats.arjuna.common.Uid;
-import com.arjuna.mw.wst.BusinessActivityManager11Factory;
-import com.arjuna.mw.wst.BusinessActivity11Manager;
-import com.arjuna.wst.BAParticipantManagerWS;
+import com.arjuna.mw.wst11.BusinessActivityManagerFactory;
+import com.arjuna.mw.wst11.BusinessActivityManager;
+import com.arjuna.wst11.BAParticipantManager;
 import com.arjuna.wst.SystemException;
 import com.jboss.jbosstm.xts.demo.theatre.ITheatreServiceBA;
 
@@ -74,7 +74,7 @@
         TheatreView theatreView = TheatreView.getSingletonInstance();
         TheatreManager theatreManager = TheatreManager.getSingletonInstance();
 
-        BusinessActivity11Manager activityManager = BusinessActivityManager11Factory.businessActivityManager();
+        BusinessActivityManager activityManager = BusinessActivityManagerFactory.businessActivityManager();
 
         // get the transaction context of this thread:
         String transactionId = null;
@@ -105,7 +105,7 @@
 
             TheatreParticipantBA theatreParticipant = new TheatreParticipantBA(transactionId, how_many, which_area);
             // enlist the Participant for this service:
-            BAParticipantManagerWS participantManager = null;
+            BAParticipantManager participantManager = null;
             try
             {
                 participantManager = activityManager.enlistForBusinessAgreementWithParticipantCompletion(theatreParticipant, new Uid().toString());




More information about the jboss-svn-commits mailing list