Author: ruwan Date: Wed Apr 22 04:25:44 2009 New Revision: 33892 URL: http://wso2.org/svn/browse/wso2?view=rev&revision=33892
Log: Moving to the synapse trunk == custom branch with clustereing changes Modified: trunk/esb/java/modules/core/pom.xml trunk/esb/java/modules/core/src/main/java/org/wso2/esb/core/ESBActivator.java trunk/esb/java/modules/distribution/pom.xml trunk/esb/java/modules/distribution/src/main/assembly/dist.xml trunk/esb/java/pom.xml Modified: trunk/esb/java/modules/core/pom.xml URL: http://wso2.org/svn/browse/wso2/trunk/esb/java/modules/core/pom.xml?rev=33892&r1=33891&r2=33892&view=diff ============================================================================== --- trunk/esb/java/modules/core/pom.xml (original) +++ trunk/esb/java/modules/core/pom.xml Wed Apr 22 04:25:44 2009 @@ -28,7 +28,7 @@ <dependency> <groupId>org.apache.synapse</groupId> <artifactId>synapse-core</artifactId> - <version>1.2.wso2v1</version> + <version>1.3-wso2v1</version> </dependency> <dependency> Modified: trunk/esb/java/modules/core/src/main/java/org/wso2/esb/core/ESBActivator.java URL: http://wso2.org/svn/browse/wso2/trunk/esb/java/modules/core/src/main/java/org/wso2/esb/core/ESBActivator.java?rev=33892&r1=33891&r2=33892&view=diff ============================================================================== --- trunk/esb/java/modules/core/src/main/java/org/wso2/esb/core/ESBActivator.java (original) +++ trunk/esb/java/modules/core/src/main/java/org/wso2/esb/core/ESBActivator.java Wed Apr 22 04:25:44 2009 @@ -7,9 +7,7 @@ import org.apache.axis2.engine.AxisConfiguration; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; -import org.apache.synapse.ServerManager; -import org.apache.synapse.Startup; -import org.apache.synapse.SynapseConstants; +import org.apache.synapse.*; import org.apache.synapse.config.SynapseConfiguration; import org.apache.synapse.core.SynapseEnvironment; import org.osgi.framework.*; @@ -29,16 +27,6 @@ public void start(BundleContext bundleContext) throws Exception { this.bundleContext = bundleContext; bundleContext.addBundleListener(this); - if (System.getProperty("esb.sample") != null) { - String carbonHome; - if ((carbonHome = System.getProperty("carbon.home")).equals(".")) { - carbonHome = new File(".").getAbsolutePath(); - } - ServerManager.getInstance().setSynapseHome(carbonHome); - ServerManager.getInstance().setSynapseXMLPath("repository" + File.separator - + "samples" + File.separator + "synapse_sample_" - + System.getProperty("esb.sample") + ".xml"); - } } public void stop(BundleContext bundleContext) throws Exception { @@ -63,44 +51,62 @@ } private void initESB() throws AxisFault { - SynapseConfiguration synConfig = null; - ServiceReference ref = bundleContext.getServiceReference(ConfigurationContextService.class.getName()); - Object serviceObject = bundleContext.getService(ref); - if (serviceObject instanceof ConfigurationContextService) { - ConfigurationContext configContext = ((ConfigurationContextService) - serviceObject).getServerConfigContext(); - AxisConfiguration axisConf = configContext.getAxisConfiguration(); - - AxisServiceGroup serviceGroup = axisConf.getServiceGroup(SynapseConstants.SYNAPSE_SERVICE_NAME); - serviceGroup.addParameter("hiddenService", "true"); - - Parameter synEnv - = axisConf.getParameter(SynapseConstants.SYNAPSE_ENV); - Parameter synCfg - = axisConf.getParameter(SynapseConstants.SYNAPSE_CONFIG); - - String message = "Unable to initialize the Synapse Configuration : Cannot find the "; - if (synCfg == null || synCfg.getValue() == null - || !(synCfg.getValue() instanceof SynapseConfiguration)) { - return; - } else { - synConfig = (SynapseConfiguration) synCfg.getValue(); - } - - if (synEnv == null || synEnv.getValue() == null - || !(synEnv.getValue() instanceof SynapseEnvironment)) { - return; - } else { - - ((SynapseEnvironment) synEnv.getValue()).setInitialized(true); - - // initialize the startups - for (Startup stp : synConfig.getStartups()) { - if (stp != null) { - stp.init((SynapseEnvironment) synEnv.getValue()); - } - } - } + ServiceReference ref = bundleContext.getServiceReference( + ConfigurationContextService.class.getName()); + Object serviceObject = bundleContext.getService(ref); + if (serviceObject instanceof ConfigurationContextService) { + ConfigurationContext configContext = ((ConfigurationContextService) + serviceObject).getServerConfigContext(); + + log.info("Initializing Synapse"); + ServerConfigurationInformation configurationInformation = + ServerConfigurationInformationFactory.createServerConfigurationInformation( + configContext.getAxisConfiguration()); + + if (System.getProperty("esb.sample") != null) { + configurationInformation.setSynapseXMLLocation("repository" + File.separator + + "samples" + File.separator + "synapse_sample_" + + System.getProperty("esb.sample") + ".xml"); } + + ServerManager serverManager = ServerManager.getInstance(); + ServerContextInformation contextInfo = new ServerContextInformation(configContext); + serverManager.init(configurationInformation, contextInfo); + serverManager.start(); + + AxisConfiguration axisConf = configContext.getAxisConfiguration(); + + AxisServiceGroup serviceGroup = axisConf.getServiceGroup( + SynapseConstants.SYNAPSE_SERVICE_NAME); + serviceGroup.addParameter("hiddenService", "true"); + +// Parameter synEnv +// = axisConf.getParameter(SynapseConstants.SYNAPSE_ENV); +// Parameter synCfg +// = axisConf.getParameter(SynapseConstants.SYNAPSE_CONFIG); +// +// String message = "Unable to initialize the Synapse Configuration : Cannot find the "; +// if (synCfg == null || synCfg.getValue() == null +// || !(synCfg.getValue() instanceof SynapseConfiguration)) { +// return; +// } else { +// synConfig = (SynapseConfiguration) synCfg.getValue(); +// } +// +// if (synEnv == null || synEnv.getValue() == null +// || !(synEnv.getValue() instanceof SynapseEnvironment)) { +// return; +// } else { +// +// ((SynapseEnvironment) synEnv.getValue()).setInitialized(true); +// +// // initialize the startups +// for (Startup stp : synConfig.getStartups()) { +// if (stp != null) { +// stp.init((SynapseEnvironment) synEnv.getValue()); +// } +// } +// } + } } } Modified: trunk/esb/java/modules/distribution/pom.xml URL: http://wso2.org/svn/browse/wso2/trunk/esb/java/modules/distribution/pom.xml?rev=33892&r1=33891&r2=33892&view=diff ============================================================================== --- trunk/esb/java/modules/distribution/pom.xml (original) +++ trunk/esb/java/modules/distribution/pom.xml Wed Apr 22 04:25:44 2009 @@ -52,13 +52,7 @@ <groupId>org.apache.synapse</groupId> <artifactId>synapse-core</artifactId> <version>${synapse.version}</version> - </dependency> - - <dependency> - <groupId>org.apache.synapse</groupId> - <artifactId>org.apache.synapse.module</artifactId> - <version>${synapse.version}</version> - </dependency> + </dependency> <!-- Transport management dependencies --> Modified: trunk/esb/java/modules/distribution/src/main/assembly/dist.xml URL: http://wso2.org/svn/browse/wso2/trunk/esb/java/modules/distribution/src/main/assembly/dist.xml?rev=33892&r1=33891&r2=33892&view=diff ============================================================================== --- trunk/esb/java/modules/distribution/src/main/assembly/dist.xml (original) +++ trunk/esb/java/modules/distribution/src/main/assembly/dist.xml Wed Apr 22 04:25:44 2009 @@ -196,7 +196,6 @@ <!-- Synapse bundles --> <include>org.apache.synapse:synapse-transports:jar</include> <include>org.apache.synapse:synapse-core:jar</include> - <include>org.apache.synapse:org.apache.synapse.module:jar</include> <include>org.apache.synapse:synapse-utils:jar</include> <include>org.apache.synapse:synapse-tasks:jar</include> <include>org.apache.synapse:synapse-extensions:jar</include> Modified: trunk/esb/java/pom.xml URL: http://wso2.org/svn/browse/wso2/trunk/esb/java/pom.xml?rev=33892&r1=33891&r2=33892&view=diff ============================================================================== --- trunk/esb/java/pom.xml (original) +++ trunk/esb/java/pom.xml Wed Apr 22 04:25:44 2009 @@ -229,7 +229,7 @@ <opencsv.version>1.8</opencsv.version> <poi.version>3.0-FINAL</poi.version> <carbon.version>SNAPSHOT</carbon.version> - <synapse.version>1.2.wso2v1</synapse.version> + <synapse.version>1.3-wso2v1</synapse.version> <esb.version>SNAPSHOT</esb.version> </properties> </project> _______________________________________________ Esb-java-dev mailing list [email protected] https://wso2.org/cgi-bin/mailman/listinfo/esb-java-dev
