@HandlerOutput(name="enabled", type=Boolean.class)} )
public static void getApplicationInfo(HandlerContext handlerCtx) {
String name = (String) handlerCtx.getInputValue("name");
String appType = (String) handlerCtx.getInputValue("appType");
ModuleConfig module = null;
if ("application".equals(appType)){
module = AMXUtil.getDomainConfig().getJ2EEApplicationConfigMap().get(name);
if (module != null){
J2EEApplicationConfig j2eeApp = (J2EEApplicationConfig) module;
handlerCtx.setOutputValue("javaWebStart", j2eeApp.getJavaWebStartEnabled());
handlerCtx.setOutputValue("availEnabled", j2eeApp.getAvailabilityEnabled());
if(!AMXUtil.supportCluster()) {
//We need this only for PE, so hard code it "server"
handlerCtx.setOutputValue("vs", TargetUtil.getAssociatedVS(name, "server"));
}
}
}else
if ("ejbModule".equals(appType)){
module = AMXUtil.getDomainConfig().getEJBModuleConfigMap().get(name);
if (module != null){
EJBModuleConfig ejbModule = (EJBModuleConfig) module;
handlerCtx.setOutputValue("availEnabled", ejbModule.getAvailabilityEnabled());
}
}else
if ("webApp".equals(appType)){
module = AMXUtil.getDomainConfig().getWebModuleConfigMap().get(name);
if (module != null){
WebModuleConfig webModule = (WebModuleConfig) module;
handlerCtx.setOutputValue("contextRoot", webModule.getContextRoot());
handlerCtx.setOutputValue("availEnabled", webModule.getAvailabilityEnabled());
if(!AMXUtil.supportCluster()) {
//We need this only for PE, so hard code it "server"
handlerCtx.setOutputValue("vs", TargetUtil.getAssociatedVS(name, "server"));
}
}
}else
if ("connector".equals(appType)){
module = AMXUtil.getDomainConfig().getRARModuleConfigMap().get(name);
if (module != null){
ResourceAdapterConfig adapter = AMXUtil.getDomainConfig().getResourceAdapterConfigMap().get(name);
if (adapter != null)
handlerCtx.setOutputValue("threadPool", adapter.getThreadPoolIDs());
}
}
if (module == null){
//TODO: log error
return;
}
handlerCtx.setOutputValue("location", module.getLocation());
handlerCtx.setOutputValue("description", module.getDescription());
handlerCtx.setOutputValue("objectType", module.getObjectType());
if(AMXUtil.isEE())
handlerCtx.setOutputValue("enabledString", TargetUtil.getEnabledStatus(module, true));
else
handlerCtx.setOutputValue("enabled", TargetUtil.isApplicationEnabled(module, "server" ));