You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jetspeed-dev@portals.apache.org by at...@apache.org on 2008/04/10 12:34:05 UTC
svn commit: r646737 -
/portals/jetspeed-2/portal/trunk/components/jetspeed-cm/src/main/java/org/apache/jetspeed/components/SpringComponentManager.java
Author: ate
Date: Thu Apr 10 03:33:51 2008
New Revision: 646737
URL: http://svn.apache.org/viewvc?rev=646737&view=rev
Log:
minor change to parameter naming and making sure stop() isn't doing anything if the manager hasn't started yet
Modified:
portals/jetspeed-2/portal/trunk/components/jetspeed-cm/src/main/java/org/apache/jetspeed/components/SpringComponentManager.java
Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-cm/src/main/java/org/apache/jetspeed/components/SpringComponentManager.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-cm/src/main/java/org/apache/jetspeed/components/SpringComponentManager.java?rev=646737&r1=646736&r2=646737&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-cm/src/main/java/org/apache/jetspeed/components/SpringComponentManager.java (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-cm/src/main/java/org/apache/jetspeed/components/SpringComponentManager.java Thu Apr 10 03:33:51 2008
@@ -60,23 +60,23 @@
}
public SpringComponentManager(JetspeedBeanDefinitionFilter filter, String[] bootConfigs, String[] appConfigs, ServletContext servletContext,
- String appRoot, Properties bootProperties)
+ String appRoot, Properties initProperties)
{
- if (bootProperties == null)
+ if (initProperties == null)
{
- bootProperties = new Properties();
+ initProperties = new Properties();
}
- bootProperties.setProperty(JetspeedEngineConstants.APPLICATION_ROOT_KEY, appRoot);
+ initProperties.setProperty(JetspeedEngineConstants.APPLICATION_ROOT_KEY, appRoot);
if (bootConfigs != null && bootConfigs.length > 0)
{
- bootCtx = new FilteringXmlWebApplicationContext(filter, bootConfigs, bootProperties, servletContext);
+ bootCtx = new FilteringXmlWebApplicationContext(filter, bootConfigs, initProperties, servletContext);
}
else
{
bootCtx = new FileSystemXmlApplicationContext();
}
- appContext = new FilteringXmlWebApplicationContext(filter, appConfigs, bootProperties, servletContext, bootCtx);
+ appContext = new FilteringXmlWebApplicationContext(filter, appConfigs, initProperties, servletContext, bootCtx);
factories = new ArrayList();
factories.add(appContext);
@@ -89,23 +89,23 @@
this(filter, bootConfigs, appConfigs, appRoot, null, fileSystem);
}
- public SpringComponentManager(JetspeedBeanDefinitionFilter filter, String[] bootConfigs, String[] appConfigs, String appRoot, Properties bootProperties, boolean fileSystem)
+ public SpringComponentManager(JetspeedBeanDefinitionFilter filter, String[] bootConfigs, String[] appConfigs, String appRoot, Properties initProperties, boolean fileSystem)
{
- if (bootProperties == null)
+ if (initProperties == null)
{
- bootProperties = new Properties();
+ initProperties = new Properties();
}
- bootProperties.setProperty(JetspeedEngineConstants.APPLICATION_ROOT_KEY, appRoot);
+ initProperties.setProperty(JetspeedEngineConstants.APPLICATION_ROOT_KEY, appRoot);
if (bootConfigs != null && bootConfigs.length > 0)
{
if (fileSystem)
{
- bootCtx = new FilteringFileSystemXmlApplicationContext(filter, bootConfigs, bootProperties);
+ bootCtx = new FilteringFileSystemXmlApplicationContext(filter, bootConfigs, initProperties);
}
else
{
- bootCtx = new FilteringClassPathXmlApplicationContext(filter, bootConfigs, bootProperties);
+ bootCtx = new FilteringClassPathXmlApplicationContext(filter, bootConfigs, initProperties);
}
}
else
@@ -115,11 +115,11 @@
if (fileSystem)
{
- appContext = new FilteringFileSystemXmlApplicationContext(filter, appConfigs, bootProperties, bootCtx);
+ appContext = new FilteringFileSystemXmlApplicationContext(filter, appConfigs, initProperties, bootCtx);
}
else
{
- appContext = new FilteringClassPathXmlApplicationContext(filter, appConfigs, bootProperties, bootCtx);
+ appContext = new FilteringClassPathXmlApplicationContext(filter, appConfigs, initProperties, bootCtx);
}
factories = new ArrayList();
factories.add(appContext);
@@ -212,9 +212,12 @@
*/
public void stop()
{
- appContext.close();
- bootCtx.close();
- started = false;
+ if (started)
+ {
+ appContext.close();
+ bootCtx.close();
+ started = false;
+ }
}
public ApplicationContext getApplicationContext()
---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-dev-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-dev-help@portals.apache.org