You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@servicemix.apache.org by lh...@apache.org on 2008/06/12 11:05:23 UTC

svn commit: r667011 - in /servicemix/smx3/trunk: ./ archetypes/ archetypes/servicemix-scripting-service-unit/ archetypes/servicemix-scripting-service-unit/src/ archetypes/servicemix-scripting-service-unit/src/main/ archetypes/servicemix-scripting-servi...

Author: lhein
Date: Thu Jun 12 02:05:21 2008
New Revision: 667011

URL: http://svn.apache.org/viewvc?rev=667011&view=rev
Log:
- added new jbi service engine to handle JSR-223 scripting (SM-1388)
- updated the new service engine's groovy version to 1.5.6 (SM-1375)
- added new archetype for the scripting SE


Added:
    servicemix/smx3/trunk/archetypes/servicemix-scripting-service-unit/
    servicemix/smx3/trunk/archetypes/servicemix-scripting-service-unit/pom.xml   (with props)
    servicemix/smx3/trunk/archetypes/servicemix-scripting-service-unit/src/
    servicemix/smx3/trunk/archetypes/servicemix-scripting-service-unit/src/main/
    servicemix/smx3/trunk/archetypes/servicemix-scripting-service-unit/src/main/resources/
    servicemix/smx3/trunk/archetypes/servicemix-scripting-service-unit/src/main/resources/META-INF/
    servicemix/smx3/trunk/archetypes/servicemix-scripting-service-unit/src/main/resources/META-INF/maven/
    servicemix/smx3/trunk/archetypes/servicemix-scripting-service-unit/src/main/resources/META-INF/maven/archetype.xml   (with props)
    servicemix/smx3/trunk/archetypes/servicemix-scripting-service-unit/src/main/resources/archetype-resources/
    servicemix/smx3/trunk/archetypes/servicemix-scripting-service-unit/src/main/resources/archetype-resources/pom.xml   (with props)
    servicemix/smx3/trunk/archetypes/servicemix-scripting-service-unit/src/main/resources/archetype-resources/src/
    servicemix/smx3/trunk/archetypes/servicemix-scripting-service-unit/src/main/resources/archetype-resources/src/main/
    servicemix/smx3/trunk/archetypes/servicemix-scripting-service-unit/src/main/resources/archetype-resources/src/main/resources/
    servicemix/smx3/trunk/archetypes/servicemix-scripting-service-unit/src/main/resources/archetype-resources/src/main/resources/GroovyExchangeProcessorJSR223.groovy
    servicemix/smx3/trunk/archetypes/servicemix-scripting-service-unit/src/main/resources/archetype-resources/src/main/resources/JSExchangeProcessorJSR223.js
    servicemix/smx3/trunk/archetypes/servicemix-scripting-service-unit/src/main/resources/archetype-resources/src/main/resources/RubyExchangeProcessorJSR223.rb
    servicemix/smx3/trunk/archetypes/servicemix-scripting-service-unit/src/main/resources/archetype-resources/src/main/resources/xbean.xml   (with props)
    servicemix/smx3/trunk/deployables/serviceengines/servicemix-scripting/
    servicemix/smx3/trunk/deployables/serviceengines/servicemix-scripting/pom.xml   (with props)
    servicemix/smx3/trunk/deployables/serviceengines/servicemix-scripting/src/
    servicemix/smx3/trunk/deployables/serviceengines/servicemix-scripting/src/main/
    servicemix/smx3/trunk/deployables/serviceengines/servicemix-scripting/src/main/java/
    servicemix/smx3/trunk/deployables/serviceengines/servicemix-scripting/src/main/java/org/
    servicemix/smx3/trunk/deployables/serviceengines/servicemix-scripting/src/main/java/org/apache/
    servicemix/smx3/trunk/deployables/serviceengines/servicemix-scripting/src/main/java/org/apache/servicemix/
    servicemix/smx3/trunk/deployables/serviceengines/servicemix-scripting/src/main/java/org/apache/servicemix/scripting/
    servicemix/smx3/trunk/deployables/serviceengines/servicemix-scripting/src/main/java/org/apache/servicemix/scripting/DefaultScriptingMarshaler.java   (with props)
    servicemix/smx3/trunk/deployables/serviceengines/servicemix-scripting/src/main/java/org/apache/servicemix/scripting/ScriptingComponent.java   (with props)
    servicemix/smx3/trunk/deployables/serviceengines/servicemix-scripting/src/main/java/org/apache/servicemix/scripting/ScriptingEndpoint.java   (with props)
    servicemix/smx3/trunk/deployables/serviceengines/servicemix-scripting/src/main/java/org/apache/servicemix/scripting/ScriptingEndpointType.java   (with props)
    servicemix/smx3/trunk/deployables/serviceengines/servicemix-scripting/src/main/java/org/apache/servicemix/scripting/ScriptingMarshalerSupport.java   (with props)
    servicemix/smx3/trunk/deployables/serviceengines/servicemix-scripting/src/main/jbi/
    servicemix/smx3/trunk/deployables/serviceengines/servicemix-scripting/src/main/jbi/jboss-service.xml   (with props)
    servicemix/smx3/trunk/deployables/serviceengines/servicemix-scripting/src/main/resources/
    servicemix/smx3/trunk/deployables/serviceengines/servicemix-scripting/src/test/
    servicemix/smx3/trunk/deployables/serviceengines/servicemix-scripting/src/test/java/
    servicemix/smx3/trunk/deployables/serviceengines/servicemix-scripting/src/test/java/org/
    servicemix/smx3/trunk/deployables/serviceengines/servicemix-scripting/src/test/java/org/apache/
    servicemix/smx3/trunk/deployables/serviceengines/servicemix-scripting/src/test/java/org/apache/servicemix/
    servicemix/smx3/trunk/deployables/serviceengines/servicemix-scripting/src/test/java/org/apache/servicemix/scripting/
    servicemix/smx3/trunk/deployables/serviceengines/servicemix-scripting/src/test/java/org/apache/servicemix/scripting/ScriptingComponentTest.java   (with props)
    servicemix/smx3/trunk/deployables/serviceengines/servicemix-scripting/src/test/resources/
    servicemix/smx3/trunk/deployables/serviceengines/servicemix-scripting/src/test/resources/GroovyExchangeProcessorJSR223.groovy
    servicemix/smx3/trunk/deployables/serviceengines/servicemix-scripting/src/test/resources/JSExchangeProcessorJSR223.js
    servicemix/smx3/trunk/deployables/serviceengines/servicemix-scripting/src/test/resources/RubyExchangeProcessorJSR223.rb
    servicemix/smx3/trunk/deployables/serviceengines/servicemix-scripting/src/test/resources/log4j-tests.properties   (with props)
    servicemix/smx3/trunk/deployables/serviceengines/servicemix-scripting/src/test/resources/log4j.properties   (with props)
    servicemix/smx3/trunk/deployables/serviceengines/servicemix-scripting/src/test/resources/spring.xml   (with props)
Modified:
    servicemix/smx3/trunk/archetypes/pom.xml
    servicemix/smx3/trunk/deployables/serviceengines/pom.xml
    servicemix/smx3/trunk/distributions/apache-servicemix/pom.xml
    servicemix/smx3/trunk/distributions/apache-servicemix/src/main/release/bin/smx-arch
    servicemix/smx3/trunk/distributions/apache-servicemix/src/main/release/bin/smx-arch.bat
    servicemix/smx3/trunk/pom.xml

Modified: servicemix/smx3/trunk/archetypes/pom.xml
URL: http://svn.apache.org/viewvc/servicemix/smx3/trunk/archetypes/pom.xml?rev=667011&r1=667010&r2=667011&view=diff
==============================================================================
--- servicemix/smx3/trunk/archetypes/pom.xml (original)
+++ servicemix/smx3/trunk/archetypes/pom.xml Thu Jun 12 02:05:21 2008
@@ -63,6 +63,7 @@
         <module>servicemix-cxf-se-wsdl-first-service-unit</module>
         <module>servicemix-osworkflow-service-unit</module>
         <module>servicemix-mail-service-unit</module>
+        <module>servicemix-scripting-service-unit</module>
         <module>servicemix-archetype-catalog</module>
         <module>servicemix-project-root</module>
         <module>servicemix-archetypes-itests</module>

