aspose file tools*
The moose likes Other JSE/JEE APIs and the fly likes How to control & monitor remote batch processes ? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Other JSE/JEE APIs
Bookmark "How to control & monitor remote batch processes ?" Watch "How to control & monitor remote batch processes ?" New topic
Author

How to control & monitor remote batch processes ?

Sidhartha Ray
Greenhorn

Joined: Jul 04, 2012
Posts: 29
Multiple jobs/applications are there on multiple hosts.
I've to controll(start/stop/failover/...) from one remote application.

Experts please advise on this........
Chris Hurst
Ranch Hand

Joined: Oct 26, 2003
Posts: 416
    
    2

Probably need more info ...

What are your batch jobs java / shell script / DOS batch file ... ? i.e. if I were on the remote machine how would I execute them. Is this a private network ?

Do you have a web server on the boxes ? or can you SSH to the remote machines ?

Whats your perferred controller ... web page, swing app, command line ... etc etc


"Eagles may soar but weasels don't get sucked into jet engines" SCJP 1.6, SCWCD 1.4, SCJD 1.5,SCBCD 5
Sidhartha Ray
Greenhorn

Joined: Jul 04, 2012
Posts: 29
Actually these are simple standalone java applications present on remote hosts(simple boxes no web/application servers) as executable jars. And need to be executed at perticular time intervals.

We've to control(start the scheduler/stop/failover.....) and monitor(server is up/down/failover...) them from a web application.
Chris Hurst
Ranch Hand

Joined: Oct 26, 2003
Posts: 416
    
    2

You basically first need to decide how you will remote control your application ...

What can you install, which ports can you open up, which OS are you targetting etc etc

I have had J2EE servers on the boxes I'm controlling then used http effectively to drive the apps, or you could use JMX beans if you can enable your apps to use JMX or install another app on the box to drive them . The new J2EE spec has some new additions around batch processing / monitoring I think.

I have used SSH, so had a web server set up else where that can send out SSH commands to UNIX and Windows boxes on a private network and had a web page crafted like a desktop so each process can sit in a html Window and then parse the text for monitoring.

The possibilities are endless but I really need to know what you can and can't use.
Sidhartha Ray
Greenhorn

Joined: Jul 04, 2012
Posts: 29
Hi Chris,

Thanks for your really worth feedback.

Actually client don't want to install extra J2EE servers on those boxes to run those executable jars.
In that case, I think JMX MBeans would be fit as per suggestion....

We can pass the command to the MBean's method to execute the jar....

I've also started....
If any further issue I'll face, I'll share with you...

Thank You !
Sidhartha Ray
Greenhorn

Joined: Jul 04, 2012
Posts: 29
Hi Chris,

Thanks a lot for the reply.
Now I get stuck at one place and really need your help.

Here the scene is like this:
One application say "EmailNotification.jar" presents at two boxes, say "hostabc"(Primary one) and "hostxyz"(Failover one).
We developed an application "JMXAgent.jar" which will be running on both the boxes to listen
requests from the client application to execute EmailNotification.jar.
But the problem is when we stop the primary one(say by System Log off or by pressing Ctlr+C on command prompt), the failover one should be up.
I don't know how to implement that ?
Currently I'm implementing some fuzzy logic, like starting the failover one in catch block.

Please advise me on this....
 
 
subject: How to control & monitor remote batch processes ?