ADFLogger logger;
logger = ADFLogger.createADFLogger(MyClass.class);
InitialContext ctx = new InitialContext();
MBeanServer server = (MBeanServer)ctx.lookup("java:comp/env/jmx/runtime");
ObjectName service =new ObjectName("com.bea:Name=RuntimeService,Type=weblogic.management.mbeanservers.
runtime.RuntimeServiceMBean");
ObjectName domain =(ObjectName)server.getAttribute(service, "DomainConfiguration");
rootDir = (String)server.getAttribute(domain, "RootDirectory");
logger.info("Root Dir : " + rootDir);
No comments:
Post a Comment