Yes, that's the general idea. In your example the worker1 thread-pool would be 
in the serviceengine.xml file on server 1, and the worker2 thread-pool would be 
there on server 2.

-David


On Dec 22, 2009, at 8:53 AM, Brett Palmer wrote:

> I discovered some posting on this subject where users were setting up
> different service "ThreadPools" to handle specific requests.  Is this still
> the preferred approach to assigning jobs to specific application servers?
> 
> For Example we could configure our service engine to have a worker1 pool for
> app server 1 and worker2 pool for app server 2:
> 
>        <thread-pool send-to-pool="worker1"
>                     purge-job-days="4"
>                     failed-retry-min="3"
>                     ttl="18000000"
>                     wait-millis="750"
>                     jobs="10"
>                     min-threads="5"
>                     max-threads="15"
>                     poll-enabled="true"
>                     poll-db-millis="20000">
>            <run-from-pool name="worker1"/>
>        </thread-pool>
> 
>        <thread-pool send-to-pool="worker2"
>                     purge-job-days="4"
>                     failed-retry-min="3"
>                     ttl="18000000"
>                     wait-millis="750"
>                     jobs="10"
>                     min-threads="5"
>                     max-threads="15"
>                     poll-enabled="true"
>                     poll-db-millis="20000">
>            <run-from-pool name="worker2"/>
>        </thread-pool>
> 
> 
> Brett
> 
> On Tue, Dec 22, 2009 at 7:30 AM, Brett Palmer <[email protected]>wrote:
> 
>> We run multiple ofbiz application servers against the same ofbiz database.
>> We would like to have specific application servers execute scheduled batch
>> services through the JobSandbox.  For example, server 1 executes service 1,
>> server 2 executes service 2, etc.
>> 
>> The default behavior is that each application server polls the JobSandbox
>> for jobs that need to be serviced and the assignment of the job is
>> completely random.
>> 
>> Is there a way to assign jobs to servers and if so what is the recommended
>> approach?
>> 
>> 
>> Brett
>> 

Reply via email to