You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@synapse.apache.org by ru...@apache.org on 2009/08/17 19:16:03 UTC

svn commit: r805051 - in /synapse/trunk/java: modules/distribution/src/main/bin/ repository/conf/ repository/conf/synapse-config/ repository/conf/synapse-config/sequences/

Author: ruwan
Date: Mon Aug 17 17:16:03 2009
New Revision: 805051

URL: http://svn.apache.org/viewvc?rev=805051&view=rev
Log:
Making the synapse artifact repository the default configuration building mechanism

Added:
    synapse/trunk/java/repository/conf/synapse-config/
    synapse/trunk/java/repository/conf/synapse-config/registry.xml
    synapse/trunk/java/repository/conf/synapse-config/sequences/
    synapse/trunk/java/repository/conf/synapse-config/sequences/fault.xml
    synapse/trunk/java/repository/conf/synapse-config/sequences/main.xml
Modified:
    synapse/trunk/java/modules/distribution/src/main/bin/synapse.bat
    synapse/trunk/java/modules/distribution/src/main/bin/synapse.sh
    synapse/trunk/java/repository/conf/synapse.xml
    synapse/trunk/java/repository/conf/wrapper.conf

Modified: synapse/trunk/java/modules/distribution/src/main/bin/synapse.bat
URL: http://svn.apache.org/viewvc/synapse/trunk/java/modules/distribution/src/main/bin/synapse.bat?rev=805051&r1=805050&r2=805051&view=diff
==============================================================================
--- synapse/trunk/java/modules/distribution/src/main/bin/synapse.bat (original)
+++ synapse/trunk/java/modules/distribution/src/main/bin/synapse.bat Mon Aug 17 17:16:03 2009
@@ -23,7 +23,7 @@
 rem %~dp0 is expanded pathname of the current script under NT
 set SYNAPSE_HOME=%~dps0..
 
-set _SYNAPSE_XML="%SYNAPSE_HOME%\repository\conf\synapse.xml"
+set _SYNAPSE_XML="%SYNAPSE_HOME%\repository\conf\synapse-config"
 set _XDEBUG=
 set _SERVER_NAME=
 

Modified: synapse/trunk/java/modules/distribution/src/main/bin/synapse.sh
URL: http://svn.apache.org/viewvc/synapse/trunk/java/modules/distribution/src/main/bin/synapse.sh?rev=805051&r1=805050&r2=805051&view=diff
==============================================================================
--- synapse/trunk/java/modules/distribution/src/main/bin/synapse.sh (original)
+++ synapse/trunk/java/modules/distribution/src/main/bin/synapse.sh Mon Aug 17 17:16:03 2009
@@ -120,8 +120,8 @@
 # endorsed dir
 SYNAPSE_ENDORSED=$SYNAPSE_HOME/lib/endorsed
 
-# synapse.xml
-SYNAPSE_XML=$SYNAPSE_HOME/repository/conf/synapse.xml
+# synapse config
+SYNAPSE_XML=$SYNAPSE_HOME/repository/conf/synapse-config
 
 # server name
 SERVER_NAME=

