I have previously had great success doing this using "
Java Service WrapperB" from Tankuisoftware.
Check detailed instructions for
setting up with JBOSS. The instructions are for JBoss3.X but you can use the same procedure with JBoss 4.x. I have done so with great success :-)
Benefits:
- easy to set up, i find it at lot easier than the method described in the JBoss Wiki
- features such as automatic restart under given circumstances (for instance on OutOffMemoryErrors)
- intergrates well with all major Linux distros
- you can restart the JVM using a JMX bean (included)