? admin/backup/build ? admin/mbeanapi-impl/build ? admin/mbeans/build ? admin/monitor/build ? admin/nbproject/.cvsignore ? admin/servermgmt/admin.log ? admin/servermgmt/build ? admin/templates/pe80/ri-domain.xml.template ? admin/templates/pe80/samples-domain.xml.template ? admin/util/classes ? admin/validator/build ? admin/ws-mgmt/build ? admin-cli/admin-cli.log ? admin-cli/build ? admin-cli/commands/build ? admin-cli/framework/${javadoc.dir} ? admin-cli/framework/build Index: admin/servermgmt/src/java/com/sun/enterprise/admin/servermgmt/RepositoryConfig.java =================================================================== RCS file: /cvs/glassfish/admin/servermgmt/src/java/com/sun/enterprise/admin/servermgmt/RepositoryConfig.java,v retrieving revision 1.4 diff -u -w -b -r1.4 RepositoryConfig.java --- admin/servermgmt/src/java/com/sun/enterprise/admin/servermgmt/RepositoryConfig.java 15 Feb 2007 04:32:50 -0000 1.4 +++ admin/servermgmt/src/java/com/sun/enterprise/admin/servermgmt/RepositoryConfig.java 11 Apr 2007 00:04:12 -0000 @@ -80,10 +80,11 @@ * * @author kebbs */ -public class RepositoryConfig extends HashMap { +public class RepositoryConfig extends HashMap { public static final String K_INSTALL_ROOT = "install.root"; public static final String K_CONFIG_ROOT = "config.root"; + public static final String K_REFRESH_CONFIG_CONTEXT = "refresh.cc"; //Name of the domain or node agent. Cannot be null. private String _repositoryName; @@ -109,6 +110,12 @@ _configurationName = configName; put(K_INSTALL_ROOT, getFilePath(SystemPropertyConstants.INSTALL_ROOT_PROPERTY)); put(K_CONFIG_ROOT, getFilePath(SystemPropertyConstants.CONFIG_ROOT_PROPERTY)); + put(K_REFRESH_CONFIG_CONTEXT, true); + /* Since the changes for the startup, we have the problem of refreshing + * config context. So, by default, I am making a change to refresh the + * config context. If some processes (e.g. start-domain) have already + * created a config context, then they should explicitly say so. + */ } public RepositoryConfig(String repositoryName, String repositoryRoot, String instanceName) { @@ -194,4 +201,13 @@ { return (String)get(K_CONFIG_ROOT); } + + public Boolean getRefreshConfigContext() { + return ( (Boolean) get(K_REFRESH_CONFIG_CONTEXT ) ); + //this will never be null, because constructor initializes it to false + } + + public void setRefreshConfingContext(final boolean refresh) { + this.put(K_REFRESH_CONFIG_CONTEXT, refresh); + } } Index: admin/servermgmt/src/java/com/sun/enterprise/admin/servermgmt/launch/ASLauncher.java =================================================================== RCS file: /cvs/glassfish/admin/servermgmt/src/java/com/sun/enterprise/admin/servermgmt/launch/ASLauncher.java,v retrieving revision 1.13 diff -u -w -b -r1.13 ASLauncher.java --- admin/servermgmt/src/java/com/sun/enterprise/admin/servermgmt/launch/ASLauncher.java 30 Mar 2007 21:40:11 -0000 1.13 +++ admin/servermgmt/src/java/com/sun/enterprise/admin/servermgmt/launch/ASLauncher.java 11 Apr 2007 00:04:12 -0000 @@ -165,6 +165,9 @@ private String[] _args=null; private static boolean bDebug=false; + /* Refresh the config context from the disk, by default */ + private boolean refreshConfigContext = true; + // WBN March 2007 // The server's logfile is added to the *local* logger. But it is never // removed. The files are kept open by the logger. One really bad result @@ -298,6 +301,14 @@ } + public void setRefreshConfigContext(final boolean refresh) { + this.refreshConfigContext = refresh; + } + + public boolean getRefreshConfigContext() { + return ( refreshConfigContext ); + } + private void preProcess(String[] args) throws ASLauncherException { // We are being called from a script or native code @@ -713,7 +724,19 @@ // derive domain.xml location and create config to be used by config api String domainXMLLocation=System.getProperty(SystemPropertyConstants.INSTANCE_ROOT_PROPERTY) + RELATIVE_LOCATION_DOMAIN_XML; - ConfigContext configCtxt=ConfigFactory.createConfigContext(domainXMLLocation); + //ConfigContext configCtxt=ConfigFactory.createConfigContext(domainXMLLocation); + final ConfigContext configCtxt; + if (this.getRefreshConfigContext()) //refresh, hence cache = false, new CC is returned; + configCtxt = ConfigFactory.createConfigContext(domainXMLLocation, true, false, false); + else //use cached config context + configCtxt = ConfigFactory.createConfigContext(domainXMLLocation, true, false, true); + + /* Implementation Note: For start-domain command, control should go into else clause + * because the start-domain-command code is creating the config context and + * passing it to launcher. In the case of instances and node agents, the + * cached config context is NOT used. + * This is true with changes made to launcher during Oct 2006 - April 2007. + */ Domain domain=ConfigAPIHelper.getDomainConfigBean(configCtxt); setDomainName(domain); // get the server's config by name, need it as soon as possible for logging Index: admin/servermgmt/src/java/com/sun/enterprise/admin/servermgmt/pe/PEInstancesManager.java =================================================================== RCS file: /cvs/glassfish/admin/servermgmt/src/java/com/sun/enterprise/admin/servermgmt/pe/PEInstancesManager.java,v retrieving revision 1.13 diff -u -w -b -r1.13 PEInstancesManager.java --- admin/servermgmt/src/java/com/sun/enterprise/admin/servermgmt/pe/PEInstancesManager.java 9 Dec 2006 03:45:12 -0000 1.13 +++ admin/servermgmt/src/java/com/sun/enterprise/admin/servermgmt/pe/PEInstancesManager.java 11 Apr 2007 00:04:12 -0000 @@ -265,6 +265,7 @@ else { ASLauncher launcher = new ASLauncher(); + launcher.setRefreshConfigContext(_config.getRefreshConfigContext()); launcher.preProcess(launcherArgs, envProps); process = launcher.process(launcherArgs, securityInfo); } Index: admin-cli/commands/src/java/com/sun/enterprise/cli/commands/StartDomainCommand.java =================================================================== RCS file: /cvs/glassfish/admin-cli/commands/src/java/com/sun/enterprise/cli/commands/StartDomainCommand.java,v retrieving revision 1.23 diff -u -w -b -r1.23 StartDomainCommand.java --- admin-cli/commands/src/java/com/sun/enterprise/cli/commands/StartDomainCommand.java 8 Mar 2007 14:36:48 -0000 1.23 +++ admin-cli/commands/src/java/com/sun/enterprise/cli/commands/StartDomainCommand.java 11 Apr 2007 00:04:12 -0000 @@ -400,6 +400,7 @@ { mgr = getFeatureFactory().getDomainsManager(); config = getDomainConfig(domainName); + config.setRefreshConfingContext(false); this.validateDomain(); CLILogger.getInstance().printDetailMessage(getLocalizedString("StartingDomain", new Object[] {domainName}));