tags:

views:

50

answers:

1

How can I check from Java is MySQL / LDAP is running or not?

+1  A: 

Simply attempt a connection. In case the target servers aren't running, you will get, and catch an exception indicating this.

If you then don't want to use the connection, if successful, close() it.

Bozho
was thinking of the same, but is that the right way to test the connection?
Panther24
Yes. (15 chars)
Bozho