}
public ServerDO[] getMonitoredServersByType(String serverType) throws BAMException {
BAMConfigurationDSClient client = null;
try {
client = BAMUtil.getBAMConfigurationDSClient();
ServerDO[] servers = client.getServersforServerType(serverType);
if (servers != null) {
for (ServerDO server : servers) {
if (server.getPassword() != null) {
server.setPassword(decryptPassword(server.getPassword()));
}
}
}
return servers;
} catch (CryptoException e) {
throw new BAMException("Cannot decrypt password for server ", e);
} finally {
if (client != null) {
client.cleanup();
}
}
}