If ClientAdmin fails because of a security issue, it returns 0 instead of 2
If connection to the server is unsuccessful, the JOnAS ClientAdmin normally returns 2. For example, that is extremely useful when pinging.
On the other hand, if connection fails because the JMX security has failed (i.e., a SecurityException is thrown), ClientAdmin's main method doesn't exit with an error code, therefore exits with error code 0.
It should exit with code 2, since connection is unsuccessful.