Allowing Users to set the Kandula Listener port
Resolved the classloading issues that arise when deployed in TOmcat... 

modified the Storage to store the contexts in Configuration contexts so that the classes in different services can communicate

git-svn-id: https://svn.apache.org/repos/asf/webservices/kandula/trunk/java@331109 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/src/endpoints.conf b/src/endpoints.conf
index ef5b073..18de487 100644
--- a/src/endpoints.conf
+++ b/src/endpoints.conf
@@ -1,4 +1,5 @@
 host=127.0.0.1

 port=8082

 tcpmon_enable=false

-PARTICIPANT_REPOSITORY =.
\ No newline at end of file
+PARTICIPANT_REPOSITORY =.

+KANDULA_LISTENER_PORT=5050
\ No newline at end of file
diff --git a/src/org/apache/kandula/Constants.java b/src/org/apache/kandula/Constants.java
index ffbbe08..32de930 100644
--- a/src/org/apache/kandula/Constants.java
+++ b/src/org/apache/kandula/Constants.java
@@ -75,6 +75,8 @@
     public static String KANDULA_RESOURCE = "KandulaResource";

     

     public static String KANDULA_PRE = "kand";

+

+    public static String KANDULA_STORE = "KandulaStore" ;

     

     public static final QName TRANSACTION_ID_PARAMETER = new QName(

             KANDULA_URI, "TransactionID",KANDULA_PRE);

diff --git a/src/org/apache/kandula/initiator/TransactionManager.java b/src/org/apache/kandula/initiator/TransactionManager.java
index f73be1a..7a1d8f2 100644
--- a/src/org/apache/kandula/initiator/TransactionManager.java
+++ b/src/org/apache/kandula/initiator/TransactionManager.java
@@ -49,7 +49,7 @@
         if (threadInfo.get() != null)

             throw new IllegalStateException();

         threadInfo.set(context.getProperty(ATActivityContext.REQUESTER_ID));

-        Store store = StorageFactory.getInstance().getStore();

+        Store store = StorageFactory.getInstance().getInitiatorStore();

         store.put(context.getProperty(ATActivityContext.REQUESTER_ID), context);

     }

 

