// for extension module type
private void instantiateAndRegisterExtModuleRuntimeMBean(
String type, Object managed, String grandParentName,
String parentName, String name, String extModuleType) {
MBeanRegistry registry = MBeanRegistryFactory.getRuntimeMBeanRegistry();
String domainName = ApplicationServer.getServerContext().getDefaultDomainName();
String serverName = ApplicationServer.getServerContext().getInstanceName();
try {
if(grandParentName!=null) {
registry.instantiateMBean(
type,
new String[]{domainName, serverName, grandParentName,
parentName, name, extModuleType},
managed, AdminService.getAdminService().getAdminContext().getAdminConfigContext(), true); //FIXME
} else {
if(parentName!=null) {
registry.instantiateMBean(
type,
new String[]{domainName, serverName,
parentName, name, extModuleType},
managed, AdminService.getAdminService().getAdminContext().getAdminConfigContext(), true); //FIXME
} else {
if(name!=null) {
registry.instantiateMBean(
type, new String[]{domainName, serverName,name, extModuleType},
managed, AdminService.getAdminService().getAdminContext().getAdminConfigContext(), true); //FIXME
} else {
registry.instantiateMBean(
type, new String[]{domainName, serverName, extModuleType},
managed, AdminService.getAdminService().getAdminContext().getAdminConfigContext(), true); //FIXME
}
}
}