[jboss-cvs] jboss-seam/doc/reference/en/modules ...
Michael Youngstrom
youngm at gmail.com
Thu Jun 14 19:08:04 EDT 2007
User: myoungstrom
Date: 07/06/14 19:08:04
Modified: doc/reference/en/modules spring.xml
Log:
Fixes for: JBSEAM-1459, JBSEAM-1458, JBSEAM-1377
Revision Changes Path
1.16 +26 -0 jboss-seam/doc/reference/en/modules/spring.xml
(In the diff below, changes in quantity of whitespace are not shown.)
Index: spring.xml
===================================================================
RCS file: /cvsroot/jboss/jboss-seam/doc/reference/en/modules/spring.xml,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -b -r1.15 -r1.16
--- spring.xml 29 May 2007 19:52:05 -0000 1.15
+++ spring.xml 14 Jun 2007 23:08:04 -0000 1.16
@@ -27,6 +27,9 @@
<listitem>
<para>provides a Seam managed replacement for Spring's <literal>OpenEntityManagerInViewFilter</literal></para>
</listitem>
+ <listitem>
+ <para>Support for Spring <literal>TaskExecutors</literal> to back <literal>@Asynchronous</literal> calls</para>
+ </listitem>
</itemizedlist>
<section>
@@ -324,4 +327,27 @@
</components>]]></programlisting>
</section>
+ <section>
+ <title>Using a Spring TaskExecutor for @Asynchronous</title>
+
+ <para>Spring provides an abstraction for executing code asynchronously called a <literal>TaskExecutor</literal>.
+ The Spring Seam integration allows for the use of a Spring <literal>TaskExecutor</literal> for executing
+ immediate <literal>@Asynchronous</literal> method calls. To enable this functionality install the
+ <literal>SpringTaskExecutorDispatchor</literal> and provide a spring bean defined taskExecutor like so:</para>
+
+ <programlisting>
+ <![CDATA[<spring:task-executor-dispatcher task-executor="#{springThreadPoolTaskExecutor}"/>]]>
+ </programlisting>
+
+ <para>Because a Spring <literal>TaskExecutor</literal> does not support scheduling of an asynchronous event
+ a fallback Seam <literal>Dispatcher</literal> can be provided to handle scheduled asynchronous event like so:</para>
+
+ <programlisting>
+ <![CDATA[<!-- Install a ThreadPoolDispatcher to handle scheduled asynchronous event -->
+<core:thread-pool-dispatcher name="threadPoolDispatcher"/>
+
+<!-- Install the SpringDispatcher as default -->
+<spring:task-executor-dispatcher task-executor="#{springThreadPoolTaskExecutor}" schedule-dispatcher="#{threadPoolDispatcher}"/>]]>
+ </programlisting>
+ </section>
</chapter>
More information about the jboss-cvs-commits
mailing list