1) Added catch Exception when trying to connect to a EJBCA instance.
2) Added a 1 second timeout to check the EJBCA status.