use of com.dexels.navajo.server.NavajoConfigInterface in project navajo by Dexels.
the class JMXHelper method getObjectName.
private static final ObjectName getObjectName(String domain, String type) {
if (applicationPrefix == null) {
synchronized (semaphore) {
DispatcherInterface instance = DispatcherFactory.getInstance();
if (instance == null) {
// logger.debug("Navajo instance not started. Is navajo context listener valid? Check web.xml");
return null;
}
NavajoConfigInterface navajoConfig = instance.getNavajoConfig();
if (navajoConfig == null) {
throw new RuntimeException("Navajo instance not started. Is navajo context listener valid? Check web.xml");
}
applicationPrefix = navajoConfig.getInstanceName();
if (applicationPrefix == null) {
applicationPrefix = "unnamedapplication";
}
}
}
try {
return new ObjectName(constructObjectName(domain) + type + ",instance=" + applicationPrefix);
} catch (MalformedObjectNameException e) {
logger.error("Error: ", e);
return null;
} catch (NullPointerException e) {
logger.error("Error: ", e);
return null;
}
}
use of com.dexels.navajo.server.NavajoConfigInterface in project navajo by Dexels.
the class AdminMap method load.
@Override
public void load(Access access) throws MappableException, UserException {
NavajoConfigInterface nc = DispatcherFactory.getInstance().getNavajoConfig();
scriptPath = ensurePathEndsWithSeparator(nc.getScriptPath());
configPath = ensurePathEndsWithSeparator(nc.getConfigPath());
adapterPath = ensurePathEndsWithSeparator(nc.getAdapterPath());
compiledScriptPath = ensurePathEndsWithSeparator(nc.getCompiledScriptPath());
rootPath = ensurePathEndsWithSeparator(nc.getRootPath());
supportsAsync = true;
supportsStore = (nc.getAsyncStore() != null);
supportsIntegrity = false;
supportsStatistics = nc.isEnableStatisticsRunner();
supportsLocks = nc.isLockManagerEnabled();
serverId = DispatcherFactory.getInstance().getApplicationId();
myAccess = access;
instanceName = nc.getInstanceName();
instanceGroup = nc.getInstanceGroup();
clientId = access.getClientToken();
}
Aggregations