Programmatically stop and start JBoss in Eclipse

Is it possible to programmatically start and stop JBoss in Eclipse? I am using Indigo Eclipse Java EE, I have a JBoss 5.1.0.GA server that I start / stop manually in Eclipse.

I want to automate a server reboot (as part of a test procedure to restart a server to reflect changes in the database). Is there any library I can use for this, or some other way to do this?

+7
source share
1 answer

Create a .bat or .sh file (depending on the OS installed for your JBoss instance) using a script that shuts down (bat or sh) and then starts (bat or sh). You do not need to use Java or any other programming language for this.

However, if you really want to do this using Java, you can use one of the approaches (again, depending on the OS):

Batch Files:

Shell Files:

Just remember that the start and stop script files are in the [JBoss_install_path] / bin folder

+5
source

All Articles