[wildfly-dev] Batch Subsystem Model

Cheng Fang cfang at redhat.com
Fri Sep 13 11:52:17 EDT 2013


On 9/13/13 11:17 AM, James R. Perkins wrote:
> Thanks for all the feedback. If I'm understanding everything right we'll
> end with something like the following for in-memory.
>
> <subsystem xmlns="urn:jboss:domain:batch:1.0">
>       <job-repository>
>           <in-memory thread-pool="default"/>
>       </job-repository>
>       <thread-pool name="default">
>           <max-threads count="10"/>
>           <keepalive-time time="100" unit="milliseconds"/>
>       </thread-pool>
> </subsystem>
Why does a job repository need to reference a thread-pool as its 
attribute?  thread-pool is for job execution and not tied to how jobs 
are kept in job repository.  By having a top-level <thread-pool>, it 
tells this thread-pool configuration is to be used by batch runtime, 
regardless in-memory or jdbc job repository.

In your current design, it seems users can configure multiple 
<thread-pool> elements and choose one to use.  But I don't see this is 
really necessary, and still a job repository need not be associated with 
a thread-pool.

Cheng
>
> "subsystem" => {
>       "batch" => {
>           "job-repository" => { "in-memory" => {
>               "thread-pool" => "default"
>           }},
>           "thread-pool" => { "default" => {
>               "max-threads" => "10",
>               "keepalive-time" => "100",
>               "keepalive-unit" => "milliseconds"
>           }}
>       }
> }
>
> And something like the following for JDBC.
>
> <subsystem xmlns="urn:jboss:domain:batch:1.0">
>       <job-repository>
>           <jdbc thread-pool="default"
> jndi-name="java:jboss/datasources/ExampleDS"/>
>       </job-repository>
>       <thread-pool name="default">
>           <max-threads count="10"/>
>           <keepalive-time time="100" unit="milliseconds"/>
>       </thread-pool>
> </subsystem>
>
> "subsystem" => {
>       "batch" => {
>           "job-repository" => { "jdbc" => {
>               "thread-pool" => "default",
>               "jndi-name" => "java:jboss/datasources/ExampleDS"
>           }},
>           "thread-pool" => { "default" => {
>               "max-threads" => "10",
>               "keepalive-time" => "100",
>               "keepalive-unit" => "milliseconds"
>           }}
>       }
> }
>
> I personally prefer the <job-repository><in-memory/></job-repository>
> over the <in-memory-job-repository/>, but I don't care all that much. If
> the consensus is the later, that's fine.
>
> Also do we want the thread pool to be called batch-thread-pool or just
> simply thread-pool?
>
> Thanks for all the feedback. I just wanted to get it right since what we
> decide we're stuck with.
>



More information about the wildfly-dev mailing list