Added: servicemix/smx3/trunk/archetypes/servicemix-scripting-service-unit/pom.xml
URL: http://svn.apache.org/viewvc/servicemix/smx3/trunk/archetypes/servicemix-scripting-service-unit/pom.xml?rev=667011&view=auto
==============================================================================
--- servicemix/smx3/trunk/archetypes/servicemix-scripting-service-unit/pom.xml (added)
+++ servicemix/smx3/trunk/archetypes/servicemix-scripting-service-unit/pom.xml Thu Jun 12 02:05:21 2008
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+    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.
+-->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+
+  <parent>
+    <groupId>org.apache.servicemix</groupId>
+    <artifactId>archetypes</artifactId>
+    <version>3.3-SNAPSHOT</version>
+  </parent>
+
+  <groupId>org.apache.servicemix.tooling</groupId>
+  <artifactId>servicemix-scripting-service-unit</artifactId>
+  <name>ServiceMix :: Archetypes :: ScriptingServiceUnit</name>
+
+</project>

Propchange: servicemix/smx3/trunk/archetypes/servicemix-scripting-service-unit/pom.xml
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: servicemix/smx3/trunk/archetypes/servicemix-scripting-service-unit/src/main/resources/META-INF/maven/archetype.xml
URL: http://svn.apache.org/viewvc/servicemix/smx3/trunk/archetypes/servicemix-scripting-service-unit/src/main/resources/META-INF/maven/archetype.xml?rev=667011&view=auto
==============================================================================
--- servicemix/smx3/trunk/archetypes/servicemix-scripting-service-unit/src/main/resources/META-INF/maven/archetype.xml (added)
+++ servicemix/smx3/trunk/archetypes/servicemix-scripting-service-unit/src/main/resources/META-INF/maven/archetype.xml Thu Jun 12 02:05:21 2008
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+    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.
+
+-->
+<archetype>
+  <id>servicemix-su</id>
+  <resources>
+    <resource>src/main/resources/xbean.xml</resource>   
+    <resource>src/main/resources/GroovyExchangeProcessorJSR223.groovy</resource>
+    <resource>src/main/resources/RubyExchangeProcessorJSR223.rb</resource>
+    <resource>src/main/resources/JSExchangeProcessorJSR223.js</resource>
+  </resources>
+</archetype>

Propchange: servicemix/smx3/trunk/archetypes/servicemix-scripting-service-unit/src/main/resources/META-INF/maven/archetype.xml
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: servicemix/smx3/trunk/archetypes/servicemix-scripting-service-unit/src/main/resources/archetype-resources/pom.xml
URL: http://svn.apache.org/viewvc/servicemix/smx3/trunk/archetypes/servicemix-scripting-service-unit/src/main/resources/archetype-resources/pom.xml?rev=667011&view=auto
==============================================================================
--- servicemix/smx3/trunk/archetypes/servicemix-scripting-service-unit/src/main/resources/archetype-resources/pom.xml (added)
+++ servicemix/smx3/trunk/archetypes/servicemix-scripting-service-unit/src/main/resources/archetype-resources/pom.xml Thu Jun 12 02:05:21 2008
@@ -0,0 +1,67 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+    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.
+
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+  <groupId>${groupId}</groupId>
+  <artifactId>${artifactId}</artifactId>
+  <packaging>jbi-service-unit</packaging>
+  <version>${version}</version>
+  <name>A scripting service unit</name>
+  <url>http://www.myorganization.org</url>
+  @{repositories}
+  <properties>
+    <servicemix-version>@{servicemix-version}</servicemix-version>
+  </properties>
+  <dependencies>
+    <dependency>
+      <groupId>org.apache.servicemix</groupId>
+      <artifactId>servicemix-core</artifactId>
+      <version>${servicemix-version}</version>
+      <scope>provided</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.servicemix</groupId>
+      <artifactId>servicemix-scripting</artifactId>
+      <version>${servicemix-version}</version>
+    </dependency>
+  </dependencies>
+  <build>
+    <resources>
+      <resource>
+        <directory>src/main/resources</directory>
+        <includes>
+          <include>**/*</include>
+        </includes>
+      </resource>
+    </resources>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.servicemix.tooling</groupId>
+        <artifactId>jbi-maven-plugin</artifactId>
+        <version>${servicemix-version}</version>
+        <extensions>true</extensions>
+        <configuration>
+          <type>service-unit</type>
+        </configuration>
+      </plugin>
+    </plugins>
+  </build>
+</project>

Propchange: servicemix/smx3/trunk/archetypes/servicemix-scripting-service-unit/src/main/resources/archetype-resources/pom.xml
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: servicemix/smx3/trunk/archetypes/servicemix-scripting-service-unit/src/main/resources/archetype-resources/src/main/resources/GroovyExchangeProcessorJSR223.groovy
URL: http://svn.apache.org/viewvc/servicemix/smx3/trunk/archetypes/servicemix-scripting-service-unit/src/main/resources/archetype-resources/src/main/resources/GroovyExchangeProcessorJSR223.groovy?rev=667011&view=auto
==============================================================================
--- servicemix/smx3/trunk/archetypes/servicemix-scripting-service-unit/src/main/resources/archetype-resources/src/main/resources/GroovyExchangeProcessorJSR223.groovy (added)
+++ servicemix/smx3/trunk/archetypes/servicemix-scripting-service-unit/src/main/resources/archetype-resources/src/main/resources/GroovyExchangeProcessorJSR223.groovy Thu Jun 12 02:05:21 2008
@@ -0,0 +1,32 @@
+/*
+ * 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.
+ */
+import javax.jbi.messaging.MessageExchange;
+import javax.jbi.messaging.NormalizedMessage;
+import org.apache.servicemix.jbi.jaxp.StringSource;
+import org.apache.servicemix.jbi.jaxp.SourceTransformer;
+
+println "Starting JSR-223 groovy processor";
+
+println exchange;       
+def inputMessage = new SourceTransformer().toString(inMessage.getContent());
+println "Hello, I got an input message " + inputMessage;
+NormalizedMessage out = exchange.createMessage();
+out.setContent(new StringSource("<response>" + bindings.get("answerGroovy") + "</response>"));
+exchange.setMessage(out, "out");
+println exchange;
+
+println "Stopping JSR-223 groovy processor";

Added: servicemix/smx3/trunk/archetypes/servicemix-scripting-service-unit/src/main/resources/archetype-resources/src/main/resources/JSExchangeProcessorJSR223.js
URL: http://svn.apache.org/viewvc/servicemix/smx3/trunk/archetypes/servicemix-scripting-service-unit/src/main/resources/archetype-resources/src/main/resources/JSExchangeProcessorJSR223.js?rev=667011&view=auto
==============================================================================
--- servicemix/smx3/trunk/archetypes/servicemix-scripting-service-unit/src/main/resources/archetype-resources/src/main/resources/JSExchangeProcessorJSR223.js (added)
+++ servicemix/smx3/trunk/archetypes/servicemix-scripting-service-unit/src/main/resources/archetype-resources/src/main/resources/JSExchangeProcessorJSR223.js Thu Jun 12 02:05:21 2008
@@ -0,0 +1,31 @@
+/*
+ * 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.
+ */
+importPackage(java.lang); 
+importPackage(javax.jbi.messaging);
+importPackage(org.apache.servicemix.jbi.jaxp);
+
+System.out.println("Starting JSR-223 JavaScript processor");
+
+System.out.println(exchange);       
+inputMessage = new SourceTransformer().toString(inMessage.getContent());
+System.out.println("Hello, I got an input message " + inputMessage);
+out = exchange.createMessage();
+out.setContent(new StringSource("<response>" + bindings.get("answerJS") + "</response>"));
+exchange.setMessage(out, "out");
+System.out.println(exchange);
+
+System.out.println("Stopping JSR-223 JavaScript processor");

Added: servicemix/smx3/trunk/archetypes/servicemix-scripting-service-unit/src/main/resources/archetype-resources/src/main/resources/RubyExchangeProcessorJSR223.rb
URL: http://svn.apache.org/viewvc/servicemix/smx3/trunk/archetypes/servicemix-scripting-service-unit/src/main/resources/archetype-resources/src/main/resources/RubyExchangeProcessorJSR223.rb?rev=667011&view=auto
==============================================================================
--- servicemix/smx3/trunk/archetypes/servicemix-scripting-service-unit/src/main/resources/archetype-resources/src/main/resources/RubyExchangeProcessorJSR223.rb (added)
+++ servicemix/smx3/trunk/archetypes/servicemix-scripting-service-unit/src/main/resources/archetype-resources/src/main/resources/RubyExchangeProcessorJSR223.rb Thu Jun 12 02:05:21 2008
@@ -0,0 +1,45 @@
+# 
+# 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.
+#
+#
+include Java
+
+import javax.jbi.messaging.MessageExchange
+import javax.jbi.messaging.NormalizedMessage
+import org.apache.servicemix.jbi.jaxp.StringSource
+import org.apache.servicemix.jbi.jaxp.SourceTransformer
+
+print "Starting JSR-223 jruby processor\n"
+
+print $exchange
+print "\n"
+
+inputMessage = SourceTransformer.new().toString($inMessage.getContent());
+print "Hello, I got an input message "
+print inputMessage
+print "\n"
+
+outMsg = $exchange.createMessage()
+outMsg.setContent(StringSource.new("<response>" + $bindings.get("answerJRuby") + "</response>"))
+$exchange.setMessage(outMsg, "out")
+
+print $exchange
+print "\n"
+
+print "Stopping JSR-223 jruby processor\n"
+

