final String path = Application.getInstance().getRootPath();
File openejbWarDir = null;
if (path != null) {
openejbWarDir = new File(path);
}
final Paths paths = new Paths(openejbWarDir);
final Map<String, Object> json = new HashMap<String, Object>();
json.put("isListenerInstalled", Installer.isListenerInstalled());
json.put("isAgentInstalled", Installer.isAgentInstalled());
final Map<String, String> strPaths = new HashMap<String, String>();
strPaths.put("catalina-conf", getSafePath(paths.getCatalinaConfDir()));
strPaths.put("catalina-lib", getSafePath(paths.getCatalinaLibDir()));
strPaths.put("catalina-bin", getSafePath(paths.getCatalinaBinDir()));
strPaths.put("catalina-catalina-sh", getSafePath(paths.getCatalinaShFile()));
strPaths.put("catalina-catalina-bat", getSafePath(paths.getCatalinaBatFile()));
strPaths.put("openEJB-lib", getSafePath(paths.getOpenEJBLibDir()));
strPaths.put("openEJB-loader-jar", getSafePath(paths.getOpenEJBTomcatLoaderJar()));
strPaths.put("openEJB-javaagent-jar", getSafePath(paths.getOpenEJBJavaagentJar()));
final Map<String, String> strMainPaths = new HashMap<String, String>();
strMainPaths.put("catalina-home", getSafePath(paths.getCatalinaHomeDir()));
strMainPaths.put("catalina-base", getSafePath(paths.getCatalinaBaseDir()));
strMainPaths.put("catalina-server-xml", getSafePath(paths.getServerXmlFile()));
json.put("paths", strPaths);
json.put("mainPaths", strMainPaths);
final Installer installer = new Installer(paths);