You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@servicemix.apache.org by gn...@apache.org on 2009/03/17 09:39:29 UTC
svn commit: r755151 - in /servicemix/smx4/nmr/trunk: ./ examples/
examples/cluster/ examples/cluster/instances/
examples/cluster/instances/smx1/ examples/cluster/instances/smx1/deploy/
examples/cluster/instances/smx2/ examples/cluster/instances/smx2/de...
Author: gnodet
Date: Tue Mar 17 08:39:28 2009
New Revision: 755151
URL: http://svn.apache.org/viewvc?rev=755151&view=rev
Log:
SMX4NMR-25: Add a cluster example
Added:
servicemix/smx4/nmr/trunk/examples/cluster/ (with props)
servicemix/smx4/nmr/trunk/examples/cluster/README.txt
servicemix/smx4/nmr/trunk/examples/cluster/instances/
servicemix/smx4/nmr/trunk/examples/cluster/instances/smx1/
servicemix/smx4/nmr/trunk/examples/cluster/instances/smx1/deploy/
servicemix/smx4/nmr/trunk/examples/cluster/instances/smx1/deploy/cluster.xml
servicemix/smx4/nmr/trunk/examples/cluster/instances/smx1/deploy/jms.xml
servicemix/smx4/nmr/trunk/examples/cluster/instances/smx1/deploy/quartz.xml
servicemix/smx4/nmr/trunk/examples/cluster/instances/smx2/
servicemix/smx4/nmr/trunk/examples/cluster/instances/smx2/deploy/
servicemix/smx4/nmr/trunk/examples/cluster/instances/smx2/deploy/camel.xml
servicemix/smx4/nmr/trunk/examples/cluster/instances/smx2/deploy/cluster.xml
servicemix/smx4/nmr/trunk/examples/cluster/instances/smx2/deploy/jms.xml
servicemix/smx4/nmr/trunk/examples/cluster/pom.xml
Modified:
servicemix/smx4/nmr/trunk/examples/pom.xml
servicemix/smx4/nmr/trunk/pom.xml
Propchange: servicemix/smx4/nmr/trunk/examples/cluster/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Tue Mar 17 08:39:28 2009
@@ -0,0 +1,4 @@
+target
+*.iml
+*.ipr
+*.iws
Added: servicemix/smx4/nmr/trunk/examples/cluster/README.txt
URL: http://svn.apache.org/viewvc/servicemix/smx4/nmr/trunk/examples/cluster/README.txt?rev=755151&view=auto
==============================================================================
--- servicemix/smx4/nmr/trunk/examples/cluster/README.txt (added)
+++ servicemix/smx4/nmr/trunk/examples/cluster/README.txt Tue Mar 17 08:39:28 2009
@@ -0,0 +1,123 @@
+/*
+ * 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.
+ */
+
+Welcome to the ServiceMix NMR cluster example
+=============================================
+
+This example shows how to set up a cluster of two ServiceMix NMR and install
+a simple example demonstrating the transparent remoting capability.
+
+Description
+===========
+
+This example will use three ServiceMix instances:
+ * the main one will contain an ActiveMQ broker
+ * the second one will contain a quartz service assembly which will fire JBI exchanges
+ at repeated intervals. This quartz endpoint is registered as a clustered endpoint
+ so that those exchanges will go through the cluster engine instead of looking for
+ the target locally
+ * the last one will contain a camel route which will receive the exchanges coming from
+ the previous instances and log them
+
+The two custer engines deployed on the instances will use a single ActiveMQ broker. It is
+possible to set up two different brokers and create a cluster of broker by changing the
+configuration of the brokers so that they discover each other. However, this is not the
+main topic of this example.
+
+In order to set up this example, you will first create the ActiveMQ broker, then create two
+new ServiceMix instances and deploy the required configurations on to them. For each of
+these instances, three files will be put in the deploy folder:
+ * jms.xml contains a definition of a JMS ConnectionFactory pointing to the ActiveMQ broker
+ that will be registered in OSGi for the cluster engine to use it
+ * cluster.xml contains the cluster engine definition. This is not a spring configuration
+ file, but a feature descriptor (see ServiceMix Kernel User's Guide for more informations).
+ This descriptor will be user to automatically install the JBI cluster engine and the
+ required JBI component for this particular instance
+ * quartz.xml / camel.xml contain the JBI endpoints definition
+
+Instructions
+============
+
+First, run "mvn install" in this examples folder, then copy the contents of the "target/instances"
+folder from this example into the installation directory of ServiceMix.
+Note that the cluster.xml files refer to the release of ServiceMix Features project. The default
+version used in this example is 4.0.0, but if this version has not been released yet, you need
+to edit the pom.xml and replace the <properties><servicemix.features.version> text element with
+a valid version, for example 4.0-m2-SNAPSHOT.
+
+You should have the following tree:
+ + apache-servicemix-nmr
+ |-- ant
+ |-- bin
+ |-- etc
+ |-- examples
+ |-- instances
+ | |-- smx1
+ | | \-- deploy
+ | | |-- cluster.xml
+ | | |-- jms.xml
+ | | \-- quartz.xml
+ | \-- smxx
+ | \-- deploy
+ | |-- camel.xml
+ | |-- cluter.xml
+ | \-- jms.xml
+ |-- lib
+ \-- system
+
+The three commands below will install Apache ActiveMQ on the main instance and create a broker.
+In this example, we will only use a single ActiveMQ broker but you can change this topology
+to create a broker per JBI container if you want. The required change would be to install
+a broker on each of the instances and configure them to build a network of brokers.
+See the ActiveMQ web site (http://activemq.apache.org/networks-of-brokers.html) for more
+informations.
+
+Note that the maven url below may need to be changed. It is pointing to the released version
+of Apache ServiceMix 4.x and the version may need to be modified (if the 4.0.0 version has not
+been released yet, you need to change it to a snapshot version). Something like:
+ mvn:org.apache.servicemix.features/apache-servicemix/4.0-m2-SNAPSHOT/xml/features
+
+smx@root:/> features/addUrl mvn:org.apache.servicemix.features/apache-servicemix/4.0.0/xml/features
+smx@root:/> features/install activemq
+smx@root:/> activemq/create-broker
+
+Then, create two new instances of ServiceMix Kernel and start then using the following commands:
+
+smx@root:/> admin/create smx1
+smx@root:/> admin/start smx1
+smx@root:/> admin/create smx2
+smx@root:/> admin/start smx2
+
+Wait for the two new instances to be fully started. This can be easily checked by running the
+following command:
+
+smx@root:/> admin/list
+
+Both instances should be displayed as either "Starting" or "Started", so you just need to wait
+a bit until both are displayed as "Started".
+
+
+
+Now, we can make sure the example is working as designed by connecting to the "smx2" instance
+and checking the log.
+
+smx:root:/> admin/connect smx2
+smx:smx2:/> ld | grep Exchange
+
+You should see a list of log statements, one for each message received from the "smx1" instance.
+
+
Added: servicemix/smx4/nmr/trunk/examples/cluster/instances/smx1/deploy/cluster.xml
URL: http://svn.apache.org/viewvc/servicemix/smx4/nmr/trunk/examples/cluster/instances/smx1/deploy/cluster.xml?rev=755151&view=auto
==============================================================================
--- servicemix/smx4/nmr/trunk/examples/cluster/instances/smx1/deploy/cluster.xml (added)
+++ servicemix/smx4/nmr/trunk/examples/cluster/instances/smx1/deploy/cluster.xml Tue Mar 17 08:39:28 2009
@@ -0,0 +1,33 @@
+<!--
+
+ 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.
+-->
+<!--
+ This feature descriptor will be loaded by the ServiceMix Kernel deployer and the feature
+ defined here will be automatically installed.
+ -->
+<features>
+ <repository>mvn:org.apache.servicemix.nmr/apache-servicemix-nmr/${servicemix.nmr.version}/xml/features</repository>
+ <repository>mvn:org.apache.servicemix.features/apache-servicemix/${servicemix.features.version}/xml/features</repository>
+ <feature name="cluster-example-smx2">
+ <config name="org.apache.servicemix.jbi.cluster.config">
+ clusterName=smx2
+ </config>
+ <feature>activemq</feature>
+ <feature>jbi-cluster</feature>
+ <feature>servicemix-quartz</feature>
+ </feature>
+</features>
Added: servicemix/smx4/nmr/trunk/examples/cluster/instances/smx1/deploy/jms.xml
URL: http://svn.apache.org/viewvc/servicemix/smx4/nmr/trunk/examples/cluster/instances/smx1/deploy/jms.xml?rev=755151&view=auto
==============================================================================
--- servicemix/smx4/nmr/trunk/examples/cluster/instances/smx1/deploy/jms.xml (added)
+++ servicemix/smx4/nmr/trunk/examples/cluster/instances/smx1/deploy/jms.xml Tue Mar 17 08:39:28 2009
@@ -0,0 +1,65 @@
+<!--
+ 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.
+-->
+<!--
+ This spring application defines a JMS ConnectionFactory pointing to an ActiveMQ broker at
+ tcp://localhost:61616
+ and register this connection factory in the OSGi registry.
+ -->
+<beans
+ xmlns="http://www.springframework.org/schema/beans"
+ xmlns:amq="http://activemq.apache.org/schema/core"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:osgi="http://www.springframework.org/schema/osgi"
+ xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
+ http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd
+ http://activemq.apache.org/camel/schema/spring http://activemq.apache.org/camel/schema/spring/camel-spring.xsd
+ http://www.springframework.org/schema/osgi http://www.springframework.org/schema/osgi/spring-osgi.xsd">
+
+ <!-- Allows us to use system properties as variables in this configuration file -->
+ <bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"/>
+
+ <bean id="activemqConnectionFactory" class="org.apache.activemq.ActiveMQConnectionFactory">
+ <property name="brokerURL" value="tcp://localhost:61616" />
+ </bean>
+
+ <bean id="pooledConnectionFactory" class="org.apache.activemq.pool.PooledConnectionFactoryBean">
+ <property name="maxConnections" value="8" />
+ <property name="transactionManager" ref="transactionManager" />
+ <property name="connectionFactory" ref="activemqConnectionFactory" />
+ <property name="resourceName" value="activemq.localhost" />
+ </bean>
+
+ <bean id="resourceManager" class="org.apache.activemq.pool.ActiveMQResourceManager" init-method="recoverResource">
+ <property name="transactionManager" ref="transactionManager" />
+ <property name="connectionFactory" ref="activemqConnectionFactory" />
+ <property name="resourceName" value="activemq.localhost" />
+ </bean>
+
+ <osgi:reference id="transactionManager" interface="javax.transaction.TransactionManager" />
+
+ <osgi:service ref="pooledConnectionFactory">
+ <osgi:interfaces>
+ <value>javax.jms.ConnectionFactory</value>
+ </osgi:interfaces>
+ <osgi:service-properties>
+ <entry key="name" value="localhost"/>
+ </osgi:service-properties>
+ </osgi:service>
+
+</beans>
+
+
Added: servicemix/smx4/nmr/trunk/examples/cluster/instances/smx1/deploy/quartz.xml
URL: http://svn.apache.org/viewvc/servicemix/smx4/nmr/trunk/examples/cluster/instances/smx1/deploy/quartz.xml?rev=755151&view=auto
==============================================================================
--- servicemix/smx4/nmr/trunk/examples/cluster/instances/smx1/deploy/quartz.xml (added)
+++ servicemix/smx4/nmr/trunk/examples/cluster/instances/smx1/deploy/quartz.xml Tue Mar 17 08:39:28 2009
@@ -0,0 +1,56 @@
+<?xml version="1.0"?>
+<!--
+ 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="http://www.springframework.org/schema/beans"
+ xmlns:util="http://www.springframework.org/schema/util"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:quartz="http://servicemix.apache.org/quartz/1.0"
+ xmlns:camel="http://activemq.apache.org/camel/schema/spring"
+ xmlns:osgi="http://www.springframework.org/schema/osgi"
+ xmlns:b="http://servicemix.apache.org/examples/camel"
+ xsi:schemaLocation="
+ http://www.springframework.org/schema/beans
+ http://www.springframework.org/schema/beans/spring-beans.xsd
+ http://www.springframework.org/schema/util
+ http://www.springframework.org/schema/util/spring-util.xsd
+ http://www.springframework.org/schema/osgi
+ http://www.springframework.org/schema/osgi/spring-osgi.xsd
+ http://www.springframework.org/schema/osgi-compendium
+ http://www.springframework.org/schema/osgi-compendium/spring-osgi-compendium.xsd
+ http://servicemix.apache.org/quartz/1.0
+ http://servicemix.apache.org/quartz/1.0/servicemix-quartz.xsd
+ http://activemq.apache.org/camel/schema/spring
+ http://activemq.apache.org/camel/schema/spring/camel-spring.xsd
+ http://www.springframework.org/schema/osgi
+ http://www.springframework.org/schema/osgi/spring-osgi.xsd">
+
+ <!-- Define a quartz endpoint, firing JBI exchangs every 500 ms -->
+ <quartz:endpoint id="quartzEndpoint" service="b:service" endpoint="endpoint" targetService="b:receiver">
+ <quartz:trigger>
+ <quartz:simple repeatCount="500" repeatInterval="500" startDelay="2000" />
+ </quartz:trigger>
+ </quartz:endpoint>
+
+ <!-- Export the endpoints and create a service assembly -->
+ <bean class="org.apache.servicemix.common.osgi.EndpointExporter" />
+
+ <!-- Register the quartzEndpoint endpoint as a clustered endpoint -->
+ <bean class="org.apache.servicemix.jbi.cluster.engine.OsgiSimpleClusterRegistration">
+ <property name="endpoint" ref="quartzEndpoint" />
+ </bean>
+
+</beans>
Added: servicemix/smx4/nmr/trunk/examples/cluster/instances/smx2/deploy/camel.xml
URL: http://svn.apache.org/viewvc/servicemix/smx4/nmr/trunk/examples/cluster/instances/smx2/deploy/camel.xml?rev=755151&view=auto
==============================================================================
--- servicemix/smx4/nmr/trunk/examples/cluster/instances/smx2/deploy/camel.xml (added)
+++ servicemix/smx4/nmr/trunk/examples/cluster/instances/smx2/deploy/camel.xml Tue Mar 17 08:39:28 2009
@@ -0,0 +1,52 @@
+<?xml version="1.0"?>
+<!--
+ 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="http://www.springframework.org/schema/beans"
+ xmlns:util="http://www.springframework.org/schema/util"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:quartz="http://servicemix.apache.org/quartz/1.0"
+ xmlns:camel="http://activemq.apache.org/camel/schema/spring"
+ xmlns:osgi="http://www.springframework.org/schema/osgi"
+ xmlns:b="http://servicemix.apache.org/examples/camel"
+ xsi:schemaLocation="
+ http://www.springframework.org/schema/beans
+ http://www.springframework.org/schema/beans/spring-beans.xsd
+ http://www.springframework.org/schema/util
+ http://www.springframework.org/schema/util/spring-util.xsd
+ http://www.springframework.org/schema/osgi
+ http://www.springframework.org/schema/osgi/spring-osgi.xsd
+ http://www.springframework.org/schema/osgi-compendium
+ http://www.springframework.org/schema/osgi-compendium/spring-osgi-compendium.xsd
+ http://servicemix.apache.org/quartz/1.0
+ http://servicemix.apache.org/quartz/1.0/servicemix-quartz.xsd
+ http://activemq.apache.org/camel/schema/spring
+ http://activemq.apache.org/camel/schema/spring/camel-spring.xsd
+ http://www.springframework.org/schema/osgi
+ http://www.springframework.org/schema/osgi/spring-osgi.xsd">
+
+ <!-- Define a camel route using a JBI endpoint to receive exchanges from the other instance -->
+ <camel:camelContext>
+ <camel:route>
+ <camel:from uri="jbi:endpoint:http://servicemix.apache.org/examples/camel/receiver/endpoint" />
+ <camel:to uri="log:test" />
+ </camel:route>
+ </camel:camelContext>
+
+ <!-- Export the endpoints and create a service assembly -->
+ <bean class="org.apache.servicemix.common.osgi.EndpointExporter" />
+
+</beans>
Added: servicemix/smx4/nmr/trunk/examples/cluster/instances/smx2/deploy/cluster.xml
URL: http://svn.apache.org/viewvc/servicemix/smx4/nmr/trunk/examples/cluster/instances/smx2/deploy/cluster.xml?rev=755151&view=auto
==============================================================================
--- servicemix/smx4/nmr/trunk/examples/cluster/instances/smx2/deploy/cluster.xml (added)
+++ servicemix/smx4/nmr/trunk/examples/cluster/instances/smx2/deploy/cluster.xml Tue Mar 17 08:39:28 2009
@@ -0,0 +1,33 @@
+<!--
+
+ 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.
+-->
+<!--
+ This feature descriptor will be loaded by the ServiceMix Kernel deployer and the feature
+ defined here will be automatically installed.
+ -->
+<features>
+ <repository>mvn:org.apache.servicemix.nmr/apache-servicemix-nmr/${servicemix.nmr.version}/xml/features</repository>
+ <repository>mvn:org.apache.servicemix.features/apache-servicemix/${servicemix.features.version}/xml/features</repository>
+ <feature name="cluster-example-smx2">
+ <config name="org.apache.servicemix.jbi.cluster.config">
+ clusterName=smx2
+ </config>
+ <feature>activemq</feature>
+ <feature>jbi-cluster</feature>
+ <feature>servicemix-camel</feature>
+ </feature>
+</features>
Added: servicemix/smx4/nmr/trunk/examples/cluster/instances/smx2/deploy/jms.xml
URL: http://svn.apache.org/viewvc/servicemix/smx4/nmr/trunk/examples/cluster/instances/smx2/deploy/jms.xml?rev=755151&view=auto
==============================================================================
--- servicemix/smx4/nmr/trunk/examples/cluster/instances/smx2/deploy/jms.xml (added)
+++ servicemix/smx4/nmr/trunk/examples/cluster/instances/smx2/deploy/jms.xml Tue Mar 17 08:39:28 2009
@@ -0,0 +1,66 @@
+<!--
+ 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.
+-->
+<!--
+ This spring application defines a JMS ConnectionFactory pointing to an ActiveMQ broker at
+ tcp://localhost:61616
+ and register this connection factory in the OSGi registry.
+ -->
+<beans
+ xmlns="http://www.springframework.org/schema/beans"
+ xmlns:amq="http://activemq.apache.org/schema/core"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:osgi="http://www.springframework.org/schema/osgi"
+ xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
+ http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd
+ http://activemq.apache.org/camel/schema/spring http://activemq.apache.org/camel/schema/spring/camel-spring.xsd
+ http://www.springframework.org/schema/osgi http://www.springframework.org/schema/osgi/spring-osgi.xsd">
+
+ <!-- Allows us to use system properties as variables in this configuration file -->
+ <bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"/>
+
+ <bean id="activemqConnectionFactory" class="org.apache.activemq.ActiveMQConnectionFactory">
+ <property name="brokerURL" value="tcp://localhost:61616" />
+ </bean>
+
+ <bean id="pooledConnectionFactory" class="org.apache.activemq.pool.PooledConnectionFactoryBean">
+ <property name="maxConnections" value="8" />
+ <property name="transactionManager" ref="transactionManager" />
+ <property name="connectionFactory" ref="activemqConnectionFactory" />
+ <property name="resourceName" value="activemq.localhost" />
+ </bean>
+
+ <bean id="resourceManager" class="org.apache.activemq.pool.ActiveMQResourceManager" init-method="recoverResource">
+ <property name="transactionManager" ref="transactionManager" />
+ <property name="connectionFactory" ref="activemqConnectionFactory" />
+ <property name="resourceName" value="activemq.localhost" />
+ </bean>
+
+ <osgi:reference id="transactionManager" interface="javax.transaction.TransactionManager" />
+
+ <osgi:service ref="pooledConnectionFactory">
+
+ <osgi:interfaces>
+ <value>javax.jms.ConnectionFactory</value>
+ </osgi:interfaces>
+ <osgi:service-properties>
+ <entry key="name" value="localhost"/>
+ </osgi:service-properties>
+ </osgi:service>
+
+</beans>
+
+
Added: servicemix/smx4/nmr/trunk/examples/cluster/pom.xml
URL: http://svn.apache.org/viewvc/servicemix/smx4/nmr/trunk/examples/cluster/pom.xml?rev=755151&view=auto
==============================================================================
--- servicemix/smx4/nmr/trunk/examples/cluster/pom.xml (added)
+++ servicemix/smx4/nmr/trunk/examples/cluster/pom.xml Tue Mar 17 08:39:28 2009
@@ -0,0 +1,67 @@
+<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.nmr.examples</groupId>
+ <artifactId>examples</artifactId>
+ <version>1.0.0-SNAPSHOT</version>
+ </parent>
+
+ <groupId>org.apache.servicemix.nmr.examples</groupId>
+ <artifactId>org.apache.servicemix.nmr.examples.cluster</artifactId>
+ <packaging>pom</packaging>
+ <name>Apache ServiceMix NMR Example:: Cluster</name>
+
+ <properties>
+ <servicemix.nmr.version>${pom.version}</servicemix.nmr.version>
+ <servicemix.features.version>4.0.0</servicemix.features.version>
+ </properties>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-resources-plugin</artifactId>
+ <version>2.3</version>
+ <executions>
+ <execution>
+ <id>copy-resources</id>
+ <phase>compile</phase>
+ <goals>
+ <goal>copy-resources</goal>
+ </goals>
+ <configuration>
+ <outputDirectory>${basedir}/target/instances</outputDirectory>
+ <resources>
+ <resource>
+ <directory>instances</directory>
+ <filtering>true</filtering>
+ </resource>
+ </resources>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+
+</project>
\ No newline at end of file
Modified: servicemix/smx4/nmr/trunk/examples/pom.xml
URL: http://svn.apache.org/viewvc/servicemix/smx4/nmr/trunk/examples/pom.xml?rev=755151&r1=755150&r2=755151&view=diff
==============================================================================
--- servicemix/smx4/nmr/trunk/examples/pom.xml (original)
+++ servicemix/smx4/nmr/trunk/examples/pom.xml Tue Mar 17 08:39:28 2009
@@ -32,6 +32,7 @@
<name>Apache ServiceMix NMR Examples</name>
<modules>
+ <module>cluster</module>
<module>nmr</module>
</modules>
Modified: servicemix/smx4/nmr/trunk/pom.xml
URL: http://svn.apache.org/viewvc/servicemix/smx4/nmr/trunk/pom.xml?rev=755151&r1=755150&r2=755151&view=diff
==============================================================================
--- servicemix/smx4/nmr/trunk/pom.xml (original)
+++ servicemix/smx4/nmr/trunk/pom.xml Tue Mar 17 08:39:28 2009
@@ -99,7 +99,7 @@
<servicemix.shared.version>2008.01</servicemix.shared.version>
<servicemix.kernel.version>1.1.0-SNAPSHOT</servicemix.kernel.version>
<servicemix.legal.version>1.0</servicemix.legal.version>
- <servicemix.specs.version>1.4.0-SNAPSHOT</servicemix.specs.version>
+ <servicemix.specs.version>1.4-SNAPSHOT</servicemix.specs.version>
<servicemix.utils.version>1.0.0</servicemix.utils.version>
<spring.osgi.version>1.2.0-m2</spring.osgi.version>
<spring.version>2.5.6</spring.version>