Author: ningjiang
Date: Tue Jun 10 21:13:58 2008
New Revision: 666518
URL: http://svn.apache.org/viewvc?rev=666518&view=rev
Log:
Added snippet comments for the spring integration component wiki page
Modified:
activemq/camel/trunk/components/camel-spring-integration/src/test/resources/org/apache/camel/component/spring/integration/adapter/CamelSource.xml
activemq/camel/trunk/components/camel-spring-integration/src/test/resources/org/apache/camel/component/spring/integration/adapter/CamelTarget.xml
activemq/camel/trunk/components/camel-spring-integration/src/test/resources/org/apache/camel/component/spring/integration/producer.xml
activemq/camel/trunk/components/camel-spring-integration/src/test/resources/org/apache/camel/component/spring/integration/springChannelConverter.xml
activemq/camel/trunk/components/camel-spring-integration/src/test/resources/org/apache/camel/component/spring/integration/twoWayConsumer.xml
Modified:
activemq/camel/trunk/components/camel-spring-integration/src/test/resources/org/apache/camel/component/spring/integration/adapter/CamelSource.xml
URL:
http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-spring-integration/src/test/resources/org/apache/camel/component/spring/integration/adapter/CamelSource.xml?rev=666518&r1=666517&r2=666518&view=diff
==============================================================================
---
activemq/camel/trunk/components/camel-spring-integration/src/test/resources/org/apache/camel/component/spring/integration/adapter/CamelSource.xml
(original)
+++
activemq/camel/trunk/components/camel-spring-integration/src/test/resources/org/apache/camel/component/spring/integration/adapter/CamelSource.xml
Tue Jun 10 21:13:58 2008
@@ -56,13 +56,19 @@
</route>
</camelContext>
+ <!-- camelSource will redirect the message coming for direct:EndpointB to
the spring requestChannel channelA -->
+
<camel-si:camelSource id="camelSourceA" camelEndpointUri="direct:EndpointB"
requestChannel="channelA" expectReply="false">
<camel-si:camelContextRef>camelSourceContext</camel-si:camelContextRef>
</camel-si:camelSource>
+ <!-- camelSource will redirect the message coming for direct:EndpointC to
the spring requestChannel channelB
+ then it will pull the response from channelC and put the response message
back to direct:EndpointC -->
+
<camel-si:camelSource id="camelSourceB" camelEndpointUri="direct:EndpointC"
requestChannel="channelB" replyChannel="channelC" expectReply="true">
<camel-si:camelContextRef>camelSourceContext</camel-si:camelContextRef>
</camel-si:camelSource>
<!-- END SNIPPET: example -->
</beans:beans>
+
Modified:
activemq/camel/trunk/components/camel-spring-integration/src/test/resources/org/apache/camel/component/spring/integration/adapter/CamelTarget.xml
URL:
http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-spring-integration/src/test/resources/org/apache/camel/component/spring/integration/adapter/CamelTarget.xml?rev=666518&r1=666517&r2=666518&view=diff
==============================================================================
---
activemq/camel/trunk/components/camel-spring-integration/src/test/resources/org/apache/camel/component/spring/integration/adapter/CamelTarget.xml
(original)
+++
activemq/camel/trunk/components/camel-spring-integration/src/test/resources/org/apache/camel/component/spring/integration/adapter/CamelTarget.xml
Tue Jun 10 21:13:58 2008
@@ -15,6 +15,7 @@
See the License for the specific language governing permissions and
limitations under the License.
-->
+<!-- START SNIPPET: header -->
<beans:beans xmlns="http://www.springframework.org/schema/integration"
xmlns:beans="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
@@ -24,21 +25,19 @@
http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
http://www.springframework.org/schema/integration
http://www.springframework.org/schema/integration/spring-integration-1.0.xsd
- http://cxf.apache.org/transports/camel
http://cxf.apache.org/transports/camel.xsd
http://activemq.apache.org/camel/schema/spring/integration
http://activemq.apache.org/camel/schema/spring/integration/camel-spring-integration.xsd
http://activemq.apache.org/camel/schema/spring
http://activemq.apache.org/camel/schema/spring/camel-spring.xsd
">
-
+ <!-- END SNIPPET: header -->
<message-bus/>
<channel id="channelA"/>
<channel id="channelB"/>
<channel id="channelC"/>
-
-
<!-- START SNIPPET: example -->
+ <!-- Create the camel context here -->
<camelContext id="camelTargetContext"
xmlns="http://activemq.apache.org/camel/schema/spring">
<route>
<from uri="direct:EndpointA" />
@@ -50,6 +49,7 @@
</route>
</camelContext>
+ <!-- We can bind the camelTarget to the camel context's endpoint by
specifying the camelEndpointUri attribute -->
<camel-si:camelTarget id="camelTargetA" camelEndpointUri="direct:EndpointA"
requestChannel="channelA" expectReply="false">
<camel-si:camelContextRef>camelTargetContext</camel-si:camelContextRef>
</camel-si:camelTarget>
@@ -60,5 +60,5 @@
<beans:bean id="myProcessor"
class="org.apache.camel.component.spring.integration.MyProcessor"/>
<!-- END SNIPPET: example -->
-
</beans:beans>
+
Modified:
activemq/camel/trunk/components/camel-spring-integration/src/test/resources/org/apache/camel/component/spring/integration/producer.xml
URL:
http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-spring-integration/src/test/resources/org/apache/camel/component/spring/integration/producer.xml?rev=666518&r1=666517&r2=666518&view=diff
==============================================================================
---
activemq/camel/trunk/components/camel-spring-integration/src/test/resources/org/apache/camel/component/spring/integration/producer.xml
(original)
+++
activemq/camel/trunk/components/camel-spring-integration/src/test/resources/org/apache/camel/component/spring/integration/producer.xml
Tue Jun 10 21:13:58 2008
@@ -15,6 +15,7 @@
See the License for the specific language governing permissions and
limitations under the License.
-->
+<!-- START SNIPPET: example -->
<beans:beans xmlns="http://www.springframework.org/schema/integration"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:beans="http://www.springframework.org/schema/beans"
@@ -33,7 +34,7 @@
method="sayHello"/>
<beans:bean id="helloService"
class="org.apache.camel.component.spring.integration.HelloWorldService"/>
-
+ <!-- START SNIPPET: example -->
<camelContext id="camel"
xmlns="http://activemq.apache.org/camel/schema/spring">
<route>
<from uri="direct:start"/>
@@ -41,4 +42,5 @@
<to
uri="spring-integration:inputChannel?inOut=true&inputChannel=outputChannel"/>
</route>
</camelContext>
+ <!-- END SNIPPET: example -->
</beans:beans>
Modified:
activemq/camel/trunk/components/camel-spring-integration/src/test/resources/org/apache/camel/component/spring/integration/springChannelConverter.xml
URL:
http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-spring-integration/src/test/resources/org/apache/camel/component/spring/integration/springChannelConverter.xml?rev=666518&r1=666517&r2=666518&view=diff
==============================================================================
---
activemq/camel/trunk/components/camel-spring-integration/src/test/resources/org/apache/camel/component/spring/integration/springChannelConverter.xml
(original)
+++
activemq/camel/trunk/components/camel-spring-integration/src/test/resources/org/apache/camel/component/spring/integration/springChannelConverter.xml
Tue Jun 10 21:13:58 2008
@@ -15,6 +15,7 @@
See the License for the specific language governing permissions and
limitations under the License.
-->
+<!-- START SNIPPET: example -->
<beans:beans xmlns="http://www.springframework.org/schema/integration"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:beans="http://www.springframework.org/schema/beans"
@@ -24,15 +25,17 @@
http://www.springframework.org/schema/integration/spring-integration-1.0.xsd
http://activemq.apache.org/camel/schema/spring
http://activemq.apache.org/camel/schema/spring/camel-spring.xsd">
-
+ <!-- START SNIPPET: example -->
<message-bus auto-create-channels="true"/>
<channel id="outputChannel"/>
<camelContext id="camel"
xmlns="http://activemq.apache.org/camel/schema/spring">
<route>
+ <!-- camel will create a spring integration endpoint automatically -->
<from uri="outputChannel"/>
<to uri="mock:result"/>
</route>
</camelContext>
+ <!-- END SNIPPET: example -->
</beans:beans>
Modified:
activemq/camel/trunk/components/camel-spring-integration/src/test/resources/org/apache/camel/component/spring/integration/twoWayConsumer.xml
URL:
http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-spring-integration/src/test/resources/org/apache/camel/component/spring/integration/twoWayConsumer.xml?rev=666518&r1=666517&r2=666518&view=diff
==============================================================================
---
activemq/camel/trunk/components/camel-spring-integration/src/test/resources/org/apache/camel/component/spring/integration/twoWayConsumer.xml
(original)
+++
activemq/camel/trunk/components/camel-spring-integration/src/test/resources/org/apache/camel/component/spring/integration/twoWayConsumer.xml
Tue Jun 10 21:13:58 2008
@@ -15,6 +15,7 @@
See the License for the specific language governing permissions and
limitations under the License.
-->
+
<beans:beans xmlns="http://www.springframework.org/schema/integration"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:beans="http://www.springframework.org/schema/beans"
@@ -24,7 +25,7 @@
http://www.springframework.org/schema/integration/spring-integration-1.0.xsd
http://activemq.apache.org/camel/schema/spring
http://activemq.apache.org/camel/schema/spring/camel-spring.xsd">
-
+ <!-- START SNIPPET: example -->
<message-bus auto-create-channels="true"/>
<channel id="requestChannel"/>
@@ -39,4 +40,6 @@
<process ref="myProcessor"/>
</route>
</camelContext>
+ <!-- END SNIPPET: example -->
</beans:beans>
+