mcconnell 2002/12/15 17:08:57
Modified: assembly/src/java/org/apache/avalon/assembly/engine
EngineClassLoader.java
Log:
State optimization of system context creation.
Revision Changes Path
1.9 +13 -2
avalon-sandbox/assembly/src/java/org/apache/avalon/assembly/engine/EngineClassLoader.java
Index: EngineClassLoader.java
===================================================================
RCS file:
/home/cvs/avalon-sandbox/assembly/src/java/org/apache/avalon/assembly/engine/EngineClassLoader.java,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- EngineClassLoader.java 15 Dec 2002 14:08:56 -0000 1.8
+++ EngineClassLoader.java 16 Dec 2002 01:08:57 -0000 1.9
@@ -163,6 +163,11 @@
private Configuration m_config;
/**
+ * The base system wide context.
+ */
+ private Context m_system;
+
+ /**
* The system wide context where system refers to the context that
* will be propergated by this engine to compoents under it
* supervision.
@@ -1119,6 +1124,11 @@
private Context getSystemContext()
{
+ if( m_system != null )
+ {
+ return m_system;
+ }
+
if( getLogger().isDebugEnabled() )
{
getLogger().debug( "bootstrap system context" );
@@ -1143,7 +1153,8 @@
final File home = new File( System.getProperty( "user.dir" ) );
context.put( "urn:avalon:home", home );
}
- return context;
+ m_system = context;
+ return m_system;
}
private PoolManager getPoolManager( )
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>