0
votes

I have looked around quite a bit at Spring Batch and Spring Batch Admin. My question is as follows. I understand that Spring Batch meta-tables do not store an attribute 'jobId' as such but the 'job name' which is the value passed as the 'id' in the <job/> bean. I want to have something of the following sort. For example:

             <job id="myJob">
                <property name="jobId" value="123"/>
             </job>

That is, for my specific requirement I want to display the 'jobId' against the respective 'jobName'. So I have created another table that holds the 'jobName' and the 'jobId'. But I am unable to make any progress on how to go about making the Spring Batch Admin UI pick up the 'jobId' given the 'jobName' from my table and display it on the Admin screen. Or, is there any other way through which Spring Admin could pick up the jobId? For instance, will it make sense to have a class extend 'SimpleJob' and then make the job a child of this class? Say, something like this:

        class MyJob extends SimpleJob{
                 private int jobId;
        }

        //And then in the config file
       <bean id="baseJob" class="...MyJob/>

       <job id="myJob" parent="baseJob">
            <property name="jobId" value="123"/>
       </job>

By the way, I am using spring-admin-manager and spring-admin-resources version '1.3.1.RELEASE'. And spring batch version is '2.1.8.RELEASE'

Would somehow please share some pointers?

Thanks

1

1 Answers

0
votes

what is the spring batch version that you are using..?

While ago when I was using the batch varsion Spring-batch 2.1.8 - it used to insert the jobID , jobName , jobStatus and time too.