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 2011/08/05 11:17:01 UTC
svn commit: r1154131 - in
/servicemix/archetypes/trunk/servicemix-binding-component/src/main/resources:
META-INF/maven/ archetype-resources/src/main/resources/OSGI-INF/
archetype-resources/src/main/resources/OSGI-INF/blueprint/
Author: jbonofre
Date: Fri Aug 5 09:17:01 2011
New Revision: 1154131
URL: http://svn.apache.org/viewvc?rev=1154131&view=rev
Log:
[SM-2112] Add blueprint descriptor in the binding component archetype
Added:
servicemix/archetypes/trunk/servicemix-binding-component/src/main/resources/archetype-resources/src/main/resources/OSGI-INF/
servicemix/archetypes/trunk/servicemix-binding-component/src/main/resources/archetype-resources/src/main/resources/OSGI-INF/blueprint/
servicemix/archetypes/trunk/servicemix-binding-component/src/main/resources/archetype-resources/src/main/resources/OSGI-INF/blueprint/my-component.xml
Modified:
servicemix/archetypes/trunk/servicemix-binding-component/src/main/resources/META-INF/maven/archetype.xml
Modified: servicemix/archetypes/trunk/servicemix-binding-component/src/main/resources/META-INF/maven/archetype.xml
URL: http://svn.apache.org/viewvc/servicemix/archetypes/trunk/servicemix-binding-component/src/main/resources/META-INF/maven/archetype.xml?rev=1154131&r1=1154130&r2=1154131&view=diff
==============================================================================
--- servicemix/archetypes/trunk/servicemix-binding-component/src/main/resources/META-INF/maven/archetype.xml (original)
+++ servicemix/archetypes/trunk/servicemix-binding-component/src/main/resources/META-INF/maven/archetype.xml Fri Aug 5 09:17:01 2011
@@ -25,6 +25,9 @@
<source>src/main/java/MyEndpointType.java</source>
<source>src/main/java/MyProviderEndpoint.java</source>
</sources>
+ <resources>
+ <resource>src/main/resources/OSGI-INF/blueprint/my-component.xml</resource>
+ </resources>
<testSources>
<source>src/test/java/MySpringComponentTest.java</source>
</testSources>
Added: servicemix/archetypes/trunk/servicemix-binding-component/src/main/resources/archetype-resources/src/main/resources/OSGI-INF/blueprint/my-component.xml
URL: http://svn.apache.org/viewvc/servicemix/archetypes/trunk/servicemix-binding-component/src/main/resources/archetype-resources/src/main/resources/OSGI-INF/blueprint/my-component.xml?rev=1154131&view=auto
==============================================================================
--- servicemix/archetypes/trunk/servicemix-binding-component/src/main/resources/archetype-resources/src/main/resources/OSGI-INF/blueprint/my-component.xml (added)
+++ servicemix/archetypes/trunk/servicemix-binding-component/src/main/resources/archetype-resources/src/main/resources/OSGI-INF/blueprint/my-component.xml Fri Aug 5 09:17:01 2011
@@ -0,0 +1,61 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<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">
+
+ <!-- Retrieve ManagementStrategy from OSGi service registry -->
+ <reference id="managementStrategy" interface="org.fusesource.commons.management.ManagementStrategy"/>
+
+ <bean id="my-component" class="${packageName}.MyComponent">
+ <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>
+ <property name="managementStrategy" ref="managementStrategy"/>
+ </bean>
+
+ <bean id="endpoint-tracker" class="org.apache.servicemix.common.osgi.EndpointTracker">
+ <property name="component" ref="my-component"/>
+ </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="my-component" interface="javax.jbi.component.Component">
+ <service-properties>
+ <entry key="NAME" value="my-component"/>
+ <entry key="TYPE" value="binding-component"/>
+ </service-properties>
+ </service>
+
+ <service interface="org.apache.aries.blueprint.NamespaceHandler">
+ <service-properties>
+ <entry key="osgi.service.blueprint.namespace" value="http://servicemix.apache.org/my-component/1.0"/>
+ </service-properties>
+ <bean class="org.apache.xbean.blueprint.context.impl.XBeanNamespaceHandler">
+ <argument value="http://servicemix.apache.org/my-component/1.0"/>
+ <argument value="servicemix-my-component.xsd"/>
+ <argument ref="blueprintBundle"/>
+ <argument value="META-INF/services/org/apache/xbean/spring/http/servicemix.apache.org/my-component/1.0"/>
+ </bean>
+ </service>
+
+ <cm:property-placeholder persistent-id="org.apache.servicemix.components.my-component">
+ <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