[wildfly-dev] Batch Subsystem Model

David M. Lloyd david.lloyd at redhat.com
Thu Sep 12 23:48:18 EDT 2013


On 09/12/2013 10:39 PM, James R. Perkins wrote:
> I'm struggling a bit come up with the right model for the batch
> subsystem. The XML currently looks like the following, but doesn't have
> to remain like this if someone has a better idea.
>
> <subsystem xmlns="urn:jboss:domain:batch:1.0">
>       <job-repository value="default"/>
>
>       <job-repository-type name="default">
>           <in-memory thread-pool-name="default"/>
>       </job-repository>

End tags

>       <job-repository-type name="jdbc">
>           <jdbc thread-pool-name="default">

I don't recall if we use -name suffixes in referential attributes.  I 
don't think we do.

>               <datasource jndi-name="java:jboss/datasources/ExampleDS"/>
>           </jdbc>
>       </job-repository>
>
>       <unbounded-queue-thread-pool name="default">
>           <max-threads count="10"/>
>           <keepalive-time time="100" unit="milliseconds"/>
>       </unbounded-queue-thread-pool>

Rename this element to something like "batch-thread-pool".

> </subsystem>
>
> This would make the model for the in-memory type something like;
> "subsystem" => {
>       "batch" => {
>           "job-repository" => "default",
>           "job-repository-type" => {"default" => {
>               "type" => "in-memory",
>               "thread-pool-name" => "default"
>           }}
>       }
> }
>
> The problem is I'm not sure what to do with JDBC which would also need a
> datasource/jndi-name attribute, but I don't want that attribute on the
> in-memory type.
>
> Another thought I had was to have it look more like;
> "subsystem" => {
>       "batch" => {
>           "job-repository" => "default",
>           "in-memory" => {"default" => {
>               "thread-pool-name" => "default"
>           }},
>           "jdbc" => {"jdbc" => {
>               "thread-pool-name" => "default",
>               "jndi-name" => "java:jboss/datasources/ExampleDS"
>           }}
>       }
> }
>
> The problem here is really the jdbc resource could also be called
> default. I'm not sure if there is a way to query a parent resource to
> check each name, but if there is then maybe that's the way to go.
>
> Anyway, if anyone has suggestions let me know.

Why have a separate job-repository from job-repository-type?

-- 
- DML


More information about the wildfly-dev mailing list