Question

I am currently in a project where the project flow is something like this :

A scheduler will call my Shell script at a certain time --> The shell script will call the java job process --> The java job will invoke the web service and return the response content --> The response content will be formatted to a CSV file in a specific format and the file will be SFTP'd to a network.

Now , i have written some shell scripts, so i have an idea about how to write them.

I have used web services in java , so i know how to invoke them and get the response string.

I poured through the net and found that , one can call a java job like this :

#!/bin/sh
java -jar jobs/job.jar

What i am confused about is : What is a java job ? Is it like a normal java file ? If it is not so, then how to call a web service from such a thing ? Why is a job always kept in the jar ?

Also, if it is a normal java jar, then do i need to keep the web service implementation in that jar while calling the job from my shell script ?

I am extremely confused with this and i was not able to find a lot of information or code about it on the internet. Can some one help me out here? Any help is greatly appreciated. Thanks !

Was it helpful?

Solution

i think "jobs/job.jar" is an ordinary jar file, it consist (perhaps) jaxws functions to do ws requests, and give the response back, and yes, you should keep the webservice's implementation on that jar.

btw, to make your life easier, i recommend using Spring Integration or Talend Openstudio instead.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top