Author: hiranya
Date: Tue Apr  6 04:46:18 2010
New Revision: 931013

URL: http://svn.apache.org/viewvc?rev=931013&view=rev
Log:
Forcing the indirect endpoint to reload the endpoint from the 
SynapseConfiguration if it is defined statically


Modified:
    
synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/endpoints/IndirectEndpoint.java

Modified: 
synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/endpoints/IndirectEndpoint.java
URL: 
http://svn.apache.org/viewvc/synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/endpoints/IndirectEndpoint.java?rev=931013&r1=931012&r2=931013&view=diff
==============================================================================
--- 
synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/endpoints/IndirectEndpoint.java
 (original)
+++ 
synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/endpoints/IndirectEndpoint.java
 Tue Apr  6 04:46:18 2010
@@ -23,7 +23,6 @@ import org.apache.axis2.context.Configur
 import org.apache.axis2.description.Parameter;
 import org.apache.synapse.MessageContext;
 import org.apache.synapse.SynapseConstants;
-import org.apache.synapse.ManagedLifecycle;
 import org.apache.synapse.core.axis2.Axis2MessageContext;
 import org.apache.synapse.core.axis2.Axis2SynapseEnvironment;
 import org.apache.synapse.core.SynapseEnvironment;
@@ -138,6 +137,9 @@ public class IndirectEndpoint extends Ab
                     if (!entry.isCached() || entry.isExpired()) {
                         reLoad = true;
                     }
+                } else {
+                    // If the endpoint is static we should reload it from the 
Synapse config
+                    reLoad = true;
                 }
             }
 
@@ -148,9 +150,8 @@ public class IndirectEndpoint extends Ab
                 }
 
                 realEndpoint = synCfg.getEndpoint(key);
-                if (realEndpoint != null && !realEndpoint.isInitialized()
-                        && realEndpoint instanceof ManagedLifecycle) {
-                    ((ManagedLifecycle) realEndpoint).init(synapseEnvironment);
+                if (realEndpoint != null && !realEndpoint.isInitialized()) {
+                    realEndpoint.init(synapseEnvironment);
                 }
             }
         }


Reply via email to