User: user57
Date: 02/03/01 15:24:39
Added: src/main/org/jboss/system/server ServerConfigLocator.java
Log:
o helper to get a proxy to ServerConfig instance
Revision Changes Path
1.1
jboss-system/src/main/org/jboss/system/server/ServerConfigLocator.java
Index: ServerConfigLocator.java
===================================================================
/***************************************
* *
* JBoss: The OpenSource J2EE WebOS *
* *
* Distributable under LGPL license. *
* See terms of license at gnu.org. *
* *
***************************************/
package org.jboss.system.server;
import javax.management.ObjectName;
import org.jboss.util.jmx.MBeanProxy;
/**
* A helper for locating the {@link ServerConfig} instance
* for the running server.
*
* @version <tt>$Revision: 1.1 $</tt>
* @author <a href="mailto:[EMAIL PROTECTED]">Jason Dillon</a>
*/
public class ServerConfigLocator
{
private static volatile ServerConfig instance = null;
public static ServerConfig locate()
{
if (instance == null) {
instance = (ServerConfig)
MBeanProxy.create(ServerConfig.class,
ServerConfigImplMBean.OBJECT_NAME);
}
return instance;
}
}
_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development