@@ -119,7 +119,7 @@
     public static AbstractContext getTransaction() throws AbstractKandulaException {

         Object key = threadInfo.get();

         AbstractContext context = (AbstractContext) StorageFactory

-                .getInstance().getStore().get(key);

+                .getInstance().getInitiatorStore().get(key);

         if (context == null) {

             throw new InvalidStateException("No Activity Found");

         }

diff --git a/src/org/apache/kandula/participant/TransactionInHandler.java b/src/org/apache/kandula/participant/TransactionInHandler.java
index 60a55a9..f69b613 100644
--- a/src/org/apache/kandula/participant/TransactionInHandler.java
+++ b/src/org/apache/kandula/participant/TransactionInHandler.java
@@ -43,6 +43,7 @@
 

     public void invoke(MessageContext msgContext) throws AxisFault {

         KandulaResource resource;

+        StorageFactory.getInstance().setConfigurationContext(msgContext.getServiceContext().getConfigurationContext());

         ATParticipantContext context = new ATParticipantContext();

         SOAPHeader header = msgContext.getEnvelope().getHeader();

         OMElement coordinationElement = header.getFirstChildWithName(new QName(

diff --git a/src/org/apache/kandula/storage/StorageFactory.java b/src/org/apache/kandula/storage/StorageFactory.java
index 17849dc..f5ed64f 100644
--- a/src/org/apache/kandula/storage/StorageFactory.java
+++ b/src/org/apache/kandula/storage/StorageFactory.java
@@ -16,22 +16,57 @@
  */
 package org.apache.kandula.storage;
 
+import org.apache.axis2.context.ConfigurationContext;
+import org.apache.kandula.Constants;
+
 /**
  * @author <a href="mailto:thilina@opensource.lk"> Thilina Gunarathne </a>
  */
 public class StorageFactory {
-    private static StorageFactory instance = new StorageFactory();
+    private static StorageFactory instance= new StorageFactory();
 
-    private Store store;
+    private ConfigurationContext configurationContext=null;
 
+    private Store clientStore =null;
+
+    private StorageFactory()
+    {}
     public static StorageFactory getInstance() {
         return instance;
     }
 
     public Store getStore() {
+        if (configurationContext ==null)
+            return null;
+        Store store  = (Store)configurationContext.getProperty(Constants.KANDULA_STORE);
         if (store == null) {
             store = new SimpleStore();
+            configurationContext.setProperty(Constants.KANDULA_STORE,store);
         }
         return store;
     }
+
+    /*
+     * TODO: Have to remove this. This is a hack done to get through the interop
+     */
+    public Store getInitiatorStore()
+    {
+         if  (clientStore==null)
+         {
+              clientStore = new SimpleStore();
+         }
+        return clientStore;
+    }
+
+    public void setConfigurationContext(ConfigurationContext configurationContext)
+    {
+        this.configurationContext = configurationContext;
+    }
+    /*
+     * TODO : Remove this... Parts of the Hack done for Interop
+    */
+    public ConfigurationContext getConfigurationContext()
+    {
+       return configurationContext;
+    }
 }
\ No newline at end of file
diff --git a/src/org/apache/kandula/utility/EndpointReferenceFactory.java b/src/org/apache/kandula/utility/EndpointReferenceFactory.java
index cf5e8b6..0ed237d 100644
--- a/src/org/apache/kandula/utility/EndpointReferenceFactory.java
+++ b/src/org/apache/kandula/utility/EndpointReferenceFactory.java
@@ -44,7 +44,9 @@
 	

 	static final String REPO = "PARTICIPANT_REPOSITORY";

 

-	private static EndpointReferenceFactory instance = null;

+   static final String LISTENER_PORT = "KANDULA_LISTENER_PORT";

+

+    private static EndpointReferenceFactory instance = null;

 

 	Properties properties = null;

 

@@ -52,7 +54,9 @@
 	

 	String participantRepository =null;

 

-	private EndpointReferenceFactory() {

+    String kandulaListenerPort=null;

+

+    private EndpointReferenceFactory() {

 

 		String port = null;

 

@@ -66,12 +70,20 @@
 			host = properties.getProperty(HOST_PROPERTY);

 			port = properties.getProperty(PORT_PROPERTY);

 			participantRepository = properties.getProperty(REPO);

-			if (participantRepository ==null)

+

+            if (participantRepository ==null)

 			{

 				participantRepository = ".";

 			}

-			

-			if (port == null) {

+

+            kandulaListenerPort = properties.getProperty(LISTENER_PORT);

+

+             if (kandulaListenerPort ==null)

+			{

+				kandulaListenerPort = "5059";

+			}

+

+            if (port == null) {

 				port = "8080";

 			}

 			if (host == null) {

@@ -80,7 +92,8 @@
 			

 

 			location = "http://" + host + ":"+port;

-		} catch (Exception e) {

+            System.out.println(location);

+        } catch (Exception e) {

 			if (e instanceof RuntimeException)

 				throw (RuntimeException) e;

 			else

@@ -153,4 +166,9 @@
 	{

 		return participantRepository;

 	}

+

+    public String getKadulaListenerPort()

+    {

+         return kandulaListenerPort;

+    }

 }
\ No newline at end of file
diff --git a/src/org/apache/kandula/utility/KandulaListener.java b/src/org/apache/kandula/utility/KandulaListener.java
index fc73991..dcaaa0a 100644
--- a/src/org/apache/kandula/utility/KandulaListener.java
+++ b/src/org/apache/kandula/utility/KandulaListener.java
@@ -19,6 +19,7 @@
 import java.io.IOException;

 import java.net.InetAddress;

 import java.net.UnknownHostException;

+import java.net.BindException;

 import java.util.HashMap;

 

 import org.apache.axis2.AxisFault;

@@ -43,14 +44,25 @@
 

     private boolean serverStarted = false;

 

-    public static final int SERVER_PORT = 5059;

+    public int serverPort;

 

-    private KandulaListener() throws IOException {

+     private KandulaListener() throws IOException {

         responseConfigurationContext = new org.apache.axis2.context.ConfigurationContextFactory()

                 .buildClientConfigurationContext(".");

-        receiver = new SimpleHTTPServer(responseConfigurationContext,

-                SERVER_PORT);

-

+        try{

+        serverPort = Integer.parseInt(EndpointReferenceFactory.getInstance().getKadulaListenerPort());

+        }catch (Exception e)

+         {

+              serverPort = 5059;

+         }

+        while (receiver == null) {

+            try {

+                receiver = new SimpleHTTPServer(responseConfigurationContext,

+                serverPort);

+            } catch (BindException e) {

+                serverPort++;

+            }

+        }

     }

 

     public static KandulaListener getInstance() throws IOException {

@@ -65,7 +77,7 @@
 

             receiver.start();

             serverStarted = true;

-            System.out.print("Server started on port " + SERVER_PORT + ".....");

+            System.out.print("Server started on port " + serverPort + ".....");

         }

 

     }

@@ -76,8 +88,7 @@
     }

 

     /**

-     * @param serviceName

-     * @param operationName

+     * @param service

      * @throws AxisFault

      *             To add services with only one operation, which is the

      *             frequent case in reponses

@@ -101,6 +112,6 @@
 

     public String getHost() throws UnknownHostException {

         return "http://" + InetAddress.getLocalHost().getHostAddress() + ":"

-                + (SERVER_PORT + 1) + "/axis2/services/";

+                + (serverPort) + "/axis2/services/";

     }

 }
\ No newline at end of file
diff --git a/src/org/apache/kandula/wsat/AbstractATNotifierStub.java b/src/org/apache/kandula/wsat/AbstractATNotifierStub.java
index e365da7..170b083 100644
--- a/src/org/apache/kandula/wsat/AbstractATNotifierStub.java
+++ b/src/org/apache/kandula/wsat/AbstractATNotifierStub.java
@@ -77,6 +77,8 @@
             messageSender.setWsaAction(action);
             messageSender
                     .setSenderTransport(org.apache.axis2.Constants.TRANSPORT_HTTP);
+            System.out.println(operations[opIndex]);
+            
             messageSender.send(operations[opIndex], messageContext);
         } catch (AxisFault e) {
             throw new KandulaGeneralException(e);
diff --git a/src/org/apache/kandula/wsat/completion/CompletionCoordinatorPortTypeRawXMLSkeleton.java b/src/org/apache/kandula/wsat/completion/CompletionCoordinatorPortTypeRawXMLSkeleton.java
index 4323039..27158bf 100644
--- a/src/org/apache/kandula/wsat/completion/CompletionCoordinatorPortTypeRawXMLSkeleton.java
+++ b/src/org/apache/kandula/wsat/completion/CompletionCoordinatorPortTypeRawXMLSkeleton.java
@@ -20,6 +20,7 @@
 import org.apache.axis2.context.MessageContext;
 import org.apache.axis2.om.OMElement;
 import org.apache.kandula.Constants;
+import org.apache.kandula.storage.StorageFactory;
 import org.apache.kandula.context.AbstractContext;
 import org.apache.kandula.coordinator.Coordinator;
 import org.apache.kandula.coordinator.at.ATCoordinator;
@@ -42,6 +43,7 @@
         AbstractContext context;
         String activityId;
      //log.info("Visited Commit operation");
+        StorageFactory.getInstance().setConfigurationContext(msgContext.getServiceContext().getConfigurationContext());
         OMElement header = msgContext.getEnvelope().getHeader();
         activityId = header.getFirstChildWithName(
                 Constants.TRANSACTION_ID_PARAMETER).getText();
@@ -61,6 +63,7 @@
             throws AxisFault {
         AbstractContext context;
         String activityId;
+        StorageFactory.getInstance().setConfigurationContext(msgContext.getServiceContext().getConfigurationContext());
       //log.info("Visited rollback operation");
         OMElement header = msgContext.getEnvelope().getHeader();
         activityId = header.getFirstChildWithName(
diff --git a/src/org/apache/kandula/wsat/completion/CompletionInitiatorPortTypeRawXMLSkeleton.java b/src/org/apache/kandula/wsat/completion/CompletionInitiatorPortTypeRawXMLSkeleton.java
index 9c40f87..f812ab1 100644
--- a/src/org/apache/kandula/wsat/completion/CompletionInitiatorPortTypeRawXMLSkeleton.java
+++ b/src/org/apache/kandula/wsat/completion/CompletionInitiatorPortTypeRawXMLSkeleton.java
@@ -35,7 +35,7 @@
     }

 

     public OMElement committedOperation(OMElement requestElement) {

-

+        StorageFactory.getInstance().setConfigurationContext(msgContext.getServiceContext().getConfigurationContext());

         OMElement header = msgContext.getEnvelope().getHeader();

         String requesterID = header.getFirstChildWithName(

                 Constants.REQUESTER_ID_PARAMETER).getText();

@@ -46,7 +46,7 @@
     }

 

     public OMElement abortedOperation(OMElement requestElement) {

-        

+        StorageFactory.getInstance().setConfigurationContext(msgContext.getServiceContext().getConfigurationContext());

         OMElement header = msgContext.getEnvelope().getHeader();

         String requesterID = header.getFirstChildWithName(

                 Constants.REQUESTER_ID_PARAMETER).getText();

diff --git a/src/org/apache/kandula/wsat/twopc/CoordinatorPortTypeRawXMLSkeleton.java b/src/org/apache/kandula/wsat/twopc/CoordinatorPortTypeRawXMLSkeleton.java
index 01e5d9e..bd4ced1 100644
--- a/src/org/apache/kandula/wsat/twopc/CoordinatorPortTypeRawXMLSkeleton.java
+++ b/src/org/apache/kandula/wsat/twopc/CoordinatorPortTypeRawXMLSkeleton.java
@@ -20,6 +20,7 @@
 import org.apache.axis2.context.MessageContext;
 import org.apache.axis2.om.OMElement;
 import org.apache.kandula.Constants;
+import org.apache.kandula.storage.StorageFactory;
 import org.apache.kandula.context.AbstractContext;
 import org.apache.kandula.coordinator.Coordinator;
 import org.apache.kandula.coordinator.at.ATCoordinator;
@@ -41,6 +42,7 @@
      */
     public OMElement preparedOperation(OMElement requestElement)
             throws AxisFault {
+        StorageFactory.getInstance().setConfigurationContext(msgContext.getServiceContext().getConfigurationContext());
         OMElement header = msgContext.getEnvelope().getHeader();
         String activityId = header.getFirstChildWithName(
                 Constants.TRANSACTION_ID_PARAMETER).getText();
@@ -63,6 +65,7 @@
      */
     public OMElement abortedOperation(OMElement requestElement)
             throws AxisFault {
+        StorageFactory.getInstance().setConfigurationContext(msgContext.getServiceContext().getConfigurationContext());
         OMElement header = msgContext.getEnvelope().getHeader();
         String activityId = header.getFirstChildWithName(
                 Constants.TRANSACTION_ID_PARAMETER).getText();
@@ -85,6 +88,7 @@
      */
     public OMElement readOnlyOperation(OMElement requestElement)
             throws AxisFault {
+        StorageFactory.getInstance().setConfigurationContext(msgContext.getServiceContext().getConfigurationContext());
         OMElement header = msgContext.getEnvelope().getHeader();
         String activityId = header.getFirstChildWithName(
                 Constants.TRANSACTION_ID_PARAMETER).getText();
@@ -107,6 +111,7 @@
      */
     public OMElement committedOperation(OMElement requestElement)
             throws AxisFault {
+        StorageFactory.getInstance().setConfigurationContext(msgContext.getServiceContext().getConfigurationContext());
         AbstractContext context;
         System.out.println("Visited Committed operation");
         return null;
@@ -117,6 +122,7 @@
      * @throws AbstractKandulaException
      */
     public OMElement replayOperation(OMElement requestElement) throws AxisFault {
+        StorageFactory.getInstance().setConfigurationContext(msgContext.getServiceContext().getConfigurationContext());
         AbstractContext context;
         System.out.println("Visited Replay operation");
         return null;
diff --git a/src/org/apache/kandula/wsat/twopc/ParticipantPortTypeRawXMLSkeleton.java b/src/org/apache/kandula/wsat/twopc/ParticipantPortTypeRawXMLSkeleton.java
index 4fc0290..87d26ce 100644
--- a/src/org/apache/kandula/wsat/twopc/ParticipantPortTypeRawXMLSkeleton.java
+++ b/src/org/apache/kandula/wsat/twopc/ParticipantPortTypeRawXMLSkeleton.java
@@ -39,6 +39,7 @@
     }

 

     public OMElement prepareOperation(OMElement requestEle) throws AxisFault {

+        StorageFactory.getInstance().setConfigurationContext(msgContext.getServiceContext().getConfigurationContext());

         OMElement header = msgContext.getEnvelope().getHeader();

         String requesterID = header.getFirstChildWithName(

                 Constants.REQUESTER_ID_PARAMETER).getText();

@@ -57,6 +58,7 @@
     }

 

     public OMElement commitOperation(OMElement requestEle) throws AxisFault {

+        StorageFactory.getInstance().setConfigurationContext(msgContext.getServiceContext().getConfigurationContext());

         OMElement header = msgContext.getEnvelope().getHeader();

         String requesterID = header.getFirstChildWithName(

                 Constants.REQUESTER_ID_PARAMETER).getText();

@@ -73,6 +75,7 @@
     }

 

     public OMElement rollbackOperation(OMElement requestEle) throws AxisFault {

+        StorageFactory.getInstance().setConfigurationContext(msgContext.getServiceContext().getConfigurationContext());

         OMElement header = msgContext.getEnvelope().getHeader();

         String requesterID = header.getFirstChildWithName(

                 Constants.REQUESTER_ID_PARAMETER).getText();

diff --git a/src/org/apache/kandula/wscoor/ActivationPortTypeRawXMLAsyncMessageReceiver.java b/src/org/apache/kandula/wscoor/ActivationPortTypeRawXMLAsyncMessageReceiver.java
index 04c89c2..6cb588f 100644
--- a/src/org/apache/kandula/wscoor/ActivationPortTypeRawXMLAsyncMessageReceiver.java
+++ b/src/org/apache/kandula/wscoor/ActivationPortTypeRawXMLAsyncMessageReceiver.java
@@ -70,6 +70,7 @@
                 newMsgContext.setEnvelope(envelope);
                 newMsgContext
                         .setWSAAction(Constants.WS_COOR_CREATE_COORDINATIONCONTEXT_RESPONSE);
+                newMsgContext.setRelatesTo(null);
             }
         } catch (Exception e) {
             throw AxisFault.makeFault(e);
diff --git a/src/org/apache/kandula/wscoor/ActivationPortTypeRawXMLSkeleton.java b/src/org/apache/kandula/wscoor/ActivationPortTypeRawXMLSkeleton.java
index a15368e..3b33186 100644
--- a/src/org/apache/kandula/wscoor/ActivationPortTypeRawXMLSkeleton.java
+++ b/src/org/apache/kandula/wscoor/ActivationPortTypeRawXMLSkeleton.java
@@ -19,11 +19,13 @@
 import javax.xml.namespace.QName;
 
 import org.apache.axis2.AxisFault;
+import org.apache.axis2.context.MessageContext;
 import org.apache.axis2.om.OMAbstractFactory;
 import org.apache.axis2.om.OMElement;
 import org.apache.axis2.om.OMNamespace;
 import org.apache.axis2.soap.SOAPFactory;
 import org.apache.kandula.Constants;
+import org.apache.kandula.storage.StorageFactory;
 import org.apache.kandula.context.AbstractContext;
 import org.apache.kandula.coordinator.Coordinator;
 import org.apache.kandula.faults.AbstractKandulaException;
@@ -32,6 +34,10 @@
  */
 
 public class ActivationPortTypeRawXMLSkeleton {
+    private MessageContext msgContext;
+     public void init(MessageContext context) {
+        this.msgContext = context;
+    }
 
     /**
      * Auto generated method signature
@@ -42,7 +48,7 @@
     public OMElement createCoordinationContextOperation(OMElement requestElement)
             throws AxisFault {
         AbstractContext context;
-
+        StorageFactory.getInstance().setConfigurationContext(msgContext.getServiceContext().getConfigurationContext());
         /*
          * Extracting data from the incoming message
          */
diff --git a/src/org/apache/kandula/wscoor/ActivationRequesterPortTypeRawXMLSkeleton.java b/src/org/apache/kandula/wscoor/ActivationRequesterPortTypeRawXMLSkeleton.java
index 93d9ee8..ad62b92 100644
--- a/src/org/apache/kandula/wscoor/ActivationRequesterPortTypeRawXMLSkeleton.java
+++ b/src/org/apache/kandula/wscoor/ActivationRequesterPortTypeRawXMLSkeleton.java
@@ -44,7 +44,7 @@
             CoordinationContext coordinationContext = CoordinationContext.Factory

                     .newContext(response);

             AbstractContext context = (AbstractContext) StorageFactory

-                    .getInstance().getStore().get(requesterID);

+                    .getInstance().getInitiatorStore().get(requesterID);

             context.setCoordinationContext(coordinationContext);

         }

         return null;

diff --git a/src/org/apache/kandula/wscoor/RegistrationPortTypeRawXMLAsyncMessageReceiver.java b/src/org/apache/kandula/wscoor/RegistrationPortTypeRawXMLAsyncMessageReceiver.java
index dd1dfdf..0bdf75c 100644
--- a/src/org/apache/kandula/wscoor/RegistrationPortTypeRawXMLAsyncMessageReceiver.java
+++ b/src/org/apache/kandula/wscoor/RegistrationPortTypeRawXMLAsyncMessageReceiver.java
@@ -69,6 +69,7 @@
                 }
                 newMsgContext.setEnvelope(envelope);
                 newMsgContext.setWSAAction(Constants.WS_COOR_REGISTER_RESPONSE);
+                newMsgContext.setRelatesTo(null);
             }
         } catch (Exception e) {
             throw AxisFault.makeFault(e);
diff --git a/src/org/apache/kandula/wscoor/RegistrationPortTypeRawXMLSkeleton.java b/src/org/apache/kandula/wscoor/RegistrationPortTypeRawXMLSkeleton.java
index 92e1766..6b3a4a4 100644
--- a/src/org/apache/kandula/wscoor/RegistrationPortTypeRawXMLSkeleton.java
+++ b/src/org/apache/kandula/wscoor/RegistrationPortTypeRawXMLSkeleton.java
@@ -28,6 +28,7 @@
 import org.apache.axis2.om.OMNamespace;
 import org.apache.axis2.soap.SOAPFactory;
 import org.apache.kandula.Constants;
+import org.apache.kandula.storage.StorageFactory;
 import org.apache.kandula.coordinator.Coordinator;
 import org.apache.kandula.faults.AbstractKandulaException;
 import org.apache.kandula.utility.KandulaUtils;
@@ -48,7 +49,7 @@
         String protocolIdentifier;
         EndpointReference participantEPR;
         String activityId;
-
+        StorageFactory.getInstance().setConfigurationContext(msgContext.getServiceContext().getConfigurationContext());
         /*
          * Extracting data from the received message
          */
diff --git a/src/org/apache/kandula/wscoor/RegistrationRequesterPortTypeRawXMLSkeleton.java b/src/org/apache/kandula/wscoor/RegistrationRequesterPortTypeRawXMLSkeleton.java
index d435387..62c791d 100644
--- a/src/org/apache/kandula/wscoor/RegistrationRequesterPortTypeRawXMLSkeleton.java
+++ b/src/org/apache/kandula/wscoor/RegistrationRequesterPortTypeRawXMLSkeleton.java
@@ -18,6 +18,7 @@
 

 import org.apache.axis2.addressing.EndpointReference;

 import org.apache.axis2.context.MessageContext;

+import org.apache.axis2.context.ConfigurationContext;

 import org.apache.axis2.om.OMElement;

 import org.apache.kandula.Constants;

 import org.apache.kandula.context.AbstractContext;

@@ -37,6 +38,7 @@
     }

 

     public OMElement registerResponseOperation(OMElement responseElement) {

+

         OMElement response = responseElement.getFirstElement();

         if ("CoordinatorProtocolService".equals(response.getLocalName())) {

             OMElement header = msgContext.getEnvelope().getHeader();

@@ -44,8 +46,18 @@
                     Constants.REQUESTER_ID_PARAMETER).getText();

             EndpointReference coordinatorService = KandulaUtils

                     .endpointFromOM(response.getFirstElement());

-            AbstractContext context = (AbstractContext) StorageFactory

-                    .getInstance().getStore().get(requesterID);

+            // TODO: remove this

+            ConfigurationContext configurationContext =  StorageFactory.getInstance().getConfigurationContext();

+            AbstractContext context;

+            if (configurationContext==null)

+            {

+                context = (AbstractContext) StorageFactory

+                    .getInstance().getInitiatorStore().get(requesterID);

+            }

+            else

+            {

+                 context = (AbstractContext) StorageFactory.getInstance().getStore().get(requesterID);

+            }

             context.setProperty(ATActivityContext.COORDINATION_EPR,

                     coordinatorService);

         }