cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Felix Knecht <fe...@otego.com>
Subject Re: Configuration of RunnableManager
Date Mon, 05 Mar 2007 18:35:43 GMT
Thanks Vadim, I'll go on with this.

IIRC the interfaces of the core block are stable(freezed) because of 
RC1. Therefor I'm going to introduce a new RunnableManager called 
ConfigurableRunnableManager which is heavy based on the 
DefaultRunnableManager (otherwise I'd need to change the bean 
configuration/interface of the DefaultRunnableManager).

Felix


> Felix Knecht wrote:
>> 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.
> 
> This looks like a sensible approach to me. +1
> 
> Vadim
> 


Mime
View raw message