cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Felix Knecht <fe...@otego.com>
Subject Configuration of RunnableManager
Date Mon, 05 Mar 2007 12:32:01 GMT
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

I wonder how to create/add my own configuration for the
RunnableManager. At the moment, the given configuration is included in
the deployed jar file (having configured 2 pools (default,daemon)).
Changing this configuration seems not that easy as I need to 'patch'
the existing configuration in the deployed jar file.

Making configuration easier I'd prefer the the 'New Features for the
spring configurator' and introduce a new bean just containing the
configuration data for a pool which implementing a specific (helper)
interface. Thus everybody can add his own threadpool configuration.
The RunnableManager then will create thread pools for all found beans
implementing this (helper) interface.

Configuration could then look as following:

 <bean name="org.apache.cocoon.components.thread.RunnableManager"
        class="org.apache.cocoon.components.thread.DefaultRunnableManager"
        scope="singleton" init-method="init" destroy-method="destroy">
    <property name="threadFactory"
value="org.apache.cocoon.components.thread.DefaultThreadFactory"/>
    <property name="threadPools">
        <configurator:bean-map
type="org.apache.cocoon.components.thread.ThreadPoolConfig" />
    </property>
</bean>


<bean
id="org.apache.cocoon.components.thread.ThreadPoolConfig/default"
class="org.apache.cocoon.components.thread.ThreadPoolConfigImpl">
       <property name="name" value="default"/>
       <property name="priority" value="NORM"/>
       <property name="daemon" value="false"/>
       <property name="queue-size" value="-1"/>
       <property name="max-pool-size" value="5"/>
       <property name="min-pool-size" value="5"/>
       <property name="keep-alive-time-ms" value="60000"/>
       <property name="block-policy" value="ABORT"/>
       <property name="shutdown-graceful" value="false"/>
       <property name="shutdown-wait-time-ms" value="-1"/>
</bean>

<bean id="org.apache.cocoon.components.thread.ThreadPoolConfig/daemon"
class="org.apache.cocoon.components.thread.ThreadPoolConfigImpl">
    <snip />
</bean>


<bean id="org.apache.cocoon.components.thread.ThreadPoolConfig/MyPool"
class="org.apache.cocoon.components.thread.ThreadPoolConfigImpl">
    <snip />
</bean>


I will write a patch if I'm not the only one having this problem and I
get a positive feedback on this.

Regards
Felix

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.2 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFF7A3B2lZVCB08qHERAqy6AJwOENR7A+FhZWIEok1APe+hOk6oMgCfbsi9
tZT41dnSlTyv3P+4QN3C10Q=
=Q/E6
-----END PGP SIGNATURE-----


Mime
View raw message