You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@servicemix.apache.org by jb...@apache.org on 2010/07/27 16:22:29 UTC

svn commit: r979719 - in /servicemix/components/engines/servicemix-script/trunk: pom.xml src/main/resources/OSGI-INF/ src/main/resources/OSGI-INF/blueprint/ src/main/resources/OSGI-INF/blueprint/servicemix-script.xml

Author: jbonofre
Date: Tue Jul 27 14:22:29 2010
New Revision: 979719

URL: http://svn.apache.org/viewvc?rev=979719&view=rev
Log:
Add OSGi resources in servicemix-script.

Added:
    servicemix/components/engines/servicemix-script/trunk/src/main/resources/OSGI-INF/
    servicemix/components/engines/servicemix-script/trunk/src/main/resources/OSGI-INF/blueprint/
    servicemix/components/engines/servicemix-script/trunk/src/main/resources/OSGI-INF/blueprint/servicemix-script.xml   (with props)
Modified:
    servicemix/components/engines/servicemix-script/trunk/pom.xml

Modified: servicemix/components/engines/servicemix-script/trunk/pom.xml
URL: http://svn.apache.org/viewvc/servicemix/components/engines/servicemix-script/trunk/pom.xml?rev=979719&r1=979718&r2=979719&view=diff
==============================================================================
--- servicemix/components/engines/servicemix-script/trunk/pom.xml (original)
+++ servicemix/components/engines/servicemix-script/trunk/pom.xml Tue Jul 27 14:22:29 2010
@@ -29,13 +29,41 @@
   <version>2010.02-SNAPSHOT</version>
   <packaging>jbi-component</packaging>
   
-  <name>ServiceMix :: Scripting Service Engine</name>
+  <name>Apache ServiceMix :: Components :: Scripting Service Engine ${project.version}</name>
   
   <scm>
     <connection>scm:svn:http://svn.apache.org/repos/asf/servicemix/components/engines/servicemix-script/trunk</connection>
     <developerConnection>scm:svn:https://svn.apache.org/repos/asf/servicemix/components/engines/servicemix-script/trunk</developerConnection>
     <url>http://svn.apache.org/viewcvs.cgi/servicemix/components/engines/servicemix-script/trunk</url>
   </scm>
+  
+  <properties>
+    <groovy.version>1.6.3</groovy.version>
+    <jruby.version>1.4.0</jruby.version>
+    
+    <servicemix.osgi.import>
+        !org.apache.servicemix.script*,
+        !META-INF.services.org.apache.xbean.spring.http.servicemix.apache.org.script,
+        org.apache.servicemix.common,
+        org.apache.servicemix.common.osgi,
+        org.apache.servicemix.executors.impl,
+        org.apache.servicemix.jbi.container*;resolution:=optional,
+        org.apache.servicemix.jbi.framework*;resolution:=optional,
+        org.apache.xbean.spring.context.v2,
+        org.springframework.beans.factory.xml,
+        sun.misc;resolution:=optional,
+        *
+    </servicemix.osgi.import>
+    <servicemix.osgi.export>
+        org.apache.servicemix.script*;version=${project.version},
+        META-INF.services.org.apache.xbean.spring.http.servicemix.apache.org.script
+    </servicemix.osgi.export>
+    <servicemix.osgi.bundles>
+        org.springframework.core,
+        org.springframework.beans,
+        org.springframework.context
+    </servicemix.osgi.bundles>
+  </properties>
 
   <dependencies>
     <dependency>
@@ -54,7 +82,7 @@
     <dependency>
       <groupId>org.codehaus.groovy</groupId>
       <artifactId>groovy-all</artifactId>
-      <version>1.6.3</version>
+      <version>${groovy.version}</version>
     </dependency>
     <dependency>
       <groupId>org.springframework</groupId>
@@ -80,7 +108,7 @@
     <dependency>
       <groupId>org.jruby</groupId>
       <artifactId>jruby</artifactId>
-      <version>1.4.0</version>
+      <version>${jruby.version}</version>
       <scope>test</scope>
     </dependency>
     <dependency>

Added: servicemix/components/engines/servicemix-script/trunk/src/main/resources/OSGI-INF/blueprint/servicemix-script.xml
URL: http://svn.apache.org/viewvc/servicemix/components/engines/servicemix-script/trunk/src/main/resources/OSGI-INF/blueprint/servicemix-script.xml?rev=979719&view=auto
==============================================================================
--- servicemix/components/engines/servicemix-script/trunk/src/main/resources/OSGI-INF/blueprint/servicemix-script.xml (added)
+++ servicemix/components/engines/servicemix-script/trunk/src/main/resources/OSGI-INF/blueprint/servicemix-script.xml Tue Jul 27 14:22:29 2010
@@ -0,0 +1,75 @@
+<?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.
+
+-->
+<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
+           xmlns:cm="http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.0.0"
+           xmlns:ext="http://aries.apache.org/blueprint/xmlns/blueprint-ext/v1.0.0">
+
+    <bean id="servicemix-script" class="org.apache.servicemix.script.ScriptComponent">
+        <property name="executorFactory" ref="executorFactory" />
+    </bean>
+    
+    <bean id="executorFactory" class="org.apache.servicemix.executors.impl.ExecutorFactoryImpl">
+        <property name="defaultConfig">
+            <bean class="org.apache.servicemix.executors.impl.ExecutorConfig">
+                <property name="corePoolSize" value="${threadPoolCorePoolSize}" />
+                <property name="maximumPoolSize" value="${threadPoolMaximumPoolSize}" />
+                <property name="queueSize" value="${threadPoolQueueSize}" />
+            </bean>
+        </property>
+    </bean>
+    
+    <bean id="endpoint-tracker" class="org.apache.servicemix.common.osgi.EndpointTracker">
+        <property name="component" ref="servicemix-script" />
+    </bean>
+    
+    <reference-list id="endpoints"
+            interface="org.apache.servicemix.common.osgi.EndpointWrapper"
+            availability="optional">
+        <reference-listener ref="endpoint-tracker" bind-method="register" unbind-method="unregister" />        
+    </reference-list>
+    
+    <service ref="servicemix-script" interface="javax.jbi.component.Component">
+        <service-properties>
+            <entry key="NAME" value="servicemix-script" />
+            <entry key="TYPE" value="service-engine" />
+        </service-properties>
+    </service>
+    
+    <service interface="org.apache.aries.blueprint.NamespaceHandler">
+        <service-properties>
+            <entry key="osgi.service.blueprint.namespace" value="http://servicemix.apache.org/script/1.0" />
+        </service-properties>
+        <bean class="org.apache.xbean.blueprint.context.impl.XBeanNamespaceHandler">
+            <argument value="http://servicemix.apache.org/script/1.0" />
+            <argument value="servicemix-script.xsd" />
+            <argument ref="blueprintBundle" />
+            <argument value="META-INF/services/org/apache/xbean/spring/http/servicemix.apache.org/script/1.0" />
+        </bean>
+    </service>
+    
+    <cm:property-placeholder persistent-id="org.apache.servicemix.components.script">
+        <cm:default-properties>
+            <cm:property name="threadPoolCorePoolSize" value="8" />
+            <cm:property name="threadPoolMaximumPoolSize" value="32" />
+            <cm:property name="threadPoolQueueSize" value="256" />
+        </cm:default-properties>
+    </cm:property-placeholder>
+           
+</blueprint>
\ No newline at end of file

Propchange: servicemix/components/engines/servicemix-script/trunk/src/main/resources/OSGI-INF/blueprint/servicemix-script.xml
------------------------------------------------------------------------------
    svn:mime-type = text/plain