Added: synapse/trunk/java/repository/conf/synapse-config/registry.xml
URL: http://svn.apache.org/viewvc/synapse/trunk/java/repository/conf/synapse-config/registry.xml?rev=805051&view=auto
==============================================================================
--- synapse/trunk/java/repository/conf/synapse-config/registry.xml (added)
+++ synapse/trunk/java/repository/conf/synapse-config/registry.xml Mon Aug 17 17:16:03 2009
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>       
+<!--
+  ~  Licensed to the Apache Software Foundation (ASF) under one
+  ~  or more contributor license agreements.  See the NOTICE file
+  ~  distributed with this work for additional information
+  ~  regarding copyright ownership.  The ASF licenses this file
+  ~  to you under the Apache License, Version 2.0 (the
+  ~  "License"); you may not use this file except in compliance
+  ~  with the License.  You may obtain a copy of the License at
+  ~
+  ~   http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~  Unless required by applicable law or agreed to in writing,
+  ~  software distributed under the License is distributed on an
+  ~   * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  ~  KIND, either express or implied.  See the License for the
+  ~  specific language governing permissions and limitations
+  ~  under the License.
+  -->
+
+<!-- the SimpleURLRegistry allows access to a URL based registry (e.g. file:/// or http://) -->
+<registry xmlns="http://ws.apache.org/ns/synapse"
+          provider="org.apache.synapse.registry.url.SimpleURLRegistry">
+    <!-- the root property of the simple URL registry helps resolve a resource URL as root + key -->
+    <parameter name="root">file:repository/conf/sample/resources/</parameter>
+    <!-- all resources loaded from the URL registry would be cached for this number of milli seconds -->
+    <parameter name="cachableDuration">15000</parameter>
+</registry>
\ No newline at end of file

Added: synapse/trunk/java/repository/conf/synapse-config/sequences/fault.xml
URL: http://svn.apache.org/viewvc/synapse/trunk/java/repository/conf/synapse-config/sequences/fault.xml?rev=805051&view=auto
==============================================================================
--- synapse/trunk/java/repository/conf/synapse-config/sequences/fault.xml (added)
+++ synapse/trunk/java/repository/conf/synapse-config/sequences/fault.xml Mon Aug 17 17:16:03 2009
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+  ~  Licensed to the Apache Software Foundation (ASF) under one
+  ~  or more contributor license agreements.  See the NOTICE file
+  ~  distributed with this work for additional information
+  ~  regarding copyright ownership.  The ASF licenses this file
+  ~  to you under the Apache License, Version 2.0 (the
+  ~  "License"); you may not use this file except in compliance
+  ~  with the License.  You may obtain a copy of the License at
+  ~
+  ~   http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~  Unless required by applicable law or agreed to in writing,
+  ~  software distributed under the License is distributed on an
+  ~   * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  ~  KIND, either express or implied.  See the License for the
+  ~  specific language governing permissions and limitations
+  ~  under the License.
+  -->
+
+<!-- Default fault sequence shipped with the Apache Synapse -->
+<sequence xmlns="http://ws.apache.org/ns/synapse" name="fault">
+    
+    <!-- Log the message at the full log level with the ERROR_MESSAGE and the ERROR_CODE-->
+    <log level="full">
+        <property name="MESSAGE" value="Executing default 'fault' sequence"/>
+        <property name="ERROR_CODE" expression="get-property('ERROR_CODE')"/>
+        <property name="ERROR_MESSAGE" expression="get-property('ERROR_MESSAGE')"/>
+    </log>
+    
+    <!-- Drops the messages by default if there is a fault -->
+    <drop/>
+    
+</sequence>
\ No newline at end of file

Added: synapse/trunk/java/repository/conf/synapse-config/sequences/main.xml
URL: http://svn.apache.org/viewvc/synapse/trunk/java/repository/conf/synapse-config/sequences/main.xml?rev=805051&view=auto
==============================================================================
--- synapse/trunk/java/repository/conf/synapse-config/sequences/main.xml (added)
+++ synapse/trunk/java/repository/conf/synapse-config/sequences/main.xml Mon Aug 17 17:16:03 2009
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+  ~  Licensed to the Apache Software Foundation (ASF) under one
+  ~  or more contributor license agreements.  See the NOTICE file
+  ~  distributed with this work for additional information
+  ~  regarding copyright ownership.  The ASF licenses this file
+  ~  to you under the Apache License, Version 2.0 (the
+  ~  "License"); you may not use this file except in compliance
+  ~  with the License.  You may obtain a copy of the License at
+  ~
+  ~   http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~  Unless required by applicable law or agreed to in writing,
+  ~  software distributed under the License is distributed on an
+  ~   * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  ~  KIND, either express or implied.  See the License for the
+  ~  specific language governing permissions and limitations
+  ~  under the License.
+  -->
+
+<!-- Default main sequence shipped with the Apache Synapse -->
+<sequence xmlns="http://ws.apache.org/ns/synapse" name="main">
+    <in>
+        <!-- Log all messages passing through -->
+        <log level="full"/>
+
+        <!-- ensure that the default configuration only sends if it is one of samples -->
+        <!-- Otherwise Synapse would be an open proxy by default (BAD!)               -->
+        <filter source="get-property('To')" regex="http://localhost:9000.*">
+            <!-- Send the messages where they have been sent (i.e. implicit "To" EPR) -->
+            <send/>
+        </filter>
+    </in>
+    <out>
+        <send/>
+    </out>
+</sequence>
\ No newline at end of file

Modified: synapse/trunk/java/repository/conf/synapse.xml
URL: http://svn.apache.org/viewvc/synapse/trunk/java/repository/conf/synapse.xml?rev=805051&r1=805050&r2=805051&view=diff
==============================================================================
--- synapse/trunk/java/repository/conf/synapse.xml (original)
+++ synapse/trunk/java/repository/conf/synapse.xml Mon Aug 17 17:16:03 2009
@@ -1,3 +1,4 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
 <!--
   ~  Licensed to the Apache Software Foundation (ASF) under one
   ~  or more contributor license agreements.  See the NOTICE file
@@ -16,21 +17,10 @@
   ~  specific language governing permissions and limitations
   ~  under the License.
   -->
-<!-- A simple Synapse configuration -->
+        
+<!-- An empty flat synapse configuration shipped with the Apache Synapse -->
 <definitions xmlns="http://ws.apache.org/ns/synapse">
 
-    <in>
-        <!-- Log all messages passing through -->
-        <log level="full"/>
-        
-        <!-- ensure that the default configuration only sends if it is one of samples -->
-        <!-- Otherwise Synapse would be an open proxy by default (BAD!)               -->
-        <filter source="get-property('To')" regex="http://localhost:9000.*">
-            <!-- Send the messages where they have been sent (i.e. implicit "To" EPR) -->
-            <send/>
-        </filter>
-    </in>
-    <out>
-        <send/>
-    </out>
+    <!-- You can add any flat sequences, endpoints, etc.. to this synapse.xml file if you do
+    not want to keep the artifacts in several files -->
 </definitions>
\ No newline at end of file

Modified: synapse/trunk/java/repository/conf/wrapper.conf
URL: http://svn.apache.org/viewvc/synapse/trunk/java/repository/conf/wrapper.conf?rev=805051&r1=805050&r2=805051&view=diff
==============================================================================
--- synapse/trunk/java/repository/conf/wrapper.conf (original)
+++ synapse/trunk/java/repository/conf/wrapper.conf Mon Aug 17 17:16:03 2009
@@ -45,7 +45,7 @@
 wrapper.app.parameter.2=repository
 wrapper.app.parameter.3=repository/conf/axis2.xml
 wrapper.app.parameter.4=.
-wrapper.app.parameter.5=repository/conf/synapse.xml
+wrapper.app.parameter.5=repository/conf/synapse-config
 wrapper.app.parameter.6=repository
 # deployment mode , set value to 'production' if it is production env.
 wrapper.app.parameter.7=