Author: ruwan Date: Sun May 3 20:50:51 2009 New Revision: 34741 URL: http://wso2.org/svn/browse/wso2?view=rev&revision=34741
Log: sync up with the synapse trunk Modified: branches/synapse/1.3-wso2v1/modules/core/src/main/java/org/apache/synapse/mediators/builtin/SendMediator.java Modified: branches/synapse/1.3-wso2v1/modules/core/src/main/java/org/apache/synapse/mediators/builtin/SendMediator.java URL: http://wso2.org/svn/browse/wso2/branches/synapse/1.3-wso2v1/modules/core/src/main/java/org/apache/synapse/mediators/builtin/SendMediator.java?rev=34741&r1=34740&r2=34741&view=diff ============================================================================== --- branches/synapse/1.3-wso2v1/modules/core/src/main/java/org/apache/synapse/mediators/builtin/SendMediator.java (original) +++ branches/synapse/1.3-wso2v1/modules/core/src/main/java/org/apache/synapse/mediators/builtin/SendMediator.java Sun May 3 20:50:51 2009 @@ -32,7 +32,7 @@ * behaviors are completely governed by that endpoint. If there is no endpoint available, * SendMediator will send the message to the implicitly stated destination. */ -public class SendMediator extends AbstractMediator { +public class SendMediator extends AbstractMediator implements ManagedLifecycle { private Endpoint endpoint = null; @@ -89,14 +89,14 @@ } public void init(SynapseEnvironment synapseEnvironment) { - if (endpoint instanceof ManagedLifecycle) { - ((ManagedLifecycle) endpoint).init(synapseEnvironment); + if (endpoint != null) { + endpoint.init(synapseEnvironment); } } public void destroy() { - if (endpoint instanceof ManagedLifecycle) { - ((ManagedLifecycle) endpoint).destroy(); + if (endpoint != null) { + endpoint.destroy(); } } } _______________________________________________ Esb-java-dev mailing list [email protected] https://wso2.org/cgi-bin/mailman/listinfo/esb-java-dev
