forrest-svn mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cross...@apache.org
Subject svn commit: r687975 - /forrest/branches/update_cocoon_2.1.12-dev/main/webapp/WEB-INF/xconf/forrest-core.xconf
Date Fri, 22 Aug 2008 06:54:16 GMT
Author: crossley
Date: Thu Aug 21 23:54:16 2008
New Revision: 687975

URL: http://svn.apache.org/viewvc?rev=687975&view=rev
Log:
Move the "Runnable manager" configuration up to "System Components" section to enable easy
comparison with Cocoon-2.1 xconf. Add descriptive comments from Cocoon-2.1 xconf.

Modified:
    forrest/branches/update_cocoon_2.1.12-dev/main/webapp/WEB-INF/xconf/forrest-core.xconf

Modified: forrest/branches/update_cocoon_2.1.12-dev/main/webapp/WEB-INF/xconf/forrest-core.xconf
URL: http://svn.apache.org/viewvc/forrest/branches/update_cocoon_2.1.12-dev/main/webapp/WEB-INF/xconf/forrest-core.xconf?rev=687975&r1=687974&r2=687975&view=diff
==============================================================================
--- forrest/branches/update_cocoon_2.1.12-dev/main/webapp/WEB-INF/xconf/forrest-core.xconf
(original)
+++ forrest/branches/update_cocoon_2.1.12-dev/main/webapp/WEB-INF/xconf/forrest-core.xconf
Thu Aug 21 23:54:16 2008
@@ -669,6 +669,99 @@
     -->
   </component>
 
+  <!--+
+      | Runnable manager
+      |
+      | This component manages commands (Runnables) executed in background using
+      | preconfigured pools of worker threads
+      +-->
+  <runnable-manager logger="core.runnable">
+    <!--+
+        | This is the default configuration of the runnable-manager. More
+        | indepth information can be found at
+        | http://gee.cs.oswego.edu/dl/classes/EDU/oswego/cs/dl/util/concurrent/PooledExecutor.html
+        | The following elements can be used:
+        |
+        | thread-factory:        specifies the fully qualified class name of an
+        |                        org.apache.cocoon.components.thread.ThreadFactory
+        |                        implementation. It is responsible to create Thread
+        |                        classes.
+        | thread-pools:          container element for thread-pool elements.
+        | name:                  required name of the pool.
+        | priority:              optional priority all threads of the pool will
+        |                        have (the ThreadFactory will be set to this
+        |                        priority).The possible values  are:
+        |                          MIN:  corresponds to Thread#MIN_PRIORITY
+        |                          NORM: corresponds to Thread#NORM_PRIORITY (default)
+        |                          MAX:  corresponds to Thread#MAX_PRIORITY
+        | daemon:                whether newly created Threads should run in
+        |                        daemon mode or not. Default to false.
+        | queue-size:            optional size of a queue to hold Runnables if the
+        |                        pool is full. Possible values are:
+        |                          less than 0:    unbounded (default)
+        |                          equal to 0:     no queue at all
+        |                          greater than 0: size of the queue
+        | max-pool-size:         optional maximum number of threads in the pool.
+        |                        Defaults to 5.
+        |                        NOTE: if a queue is specified (queue-sie != 0)
+        |                              this value will be ignored.
+        | min-pool-size:         optional minimum number of threads in the pool.
+        |                        Defaults to 5.
+        |                        NOTE: if a queue has been specified (queue-sie != 0)
+        |                              this value will be used as the maximum of
+        |                              thread running concurrently.
+        | keep-alive-time-ms:    The time in ms an idle thread should keep alive
+        |                        before it might get garbage collected. This
+        |                        defaults to 60000 ms.
+        | block-policy;          The policy to be used if all resources (thread in
+        |                        the pool and slots in the queue) are exhausted.
+        |                        Possible values are:
+        |                          ABORT:         Throw a RuntimeException
+        |                          DISCARD:       Throw away the current request
+        |                                         and return.
+        |                          DISCARDOLDEST: Throw away the oldest request
+        |                                         and return.
+        |                          RUN (default): The thread making the execute
+        |                                         request runs the task itself.
+        |                                         This policy helps guard against
+        |                                         lockup.
+        |                          WAIT:          Wait until a thread becomes
+        |                                         available. This policy should, in
+        |                                         general, not be used if the
+        |                                         minimum number of threads is zero,
+        |                                         in which case a thread may never
+        |                                         become available.
+        | shutdown-graceful:     Terminate thread pool after processing all
+        |                        Runnables currently in queue. Any Runnable entered
+        |                        after this point will be discarded. A shut down
+        |                        pool cannot be restarted. This also means that a
+        |                        pool will need keep-alive-time-ms to terminate.
+        |                        The default value not to shutdown graceful.
+        | shutdown-wait-time-ms: The time in ms to wait before issuing an
+        |                        immediate shutdown after a graceful shutdown
+        |                        has been requested.
+        +-->
+    <thread-factory>org.apache.cocoon.components.thread.DefaultThreadFactory</thread-factory>
+    <thread-pools>
+      <!--+
+          | This thread pool should be used for daemons (permanently running
+          | threads).
+          +-->
+      <thread-pool>
+        <name>daemon</name>
+        <priority>NORM</priority>
+        <daemon>true</daemon>
+        <queue-size>0</queue-size>
+        <max-pool-size>-1</max-pool-size>
+        <min-pool-size>1</min-pool-size>
+        <keep-alive-time-ms>60000</keep-alive-time-ms>
+        <block-policy>ABORT</block-policy>
+        <shutdown-graceful>false</shutdown-graceful>
+        <shutdown-wait-time-ms>-1</shutdown-wait-time-ms>
+      </thread-pool>
+    </thread-pools>
+  </runnable-manager>
+
 <!-- ================ XSP (eXtensible Server Pages) ===================== -->
 
   <!--+
@@ -941,38 +1034,5 @@
     </schema-parser>
   </validator>
 
-  <!--+
-      | Runnable manager
-      |
-      | This component manages commands (Runnables) executed in background using
-      | preconfigured pools of worker threads
-      +-->
-  <runnable-manager logger="core.runnable">
-    <!--+
-        | This is the default configuration of the runnable-manager. More
-        | indepth information can be found at
-        | http://gee.cs.oswego.edu/dl/classes/EDU/oswego/cs/dl/util/concurrent/PooledExecutor.html
-        +-->
-    <thread-factory>org.apache.cocoon.components.thread.DefaultThreadFactory</thread-factory>
-    <thread-pools>
-      <!--+
-          | This thread pool should be used for daemons (permanently running
-          | threads).
-          +-->
-      <thread-pool>
-        <name>daemon</name>
-        <priority>NORM</priority>
-        <daemon>true</daemon>
-        <queue-size>0</queue-size>
-        <max-pool-size>-1</max-pool-size>
-        <min-pool-size>1</min-pool-size>
-        <keep-alive-time-ms>60000</keep-alive-time-ms>
-        <block-policy>ABORT</block-policy>
-        <shutdown-graceful>false</shutdown-graceful>
-        <shutdown-wait-time-ms>-1</shutdown-wait-time-ms>
-      </thread-pool>
-    </thread-pools>
-  </runnable-manager>
-
 
 </components>



Mime
View raw message