You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@servicemix.apache.org by pd...@apache.org on 2006/07/18 15:36:37 UTC
svn commit: r423083 - in
/incubator/servicemix/trunk/servicemix-components/src/test/resources/org/apache/servicemix/components/mps:
./ sample-mps-config.xml servicemix-mps-test.xml
Author: pdodds
Date: Tue Jul 18 06:36:36 2006
New Revision: 423083
URL: http://svn.apache.org/viewvc?rev=423083&view=rev
Log:
Added missing test resources for new MPS component
Added:
incubator/servicemix/trunk/servicemix-components/src/test/resources/org/apache/servicemix/components/mps/
incubator/servicemix/trunk/servicemix-components/src/test/resources/org/apache/servicemix/components/mps/sample-mps-config.xml
incubator/servicemix/trunk/servicemix-components/src/test/resources/org/apache/servicemix/components/mps/servicemix-mps-test.xml
Added: incubator/servicemix/trunk/servicemix-components/src/test/resources/org/apache/servicemix/components/mps/sample-mps-config.xml
URL: http://svn.apache.org/viewvc/incubator/servicemix/trunk/servicemix-components/src/test/resources/org/apache/servicemix/components/mps/sample-mps-config.xml?rev=423083&view=auto
==============================================================================
--- incubator/servicemix/trunk/servicemix-components/src/test/resources/org/apache/servicemix/components/mps/sample-mps-config.xml (added)
+++ incubator/servicemix/trunk/servicemix-components/src/test/resources/org/apache/servicemix/components/mps/sample-mps-config.xml Tue Jul 18 06:36:36 2006
@@ -0,0 +1,52 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<mps>
+
+ <property-set name="hello">
+
+ <!-- set a static string value -->
+ <property name="my-superdooper.property">
+ <static-value><![CDATA[wishAusMadeItTotheFinals]]></static-value>
+ </property>
+ </property-set>
+
+
+ <property-set name="propertySetOne">
+
+ <!-- set a static string value -->
+ <property name="property.1">
+ <static-value><![CDATA[foobarAndCheese]]></static-value>
+ </property>
+
+ <!--
+ xpath and a default string
+ -->
+ <property name="property.2">
+ <xpath-expression>
+ <![CDATA[/sample/@id]]>
+ </xpath-expression>
+ <static-value><![CDATA[sampleIdNotFound]]></static-value>
+ </property>
+
+ <!--
+ an xpath that doesn't work
+ -->
+ <property name="prop.xpath.or.keep.existing">
+ <xpath-expression>
+ <![CDATA[/someexpath/statement/that/wont/match]]>
+ </xpath-expression>
+ <existing-property/>
+ </property>
+
+ <property name="new.prop.name">
+ <existing-property name="other.property"/>
+ </property>
+
+ <property name="property.3">
+ <existing-property name="other.set.property"/>
+ </property>
+
+ </property-set>
+
+
+
+</mps>
Added: incubator/servicemix/trunk/servicemix-components/src/test/resources/org/apache/servicemix/components/mps/servicemix-mps-test.xml
URL: http://svn.apache.org/viewvc/incubator/servicemix/trunk/servicemix-components/src/test/resources/org/apache/servicemix/components/mps/servicemix-mps-test.xml?rev=423083&view=auto
==============================================================================
--- incubator/servicemix/trunk/servicemix-components/src/test/resources/org/apache/servicemix/components/mps/servicemix-mps-test.xml (added)
+++ incubator/servicemix/trunk/servicemix-components/src/test/resources/org/apache/servicemix/components/mps/servicemix-mps-test.xml Tue Jul 18 06:36:36 2006
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<beans xmlns:sm="http://servicemix.apache.org/config/1.0"
+ xmlns:foo="http://servicemix.org/cheese/">
+
+ <!-- the JBI container -->
+ <sm:container id="jbi" embedded="true">
+ <sm:activationSpecs>
+
+ <!-- START SNIPPET: fixedPropertySet -->
+ <sm:activationSpec componentName="mpsFixed" service="foo:mpsFixed">
+ <sm:component><bean class="org.apache.servicemix.components.mps.MessagePropertySetterXML">
+ <property name="xmlConfiguration" value="classpath:org/apache/servicemix/components/mps/sample-mps-config.xml"/>
+ <property name="propertySet" value="propertySetOne"/>
+ </bean></sm:component>
+ </sm:activationSpec>
+ <!-- END SNIPPET: -->
+
+
+ <!-- START SNIPPET: fixedPropertySet -->
+ <sm:activationSpec componentName="mpsXpath" service="foo:mpsXpath">
+ <sm:component><bean class="org.apache.servicemix.components.mps.MessagePropertySetterXML">
+ <property name="xmlConfiguration" value="classpath:org/apache/servicemix/components/mps/sample-mps-config.xml"/>
+ <property name="xpathForPropertySet" value="substring-before(/sample[@id=400],' world')"/>
+ </bean></sm:component>
+ </sm:activationSpec>
+ <!-- END SNIPPET: -->
+
+ <!-- START SNIPPET: propsLoadedFromProperty -->
+ <sm:activationSpec componentName="mpsJBIPropsPS" service="foo:mpsJBIPropsPS">
+ <sm:component><bean class="org.apache.servicemix.components.mps.MessagePropertySetterXML">
+ <property name="xmlConfiguration" value="classpath:org/apache/servicemix/components/mps/sample-mps-config.xml"/>
+ </bean></sm:component>
+ </sm:activationSpec>
+ <!-- END SNIPPET: -->
+
+
+ </sm:activationSpecs>
+ </sm:container>
+
+ <bean id="client" class="org.apache.servicemix.client.DefaultServiceMixClient">
+ <constructor-arg ref="jbi"/>
+ </bean>
+
+ <bean id="workManager" class="org.jencks.factory.WorkManagerFactoryBean"/>
+</beans>