servicemix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gno...@apache.org
Subject svn commit: r428869 - in /incubator/servicemix/trunk/samples: ./ basic/ basic/src/ basic/src/main/ basic/src/main/resources/ basic/src/main/resources/META-INF/
Date Fri, 04 Aug 2006 20:20:16 GMT
Author: gnodet
Date: Fri Aug  4 13:20:15 2006
New Revision: 428869

URL: http://svn.apache.org/viewvc?rev=428869&view=rev
Log:
Add the mavenized basic example

Added:
    incubator/servicemix/trunk/samples/basic/   (with props)
    incubator/servicemix/trunk/samples/basic/pom.xml
    incubator/servicemix/trunk/samples/basic/src/
    incubator/servicemix/trunk/samples/basic/src/main/
    incubator/servicemix/trunk/samples/basic/src/main/resources/
    incubator/servicemix/trunk/samples/basic/src/main/resources/META-INF/
    incubator/servicemix/trunk/samples/basic/src/main/resources/META-INF/spring.handlers
    incubator/servicemix/trunk/samples/basic/src/main/resources/servicemix.xml
Modified:
    incubator/servicemix/trunk/samples/pom.xml

Propchange: incubator/servicemix/trunk/samples/basic/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Fri Aug  4 13:20:15 2006
@@ -0,0 +1 @@
+target

Added: incubator/servicemix/trunk/samples/basic/pom.xml
URL: http://svn.apache.org/viewvc/incubator/servicemix/trunk/samples/basic/pom.xml?rev=428869&view=auto
==============================================================================
--- incubator/servicemix/trunk/samples/basic/pom.xml (added)
+++ incubator/servicemix/trunk/samples/basic/pom.xml Fri Aug  4 13:20:15 2006
@@ -0,0 +1,65 @@
+<?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.
+-->
+<!-- $Rev: 356052 $ $Date: 2005-12-11 14:41:20 -0800 (dim., 11 déc. 2005) $ -->
+<project
+    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"
+    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+    xmlns="http://maven.apache.org/POM/4.0.0">
+
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>org.apache.servicemix</groupId>
+        <artifactId>samples</artifactId>
+        <version>3.0-incubating-SNAPSHOT</version>
+    </parent>
+
+    <groupId>org.apache.servicemix.samples</groupId>
+    <artifactId>basic</artifactId>
+    <name>ServiceMix :: Samples :: Basic</name>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.apache.servicemix</groupId>
+            <artifactId>servicemix-components</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>quartz</groupId>
+            <artifactId>quartz</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>incubator-activemq</groupId>
+            <artifactId>activemq-ra</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>incubator-activemq</groupId>
+            <artifactId>activemq-core</artifactId>
+        </dependency>
+    </dependencies>
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.servicemix.tooling</groupId>
+                <artifactId>jbi-maven-plugin</artifactId>
+                <extensions>true</extensions>
+            </plugin>
+        </plugins>
+    </build>
+</project>

Added: incubator/servicemix/trunk/samples/basic/src/main/resources/META-INF/spring.handlers
URL: http://svn.apache.org/viewvc/incubator/servicemix/trunk/samples/basic/src/main/resources/META-INF/spring.handlers?rev=428869&view=auto
==============================================================================
--- incubator/servicemix/trunk/samples/basic/src/main/resources/META-INF/spring.handlers (added)
+++ incubator/servicemix/trunk/samples/basic/src/main/resources/META-INF/spring.handlers Fri
Aug  4 13:20:15 2006
@@ -0,0 +1 @@
+http\://activemq.org/config/1.0=org.apache.xbean.spring.context.v2.XBeanNamespaceHandler

