Author: supun Date: Fri Jun 5 01:30:44 2009 New Revision: 37859 URL: http://wso2.org/svn/browse/wso2?view=rev&revision=37859
Log: Fixing issue with Enabling Statistics for Main Sequence and Fault Sequence when they are not explicitly defined in the Synapse configuration Modified: branches/synapse/1.3-wso2v1/modules/core/src/main/java/org/apache/synapse/config/xml/SynapseXMLConfigurationFactory.java Modified: branches/synapse/1.3-wso2v1/modules/core/src/main/java/org/apache/synapse/config/xml/SynapseXMLConfigurationFactory.java URL: http://wso2.org/svn/browse/wso2/branches/synapse/1.3-wso2v1/modules/core/src/main/java/org/apache/synapse/config/xml/SynapseXMLConfigurationFactory.java?rev=37859&r1=37858&r2=37859&view=diff ============================================================================== --- branches/synapse/1.3-wso2v1/modules/core/src/main/java/org/apache/synapse/config/xml/SynapseXMLConfigurationFactory.java (original) +++ branches/synapse/1.3-wso2v1/modules/core/src/main/java/org/apache/synapse/config/xml/SynapseXMLConfigurationFactory.java Fri Jun 5 01:30:44 2009 @@ -27,6 +27,8 @@ import org.apache.synapse.Startup; import org.apache.synapse.SynapseConstants; import org.apache.synapse.SynapseException; +import org.apache.synapse.aspects.AspectConfiguration; +import org.apache.synapse.aspects.AspectConfigurable; import org.apache.synapse.eventing.SynapseEventSource; import org.apache.synapse.config.Entry; import org.apache.synapse.config.SynapseConfigUtils; @@ -61,7 +63,10 @@ SequenceMediator rootSequence = new SequenceMediator(); rootSequence.setName(org.apache.synapse.SynapseConstants.MAIN_SEQUENCE_KEY); - + + // aspect configuration + AspectConfiguration configuration = new AspectConfiguration(rootSequence.getName()); + rootSequence.configure(configuration); Iterator iter = definitions.getChildren(); while (iter.hasNext()) { @@ -218,6 +223,9 @@ main.addChild(new LogMediator()); main.addChild(new DropMediator()); config.addSequence(SynapseConstants.MAIN_SEQUENCE_KEY, main); + // set the aspect configuration + AspectConfiguration configuration = new AspectConfiguration(main.getName()); + main.configure(configuration); } /** @@ -259,6 +267,11 @@ fault.addChild(log); fault.addChild(new DropMediator()); + + // set aspect configuration + AspectConfiguration configuration = new AspectConfiguration(fault.getName()); + fault.configure(configuration); + config.addSequence(org.apache.synapse.SynapseConstants.FAULT_SEQUENCE_KEY, fault); } _______________________________________________ Esb-java-dev mailing list [email protected] https://wso2.org/cgi-bin/mailman/listinfo/esb-java-dev
