You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@synapse.apache.org by as...@apache.org on 2006/05/22 14:26:19 UTC
svn commit: r408646 - in /incubator/synapse/trunk/java: bin/ etc/
modules/core/src/org/apache/synapse/core/axis2/
modules/extensions/test/org/apache/synapse/spring/ repository/conf/
repository/conf/sample/
Author: asankha
Date: Mon May 22 05:26:18 2006
New Revision: 408646
URL: http://svn.apache.org/viewvc?rev=408646&view=rev
Log:
Fix Synapse startup to always use synapse.xml system property for the XML location
Fix path names (in config files) to be relative to SYNAPSE_HOME and make synapse start in it
Remove unwanted dependencies e.g. Xalan
Added:
incubator/synapse/trunk/java/repository/conf/sample/synapse_spring_unittest.xml
- copied unchanged from r408554, incubator/synapse/trunk/java/repository/conf/sample/synapse_sample_3.xml
Removed:
incubator/synapse/trunk/java/repository/conf/sample/synapse_sample_3.xml
Modified:
incubator/synapse/trunk/java/bin/synapse.bat
incubator/synapse/trunk/java/etc/project.properties
incubator/synapse/trunk/java/etc/project.xml
incubator/synapse/trunk/java/modules/core/src/org/apache/synapse/core/axis2/Axis2MessageContextFinder.java
incubator/synapse/trunk/java/modules/core/src/org/apache/synapse/core/axis2/SynapseAxis2Interceptor.java
incubator/synapse/trunk/java/modules/extensions/test/org/apache/synapse/spring/SpringMediatorTest.java
incubator/synapse/trunk/java/repository/conf/axis2.xml
incubator/synapse/trunk/java/repository/conf/sample/synapse_sample_1.xml
incubator/synapse/trunk/java/repository/conf/sample/synapse_sample_2.xml
Modified: incubator/synapse/trunk/java/bin/synapse.bat
URL: http://svn.apache.org/viewvc/incubator/synapse/trunk/java/bin/synapse.bat?rev=408646&r1=408645&r2=408646&view=diff
==============================================================================
--- incubator/synapse/trunk/java/bin/synapse.bat (original)
+++ incubator/synapse/trunk/java/bin/synapse.bat Mon May 22 05:26:18 2006
@@ -83,11 +83,18 @@
if "%_JAVACMD%" == "" set _JAVACMD=java.exe
:runSynapse
+rem set the classes by looping through the libs
+setlocal EnableDelayedExpansion
+set SYNAPSE_CLASS_PATH=%SYNAPSE_HOME%
+FOR %%C in (%SYNAPSE_HOME%\lib\*.jar) DO set SYNAPSE_CLASS_PATH=!SYNAPSE_CLASS_PATH!;%%~fC
+set SYNAPSE_CLASS_PATH=%SYNAPSE_HOME%\conf;%SYNAPSE_CLASS_PATH%
+
+rem if a sample configuration is not specified, use default
+if "%_SYNAPSE_XML%" == "" set _SYNAPSE_XML=-Dsynapse.xml=%SYNAPSE_HOME%\synapse_repository\conf\synapse.xml
+
@echo on
-setlocal
cd %SYNAPSE_HOME%
-"%_JAVACMD%" %_SYNAPSE_XML% -Daxis2.xml=%SYNAPSE_HOME%\synapse_repository\conf\axis2.xml -Djava.ext.dirs=%SYNAPSE_HOME%\lib;%EXT_DIRS%;%SYNAPSE_HOME% -cp %SYNAPSE_HOME%\lib org.apache.axis2.transport.http.SimpleHTTPServer %SYNAPSE_CMD_LINE_ARGS%
-endlocal
+"%_JAVACMD%" %_SYNAPSE_XML% -Daxis2.xml=%SYNAPSE_HOME%\synapse_repository\conf\axis2.xml -Djava.endorsed.dirs=%SYNAPSE_HOME%\lib\endorsed -cp %SYNAPSE_CLASS_PATH% org.apache.axis2.transport.http.SimpleHTTPServer %SYNAPSE_CMD_LINE_ARGS%
goto end
:end
Modified: incubator/synapse/trunk/java/etc/project.properties
URL: http://svn.apache.org/viewvc/incubator/synapse/trunk/java/etc/project.properties?rev=408646&r1=408645&r2=408646&view=diff
==============================================================================
--- incubator/synapse/trunk/java/etc/project.properties (original)
+++ incubator/synapse/trunk/java/etc/project.properties Mon May 22 05:26:18 2006
@@ -23,7 +23,7 @@
# JUnit
# -------------------------------------------------------------------
# explicit setting of Sax parser as below is a hack to avoid Junit from loading its own parsers ignoring maven.test.excludeXmlApis
-maven.junit.jvmargs=-Djava.awt.headless=true
+maven.junit.jvmargs=-Djava.awt.headless=true -Dorg.xml.sax.driver=org.apache.xerces.parsers.SAXParser
maven.junit.fork=yes
maven.test.excludeXmlApis=yes
#maven.junit.dir=${basedir}/modules/core
@@ -39,6 +39,7 @@
# -------------------------------------------------------------------
ant.version=1.6.5
axis.wsdl4j.version=1.2
+wsdl4j.version=1.5.2
axis2.version=1.0
axiom.version=1.0
@@ -46,7 +47,7 @@
XmlSchema.version=1.0.2
wss4j.version=1.5.0
commons.codec.version=1.3
-commons.discovery.version=0.2
+commons.fileupload.version=1.0
commons.httpclient.version=3.0
commons.logging.version=1.0.4
geronimo.spec.activation.version=1.0.2-rc4
@@ -62,7 +63,6 @@
stax.impl.artifactid=wstx
stax.impl.version=asl-2.9.3
stax.api.version=1.0
-xalan.version=2.7.0
xerces.version=2.8.0
xmlunit.version=1.0
annogen.version=0.1.0
Modified: incubator/synapse/trunk/java/etc/project.xml
URL: http://svn.apache.org/viewvc/incubator/synapse/trunk/java/etc/project.xml?rev=408646&r1=408645&r2=408646&view=diff
==============================================================================
--- incubator/synapse/trunk/java/etc/project.xml (original)
+++ incubator/synapse/trunk/java/etc/project.xml Mon May 22 05:26:18 2006
@@ -102,14 +102,6 @@
</properties>
</dependency>
<dependency>
- <groupId>commons-discovery</groupId>
- <artifactId>commons-discovery</artifactId>
- <version>${commons.discovery.version}</version>
- <properties>
- <module>true</module>
- </properties>
- </dependency>
- <dependency>
<groupId>commons-codec</groupId>
<artifactId>commons-codec</artifactId>
<version>${commons.codec.version}</version>
@@ -159,6 +151,14 @@
</dependency>
<dependency>
+ <groupId>wsdl4j</groupId>
+ <artifactId>wsdl4j</artifactId>
+ <version>${wsdl4j.version}</version>
+ <properties>
+ <module>true</module>
+ </properties>
+ </dependency>
+ <dependency>
<groupId>axis</groupId>
<artifactId>axis-wsdl4j</artifactId>
<version>${axis.wsdl4j.version}</version>
@@ -167,6 +167,22 @@
</properties>
</dependency>
<dependency>
+ <groupId>commons-fileupload</groupId>
+ <artifactId>commons-fileupload</artifactId>
+ <version>${commons.fileupload.version}</version>
+ <properties>
+ <module>true</module>
+ </properties>
+ </dependency>
+ <dependency>
+ <groupId>servletapi</groupId>
+ <artifactId>servletapi</artifactId>
+ <version>${servletapi.version}</version>
+ <properties>
+ <module>true</module>
+ </properties>
+ </dependency>
+ <dependency>
<groupId>geronimo-spec</groupId>
<artifactId>geronimo-spec-javamail</artifactId>
<version>${geronimo.spec.javamail.version}</version>
@@ -186,14 +202,6 @@
<groupId>geronimo-spec</groupId>
<artifactId>geronimo-spec-jms</artifactId>
<version>${geronimo.spec.jms.version}</version>
- <properties>
- <module>true</module>
- </properties>
- </dependency>
- <dependency>
- <groupId>xalan</groupId>
- <artifactId>xalan</artifactId>
- <version>2.6.0</version>
<properties>
<module>true</module>
</properties>
Modified: incubator/synapse/trunk/java/modules/core/src/org/apache/synapse/core/axis2/Axis2MessageContextFinder.java
URL: http://svn.apache.org/viewvc/incubator/synapse/trunk/java/modules/core/src/org/apache/synapse/core/axis2/Axis2MessageContextFinder.java?rev=408646&r1=408645&r2=408646&view=diff
==============================================================================
--- incubator/synapse/trunk/java/modules/core/src/org/apache/synapse/core/axis2/Axis2MessageContextFinder.java (original)
+++ incubator/synapse/trunk/java/modules/core/src/org/apache/synapse/core/axis2/Axis2MessageContextFinder.java Mon May 22 05:26:18 2006
@@ -72,13 +72,14 @@
SynapseConfiguration synCfg = null;
AxisConfiguration axisCfg = mc.getConfigurationContext().getAxisConfiguration();
- // if the Axis2 configuration defines a parameter for the Synapse config, fetch it
- Parameter param = axisCfg.getParameter(SYNAPSE_CONFIGURATION);
- if (param != null) {
- String config = ((String) param.getValue()).trim();
- log.info("Axis2 configuration specifies the '" + SYNAPSE_CONFIGURATION + "' parameter as " + config);
+ // if the system property synapse.xml is specified, use it.. else default config
+ String config = System.getProperty(Constants.SYNAPSE_XML);
+ if (config != null) {
+ log.info("System property '" + Constants.SYNAPSE_XML +
+ "' specifies synapse configuration as " + config);
synCfg = SynapseConfigurationBuilder.getConfiguration(config);
} else {
+ log.warn("System property '" + Constants.SYNAPSE_XML + "' is not specified. Using default configuration");
synCfg = SynapseConfigurationBuilder.getDefaultConfiguration();
}
Modified: incubator/synapse/trunk/java/modules/core/src/org/apache/synapse/core/axis2/SynapseAxis2Interceptor.java
URL: http://svn.apache.org/viewvc/incubator/synapse/trunk/java/modules/core/src/org/apache/synapse/core/axis2/SynapseAxis2Interceptor.java?rev=408646&r1=408645&r2=408646&view=diff
==============================================================================
--- incubator/synapse/trunk/java/modules/core/src/org/apache/synapse/core/axis2/SynapseAxis2Interceptor.java (original)
+++ incubator/synapse/trunk/java/modules/core/src/org/apache/synapse/core/axis2/SynapseAxis2Interceptor.java Mon May 22 05:26:18 2006
@@ -54,13 +54,14 @@
SynapseConfiguration synCfg = null;
- // if the Axis2 configuration defines a parameter for the Synapse config, fetch it
- Parameter param = axisCfg.getParameter(SYNAPSE_CONFIGURATION);
- if (param != null) {
- String config = ((String) param.getValue()).trim();
- log.info("Axis2 configuration specifies the '" + SYNAPSE_CONFIGURATION + "' parameter as " + config);
+ // if the system property synapse.xml is specified, use it.. else default config
+ String config = System.getProperty(Constants.SYNAPSE_XML);
+ if (config != null) {
+ log.info("System property '" + Constants.SYNAPSE_XML +
+ "' specifies synapse configuration as " + config);
synCfg = SynapseConfigurationBuilder.getConfiguration(config);
} else {
+ log.warn("System property '" + Constants.SYNAPSE_XML + "' is not specified. Using default configuration");
synCfg = SynapseConfigurationBuilder.getDefaultConfiguration();
}
Modified: incubator/synapse/trunk/java/modules/extensions/test/org/apache/synapse/spring/SpringMediatorTest.java
URL: http://svn.apache.org/viewvc/incubator/synapse/trunk/java/modules/extensions/test/org/apache/synapse/spring/SpringMediatorTest.java?rev=408646&r1=408645&r2=408646&view=diff
==============================================================================
--- incubator/synapse/trunk/java/modules/extensions/test/org/apache/synapse/spring/SpringMediatorTest.java (original)
+++ incubator/synapse/trunk/java/modules/extensions/test/org/apache/synapse/spring/SpringMediatorTest.java Mon May 22 05:26:18 2006
@@ -36,7 +36,7 @@
MessageContext msgCtx = TestUtils.getTestContext("<dummy/>");
msgCtx.setConfiguration(
- SynapseConfigurationBuilder.getConfiguration("./../../repository/conf/sample/synapse_sample_3.xml"));
+ SynapseConfigurationBuilder.getConfiguration("./../../repository/conf/sample/synapse_spring_unittest.xml"));
msgCtx.getConfiguration().getMainMediator().mediate(msgCtx);
assertEquals(TestMediateHandlerImpl.invokeCount, 202);
Modified: incubator/synapse/trunk/java/repository/conf/axis2.xml
URL: http://svn.apache.org/viewvc/incubator/synapse/trunk/java/repository/conf/axis2.xml?rev=408646&r1=408645&r2=408646&view=diff
==============================================================================
--- incubator/synapse/trunk/java/repository/conf/axis2.xml (original)
+++ incubator/synapse/trunk/java/repository/conf/axis2.xml Mon May 22 05:26:18 2006
@@ -10,10 +10,6 @@
<!-- Uncomment this to enable REST support -->
<!-- <parameter name="enableREST" locked="false">true</parameter>-->
-
- <!-- Location of the SynapseRepository -->
- <parameter name="SynapseConfiguration" locked="false">./../synapse_repository/conf/synapse.xml</parameter>
-
<parameter name="userName" locked="false">admin</parameter>
<parameter name="password" locked="false">axis2</parameter>
Modified: incubator/synapse/trunk/java/repository/conf/sample/synapse_sample_1.xml
URL: http://svn.apache.org/viewvc/incubator/synapse/trunk/java/repository/conf/sample/synapse_sample_1.xml?rev=408646&r1=408645&r2=408646&view=diff
==============================================================================
--- incubator/synapse/trunk/java/repository/conf/sample/synapse_sample_1.xml (original)
+++ incubator/synapse/trunk/java/repository/conf/sample/synapse_sample_1.xml Mon May 22 05:26:18 2006
@@ -10,7 +10,7 @@
<set-property name="correlate/label" value="customquote"/>
<!-- transform the custom quote into a standard quote requst -->
- <transform xslt="file:../synapse_repository/conf/sample/transform.xslt"/>
+ <transform xslt="file:synapse_repository/conf/sample/transform.xslt"/>
<!-- send message to real endpoint and stop -->
<send/>
@@ -19,7 +19,7 @@
<sequence name="customresponse">
<!-- transform the custom quote into a standard quote requst -->
- <transform xslt="file:../synapse_repository/conf/sample/transform_back.xslt"/>
+ <transform xslt="file:synapse_repository/conf/sample/transform_back.xslt"/>
<!-- now send the custom response back to the client and stop -->
<send/>
Modified: incubator/synapse/trunk/java/repository/conf/sample/synapse_sample_2.xml
URL: http://svn.apache.org/viewvc/incubator/synapse/trunk/java/repository/conf/sample/synapse_sample_2.xml?rev=408646&r1=408645&r2=408646&view=diff
==============================================================================
--- incubator/synapse/trunk/java/repository/conf/sample/synapse_sample_2.xml (original)
+++ incubator/synapse/trunk/java/repository/conf/sample/synapse_sample_2.xml Mon May 22 05:26:18 2006
@@ -10,7 +10,7 @@
<sequence name="customrequest">
<!-- is this a valid custom request ? -->
- <validate schema="file:../synapse_repository/conf/sample/validate.xsd">
+ <validate schema="file:synapse_repository/conf/sample/validate.xsd">
<on-fail>
<!-- if the request does not validate againt schema throw a fault -->
<makefault>
@@ -43,7 +43,7 @@
<set-property name="correlate/label" value="customquote"/>
<!-- transform the custom quote into a standard quote requst -->
- <transform xslt="file:../synapse_repository/conf/sample/transform.xslt"/>
+ <transform xslt="file:synapse_repository/conf/sample/transform.xslt"/>
<log level="custom">
<property name="Text" value="Sending quote request"/>
@@ -60,7 +60,7 @@
<sequence name="customresponse">
<!-- transform the custom quote into a standard quote requst -->
- <transform xslt="file:../synapse_repository/conf/sample/transform_back.xslt"/>
+ <transform xslt="file:synapse_repository/conf/sample/transform_back.xslt"/>
<!-- now send the custom response back to the client and stop -->
<send/>
---------------------------------------------------------------------
To unsubscribe, e-mail: synapse-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: synapse-dev-help@ws.apache.org