Results 1 to 4 of 4

Thread: Deploying as EAR or WAR

Hybrid View

  1. #1
    Join Date
    Jun 2012
    Posts
    14

    Default 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 )

    thanks

  2. #2

    Default

    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,

    Jeff

  3. #3
    Join Date
    Jun 2012
    Posts
    14

    Default

    Thanks.

    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. #4

    Default

    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.

    Jeff

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •