You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@synapse.apache.org by ru...@apache.org on 2010/09/22 11:37:44 UTC

svn commit: r999835 - in /synapse/trunk/java/modules/core/src: main/java/org/apache/synapse/config/xml/ main/java/org/apache/synapse/config/xml/endpoints/ main/java/org/apache/synapse/config/xml/eventing/ main/java/org/apache/synapse/deployers/ test/ja...

Author: ruwan
Date: Wed Sep 22 09:37:43 2010
New Revision: 999835

URL: http://svn.apache.org/viewvc?rev=999835&view=rev
Log:
Fixing the Configuration building API to pass in properties with additional information 
This helps to get rid of the static references to the resolve root and so forth via the ServerManager 

Committing in parts as my commit as a bunch failed

Modified:
    synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/config/xml/DropMediatorFactory.java
    synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/config/xml/EnqueueMediatorFactory.java
    synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/config/xml/EntryFactory.java
    synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/config/xml/FaultMediatorFactory.java
    synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/config/xml/endpoints/DynamicLoadbalanceEndpointFactory.java
    synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/config/xml/endpoints/EndpointFactory.java
    synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/config/xml/endpoints/FailoverEndpointFactory.java
    synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/config/xml/eventing/EventPublisherMediatorFactory.java
    synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/config/xml/eventing/EventSourceFactory.java
    synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/deployers/EndpointDeployer.java
    synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/deployers/EventSourceDeployer.java
    synapse/trunk/java/modules/core/src/test/java/org/apache/synapse/config/xml/EntrySerializationTest.java

Modified: synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/config/xml/DropMediatorFactory.java
URL: http://svn.apache.org/viewvc/synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/config/xml/DropMediatorFactory.java?rev=999835&r1=999834&r2=999835&view=diff
==============================================================================
--- synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/config/xml/DropMediatorFactory.java (original)
+++ synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/config/xml/DropMediatorFactory.java Wed Sep 22 09:37:43 2010
@@ -24,6 +24,7 @@ import org.apache.synapse.Mediator;
 import org.apache.synapse.mediators.builtin.DropMediator;
 
 import javax.xml.namespace.QName;
