//Getting model controller client requires privs our callers might not have, but we want to provide this
//function even to them.
ModelControllerClient mcc = SecurityActions.createModelControllerClient();
try {
DeploymentJBossASClient client = new DeploymentJBossASClient(mcc);
String earPath = client.getDeploymentPath(RHQConstants.EAR_FILE_NAME);
return new File(earPath);
} catch (Exception e) {
throw new RuntimeException(e);
} finally {
MCCHelper.safeClose(mcc);