admin@glassfish.java.net

Re: CODE REVIEW: InstanceStatus, ProcessManager

From: Nandini Ektare <Nandini.Ektare_at_Sun.COM>
Date: Mon, 02 Apr 2007 19:08:27 -0700

Hi Lloyd,

Please go ahead.

Thanks
Nandini

Lloyd L Chambers wrote:
> Addresses FindBugs complaints, fixes thread-safety issues.
>
> Timeout: 5pm PST Tuesday April 3
>
>
> ===================================================================
> RCS file:
> /cvs/glassfish/admin-ee/nodeagent/src/java/com/sun/enterprise/ee/nodeagent/InstanceStatus.java,v
>
> retrieving revision 1.3
> diff -r1.3 InstanceStatus.java
> 61d60
> < private static Logger _logger = null;
> 64c63
> < super();
> ---
> > super();
> 68,71c67
> < if (_logger == null) {
> < _logger = Logger.getLogger(EELogDomains.NODE_AGENT_LOGGER);
> < }
> < return _logger;
> ---
> > return Logger.getLogger(EELogDomains.NODE_AGENT_LOGGER);
> Index:
> nodeagent/src/java/com/sun/enterprise/ee/nodeagent/ProcessManager.java
> ===================================================================
> RCS file:
> /cvs/glassfish/admin-ee/nodeagent/src/java/com/sun/enterprise/ee/nodeagent/ProcessManager.java,v
>
> retrieving revision 1.2
> diff -r1.2 ProcessManager.java
> 59c59
> < public class ProcessManager implements Observer {
> ---
> > public final class ProcessManager implements Observer {
> 71,75c71,76
> < private static Hashtable _htProcesses=new Hashtable();
> < private static ProcessManager _procesManager=new ProcessManager();
> < private static ProcessManagerMonitor _processManagerMonitor=null;
> < private static ProcessManagerConfig _processManagerConfig=null;
> < private static Logger _logger=null;
> ---
> > // 'volatile' because of get/set methods
> > private static volatile Hashtable _htProcesses=new Hashtable();
> >
> > private static final ProcessManager _processManager=new
> ProcessManager();
> > private final ProcessManagerMonitor _processManagerMonitor;
> >
> 78c79
> < private static boolean bDebug=false;
> ---
> > private static final boolean bDebug=System.getProperty("Debug")
> != null;
> 87,93c88
> < if (System.getProperty("Debug") != null) {
> < // turn on debug, this option was added to help developers
> < // debug the their code what adding/modifying tasks that
> are executed via
> < // the ProcessLauncher
> < bDebug=true;
> < }
> < return _procesManager;
> ---
> > return _processManager;
> 97,99c92,94
> < public void initializeConfiguration(String configFile) throws
> ProcessManagerException {
> < _processManagerConfig=new ProcessManagerConfig(configFile);
> < setProcesses(_processManagerConfig.initializeConfig());
> ---
> > public void initializeConfiguration(final String configFile)
> throws ProcessManagerException {
> > final ProcessManagerConfig config = new
> ProcessManagerConfig(configFile);
> > setProcesses(config.initializeConfig());
> 261,264c256,257
> < if (_logger == null) {
> < _logger =
> Logger.getLogger(EELogDomains.NODE_AGENT_LOGGER,
> "com.sun.logging.ee.enterprise.system.nodeagent.LogStrings");
> < }
> < return _logger;
> ---
> > return Logger.getLogger(EELogDomains.NODE_AGENT_LOGGER,
> >
> "com.sun.logging.ee.enterprise.system.nodeagent.LogStrings");
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: admin-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: admin-help_at_glassfish.dev.java.net
>