Added: incubator/servicemix/trunk/samples/basic/src/main/resources/servicemix.xml
URL: http://svn.apache.org/viewvc/incubator/servicemix/trunk/samples/basic/src/main/resources/servicemix.xml?rev=428869&view=auto
==============================================================================
--- incubator/servicemix/trunk/samples/basic/src/main/resources/servicemix.xml (added)
+++ incubator/servicemix/trunk/samples/basic/src/main/resources/servicemix.xml Fri Aug  4
13:20:15 2006
@@ -0,0 +1,189 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<beans xmlns="http://xbean.org/schemas/spring/1.0"
+	xmlns:spring="http://xbean.org/schemas/spring/1.0"
+	xmlns:sm="http://servicemix.apache.org/config/1.0"
+	xmlns:amq="http://activemq.org/config/1.0"
+	xmlns:my="http://servicemix.apache.org/demo/">
+
+
+	<!-- the JBI container -->
+	<sm:container spring:id="jbi" rootDir="./data/smx" useMBeanServer="true"
+		createMBeanServer="true" dumpStats="true"
+		statsInterval="10" transactionManager="#transactionManager">
+
+		<sm:activationSpecs>
+
+			<!-- lets kick off a timer to send messages on an input destination topic -->
+			<sm:activationSpec componentName="timer" service="my:timer"
+				destinationService="my:inputSender">
+				<sm:component>
+					<bean xmlns="http://xbean.org/schemas/spring/1.0"
+						class="org.apache.servicemix.components.quartz.QuartzComponent">
+						<property name="triggers">
+							<map>
+								<entry>
+									<key>
+										<bean
+											class="org.quartz.SimpleTrigger">
+											<property
+												name="repeatInterval" value="5000" />
+											<property name="repeatCount"
+												value="-1" />
+										</bean>
+									</key>
+									<bean
+										class="org.quartz.JobDetail">
+										<property name="name"
+											value="My Example Job" />
+										<property name="group"
+											value="ServiceMix" />
+									</bean>
+								</entry>
+							</map>
+						</property>
+					</bean>
+				</sm:component>
+			</sm:activationSpec>
+
+			<sm:activationSpec componentName="inputSender"
+				service="my:inputSender">
+				<sm:component>
+					<bean xmlns="http://xbean.org/schemas/spring/1.0"
+						class="org.apache.servicemix.components.jms.JmsSenderComponent">
+						<property name="template">
+							<bean
+								class="org.springframework.jms.core.JmsTemplate">
+								<property name="connectionFactory">
+									<ref local="jmsFactory" />
+								</property>
+								<property name="defaultDestinationName"
+									value="demo.org.servicemix.source" />
+								<property name="pubSubDomain"
+									value="true" />
+							</bean>
+						</property>
+					</bean>
+				</sm:component>
+			</sm:activationSpec>
+
+
+			<!-- lets subscribe and republish on a different JMS destination - i.e. make a JMS
bridge -->
+			<sm:activationSpec componentName="inputReceiver"
+				service="my:inputReceiver" destinationService="my:outputSender">
+				<sm:component>
+					<bean xmlns="http://xbean.org/schemas/spring/1.0"
+						class="org.apache.servicemix.components.jms.JmsInUsingJCABinding">
+						<property name="jcaContainer" ref="jencks" />
+						<property name="activationSpec">
+							<bean
+								class="org.apache.activemq.ra.ActiveMQActivationSpec">
+								<property name="destination"
+									value="demo.org.servicemix.source" />
+								<property name="destinationType"
+									value="javax.jms.Topic" />
+							</bean>
+						</property>
+					</bean>
+				</sm:component>
+			</sm:activationSpec>
+
+
+			<sm:activationSpec componentName="outputSender"
+				service="my:outputSender">
+				<sm:component>
+					<bean xmlns="http://xbean.org/schemas/spring/1.0"
+						class="org.apache.servicemix.components.jms.JmsSenderComponent">
+						<property name="template">
+							<bean
+								class="org.springframework.jms.core.JmsTemplate">
+								<property name="connectionFactory">
+									<ref local="jmsFactory" />
+								</property>
+								<property name="defaultDestinationName"
+									value="demo.org.servicemix.result" />
+								<property name="pubSubDomain"
+									value="true" />
+							</bean>
+						</property>
+					</bean>
+				</sm:component>
+			</sm:activationSpec>
+
+
+			<!-- just to demonstrate that we are sending messages, lets trace the messages we receive
-->
+			<sm:activationSpec componentName="jmsTrace"
+				service="my:jmsTrace" destinationService="my:trace">
+				<sm:component>
+					<bean xmlns="http://xbean.org/schemas/spring/1.0"
+						class="org.apache.servicemix.components.jms.JmsInUsingJCABinding">
+						<property name="jcaContainer" ref="jencks" />
+						<property name="activationSpec">
+							<bean
+								class="org.apache.activemq.ra.ActiveMQActivationSpec">
+								<property name="destination"
+									value="demo.org.servicemix.result" />
+								<property name="destinationType"
+									value="javax.jms.Topic" />
+							</bean>
+						</property>
+					</bean>
+				</sm:component>
+			</sm:activationSpec>
+
+			<sm:activationSpec componentName="trace"
+				service="my:trace">
+				<sm:component>
+					<bean xmlns="http://xbean.org/schemas/spring/1.0"
+						class="org.apache.servicemix.components.util.TraceComponent" />
+				</sm:component>
+			</sm:activationSpec>
+		</sm:activationSpecs>
+	</sm:container>
+
+
+	<!-- the JCA container -->
+	<bean id="jencks" class="org.jencks.JCAContainer"
+		singleton="true">
+
+		<!-- lets use the default configuration of work manager and transaction manager-->
+		<property name="bootstrapContext">
+			<bean
+				class="org.jencks.factory.BootstrapContextFactoryBean">
+				<property name="threadPoolSize" value="25" />
+			</bean>
+		</property>
+
+		<!-- the JCA Resource Adapter -->
+		<property name="resourceAdapter">
+			<bean id="activeMQResourceAdapter"
+				class="org.apache.activemq.ra.ActiveMQResourceAdapter" singleton="true">
+				<property name="serverUrl"
+					value="tcp://localhost:61616" />
+			</bean>
+		</property>
+	</bean>
+
+	<!-- message broker -->
+	<amq:broker id="broker" persistent="false">
+		<amq:transportConnectors>
+			<amq:transportConnector uri="tcp://localhost:61616" />
+		</amq:transportConnectors>
+	</amq:broker>
+
+	<bean id="transactionContextManager" 
+		class="org.jencks.factory.TransactionContextManagerFactoryBean"/>
+	<bean id="transactionManager"
+		class="org.jencks.factory.GeronimoTransactionManagerFactoryBean" />
+
+	<bean id="jmsFactory"
+		class="org.apache.activemq.pool.PooledConnectionFactory">
+		<property name="connectionFactory">
+			<bean class="org.apache.activemq.ActiveMQConnectionFactory">
+				<property name="brokerURL">
+					<value>tcp://localhost:61616</value>
+				</property>
+			</bean>
+		</property>
+	</bean>
+
+</beans>

Modified: incubator/servicemix/trunk/samples/pom.xml
URL: http://svn.apache.org/viewvc/incubator/servicemix/trunk/samples/pom.xml?rev=428869&r1=428868&r2=428869&view=diff
==============================================================================
--- incubator/servicemix/trunk/samples/pom.xml (original)
+++ incubator/servicemix/trunk/samples/pom.xml Fri Aug  4 13:20:15 2006
@@ -15,11 +15,7 @@
     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.
--->
-<!-- $Rev: 356052 $ $Date: 2005-12-11 14:41:20 -0800 (dim., 11 déc. 2005) $ -->
-<project
-  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"
-  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0">
+--><!-- $Rev: 356052 $ $Date: 2005-12-11 14:41:20 -0800 (dim., 11 déc. 2005) $ --><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>
 
@@ -39,5 +35,6 @@
     <module>loan-broker</module>
     <module>bridge</module>
     <module>servicemix-web</module>
+    <module>basic</module>
   </modules>
-</project>
+</project>
\ No newline at end of file



Mime
View raw message