Announcement Announcement Module
No announcement yet.
Deploying as EAR or WAR Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • Deploying as EAR or WAR

    Hi Guys,

    quick question : Which one of the following is best practice to Deploy the Spring Batch on app server ?

    deploy as (EAR or WAR )


  • #2
    If you mean Spring Batch Admin. Its a war. But you could package the war within an ear.

    Spring batch (not Spring Batch Admin) doesn't have a dependency on any application server. Its can stand up by itself as jar and its jobs can be invoked by using either a Maven command or via the Java -Jar command on the command line. But if you REALLY wanted to you could package a Spring Batch project into either an ear or a war. But you don't need to since it doesn't need the app server to run.

    I hope that helps,



    • #3

      anther quick question , if I deploy the Batch as WAR or EAR on APP Server , can I run the job with Java - Jar command ? or do i need to trigger it with servlet ?


      • #4
        Deployed artifacts on an application server are usually extracted out. So its just that the path to the jar (which contains the Spring Batch project) would be kind of nasty. But I believe you could do it. If you provided the path (which might be ugly) I suspect you could still invoke the job via a Java -jar command.