+import java.util.Properties;
 
 /**
  * Factory for {@link DropMediator} instances.
@@ -37,7 +38,7 @@ public class DropMediatorFactory extends
 
     private static final QName DROP_Q = new QName(XMLConfigConstants.SYNAPSE_NAMESPACE, "drop");
 
-    public Mediator createSpecificMediator(OMElement el) {
+    public Mediator createSpecificMediator(OMElement el, Properties properties) {
 
         Mediator dropMediator = new DropMediator();
         // after successfully creating the mediator

Modified: synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/config/xml/EnqueueMediatorFactory.java
URL: http://svn.apache.org/viewvc/synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/config/xml/EnqueueMediatorFactory.java?rev=999835&r1=999834&r2=999835&view=diff
==============================================================================
--- synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/config/xml/EnqueueMediatorFactory.java (original)
+++ synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/config/xml/EnqueueMediatorFactory.java Wed Sep 22 09:37:43 2010
@@ -26,6 +26,7 @@ import org.apache.axiom.om.OMElement;
 import org.apache.axiom.om.OMAttribute;
 
 import javax.xml.namespace.QName;
+import java.util.Properties;
 
 
 public class EnqueueMediatorFactory extends AbstractMediatorFactory{
@@ -35,7 +36,7 @@ public class EnqueueMediatorFactory exte
     public static final QName PRIORITY_ATT = new QName("priority");
     public static final QName QUEUE_ATT = new QName("executor");
 
-    public Mediator createSpecificMediator(OMElement elem) {
+    public Mediator createSpecificMediator(OMElement elem, Properties properties) {
         EnqueueMediator mediator = new EnqueueMediator();
 
         OMAttribute seqAtt = elem.getAttribute(SEQUENCE_ATT);

Modified: synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/config/xml/EntryFactory.java
URL: http://svn.apache.org/viewvc/synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/config/xml/EntryFactory.java?rev=999835&r1=999834&r2=999835&view=diff
==============================================================================
--- synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/config/xml/EntryFactory.java (original)
+++ synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/config/xml/EntryFactory.java Wed Sep 22 09:37:43 2010
@@ -20,6 +20,7 @@
 package org.apache.synapse.config.xml;
 
 import org.apache.synapse.SynapseConstants;
+import org.apache.synapse.config.SynapseConfigUtils;
 import org.apache.synapse.config.XMLToObjectMapper;
 import org.apache.synapse.config.Entry;
 import org.apache.synapse.SynapseException;
@@ -33,6 +34,7 @@ import org.apache.commons.logging.LogFac
 import javax.xml.namespace.QName;
 import java.net.URL;
 import java.net.MalformedURLException;
+import java.util.Properties;
 
 /**
  * Factory for {@link Entry} instances.
@@ -44,7 +46,7 @@ public class EntryFactory implements XML
     private static final QName DESCRIPTION_Q
             = new QName(SynapseConstants.SYNAPSE_NAMESPACE, "description");
 
-    public static Entry createEntry(OMElement elem) {
+    public static Entry createEntry(OMElement elem, Properties properties) {
 
         OMAttribute key = elem.getAttribute(new QName(XMLConfigConstants.NULL_NAMESPACE, "key"));
         if (key == null) {
@@ -71,8 +73,7 @@ public class EntryFactory implements XML
                 try {
                     entry.setSrc(new URL(src.trim()));
                     entry.setType(Entry.URL_SRC);
-                    entry.setValue(
-                        org.apache.synapse.config.SynapseConfigUtils.getObject(entry.getSrc()));
+                    entry.setValue(SynapseConfigUtils.getObject(entry.getSrc(), properties));
                 } catch (MalformedURLException e) {
                     handleException("The entry with key : " + key + " refers to an invalid URL");
                 }
@@ -99,9 +100,9 @@ public class EntryFactory implements XML
         throw new SynapseException(msg);
     }
 
-    public Object getObjectFromOMNode(OMNode om) {
+    public Object getObjectFromOMNode(OMNode om, Properties properties) {
         if (om instanceof OMElement) {
-            return createEntry((OMElement) om);
+            return createEntry((OMElement) om, properties);
         } else {
             handleException("Invalid XML configuration for an Entry. OMElement expected");
         }

Modified: synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/config/xml/FaultMediatorFactory.java
URL: http://svn.apache.org/viewvc/synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/config/xml/FaultMediatorFactory.java?rev=999835&r1=999834&r2=999835&view=diff
==============================================================================
--- synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/config/xml/FaultMediatorFactory.java (original)
+++ synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/config/xml/FaultMediatorFactory.java Wed Sep 22 09:37:43 2010
@@ -29,6 +29,7 @@ import javax.xml.namespace.QName;
 import java.net.URI;
 import java.net.URISyntaxException;
 import java.util.Iterator;
+import java.util.Properties;
 
 /**
  * Factory for {@link FaultMediator} instances.
@@ -68,7 +69,7 @@ public class FaultMediatorFactory extend
     private static final String SOAP12 = "soap12";
     private static final String POX = "pox";
 
-    public Mediator createSpecificMediator(OMElement elem) {
+    public Mediator createSpecificMediator(OMElement elem, Properties properties) {
 
         FaultMediator faultMediator = new FaultMediator();
 

Modified: synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/config/xml/endpoints/DynamicLoadbalanceEndpointFactory.java
URL: http://svn.apache.org/viewvc/synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/config/xml/endpoints/DynamicLoadbalanceEndpointFactory.java?rev=999835&r1=999834&r2=999835&view=diff
==============================================================================
--- synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/config/xml/endpoints/DynamicLoadbalanceEndpointFactory.java (original)
+++ synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/config/xml/endpoints/DynamicLoadbalanceEndpointFactory.java Wed Sep 22 09:37:43 2010
@@ -65,7 +65,8 @@ public class DynamicLoadbalanceEndpointF
         return instance;
     }
 
-    protected Endpoint createEndpoint(OMElement epConfig, boolean anonymousEndpoint) {
+    protected Endpoint createEndpoint(OMElement epConfig, boolean anonymousEndpoint,
+                                      Properties properties) {
 
         OMElement loadbalanceElement =
                 epConfig.getFirstChildWithName(new QName(SynapseConstants.SYNAPSE_NAMESPACE,
@@ -132,7 +133,7 @@ public class DynamicLoadbalanceEndpointF
                 try {
                     LoadBalanceMembershipHandler lbMembershipHandler =
                             (LoadBalanceMembershipHandler) Class.forName(clazz).newInstance();
-                    Properties properties = new Properties();
+                    Properties lbProperties = new Properties();
                     for (Iterator props = eventHandler.getChildrenWithName(new QName(
                             SynapseConstants.SYNAPSE_NAMESPACE, "property")); props.hasNext();) {
                         OMElement prop = (OMElement) props.next();
@@ -142,14 +143,14 @@ public class DynamicLoadbalanceEndpointF
                         String propValue =
                                 prop.getAttributeValue(new QName(XMLConfigConstants.NULL_NAMESPACE,
                                                                  "value")).trim();
-                        properties.put(propName, propValue);
+                        lbProperties.put(propName, propValue);
                     }
 
                     // Set load balance algorithm
                     LoadbalanceAlgorithm algorithm =
                             LoadbalanceAlgorithmFactory.
                                     createLoadbalanceAlgorithm(loadbalanceElement, null);
-                    lbMembershipHandler.init(properties, algorithm);
+                    lbMembershipHandler.init(lbProperties, algorithm);
                     loadbalanceEndpoint.setLoadBalanceMembershipHandler(lbMembershipHandler);
                 } catch (Exception e) {
                     String msg = "Could not instantiate " +

Modified: synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/config/xml/endpoints/EndpointFactory.java
URL: http://svn.apache.org/viewvc/synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/config/xml/endpoints/EndpointFactory.java?rev=999835&r1=999834&r2=999835&view=diff
==============================================================================
--- synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/config/xml/endpoints/EndpointFactory.java (original)
+++ synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/config/xml/endpoints/EndpointFactory.java Wed Sep 22 09:37:43 2010
@@ -39,10 +39,7 @@ import org.apache.synapse.util.UUIDGener
 
 
 import javax.xml.namespace.QName;
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.StringTokenizer;
-import java.util.List;
+import java.util.*;
 
 /**
  * All endpoint factories should extend from this abstract class. Use EndpointFactory to obtain the
@@ -64,7 +61,7 @@ public abstract class EndpointFactory im
 
     private static final String ENDPOINT_NAME_PREFIX = "endpoint_";
 
-    public static final QName ONFAULT_Q = new QName(XMLConfigConstants.NULL_NAMESPACE, "onFault");
+    public static final QName ON_FAULT_Q = new QName(XMLConfigConstants.NULL_NAMESPACE, "onFault");
 
     private static final QName DESCRIPTION_Q
             = new QName(SynapseConstants.SYNAPSE_NAMESPACE, "description");
@@ -75,21 +72,24 @@ public abstract class EndpointFactory im
      *
      * @param elem        XML from which the endpoint will be built
      * @param isAnonymous whether this is an anonymous endpoint or not
+     * @param properties bag of properties to pass in any information to the factory
      * @return created endpoint
      */
