cocoon-docs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From da...@cocoon.zones.apache.org
Subject [DAISY] Updated: Introduction
Date Sun, 17 Aug 2008 19:17:15 GMT
A document has been updated:

http://cocoon.zones.apache.org/daisy/documentation/1501.html

Document ID: 1501
Branch: main
Language: default
Name: Introduction (unchanged)
Document Type: Cocoon Document (unchanged)
Updated on: 8/17/08 7:17:07 PM
Updated by: Lukas Lang

A new version has been created, state: draft

Parts
=====

Content
-------
This part has been updated.
Mime type: text/xml (unchanged)
File name:  (unchanged)
Size: 5770 bytes (previous version: 2831 bytes)
Content diff:
(63 equal lines skipped)
    
    <pre>http://localhost:8080/cocoon-jms-sample/eventcache/action?event=one</pre>
    
+++ <h1>Configuration</h1>
+++ 
+++ <p>All of the previously used components are configured, using Spring and the
+++ ActiveMQ <em>amq </em>namespace. The sample's Spring bean definition looks
as
+++ follows:</p>
+++ 
+++ <pre>  &lt;!-- Event aware generator bean inherits from the jx generator --&gt;
+++   &lt;bean name="org.apache.cocoon.generation.Generator/EventCacheSample"
+++     class="org.apache.cocoon.samples.EventAwareGenerator" scope="prototype"
+++     parent="org.apache.cocoon.generation.Generator/jx" /&gt;
+++ 
+++   &lt;!-- Action bean --&gt;
+++   &lt;bean name="org.apache.cocoon.acting.Action/JMSPublisherAction"
+++     class="org.apache.cocoon.acting.JMSPublisherAction" scope="prototype"&gt;
+++     &lt;property name="template" ref="org.apache.cocoon.jms.sample.myJmsTemplate"
/&gt;
+++     &lt;property name="destination" ref="org.apache.cocoon.jms.sample.topic" /&gt;
+++   &lt;/bean&gt;
+++ 
+++   &lt;!--  lets create an embedded ActiveMQ Broker --&gt;
+++   &lt;amq:broker useJmx="false" persistent="false"&gt;
+++     &lt;amq:transportConnectors&gt;
+++       &lt;amq:transportConnector uri="tcp://localhost:0" /&gt;
+++     &lt;/amq:transportConnectors&gt;
+++   &lt;/amq:broker&gt;
+++ 
+++   &lt;!-- the topic to use --&gt;
+++   &lt;amq:topic id="org.apache.cocoon.jms.sample.topic" physicalName="org.apache.activemq.spring.Test.spring.embedded"
/&gt;
+++ 
+++   &lt;!-- JMS ConnectionFactory to use, configuring the embedded broker using XML
--&gt;
+++   &lt;amq:connectionFactory id="org.apache.cocoon.jms.sample.jmsFactory" brokerURL="vm://localhost"
/&gt;
+++ 
+++   &lt;!-- Spring JMS Template --&gt;
+++   &lt;bean id="org.apache.cocoon.jms.sample.myJmsTemplate" 
+++     class="org.springframework.jms.core.JmsTemplate"&gt;
+++     &lt;property name="connectionFactory"&gt;
+++       &lt;!-- lets wrap in a pool to avoid creating a connection per send --&gt;
+++       &lt;bean class="org.springframework.jms.connection.SingleConnectionFactory"&gt;
+++         &lt;property name="targetConnectionFactory"&gt;
+++           &lt;ref local="org.apache.cocoon.jms.sample.jmsFactory" /&gt;
+++         &lt;/property&gt;
+++       &lt;/bean&gt;
+++     &lt;/property&gt;
+++   &lt;/bean&gt;
+++ 
+++   &lt;bean id="org.apache.cocoon.jms.sample.consumerJmsTemplate" class="org.springframework.jms.core.JmsTemplate"&gt;
+++     &lt;property name="connectionFactory"´ref="org.apache.cocoon.jms.sample.jmsFactory"
/&gt;
+++   &lt;/bean&gt;
+++ 
+++   &lt;bean id="org.apache.cocoon.jms.sample.JMSEventMessageListener"
+++     class="org.apache.cocoon.acting.JMSEventMessageListener" init-method="init" destroy-method="destroy"
scope="singleton"&gt;
+++     &lt;property name="template" ref="org.apache.cocoon.jms.sample.consumerJmsTemplate"
/&gt;
+++     &lt;property name="subscriptionId" value="topicconsumer" /&gt;
+++     &lt;property name="destination" ref="org.apache.cocoon.jms.sample.topic" /&gt;
+++     &lt;property name="cache" ref="org.apache.cocoon.caching.Cache/EventAware"
/&gt;
+++   &lt;/bean&gt;</pre>
+++ 
    <h1>Further reading</h1>
    
    <p>If you want to lean more about events and EventAware cache, please have a
(4 equal lines skipped)


Mime
View raw message