Announcement Announcement Module
No announcement yet.
Spring Batch Admin integration with existing web application that is using Quartz. Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • Spring Batch Admin integration with existing web application that is using Quartz.

    We are planning to integrate the batches running in web container and schedule through Quartz to Spring Batch Framework. And also wanted to integrate the Spring batch Admin.

    I was able to build a simple batch and deploy on web server. The spring batch executed through the schedule as expected.

    Now i followed the steps to integrate the Spring Batch Admin -
    HTML Code:
        Look at the sample.
        Create a war project with an index.jsp and a web.xml (from the sample or from the spring-batch-admin-resources.jar).
        Include the spring-batch-admin-*.jar files in WEB-INF/lib. In the sample this is done simply by making the WAR depend on those jar files in the Maven pom.
        Deploy the web app.
    I have added the spring admin dependencies through Maven and I can see admin and resources jars in web server after deployment. When I tried http://localhost:8080/myApp/batch/home to access SBA, it did not work.

    Is my app and Batch admin are going to get deployed as 2 different web applications? If not, then how am I going to access the SBA pages?

    If anyone has integrated the SBA with existing web applications, it will be great if i get some tips on integration.

  • #2
    which version of Spring Batch Admin are you using? The last one - 1.2.0 - is deployed at the root of the context path, so try http://localhost:8080/myApp/home instead of http://localhost:8080/myApp/batch/home.


    • #3
      I am using 1.2.0. I tried with root context also and got HTTP-404 error. To understand more I did following things -
      - In my existing web app, added spring batch and Spring Batch Admin jars through Maven dependencies.
      - Added in Spring Batch job and configured through Quartz scheduler to run every 5 mins.
      - For initial run, I removed the job repository and made it as in memory repository.
      - As we already have Spring MVC with current web app, I added on class to launch the job from application context loaded by MVC.
      - After deployment, I was able to launch the batch through Quartz and can see the desired output.
      - Now I wanted to see the statistics of my running job through Spring Batch Admin. But not able to see any of admin page.

      I did not add any of servlet entry in my web.xml. Also not sure how Batch admin can the details of job running in the web container.


      • #4
        can you please post your web.xml file? you can also turn on logging, to see if the Spring Batch Admin controllers are registered and mapped to URLs.