-    public static Endpoint getEndpointFromElement(OMElement elem, boolean isAnonymous) {
-        return getEndpointFactory(elem).createEndpointWithName(elem, isAnonymous);
+    public static Endpoint getEndpointFromElement(OMElement elem, boolean isAnonymous,
+                                                  Properties properties) {
+        return getEndpointFactory(elem).createEndpointWithName(elem, isAnonymous, properties);
     }
 
     /**
      * Creates the {@link Endpoint} object from the provided {@link OMNode}
      *
      * @param om XML node from which the endpoint will be built
+     * @param properties bag of properties to pass in any information to the factory
      * @return created endpoint as an {@link Object}
      */
-    public Object getObjectFromOMNode(OMNode om) {
+    public Object getObjectFromOMNode(OMNode om, Properties properties) {
         if (om instanceof OMElement) {
-            return createEndpointWithName((OMElement) om, false);
+            return createEndpointWithName((OMElement) om, false, properties);
         } else {
             handleException("Invalid XML configuration for an Endpoint. OMElement expected");
         }
@@ -102,22 +102,26 @@ public abstract class EndpointFactory im
      * immediate child element of the definitions tag it should have a name, which is used as the
      * key in local registry.
      *
-     * @param epConfig          OMElement conatining the endpoint configuration.
+     * @param epConfig          OMElement containing the endpoint configuration.
      * @param anonymousEndpoint false if the endpoint has a name. true otherwise.
+     * @param properties bag of properties to pass in any information to the factory
      * @return Endpoint implementation for the given configuration.
      */
-    protected abstract Endpoint createEndpoint(OMElement epConfig, boolean anonymousEndpoint);
+    protected abstract Endpoint createEndpoint(OMElement epConfig, boolean anonymousEndpoint,
+                                               Properties properties);
 
     /**
      *  Make sure that the endpoints created by the factory has a name
      * 
      * @param epConfig          OMElement containing the endpoint configuration.
      * @param anonymousEndpoint false if the endpoint has a name. true otherwise.
+     * @param properties bag of properties to pass in any information to the factory
      * @return Endpoint implementation for the given configuration.
      */
-    private Endpoint createEndpointWithName(OMElement epConfig, boolean anonymousEndpoint) {
+    private Endpoint createEndpointWithName(OMElement epConfig, boolean anonymousEndpoint,
+                                            Properties properties) {
         
-        Endpoint ep = createEndpoint(epConfig, anonymousEndpoint);
+        Endpoint ep = createEndpoint(epConfig, anonymousEndpoint, properties);
         OMElement descriptionElem = epConfig.getFirstChildWithName(DESCRIPTION_Q);
         if (descriptionElem != null) {
             ep.setDescription(descriptionElem.getText());
@@ -133,7 +137,7 @@ public abstract class EndpointFactory im
             }
         }
 
-        OMAttribute onFaultAtt = epConfig.getAttribute(ONFAULT_Q);
+        OMAttribute onFaultAtt = epConfig.getAttribute(ON_FAULT_Q);
         if (onFaultAtt != null) {
             ep.setOnFaultMessageStore(onFaultAtt.getAttributeValue());
         }
@@ -291,13 +295,13 @@ public abstract class EndpointFactory im
             }
         }
 
-        OMElement markAsTimedout = elem.getFirstChildWithName(new QName(
+        OMElement markAsTimedOut = elem.getFirstChildWithName(new QName(
             SynapseConstants.SYNAPSE_NAMESPACE,
             XMLConfigConstants.MARK_FOR_SUSPENSION));
 
-        if (markAsTimedout != null) {
+        if (markAsTimedOut != null) {
 
-            OMElement timeoutCodes = markAsTimedout.getFirstChildWithName(new QName(
+            OMElement timeoutCodes = markAsTimedOut.getFirstChildWithName(new QName(
                 SynapseConstants.SYNAPSE_NAMESPACE,
                 XMLConfigConstants.ERROR_CODES));
             if (timeoutCodes != null && timeoutCodes.getText() != null) {
@@ -313,7 +317,7 @@ public abstract class EndpointFactory im
                 }
             }
 
-            OMElement retriesBeforeSuspend = markAsTimedout.getFirstChildWithName(new QName(
+            OMElement retriesBeforeSuspend = markAsTimedOut.getFirstChildWithName(new QName(
                 SynapseConstants.SYNAPSE_NAMESPACE,
                 XMLConfigConstants.RETRIES_BEFORE_SUSPENSION));
             if (retriesBeforeSuspend != null && retriesBeforeSuspend.getText() != null) {
@@ -326,7 +330,7 @@ public abstract class EndpointFactory im
                 }
             }
 
-            OMElement retryDelay = markAsTimedout.getFirstChildWithName(new QName(
+            OMElement retryDelay = markAsTimedOut.getFirstChildWithName(new QName(
                 SynapseConstants.SYNAPSE_NAMESPACE,
                 XMLConfigConstants.RETRY_DELAY));
             if (retryDelay != null && retryDelay.getText() != null) {
@@ -500,7 +504,7 @@ public abstract class EndpointFactory im
         OMElement dlbElement = configElement.getFirstChildWithName
                 (new QName(SynapseConstants.SYNAPSE_NAMESPACE, "dynamicLoadbalance"));
         if (dlbElement != null) {
-            //TODO: Handle Session affinitiy & failover
+            //TODO: Handle Session affinity & failover
             return DynamicLoadbalanceEndpointFactory.getInstance();
         }
 
@@ -519,17 +523,19 @@ public abstract class EndpointFactory im
      * Helper method to construct children endpoints
      *
      * @param listEndpointElement OMElement representing  the children endpoints
-     * @param parent              Parent endpoint
+     * @param parent Parent endpoint
+     * @param properties bag of properties to pass in any information to the factory
      * @return List of children endpoints
      */
-    protected ArrayList<Endpoint> getEndpoints(OMElement listEndpointElement, Endpoint parent) {
+    protected ArrayList<Endpoint> getEndpoints(OMElement listEndpointElement, Endpoint parent,
+                                               Properties properties) {
 
         ArrayList<Endpoint> endpoints = new ArrayList<Endpoint>();
         ArrayList<String> keys = new ArrayList<String>();
         Iterator iter = listEndpointElement.getChildrenWithName(XMLConfigConstants.ENDPOINT_ELT);
         while (iter.hasNext()) {
             OMElement endptElem = (OMElement) iter.next();
-            Endpoint endpoint = EndpointFactory.getEndpointFromElement(endptElem, true);
+            Endpoint endpoint = EndpointFactory.getEndpointFromElement(endptElem, true, properties);
             if (endpoint instanceof IndirectEndpoint) {
                 String key = ((IndirectEndpoint) endpoint).getKey();
                 if (!keys.contains(key)) {

Modified: synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/config/xml/endpoints/FailoverEndpointFactory.java
URL: http://svn.apache.org/viewvc/synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/config/xml/endpoints/FailoverEndpointFactory.java?rev=999835&r1=999834&r2=999835&view=diff
==============================================================================
--- synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/config/xml/endpoints/FailoverEndpointFactory.java (original)
+++ synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/config/xml/endpoints/FailoverEndpointFactory.java Wed Sep 22 09:37:43 2010
@@ -27,6 +27,7 @@ import org.apache.synapse.endpoints.Fail
 
 import javax.xml.namespace.QName;
 import java.util.List;
+import java.util.Properties;
 
 /**
  * Creates {@link FailoverEndpoint} using a XML configuration.
@@ -47,7 +48,8 @@ public class FailoverEndpointFactory ext
         return instance;
     }
 
-    protected Endpoint createEndpoint(OMElement epConfig, boolean anonymousEndpoint) {
+    protected Endpoint createEndpoint(OMElement epConfig, boolean anonymousEndpoint,
+                                      Properties properties) {
 
         OMElement failoverElement = epConfig.getFirstChildWithName
                 (new QName(SynapseConstants.SYNAPSE_NAMESPACE, "failover"));
@@ -60,7 +62,8 @@ public class FailoverEndpointFactory ext
                 failoverEndpoint.setName(name);
             }
 
-            List<Endpoint> childEndpoints = getEndpoints(failoverElement, failoverEndpoint);
+            List<Endpoint> childEndpoints = getEndpoints(
+                    failoverElement, failoverEndpoint, properties);
             if(childEndpoints == null || childEndpoints.size() == 0){
                 String msg = "Invalid Synapse configuration.\n"
                         + "A FailOver must have child elements, but the FailOver "
@@ -70,7 +73,8 @@ public class FailoverEndpointFactory ext
             }
 
             // set endpoints and return
-            failoverEndpoint.setChildren(getEndpoints(failoverElement, failoverEndpoint));
+            failoverEndpoint.setChildren(getEndpoints(
+                    failoverElement, failoverEndpoint, properties));
             // process the parameters
             processProperties(failoverEndpoint, epConfig);
 

Modified: synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/config/xml/eventing/EventPublisherMediatorFactory.java
URL: http://svn.apache.org/viewvc/synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/config/xml/eventing/EventPublisherMediatorFactory.java?rev=999835&r1=999834&r2=999835&view=diff
==============================================================================
--- synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/config/xml/eventing/EventPublisherMediatorFactory.java (original)
+++ synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/config/xml/eventing/EventPublisherMediatorFactory.java Wed Sep 22 09:37:43 2010
@@ -27,6 +27,7 @@ import org.apache.synapse.config.xml.XML
 import org.apache.synapse.mediators.eventing.EventPublisherMediator;
 
 import javax.xml.namespace.QName;
+import java.util.Properties;
 
 /**
  * Factory for {@link org.apache.synapse.mediators.eventing.EventPublisherMediator} instances.
@@ -44,7 +45,7 @@ public class EventPublisherMediatorFacto
         return TAG_NAME;
     }
 
-    public Mediator createSpecificMediator(OMElement elem) {
+    public Mediator createSpecificMediator(OMElement elem, Properties properties) {
         EventPublisherMediator eventPublisherMediator = new EventPublisherMediator();
         OMAttribute attEventSource = elem.getAttribute(PROP_NAME);
         if (attEventSource != null) {

Modified: synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/config/xml/eventing/EventSourceFactory.java
URL: http://svn.apache.org/viewvc/synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/config/xml/eventing/EventSourceFactory.java?rev=999835&r1=999834&r2=999835&view=diff
==============================================================================
--- synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/config/xml/eventing/EventSourceFactory.java (original)
+++ synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/config/xml/eventing/EventSourceFactory.java Wed Sep 22 09:37:43 2010
@@ -34,6 +34,7 @@ import org.wso2.eventing.exceptions.Even
 
 import javax.xml.namespace.QName;
 import java.util.Iterator;
+import java.util.Properties;
 
 /**
  * <eventSource name="blah">
@@ -54,8 +55,6 @@ public class EventSourceFactory {
             = new QName(XMLConfigConstants.SYNAPSE_NAMESPACE, "subscriptionManager");
     private static final QName PROPERTIES_QNAME =
             new QName(XMLConfigConstants.SYNAPSE_NAMESPACE, "property");
-    private static final QName WS_EVENTING_QNAME
-            = new QName(XMLConfigConstants.SYNAPSE_NAMESPACE, "wsEventing");
     private static final QName SUBSCRIPTION_QNAME =
             new QName(XMLConfigConstants.SYNAPSE_NAMESPACE, "subscription");
     private static final QName FILTER_QNAME =
@@ -71,7 +70,8 @@ public class EventSourceFactory {
     private static final QName ID_QNAME = new QName("id");
     private static final QName EP_URI_QNAME = new QName("uri");
 
-    public static SynapseEventSource createEventSource(OMElement elem) {
+    @SuppressWarnings({"UnusedDeclaration"})
+    public static SynapseEventSource createEventSource(OMElement elem, Properties properties) {
 
         SynapseEventSource eventSource = null;
 
@@ -160,8 +160,9 @@ public class EventSourceFactory {
     /**
      * Generate the static subscriptions
      *
-     * @param elem
-     * @param synapseEventSource
+     * @param elem containing the static subscription configurations
+     * @param synapseEventSource event source to which the static subscriptions belong to
+     * @throws EventException in-case of a failure in creating static subscriptions
      */
     private static void createStaticSubscriptions(OMElement elem,
                                                   SynapseEventSource synapseEventSource)

Modified: synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/deployers/EndpointDeployer.java
URL: http://svn.apache.org/viewvc/synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/deployers/EndpointDeployer.java?rev=999835&r1=999834&r2=999835&view=diff
==============================================================================
--- synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/deployers/EndpointDeployer.java (original)
+++ synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/deployers/EndpointDeployer.java Wed Sep 22 09:37:43 2010
@@ -28,6 +28,7 @@ import org.apache.synapse.config.xml.end
 import org.apache.synapse.endpoints.Endpoint;
 
 import java.io.File;
+import java.util.Properties;
 
 /**
  *  Handles the <code>Endpoint</code> deployment and undeployment tasks
@@ -39,14 +40,15 @@ public class EndpointDeployer extends Ab
     private static Log log = LogFactory.getLog(EndpointDeployer.class);
 
     @Override
-    public String deploySynapseArtifact(OMElement artifactConfig, String fileName) {
+    public String deploySynapseArtifact(OMElement artifactConfig, String fileName,
+                                        Properties properties) {
 
         if (log.isDebugEnabled()) {
             log.debug("Endpoint Deployment from file : " + fileName + " : Started");
         }
 
         try {
-            Endpoint ep = EndpointFactory.getEndpointFromElement(artifactConfig, false);
+            Endpoint ep = EndpointFactory.getEndpointFromElement(artifactConfig, false, properties);
             if (ep != null) {
                 ep.setFileName((new File(fileName)).getName());
                 if (log.isDebugEnabled()) {
@@ -78,14 +80,14 @@ public class EndpointDeployer extends Ab
 
     @Override
     public String updateSynapseArtifact(OMElement artifactConfig, String fileName,
-                                        String existingArtifactName) {
+                                        String existingArtifactName, Properties properties) {
 
         if (log.isDebugEnabled()) {
             log.debug("Endpoint Update from file : " + fileName + " : Started");
         }
 
         try {
-            Endpoint ep = EndpointFactory.getEndpointFromElement(artifactConfig, false);
+            Endpoint ep = EndpointFactory.getEndpointFromElement(artifactConfig, false, properties);
             if (ep != null) {
                 ep.setFileName((new File(fileName)).getName());
                 if (log.isDebugEnabled()) {

Modified: synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/deployers/EventSourceDeployer.java
URL: http://svn.apache.org/viewvc/synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/deployers/EventSourceDeployer.java?rev=999835&r1=999834&r2=999835&view=diff
==============================================================================
--- synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/deployers/EventSourceDeployer.java (original)
+++ synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/deployers/EventSourceDeployer.java Wed Sep 22 09:37:43 2010
@@ -28,6 +28,7 @@ import org.apache.synapse.config.xml.eve
 import org.apache.synapse.eventing.SynapseEventSource;
 
 import java.io.File;
+import java.util.Properties;
 
 /**
  *  Handles the <code>EventSource</code> deployment and undeployment tasks
@@ -39,14 +40,16 @@ public class EventSourceDeployer extends
     private static Log log = LogFactory.getLog(EventSourceDeployer.class);
 
     @Override
-    public String deploySynapseArtifact(OMElement artifactConfig, String fileName) {
+    public String deploySynapseArtifact(OMElement artifactConfig, String fileName,
+                                        Properties properties) {
 
         if (log.isDebugEnabled()) {
             log.debug("EventSource Deployment from file : " + fileName + " : Started");
         }
 
         try {
-            SynapseEventSource es = EventSourceFactory.createEventSource(artifactConfig);
+            SynapseEventSource es = EventSourceFactory.createEventSource(
+                    artifactConfig, properties);
             if (es != null) {
                 es.setFileName((new File(fileName)).getName());
                 if (log.isDebugEnabled()) {
@@ -78,14 +81,15 @@ public class EventSourceDeployer extends
 
     @Override
     public String updateSynapseArtifact(OMElement artifactConfig, String fileName,
-                                        String existingArtifactName) {
+                                        String existingArtifactName, Properties properties) {
 
         if (log.isDebugEnabled()) {
             log.debug("EventSource Update from file : " + fileName + " : Started");
         }
 
         try {
-            SynapseEventSource es = EventSourceFactory.createEventSource(artifactConfig);
+            SynapseEventSource es = EventSourceFactory.createEventSource(
+                    artifactConfig, properties);
             if (es != null) {
                 es.setFileName((new File(fileName)).getName());
                 if (log.isDebugEnabled()) {

Modified: synapse/trunk/java/modules/core/src/test/java/org/apache/synapse/config/xml/EntrySerializationTest.java
URL: http://svn.apache.org/viewvc/synapse/trunk/java/modules/core/src/test/java/org/apache/synapse/config/xml/EntrySerializationTest.java?rev=999835&r1=999834&r2=999835&view=diff
==============================================================================
--- synapse/trunk/java/modules/core/src/test/java/org/apache/synapse/config/xml/EntrySerializationTest.java (original)
+++ synapse/trunk/java/modules/core/src/test/java/org/apache/synapse/config/xml/EntrySerializationTest.java Wed Sep 22 09:37:43 2010
@@ -22,6 +22,8 @@ package org.apache.synapse.config.xml;
 import org.apache.axiom.om.OMElement;
 import org.apache.synapse.config.Entry;
 
+import java.util.Properties;
+
 /**
  *
  */
@@ -31,7 +33,7 @@ public class EntrySerializationTest exte
         String inputXml = "<localEntry xmlns=\"http://synapse.apache.org/ns/2010/04/configuration\" key=\"key\" " +
             "><description>description</description><foo/></localEntry>";
         OMElement inputOM = createOMElement(inputXml);
-        Entry entry = EntryFactory.createEntry(inputOM.cloneOMElement());
+        Entry entry = EntryFactory.createEntry(inputOM.cloneOMElement(), new Properties());
         OMElement resultOM = EntrySerializer.serializeEntry(entry, null);
         assertTrue(compare(resultOM, inputOM));
     }
@@ -40,7 +42,7 @@ public class EntrySerializationTest exte
         String inputXml = "<localEntry xmlns=\"http://synapse.apache.org/ns/2010/04/configuration\" key=\"key\"" +
             "><description>description</description></localEntry>";
         OMElement inputOM = createOMElement(inputXml);
-        Entry entry = EntryFactory.createEntry(inputOM.cloneOMElement());
+        Entry entry = EntryFactory.createEntry(inputOM.cloneOMElement(), new Properties());
         OMElement resultOM = EntrySerializer.serializeEntry(entry, null);
         assertTrue(compare(resultOM, inputOM));
     }
@@ -49,7 +51,7 @@ public class EntrySerializationTest exte
         String inputXml = "<localEntry xmlns=\"http://synapse.apache.org/ns/2010/04/configuration\" key=\"key\" " +
             "/>";
         OMElement inputOM = createOMElement(inputXml);
-        Entry entry = EntryFactory.createEntry(inputOM.cloneOMElement());
+        Entry entry = EntryFactory.createEntry(inputOM.cloneOMElement(), new Properties());
         OMElement resultOM = EntrySerializer.serializeEntry(entry, null);
         assertTrue(compare(resultOM, inputOM));
     }