I have a jar file that runs continuously and acts on various events. I need to create multiple instances of this jar, passing parameters to it on start up, and have it continue to run between shell sessions, reboots, etc. I'm planning to write an init.d script that has the command for each instance I need, passing in the appropriate parameters for each, and having it execute on boot. Does this sound like the correct approach?
It's possible that one of these instances can get stuck or crash, and I'll need to go in and restart it manually. I'm also wondering if there's a way that I can name each process that gets created, so when I look at top I can determine which process is which?