cocoon-docs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject [DAISY] Updated: JMSPublisherAction
Date Sun, 17 Aug 2008 18:40:14 GMT
A document has been updated:

Document ID: 1500
Branch: main
Language: default
Name: JMSPublisherAction (unchanged)
Document Type: Sitemap Component (unchanged)
Updated on: 8/17/08 6:39:56 PM
Updated by: Lukas Lang

A new version has been created, state: draft


Long description
This part has been added.
Mime type: text/xml
File name: null
Size: 2546 bytes

<p>JMSPublisherAction is based on AbstractMessagePublisher and used as a sitemap
action to send simple JMS (Java Message Service) text messages to an injected
destination, which could either be a topic or a queue. The message must be
provided as a sitemap parameter.</p>


<p>Assuming, we run the following sitemap on a Cocoon web application:</p>

<pre>&lt;map:sitemap xmlns:map=""&gt;
    &lt;map:pipes default="caching"&gt;
      &lt;map:pipe logger="core.sitemap" name="event-aware" src="org.apache.cocoon.components.pipeline.impl.CachingProcessingPipeline"&gt;
        &lt;parameter name="cache-role" value="org.apache.cocoon.caching.Cache/EventAware"
    &lt;map:pipeline type="event-aware"&gt;
      &lt;map:match pattern="action"&gt;
        &lt;map:act type="JMSPublisherAction"&gt;
          &lt;map:parameter name="message" value="{request-param:event}" /&gt;

<p>As a request matches the pattern <em>action</em>, &lt;map:act /&gt;
called. The request must provide the parameter event. Saying, the URL looks as


<p>A text message will be created and sent to the provided destination. This
sample is part of the cocoon-jms-sample block, using JMS messages for content
invalidation of an EventAware cache.</p>


<p>The action is configured, using Spring's dependency injection mechanism. In
this example, we gain benefit of using Spring's JMS capabilities, which provide
a template for message posting and delivery via callback interface. Please see
the JMS <a href="daisy:1501">sample</a> block for further information, which
uses <a href="">ActiveMQ</a> as an embedded message

<pre>  &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;


CocoonComponentReference: Action (new field)
CocoonBlock: jms (new field)
FQ Java class: org.apache.cocoon.acting.JMSPublisherAction (new field)

View raw message