Added: servicemix/smx3/trunk/archetypes/servicemix-scripting-service-unit/src/main/resources/archetype-resources/src/main/resources/xbean.xml
URL: http://svn.apache.org/viewvc/servicemix/smx3/trunk/archetypes/servicemix-scripting-service-unit/src/main/resources/archetype-resources/src/main/resources/xbean.xml?rev=667011&view=auto
==============================================================================
--- servicemix/smx3/trunk/archetypes/servicemix-scripting-service-unit/src/main/resources/archetype-resources/src/main/resources/xbean.xml (added)
+++ servicemix/smx3/trunk/archetypes/servicemix-scripting-service-unit/src/main/resources/archetype-resources/src/main/resources/xbean.xml Thu Jun 12 02:05:21 2008
@@ -0,0 +1,60 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+    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.
+
+-->
+
+<beans xmlns:scripting="http://servicemix.apache.org/scripting/1.0"
+       xmlns:replaceMe="http://servicemix.apache.org/replaceMe"
+       xmlns:util="http://www.springframework.org/schema/util"
+       xmlns="http://www.springframework.org/schema/beans"
+       xmlns:xsi="http://http://www.w3.org/2001/XMLSchema-instance"
+       xsi:schemaLocation="http://servicemix.apache.org/scripting/1.0 http://servicemix.apache.org/schema/servicemix-scripting-@{servicemix-version}.xsd
+       http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd"
+       http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-2.0.xsd">
+       
+    <!-- Groovy JSR-223 Endpoint  -->
+    <scripting:endpoint
+        service="replaceMe:groovy-jsr223" 
+        endpoint="endpoint"
+        script="classpath:GroovyExchangeProcessorJSR223.groovy"
+        bindings="#customBindings">
+    </scripting:endpoint>
+            
+    <!-- JRuby JSR-223 Endpoint  -->
+    <scripting:endpoint
+        service="replaceMe:jruby-jsr223" 
+        endpoint="endpoint"
+        script="classpath:RubyExchangeProcessorJSR223.rb"
+        bindings="#customBindings">
+    </scripting:endpoint>
+            
+    <!-- JavaScript JSR-223 Endpoint  -->
+    <scripting:endpoint
+        service="replaceMe:js-jsr223" 
+        endpoint="endpoint"
+        script="classpath:JSExchangeProcessorJSR223.js"
+        bindings="#customBindings">
+    </scripting:endpoint>
+            
+    <util:map id="customBindings">
+        <entry key="answerGroovy" value="JSR-223 with Groovy is working fine..." />
+        <entry key="answerJRuby"  value="JSR-223 with JRuby is working fine..." />
+        <entry key="answerJS"  value="JSR-223 with JavaScript is working fine..." />
+    </util:map>   
+
+</beans>

Propchange: servicemix/smx3/trunk/archetypes/servicemix-scripting-service-unit/src/main/resources/archetype-resources/src/main/resources/xbean.xml
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Modified: servicemix/smx3/trunk/deployables/serviceengines/pom.xml
URL: http://svn.apache.org/viewvc/servicemix/smx3/trunk/deployables/serviceengines/pom.xml?rev=667011&r1=667010&r2=667011&view=diff
==============================================================================
--- servicemix/smx3/trunk/deployables/serviceengines/pom.xml (original)
+++ servicemix/smx3/trunk/deployables/serviceengines/pom.xml Thu Jun 12 02:05:21 2008
@@ -45,6 +45,7 @@
     <module>servicemix-osworkflow</module>
     <module>servicemix-saxon</module>
     <module>servicemix-script</module>
+    <module>servicemix-scripting</module>
     <module>servicemix-wsn2005</module>
   </modules>
 

Added: servicemix/smx3/trunk/deployables/serviceengines/servicemix-scripting/pom.xml
URL: http://svn.apache.org/viewvc/servicemix/smx3/trunk/deployables/serviceengines/servicemix-scripting/pom.xml?rev=667011&view=auto
==============================================================================
--- servicemix/smx3/trunk/deployables/serviceengines/servicemix-scripting/pom.xml (added)
+++ servicemix/smx3/trunk/deployables/serviceengines/servicemix-scripting/pom.xml Thu Jun 12 02:05:21 2008
@@ -0,0 +1,138 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+
+<!--
+
+    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.
+-->
+
+	<modelVersion>4.0.0</modelVersion>
+
+	<parent>
+		<groupId>org.apache.servicemix</groupId>
+		<artifactId>serviceengines</artifactId>
+		<version>3.3-SNAPSHOT</version>
+	</parent>
+
+	<groupId>org.apache.servicemix</groupId>
+	<artifactId>servicemix-scripting</artifactId>
+	<packaging>jbi-component</packaging>
+
+	<name>ServiceMix :: JSR-223 Scripting Service Engine</name>
+
+	<dependencies>
+		<dependency>
+			<groupId>org.apache.servicemix</groupId>
+			<artifactId>servicemix-shared</artifactId>
+		</dependency>
+		<dependency>
+			<groupId>org.apache.servicemix</groupId>
+			<artifactId>servicemix-core</artifactId>
+			<scope>provided</scope>
+		</dependency>
+		<dependency>
+			<groupId>commons-io</groupId>
+            <artifactId>commons-io</artifactId>
+            <version>1.4</version>
+        	</dependency>
+        <dependency>
+            <groupId>org.livetribe</groupId>
+            <artifactId>livetribe-jsr223</artifactId>
+            <version>2.0.3</version>
+            <optional>true</optional>
+        </dependency>
+        <dependency>
+            <groupId>com.sun.script</groupId>
+            <artifactId>groovy-engine</artifactId>
+            <version>${jsr223-version}</version>
+        </dependency>
+        <dependency>
+            <groupId>com.sun.script</groupId>
+            <artifactId>jruby-engine</artifactId>
+            <version>${jsr223-version}</version>
+        </dependency>
+        <dependency>
+            <groupId>com.sun.script</groupId>
+            <artifactId>js-engine</artifactId>
+            <version>${jsr223-version}</version>
+        </dependency>
+		<dependency>
+			<groupId>commons-logging</groupId>
+			<artifactId>commons-logging</artifactId>
+			<scope>provided</scope>
+		</dependency>
+		<dependency>
+			<groupId>org.jruby</groupId>
+			<artifactId>jruby</artifactId>
+			<version>${jruby-version}</version>
+		</dependency>
+        <dependency>
+            <groupId>org.codehaus.groovy</groupId>
+            <artifactId>groovy-all</artifactId>
+            <version>${groovy-version}</version>
+        </dependency>
+        <dependency>
+            <groupId>rhino</groupId>
+            <artifactId>js</artifactId>
+            <version>${rhino-version}</version>
+        </dependency>
+		<dependency>
+			<groupId>junit</groupId>
+			<artifactId>junit</artifactId>
+			<version>3.8.1</version>
+			<scope>test</scope>
+		</dependency>
+	</dependencies>
+	<build>
+		<plugins>
+			<plugin>
+				<groupId>org.apache.servicemix.tooling</groupId>
+				<artifactId>jbi-maven-plugin</artifactId>
+				<version>${servicemix-version}</version>
+				<extensions>true</extensions>
+				<configuration>
+					<type>service-engine</type>
+					<component>org.apache.servicemix.scripting.ScriptingComponent</component>
+				</configuration>
+			</plugin>
+			<plugin>
+				<groupId>org.apache.xbean</groupId>
+				<artifactId>maven-xbean-plugin</artifactId>
+				<version>${xbean-version}</version>
+				<executions>
+					<execution>
+						<configuration>
+							<namespace>
+								http://org.apache.servicemix/scripting/1.0
+							</namespace>
+						</configuration>
+						<goals>
+							<goal>mapping</goal>
+						</goals>
+					</execution>
+				</executions>
+			</plugin>
+		</plugins>
+	</build>
+
+    <properties>
+        <groovy-version>1.5.6</groovy-version>
+        <jruby-version>1.1.2</jruby-version>
+        <rhino-version>1.7R1</rhino-version>
+        <jsr223-version>20080611</jsr223-version>
+    </properties>
+    
+</project>

