Question

how can i test from external java application that my server jboss is running ?

I've a JBoss (4.2.3) server and I want know from a stand-alone java application if that server i started or not.

Thanks!

EDIT

I don't have access to the jboss machine and the jmx console is disabled for safety reasons.

Was it helpful?

Solution

You can check inspecting the running processes if you have access to the machine where jboss is running.

If you don't have access to the machine, then you'll have to try to connect to it, checking if it's listening to the http port or if you can reach it via JMX, but then you can't be sure if it's really not running or if some firewall rule is blocking your request.

OTHER TIPS

One of the possible solution if you are running on linux is to execute a shell command like

 ps -ef | grep jboss >> somelog.txt

execute it using Runtime class using exec() method in Runtime and check the output of that command from your java program

Surely there might be some other better alternative , but this is just a simple thought

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