1

I'm working with Jberet an implementation of Java EE 7 Batch Processing (JSR-352). I wanted to know if there was a nicer syntax for making a list in the JSL (Job Specification Language) for an object that's used for injection instead of giving a comma delimited list. I wanted to make a list of java classes, and it becomes really long and unreadable if I put them all in one line. This is how I would currently do it

    <step id="listExample">
    <batchlet ref="com.work.production.imports.batch.batchlet.ListExampleBatchlet">
        <properties>
            <property name="rawClazz" value="com.workstuff.production.imports.entity.Class1, com.workstuff.production.imports.entity.Class2, com.workstuff.production.imports.entity.Class3"/>
        </properties>
    </batchlet>

It'd be nice if there was something like:

        <step id="listExample">
    <batchlet ref="com.workstuff.production.imports.batch.batchlet.ListExampleBatchlet">
        <properties>
            <property name="rawClazz"> 
                <list>
                    <li value = "com.workstuff.production.imports.entity.Class1"/>
                    <li value = "com.workstuff.production.imports.entity.Class2"/>
                    <li value = "com.workstuff.production.imports.entity.Class3"/>
                </list>
            </property>
        </properties>
    </batchlet>

I couldn't find anything like that after searching for about an hour. The implementation of batch that I'm using is Jberet. I know I can simply do string manipulation and create my own list, but I was wondering if there was a cleaner solution.

joshuar
  • 187
  • 2
  • 10
  • There's not anything which is part of the JSR 352 standard, (which doesn't necessarily stop an implementation from providing an extension). The subject has come up in discussions about a proposed [Batch 1.1 spec update](https://github.com/WASdev/standards.jsr352.batch-spec/wiki), but we don't have a direction at this point. – Scott Kurz Dec 17 '15 at 18:24
  • @Scott Kurz It's valuable to know that there isn't a clean way to do it per the specification so I can implement my own solution, which I have. :) – joshuar Dec 17 '15 at 20:55

1 Answers1

0

Posting my comment as answer:

There's not anything which is part of the JSR 352 standard, (which doesn't necessarily stop an implementation from providing an extension). The subject has come up in discussions about a proposed Batch 1.1 spec update, but we don't have a direction at this point.

vk239
  • 1,014
  • 1
  • 12
  • 30
Scott Kurz
  • 4,985
  • 1
  • 18
  • 40