Propchange: servicemix/smx3/trunk/deployables/serviceengines/servicemix-scripting/pom.xml
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: servicemix/smx3/trunk/deployables/serviceengines/servicemix-scripting/src/main/java/org/apache/servicemix/scripting/DefaultScriptingMarshaler.java
URL: http://svn.apache.org/viewvc/servicemix/smx3/trunk/deployables/serviceengines/servicemix-scripting/src/main/java/org/apache/servicemix/scripting/DefaultScriptingMarshaler.java?rev=667011&view=auto
==============================================================================
--- servicemix/smx3/trunk/deployables/serviceengines/servicemix-scripting/src/main/java/org/apache/servicemix/scripting/DefaultScriptingMarshaler.java (added)
+++ servicemix/smx3/trunk/deployables/serviceengines/servicemix-scripting/src/main/java/org/apache/servicemix/scripting/DefaultScriptingMarshaler.java Thu Jun 12 02:05:21 2008
@@ -0,0 +1,56 @@
+/*
+ * 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.
+ */
+package org.apache.servicemix.scripting;
+
+import java.io.IOException;
+import java.io.InputStream;
+
+import javax.jbi.messaging.MessageExchange;
+import javax.script.Bindings;
+
+/**
+ * @author lhein
+ */
+public class DefaultScriptingMarshaler implements ScriptingMarshalerSupport {
+    /* (non-Javadoc)
+     * @see org.apache.servicemix.script.ScriptingMarshalerSupport#onStartup(org.apache.servicemix.script.ScriptEndpoint)
+     */
+    public void onStartup(ScriptingEndpoint endpoint) throws Exception {
+        // nothing to do for now
+    }
+    
+    /* (non-Javadoc)
+     * @see org.apache.servicemix.script.ScriptingMarshalerSupport#onShutdown(org.apache.servicemix.script.ScriptEndpoint)
+     */
+    public void onShutdown(ScriptingEndpoint endpoint) throws Exception {
+        // nothing to do for now        
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.servicemix.script.ScriptingMarshalerSupport#registerUserBeans(org.apache.servicemix.script.ScriptEndpoint, javax.jbi.messaging.MessageExchange, javax.script.Bindings)
+     */
+    public void registerUserBeans(ScriptingEndpoint endpoint, MessageExchange exchange, Bindings bindings) {
+        // no additional beans needed for now        
+    }
+    
+    /* (non-Javadoc)
+     * @see org.apache.servicemix.script.ScriptingMarshalerSupport#getScriptCode(org.apache.servicemix.script.ScriptEndpoint, javax.jbi.messaging.MessageExchange)
+     */
+    public InputStream getScriptCode(ScriptingEndpoint endpoint, MessageExchange exchange) throws IOException {
+        return endpoint.getScript().getInputStream();
+    }
+}

Propchange: servicemix/smx3/trunk/deployables/serviceengines/servicemix-scripting/src/main/java/org/apache/servicemix/scripting/DefaultScriptingMarshaler.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: servicemix/smx3/trunk/deployables/serviceengines/servicemix-scripting/src/main/java/org/apache/servicemix/scripting/ScriptingComponent.java
URL: http://svn.apache.org/viewvc/servicemix/smx3/trunk/deployables/serviceengines/servicemix-scripting/src/main/java/org/apache/servicemix/scripting/ScriptingComponent.java?rev=667011&view=auto
==============================================================================
--- servicemix/smx3/trunk/deployables/serviceengines/servicemix-scripting/src/main/java/org/apache/servicemix/scripting/ScriptingComponent.java (added)
+++ servicemix/smx3/trunk/deployables/serviceengines/servicemix-scripting/src/main/java/org/apache/servicemix/scripting/ScriptingComponent.java Thu Jun 12 02:05:21 2008
@@ -0,0 +1,47 @@
+/*
+ * 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.
+ */
+package org.apache.servicemix.scripting;
+
+import java.util.List;
+
+import org.apache.servicemix.common.DefaultComponent;
+
+/**
+ * @org.apache.xbean.XBean element="component" description="ServiceMix Scripting
+ *                         Component"
+ */
+public class ScriptingComponent extends DefaultComponent {
+
+    private ScriptingEndpointType[] endpoints;
+
+    protected Class[] getEndpointClasses() {
+        return new Class[] { ScriptingEndpoint.class };
+    }
+
+    public ScriptingEndpointType[] getEndpoints() {
+        return endpoints;
+    }
+
+    public void setEndpoints(ScriptingEndpointType[] endpoints) {
+        this.endpoints = endpoints;
+    }
+
+    protected List getConfiguredEndpoints() {
+        return asList(endpoints);
+    }
+
+}

Propchange: servicemix/smx3/trunk/deployables/serviceengines/servicemix-scripting/src/main/java/org/apache/servicemix/scripting/ScriptingComponent.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: servicemix/smx3/trunk/deployables/serviceengines/servicemix-scripting/src/main/java/org/apache/servicemix/scripting/ScriptingEndpoint.java
URL: http://svn.apache.org/viewvc/servicemix/smx3/trunk/deployables/serviceengines/servicemix-scripting/src/main/java/org/apache/servicemix/scripting/ScriptingEndpoint.java?rev=667011&view=auto
==============================================================================
--- servicemix/smx3/trunk/deployables/serviceengines/servicemix-scripting/src/main/java/org/apache/servicemix/scripting/ScriptingEndpoint.java (added)
+++ servicemix/smx3/trunk/deployables/serviceengines/servicemix-scripting/src/main/java/org/apache/servicemix/scripting/ScriptingEndpoint.java Thu Jun 12 02:05:21 2008
@@ -0,0 +1,413 @@
+/*
+ * 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.
+ */
+package org.apache.servicemix.scripting;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.io.Reader;
+import java.util.Map;
+import java.util.logging.Logger;
+
+import javax.jbi.JBIException;
+import javax.jbi.messaging.ExchangeStatus;
+import javax.jbi.messaging.InOut;
+import javax.jbi.messaging.MessageExchange;
+import javax.jbi.messaging.MessagingException;
+import javax.jbi.messaging.MessageExchange.Role;
+import javax.script.Bindings;
+import javax.script.ScriptEngine;
+import javax.script.ScriptEngineManager;
+import javax.script.ScriptException;
+
+import org.apache.commons.io.FilenameUtils;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.apache.servicemix.common.endpoints.ProviderEndpoint;
+import org.springframework.core.io.Resource;
+
+/**
+ * @org.apache.xbean.XBean element="endpoint"
+ * @author lhein
+ */
+public class ScriptingEndpoint extends ProviderEndpoint implements ScriptingEndpointType {
+    private static Log logger = LogFactory.getLog(ScriptingEndpoint.class);
+
+    public static final String KEY_CONTEXT = "componentContext";
+    public static final String KEY_ENDPOINT = "endpoint";
+    public static final String KEY_IN_MSG = "inMessage";
+    public static final String KEY_IN_EXCHANGE = "exchange";
+    public static final String KEY_CHANNEL = "deliveryChannel";
+    public static final String KEY_LOGGER = "log";
+    public static final String KEY_COMPONENT_NAMESPACE = "componentNamespace";
+    public static final String KEY_USER_BINDINGS = "bindings";
+    public static final String KEY_ENDPOINTNAME = "endpointname";
+    public static final String KEY_SERVICENAME = "servicename";
+    public static final String KEY_INTERFACENAME = "interfacename";
+    public static final String KEY_SCRIPT = "script";
+
+    public static final String LANGUAGE_AUTODETECT = "autodetect";
+
+    private ScriptEngineManager manager = null;
+    private ScriptEngine engine = null;
+    private ScriptingMarshalerSupport marshaler = new DefaultScriptingMarshaler();
+    private Resource script;
+    private String language = LANGUAGE_AUTODETECT;
+    private String logResourceBundle;
+    private Logger scriptLogger;
+    private boolean disableOutput = false;
+    private Map<String, Object> bindings;
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see org.apache.servicemix.common.endpoints.ProviderEndpoint#start()
+     */
+    public void start() throws Exception {
+        super.start();
+        try {
+            // lazy instatiation
+            this.manager = new ScriptEngineManager();
+
+            if (script == null) {
+                throw new IllegalArgumentException("Property script must be set");
+            } else {
+                // initialize the script engine
+                if (this.language.equalsIgnoreCase(LANGUAGE_AUTODETECT)) {
+                    // detect language by file extension
+                    this.engine = this.manager.getEngineByExtension(FilenameUtils.getExtension(script
+                        .getFilename()));
+                    if (this.engine == null) {
+                        throw new RuntimeException("There is no script engine registered for extension "
+                                                   + FilenameUtils.getExtension(script.getFilename()));
+                    }
+                } else {
+                    // use predefined language from xbean
+                    this.engine = this.manager.getEngineByName(this.language);
+                    if (this.engine == null) {
+                        throw new RuntimeException("There is no script engine for language " + this.language);
+                    }
+                }
+            }
+
+            // do custom startup logic
+            marshaler.onStartup(this);
+        } catch (Exception ex) {
+            throw new JBIException(ex);
+        }
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see org.apache.servicemix.common.endpoints.ProviderEndpoint#stop()
+     */
+    @Override
+    public void stop() throws Exception {
+        try {
+            // do custom startup logic
+            marshaler.onShutdown(this);
+        } catch (Exception ex) {
+            throw new JBIException(ex);
+        }
+
+        super.stop();
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see org.apache.servicemix.common.endpoints.ProviderEndpoint#process(javax.jbi.messaging.MessageExchange)
+     */
+    @Override
+    public void process(MessageExchange exchange) throws Exception {
+        if (exchange == null) {
+            return;
+        }
+
+        // The component acts as a consumer, this means this exchange is
+        // received because
+        // we sent it to another component. As it is active, this is either an
+        // out or a fault
+        // If this component does not create / send exchanges, you may just
+        // throw an
+        // UnsupportedOperationException
+        if (exchange.getRole() == Role.CONSUMER) {
+            return;
+        }
+
+        // The component acts as a provider, this means that another component
+        // has requested our
+        // service
+        // As this exchange is active, this is either an in or a fault (out are
+        // send by this
+        // component)
+        else if (exchange.getRole() == MessageExchange.Role.PROVIDER) {
+            // Exchange is finished
+            if (exchange.getStatus() == ExchangeStatus.DONE) {
+                return;
+            }
+            // Exchange has been aborted with an exception
+            else if (exchange.getStatus() == ExchangeStatus.ERROR) {
+                return;
+            }
+            // Fault message
+            else if (exchange.getFault() != null) {
+                done(exchange);
+            } else {
+                Bindings scriptBindings = engine.createBindings();
+
+                scriptBindings.put(KEY_IN_EXCHANGE, exchange);
+
+                // exec script engine code to do its thing for this
+                scriptBindings.put(KEY_CONTEXT, getContext());
+                scriptBindings.put(KEY_IN_EXCHANGE, exchange);
+                scriptBindings.put(KEY_IN_MSG, exchange.getMessage("in"));
+                scriptBindings.put(KEY_ENDPOINT, this);
+                scriptBindings.put(KEY_CHANNEL, getChannel());
+                scriptBindings.put(KEY_ENDPOINTNAME, getEndpoint());
+                scriptBindings.put(KEY_SERVICENAME, getService());
+                scriptBindings.put(KEY_INTERFACENAME, getInterfaceName());
+                scriptBindings.put(KEY_LOGGER, getScriptLogger());
+
+                try {
+                    scriptBindings.put(KEY_SCRIPT, getScript().getFile().getAbsolutePath());
+                } catch (IOException ioex) {
+                    scriptBindings.put(KEY_SCRIPT, getScript());
+                }
+
+                scriptBindings.put(KEY_USER_BINDINGS, bindings);
+                scriptBindings.put(KEY_COMPONENT_NAMESPACE, scriptBindings);
+
+                // call back method for custom marshaler to inject it's own
+                // beans
+                this.marshaler.registerUserBeans(this, exchange, scriptBindings);
+
+                // get the input stream to the script code
+                InputStream is = null;
+                try {
+                    // gets the input stream to the script code
+                    is = this.marshaler.getScriptCode(this, exchange);
+                } catch (IOException ioex) {
+                    logger
+                        .error("Unable to load script in marshaler: " + this.marshaler.getClass().getName(),
+                               ioex);
+                    // io error getting the script code
+                    try {
+                        is = this.script.getInputStream();
+                    } catch (IOException i2) {
+                        logger.error("Unable to load the script " + script.getFilename(), i2);
+                        throw new MessagingException("Unable to load the script " + script.getFilename());
+                    }
+                }
+
+                // create a reader for the stream
+                Reader reader = new InputStreamReader(is);
+
+                try {
+                    // execute the script
+                    this.engine.eval(reader, scriptBindings);
+
+                    exchange = (MessageExchange)scriptBindings.get(KEY_IN_EXCHANGE);
+
+                    // on InOut exchanges we always do answer
+                    if (exchange instanceof InOut) {
+                        if (!isDisableOutput()) {
+                            send(exchange);
+                        }
+                    } else {
+                        // if InOnly exchange then we only answer if user wants to
+                        done(exchange);
+                    }
+                } catch (ScriptException ex) {
+                    logger.error("Error executing the script: " + ex.getFileName() + " at line: "
+                                 + ex.getLineNumber() + " and column: " + ex.getColumnNumber(), ex);
+                    fail(exchange, ex);
+                } catch (NullPointerException ex) {
+                    logger.error("Error executing the script: " + script.getFilename()
+                                 + ". A unexpected NullPointerException occured.", ex);
+                    fail(exchange, ex);
+                }
+            }
+        }
+
+        // Unknown role
+        else {
+            throw new MessagingException("ScriptingEndpoint.process(): Unknown role: " + exchange.getRole());
+        }
+    }
+
+    /**
+     * @return the script
+     */
+    public Resource getScript() {
+        return this.script;
+    }
+
+    /**
+     * @param script the script to set
+     */
+    public void setScript(Resource script) {
+        this.script = script;
+    }
+
+    /**
+     * @return the marshaler
+     */
+    public ScriptingMarshalerSupport getMarshaler() {
+        return this.marshaler;
+    }
+
+    /**
+     * @param marshaler the marshaler to set
+     */
+    public void setMarshaler(ScriptingMarshalerSupport marshaler) {
+        this.marshaler = marshaler;
+    }
+
+    /**
+     * @return the disableOutput
+     */
+    public boolean isDisableOutput() {
+        return this.disableOutput;
+    }
+
+    /**
+     * @param disableOutput the disableOutput to set
+     */
+    public void setDisableOutput(boolean disableOutput) {
+        this.disableOutput = disableOutput;
+    }
+
+    /**
+     * @return the bindings
+     */
+    public Map<String, Object> getBindings() {
+        return this.bindings;
+    }
+
+    /**
+     * @param bindings the bindings to set
+     */
+    public void setBindings(Map<String, Object> bindings) {
+        this.bindings = bindings;
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see org.apache.servicemix.common.endpoints.SimpleEndpoint#fail(javax.jbi.messaging.MessageExchange,
+     *      java.lang.Exception)
+     */
+    protected void fail(MessageExchange messageExchange, Exception e) throws MessagingException {
+        super.fail(messageExchange, e);
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see org.apache.servicemix.common.endpoints.SimpleEndpoint#send(javax.jbi.messaging.MessageExchange)
+     */
+    protected void send(MessageExchange messageExchange) throws MessagingException {
+        super.send(messageExchange);
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see org.apache.servicemix.common.endpoints.SimpleEndpoint#sendSync(javax.jbi.messaging.MessageExchange)
+     */
+    protected void sendSync(MessageExchange messageExchange) throws MessagingException {
+        super.sendSync(messageExchange);
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see org.apache.servicemix.common.endpoints.SimpleEndpoint#done(javax.jbi.messaging.MessageExchange)
+     */
+    protected void done(MessageExchange messageExchange) throws MessagingException {
+        super.done(messageExchange);
+    }
+
+    /**
+     * 
+     * @return
+     * @throws MessagingException
+     */
+    protected Logger createScriptLogger() throws MessagingException {
+        if (logResourceBundle != null) {
+            try {
+                return getContext().getLogger(getClass().getName(), logResourceBundle);
+            } catch (JBIException e) {
+                throw new MessagingException(e);
+            }
+        } else {
+            return Logger.getLogger(getClass().getName());
+        }
+    }
+
+    /**
+     * *
+     * 
+     * @return Returns the language.
+     */
+    public String getLanguage() {
+        return this.language;
+    }
+
+    /**
+     * @param language The language to set.
+     */
+    public void setLanguage(String language) {
+        this.language = language;
+    }
+
+    /** * @return Returns the logResourceBundle.
+     */
+    public String getLogResourceBundle() {
+        return this.logResourceBundle;
+    }
+
+    /**
+     * @param logResourceBundle The logResourceBundle to set.
+     */
+    public void setLogResourceBundle(String logResourceBundle) {
+        this.logResourceBundle = logResourceBundle;
+    }
+
+    /**
+     * returns the script logger
+     * @return  the script logger
+     * @throws MessagingException
+     */
+    public Logger getScriptLogger() throws MessagingException {
+        if (scriptLogger == null) {
+            scriptLogger = createScriptLogger();
+        }
+        return scriptLogger;
+    }
+
+    /**
+     * Sets the logger to use if the script decides to log
+     *
+     * @param scriptLogger
+     */
+    public void setScriptLogger(Logger scriptLogger) {
+        this.scriptLogger = scriptLogger;
+    }
+}

Propchange: servicemix/smx3/trunk/deployables/serviceengines/servicemix-scripting/src/main/java/org/apache/servicemix/scripting/ScriptingEndpoint.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: servicemix/smx3/trunk/deployables/serviceengines/servicemix-scripting/src/main/java/org/apache/servicemix/scripting/ScriptingEndpointType.java
URL: http://svn.apache.org/viewvc/servicemix/smx3/trunk/deployables/serviceengines/servicemix-scripting/src/main/java/org/apache/servicemix/scripting/ScriptingEndpointType.java?rev=667011&view=auto
==============================================================================
--- servicemix/smx3/trunk/deployables/serviceengines/servicemix-scripting/src/main/java/org/apache/servicemix/scripting/ScriptingEndpointType.java (added)
+++ servicemix/smx3/trunk/deployables/serviceengines/servicemix-scripting/src/main/java/org/apache/servicemix/scripting/ScriptingEndpointType.java Thu Jun 12 02:05:21 2008
@@ -0,0 +1,24 @@
+/*
+ * 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.
+ */
+package org.apache.servicemix.scripting;
+
+/**
+ * @author lhein
+ */
+public interface ScriptingEndpointType {
+    // just a grouping interface
+}

Propchange: servicemix/smx3/trunk/deployables/serviceengines/servicemix-scripting/src/main/java/org/apache/servicemix/scripting/ScriptingEndpointType.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: servicemix/smx3/trunk/deployables/serviceengines/servicemix-scripting/src/main/java/org/apache/servicemix/scripting/ScriptingMarshalerSupport.java
URL: http://svn.apache.org/viewvc/servicemix/smx3/trunk/deployables/serviceengines/servicemix-scripting/src/main/java/org/apache/servicemix/scripting/ScriptingMarshalerSupport.java?rev=667011&view=auto
==============================================================================
--- servicemix/smx3/trunk/deployables/serviceengines/servicemix-scripting/src/main/java/org/apache/servicemix/scripting/ScriptingMarshalerSupport.java (added)
+++ servicemix/smx3/trunk/deployables/serviceengines/servicemix-scripting/src/main/java/org/apache/servicemix/scripting/ScriptingMarshalerSupport.java Thu Jun 12 02:05:21 2008
@@ -0,0 +1,64 @@
+/*
+ * 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.
+ */
+package org.apache.servicemix.scripting;
+
+import java.io.IOException;
+import java.io.InputStream;
+
+import javax.jbi.messaging.MessageExchange;
+import javax.script.Bindings;
+
+/**
+ * @author lhein
+ */
+public interface ScriptingMarshalerSupport {
+    /**
+     * hook method to allow a custom marshaler to do things on endpoint startup
+     * 
+     * @param endpoint the endpoint
+     * @throws Exception on any exception
+     */
+    void onStartup(final ScriptingEndpoint endpoint) throws Exception;
+
+    /**
+     * hook method to allow a custom marshaler to do things on endpoint shutdown
+     * 
+     * @param endpoint the endpoint
+     * @throws Exception on any exception
+     */
+    void onShutdown(final ScriptingEndpoint endpoint) throws Exception;
+
+    /**
+     * returns the code of the script as input stream
+     * 
+     * @param endpoint the endpoint
+     * @param exchange the message exchange
+     * @return the code of the script as string
+     */
+    InputStream getScriptCode(final ScriptingEndpoint endpoint, final MessageExchange exchange) throws IOException;
+
+    /**
+     * hook method for filling user beans into the available variables from
+     * script
+     * 
+     * @param endpoint the endpoint
+     * @param exchange the exchange
+     * @param bindings the bindings
+     */
+    void registerUserBeans(final ScriptingEndpoint endpoint, final MessageExchange exchange,
+                           final Bindings bindings);
+}

Propchange: servicemix/smx3/trunk/deployables/serviceengines/servicemix-scripting/src/main/java/org/apache/servicemix/scripting/ScriptingMarshalerSupport.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: servicemix/smx3/trunk/deployables/serviceengines/servicemix-scripting/src/main/jbi/jboss-service.xml
URL: http://svn.apache.org/viewvc/servicemix/smx3/trunk/deployables/serviceengines/servicemix-scripting/src/main/jbi/jboss-service.xml?rev=667011&view=auto
==============================================================================
--- servicemix/smx3/trunk/deployables/serviceengines/servicemix-scripting/src/main/jbi/jboss-service.xml (added)
+++ servicemix/smx3/trunk/deployables/serviceengines/servicemix-scripting/src/main/jbi/jboss-service.xml Thu Jun 12 02:05:21 2008
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!-- The J2EE application client deployer service
+  -->
+<server>
+	<depends>org.servicemix:service=Deployer</depends>
+</server>
+

Propchange: servicemix/smx3/trunk/deployables/serviceengines/servicemix-scripting/src/main/jbi/jboss-service.xml
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: servicemix/smx3/trunk/deployables/serviceengines/servicemix-scripting/src/test/java/org/apache/servicemix/scripting/ScriptingComponentTest.java
URL: http://svn.apache.org/viewvc/servicemix/smx3/trunk/deployables/serviceengines/servicemix-scripting/src/test/java/org/apache/servicemix/scripting/ScriptingComponentTest.java?rev=667011&view=auto
==============================================================================
--- servicemix/smx3/trunk/deployables/serviceengines/servicemix-scripting/src/test/java/org/apache/servicemix/scripting/ScriptingComponentTest.java (added)
+++ servicemix/smx3/trunk/deployables/serviceengines/servicemix-scripting/src/test/java/org/apache/servicemix/scripting/ScriptingComponentTest.java Thu Jun 12 02:05:21 2008
@@ -0,0 +1,96 @@
+/*
+ * 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.
+ */
+package org.apache.servicemix.scripting;
+
+import javax.jbi.messaging.ExchangeStatus;
+import javax.jbi.messaging.InOut;
+import javax.xml.namespace.QName;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.apache.servicemix.client.DefaultServiceMixClient;
+import org.apache.servicemix.jbi.jaxp.SourceTransformer;
+import org.apache.servicemix.jbi.jaxp.StringSource;
+import org.apache.servicemix.tck.SpringTestSupport;
+import org.apache.xbean.spring.context.ClassPathXmlApplicationContext;
+import org.springframework.context.support.AbstractXmlApplicationContext;
+
+public class ScriptingComponentTest extends SpringTestSupport {
+    private static transient Log log = LogFactory.getLog(ScriptingComponentTest.class);
+
+    public void testGroovy() throws Exception {
+        DefaultServiceMixClient client = new DefaultServiceMixClient(jbi);
+        InOut me = client.createInOutExchange();
+        me.setService(new QName("urn:test", "groovy-jsr223"));
+        me.getInMessage().setContent(new StringSource("<hello>jsr-223</hello>"));
+        client.sendSync(me);
+        if (me.getStatus() == ExchangeStatus.ERROR) {
+            if (me.getError() != null) {
+                throw me.getError();
+            } else {
+                fail("Received ERROR status");
+            }
+        } else if (me.getFault() != null) {
+            fail("Received fault: " + new SourceTransformer().toString(me.getFault().getContent()));
+        }
+        log.info(new SourceTransformer().toString(me.getOutMessage().getContent()));
+        client.done(me);
+    }
+    
+    public void testJRuby() throws Exception {
+        DefaultServiceMixClient client = new DefaultServiceMixClient(jbi);
+        InOut me = client.createInOutExchange();
+        me.setService(new QName("urn:test", "jruby-jsr223"));
+        me.getInMessage().setContent(new StringSource("<hello>jsr-223</hello>"));
+        client.sendSync(me);
+        if (me.getStatus() == ExchangeStatus.ERROR) {
+            if (me.getError() != null) {
+                throw me.getError();
+            } else {
+                fail("Received ERROR status");
+            }
+        } else if (me.getFault() != null) {
+            fail("Received fault: " + new SourceTransformer().toString(me.getFault().getContent()));
+        }
+        log.info(new SourceTransformer().toString(me.getOutMessage().getContent()));
+        client.done(me);
+    }
+    
+    public void testJavaScript() throws Exception {
+        DefaultServiceMixClient client = new DefaultServiceMixClient(jbi);
+        InOut me = client.createInOutExchange();
+        me.setService(new QName("urn:test", "js-jsr223"));
+        me.getInMessage().setContent(new StringSource("<hello>jsr-223</hello>"));
+        client.sendSync(me);
+        if (me.getStatus() == ExchangeStatus.ERROR) {
+            if (me.getError() != null) {
+                throw me.getError();
+            } else {
+                fail("Received ERROR status");
+            }
+        } else if (me.getFault() != null) {
+            fail("Received fault: " + new SourceTransformer().toString(me.getFault().getContent()));
+        }
+        log.info(new SourceTransformer().toString(me.getOutMessage().getContent()));
+        client.done(me);
+    }
+    
+    protected AbstractXmlApplicationContext createBeanFactory() {
+        return new ClassPathXmlApplicationContext("spring.xml");
+    }
+    
+}

Propchange: servicemix/smx3/trunk/deployables/serviceengines/servicemix-scripting/src/test/java/org/apache/servicemix/scripting/ScriptingComponentTest.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: servicemix/smx3/trunk/deployables/serviceengines/servicemix-scripting/src/test/resources/GroovyExchangeProcessorJSR223.groovy
URL: http://svn.apache.org/viewvc/servicemix/smx3/trunk/deployables/serviceengines/servicemix-scripting/src/test/resources/GroovyExchangeProcessorJSR223.groovy?rev=667011&view=auto
==============================================================================
--- servicemix/smx3/trunk/deployables/serviceengines/servicemix-scripting/src/test/resources/GroovyExchangeProcessorJSR223.groovy (added)
+++ servicemix/smx3/trunk/deployables/serviceengines/servicemix-scripting/src/test/resources/GroovyExchangeProcessorJSR223.groovy Thu Jun 12 02:05:21 2008
@@ -0,0 +1,32 @@
+/*
+ * 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.
+ */
+import javax.jbi.messaging.MessageExchange;
+import javax.jbi.messaging.NormalizedMessage;
+import org.apache.servicemix.jbi.jaxp.StringSource;
+import org.apache.servicemix.jbi.jaxp.SourceTransformer;
+
+println "Starting JSR-223 groovy processor";
+
+println exchange;       
+def inputMessage = new SourceTransformer().toString(inMessage.getContent());
+println "Hello, I got an input message " + inputMessage;
+NormalizedMessage out = exchange.createMessage();
+out.setContent(new StringSource("<response>" + bindings.get("answerGroovy") + "</response>"));
+exchange.setMessage(out, "out");
+println exchange;
+
+println "Stopping JSR-223 groovy processor";

Added: servicemix/smx3/trunk/deployables/serviceengines/servicemix-scripting/src/test/resources/JSExchangeProcessorJSR223.js
URL: http://svn.apache.org/viewvc/servicemix/smx3/trunk/deployables/serviceengines/servicemix-scripting/src/test/resources/JSExchangeProcessorJSR223.js?rev=667011&view=auto
==============================================================================
--- servicemix/smx3/trunk/deployables/serviceengines/servicemix-scripting/src/test/resources/JSExchangeProcessorJSR223.js (added)
+++ servicemix/smx3/trunk/deployables/serviceengines/servicemix-scripting/src/test/resources/JSExchangeProcessorJSR223.js Thu Jun 12 02:05:21 2008
@@ -0,0 +1,31 @@
+/*
+ * 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.
+ */
+importPackage(java.lang); 
+importPackage(javax.jbi.messaging);
+importPackage(org.apache.servicemix.jbi.jaxp);
+
+System.out.println("Starting JSR-223 JavaScript processor");
+
+System.out.println(exchange);       
+inputMessage = new SourceTransformer().toString(inMessage.getContent());
+System.out.println("Hello, I got an input message " + inputMessage);
+out = exchange.createMessage();
+out.setContent(new StringSource("<response>" + bindings.get("answerJS") + "</response>"));
+exchange.setMessage(out, "out");
+System.out.println(exchange);
+
+System.out.println("Stopping JSR-223 JavaScript processor");

Added: servicemix/smx3/trunk/deployables/serviceengines/servicemix-scripting/src/test/resources/RubyExchangeProcessorJSR223.rb
URL: http://svn.apache.org/viewvc/servicemix/smx3/trunk/deployables/serviceengines/servicemix-scripting/src/test/resources/RubyExchangeProcessorJSR223.rb?rev=667011&view=auto
==============================================================================
--- servicemix/smx3/trunk/deployables/serviceengines/servicemix-scripting/src/test/resources/RubyExchangeProcessorJSR223.rb (added)
+++ servicemix/smx3/trunk/deployables/serviceengines/servicemix-scripting/src/test/resources/RubyExchangeProcessorJSR223.rb Thu Jun 12 02:05:21 2008
@@ -0,0 +1,45 @@
+# 
+# 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.
+#
+#
+include Java
+
+import javax.jbi.messaging.MessageExchange
+import javax.jbi.messaging.NormalizedMessage
+import org.apache.servicemix.jbi.jaxp.StringSource
+import org.apache.servicemix.jbi.jaxp.SourceTransformer
+
+print "Starting JSR-223 jruby processor\n"
+
+print $exchange
+print "\n"
+
+inputMessage = SourceTransformer.new().toString($inMessage.getContent());
+print "Hello, I got an input message "
+print inputMessage
+print "\n"
+
+outMsg = $exchange.createMessage()
+outMsg.setContent(StringSource.new("<response>" + $bindings.get("answerJRuby") + "</response>"))
+$exchange.setMessage(outMsg, "out")
+
+print $exchange
+print "\n"
+
+print "Stopping JSR-223 jruby processor\n"
+

Added: servicemix/smx3/trunk/deployables/serviceengines/servicemix-scripting/src/test/resources/log4j-tests.properties
URL: http://svn.apache.org/viewvc/servicemix/smx3/trunk/deployables/serviceengines/servicemix-scripting/src/test/resources/log4j-tests.properties?rev=667011&view=auto
==============================================================================
--- servicemix/smx3/trunk/deployables/serviceengines/servicemix-scripting/src/test/resources/log4j-tests.properties (added)
+++ servicemix/smx3/trunk/deployables/serviceengines/servicemix-scripting/src/test/resources/log4j-tests.properties Thu Jun 12 02:05:21 2008
@@ -0,0 +1,41 @@
+# 
+# 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 logging properties used during tests..
+#
+log4j.rootLogger=DEBUG, out
+
+log4j.logger.org.apache.activemq=INFO
+log4j.logger.org.apache.activemq.spring=WARN
+log4j.logger.org.apache.activemq.store.journal=INFO
+log4j.logger.org.activeio.journal=INFO
+
+# CONSOLE appender not used by default
+log4j.appender.stdout=org.apache.log4j.ConsoleAppender
+log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
+log4j.appender.stdout.layout.ConversionPattern=%d [%-15.15t] %-5p %-30.30c{1} - %m%n
+
+# File appender
+log4j.appender.out=org.apache.log4j.FileAppender
+log4j.appender.out.layout=org.apache.log4j.PatternLayout
+log4j.appender.out.layout.ConversionPattern=%d [%-15.15t] %-5p %-30.30c{1} - %m%n
+log4j.appender.out.file=target/servicemix-test.log
+log4j.appender.out.append=true

Propchange: servicemix/smx3/trunk/deployables/serviceengines/servicemix-scripting/src/test/resources/log4j-tests.properties
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: servicemix/smx3/trunk/deployables/serviceengines/servicemix-scripting/src/test/resources/log4j.properties
URL: http://svn.apache.org/viewvc/servicemix/smx3/trunk/deployables/serviceengines/servicemix-scripting/src/test/resources/log4j.properties?rev=667011&view=auto
==============================================================================
--- servicemix/smx3/trunk/deployables/serviceengines/servicemix-scripting/src/test/resources/log4j.properties (added)
+++ servicemix/smx3/trunk/deployables/serviceengines/servicemix-scripting/src/test/resources/log4j.properties Thu Jun 12 02:05:21 2008
@@ -0,0 +1,40 @@
+# 
+# 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 logging properties used during tests..
+#
+log4j.rootLogger=INFO, out
+
+log4j.logger.org.springframework=INFO
+log4j.logger.org.apache.activemq=INFO
+log4j.logger.org.apache.activemq.spring=WARN
+
+# CONSOLE appender 
+log4j.appender.stdout=org.apache.log4j.ConsoleAppender
+log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
+log4j.appender.stdout.layout.ConversionPattern=%d [%-15.15t] %-5p %-30.30c{1} - %m%n
+
+# File appender
+log4j.appender.out=org.apache.log4j.FileAppender
+log4j.appender.out.layout=org.apache.log4j.PatternLayout
+log4j.appender.out.layout.ConversionPattern=%d [%-15.15t] %-5p %-30.30c{1} - %m%n
+log4j.appender.out.file=target/servicemix-test.log
+log4j.appender.out.append=true

Propchange: servicemix/smx3/trunk/deployables/serviceengines/servicemix-scripting/src/test/resources/log4j.properties
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: servicemix/smx3/trunk/deployables/serviceengines/servicemix-scripting/src/test/resources/spring.xml
URL: http://svn.apache.org/viewvc/servicemix/smx3/trunk/deployables/serviceengines/servicemix-scripting/src/test/resources/spring.xml?rev=667011&view=auto
==============================================================================
--- servicemix/smx3/trunk/deployables/serviceengines/servicemix-scripting/src/test/resources/spring.xml (added)
+++ servicemix/smx3/trunk/deployables/serviceengines/servicemix-scripting/src/test/resources/spring.xml Thu Jun 12 02:05:21 2008
@@ -0,0 +1,66 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+	
+	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.
+	
+-->
+<beans xmlns:sm="http://servicemix.apache.org/config/1.0"
+	xmlns:scripting="http://org.apache.servicemix/scripting/1.0"
+	xmlns:util="http://www.springframework.org/schema/util"
+	xmlns:test="urn:test">
+
+	<sm:container id="jbi" embedded="true" createMBeanServer="false">
+		<sm:activationSpecs>
+			<sm:activationSpec service="test:echo">
+				<sm:component>
+                    <bean class="org.apache.servicemix.components.util.EchoComponent" />
+                </sm:component>
+            </sm:activationSpec>
+        </sm:activationSpecs>
+
+        <sm:endpoints>
+
+            <!-- Groovy JSR-223 Endpoint  -->
+            <scripting:endpoint
+                       service="test:groovy-jsr223" endpoint="endpoint"
+                       script="classpath:GroovyExchangeProcessorJSR223.groovy"
+                       bindings="#customBindings">
+            </scripting:endpoint>
+            
+            <!-- JRuby JSR-223 Endpoint  -->
+            <scripting:endpoint
+                       service="test:jruby-jsr223" endpoint="endpoint"
+                       script="classpath:RubyExchangeProcessorJSR223.rb"
+                       bindings="#customBindings">
+            </scripting:endpoint>
+            
+            <!-- JavaScript JSR-223 Endpoint  -->
+            <scripting:endpoint
+                       service="test:js-jsr223" endpoint="endpoint"
+                       script="classpath:JSExchangeProcessorJSR223.js"
+                       bindings="#customBindings">
+            </scripting:endpoint>
+
+        </sm:endpoints>
+    </sm:container>
+
+    <util:map id="customBindings">
+        <entry key="answerGroovy" value="JSR-223 with Groovy is working fine..." />
+        <entry key="answerJRuby"  value="JSR-223 with JRuby is working fine..." />
+        <entry key="answerJS"  value="JSR-223 with JavaScript is working fine..." />
+    </util:map>   
+
+</beans>

Propchange: servicemix/smx3/trunk/deployables/serviceengines/servicemix-scripting/src/test/resources/spring.xml
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Modified: servicemix/smx3/trunk/distributions/apache-servicemix/pom.xml
URL: http://svn.apache.org/viewvc/servicemix/smx3/trunk/distributions/apache-servicemix/pom.xml?rev=667011&r1=667010&r2=667011&view=diff
==============================================================================
--- servicemix/smx3/trunk/distributions/apache-servicemix/pom.xml (original)
+++ servicemix/smx3/trunk/distributions/apache-servicemix/pom.xml Thu Jun 12 02:05:21 2008
@@ -98,6 +98,10 @@
     </dependency>
     <dependency>
       <groupId>org.apache.servicemix</groupId>
+      <artifactId>servicemix-scripting</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.servicemix</groupId>
       <artifactId>servicemix-file</artifactId>
     </dependency>
     <dependency>
@@ -359,6 +363,13 @@
                 </artifactItem>
                 <artifactItem>
                   <groupId>org.apache.servicemix</groupId>
+                  <artifactId>servicemix-scripting</artifactId>
+                  <version>${servicemix-version}</version>
+                  <classifier>installer</classifier>
+                  <type>zip</type>
+                </artifactItem>
+                <artifactItem>
+                  <groupId>org.apache.servicemix</groupId>
                   <artifactId>servicemix-file</artifactId>
                   <version>${servicemix-version}</version>
                   <classifier>installer</classifier>

Modified: servicemix/smx3/trunk/distributions/apache-servicemix/src/main/release/bin/smx-arch
URL: http://svn.apache.org/viewvc/servicemix/smx3/trunk/distributions/apache-servicemix/src/main/release/bin/smx-arch?rev=667011&r1=667010&r2=667011&view=diff
==============================================================================
--- servicemix/smx3/trunk/distributions/apache-servicemix/src/main/release/bin/smx-arch (original)
+++ servicemix/smx3/trunk/distributions/apache-servicemix/src/main/release/bin/smx-arch Thu Jun 12 02:05:21 2008
@@ -79,8 +79,8 @@
   echo "                    ftp-poller, ftp-sender,"
   echo "                    jsr181-annotated, jsr181-wsdl-first, mail,"
   echo "                    saxon-xquery, saxon-xslt, osworkflow,"
-  echo "                    eip, lwcontainer, bean, ode, camel"
-  echo "		    cxf-se, cxf-se-wsdl-first, cxf-bc"
+  echo "                    eip, lwcontainer, bean, ode, camel, scripting,"
+  echo "                    cxf-se, cxf-se-wsdl-first, cxf-bc"
   echo "Optional arguments:"
   echo "  -DgroupId=xxxx"
   echo "  -DartifactId=xxxx"

Modified: servicemix/smx3/trunk/distributions/apache-servicemix/src/main/release/bin/smx-arch.bat
URL: http://svn.apache.org/viewvc/servicemix/smx3/trunk/distributions/apache-servicemix/src/main/release/bin/smx-arch.bat?rev=667011&r1=667010&r2=667011&view=diff
==============================================================================
--- servicemix/smx3/trunk/distributions/apache-servicemix/src/main/release/bin/smx-arch.bat (original)
+++ servicemix/smx3/trunk/distributions/apache-servicemix/src/main/release/bin/smx-arch.bat Thu Jun 12 02:05:21 2008
@@ -50,8 +50,8 @@
 echo                     ftp-poller, ftp-sender,
 echo                     jsr181-annotated, jsr181-wsdl-first, mail, 
 echo                     saxon-xquery, saxon-xslt, osworkflow,
-echo                     eip, lwcontainer, bean, ode, camel
-echo			 cxf-se, cxf-se-wsdl-first, cxf-bc
+echo                     eip, lwcontainer, bean, ode, camel, scripting,
+echo                     cxf-se, cxf-se-wsdl-first, cxf-bc
 echo Optional arguments:
 echo   -DgroupId=xxxx
 echo   -DartifactId=xxxx

Modified: servicemix/smx3/trunk/pom.xml
URL: http://svn.apache.org/viewvc/servicemix/smx3/trunk/pom.xml?rev=667011&r1=667010&r2=667011&view=diff
==============================================================================
--- servicemix/smx3/trunk/pom.xml (original)
+++ servicemix/smx3/trunk/pom.xml Thu Jun 12 02:05:21 2008
@@ -803,6 +803,11 @@
             </dependency>
             <dependency>
                 <groupId>org.apache.servicemix</groupId>
+                <artifactId>servicemix-scripting</artifactId>
+                <version>3.3-SNAPSHOT</version>
+            </dependency>
+            <dependency>
+                <groupId>org.apache.servicemix</groupId>
                 <artifactId>servicemix-file</artifactId>
                 <version>3.3-SNAPSHOT</version>
             </dependency>