Pergunta

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.

Foi útil?

Solução

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.

Outras dicas

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

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top