Update of /cvsroot/plexus/plexus-container-new/src/java/org/apache/plexus
In directory eng.werken.com:/tmp/cvs-serv19024
Modified Files:
DefaultPlexusContainer.java
Removed Files:
PlexusDefaults.java
Log Message:
o We don't need the PlexusDefaults. Bad idea, will just use the configuration
and pass it around to factories to create the base entities required
in the container.
Index: DefaultPlexusContainer.java
===================================================================
RCS file: /cvsroot/plexus/plexus-container-new/src/java/org/apache/plexus/DefaultPlexusContainer.java,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- DefaultPlexusContainer.java 25 Apr 2003 17:42:05 -0000 1.8
+++ DefaultPlexusContainer.java 25 Apr 2003 19:24:42 -0000 1.9
@@ -65,6 +65,7 @@
import org.apache.plexus.configuration.DefaultConfigurationBuilder;
import org.apache.plexus.context.DefaultContext;
import org.apache.plexus.lifecycle.LifecycleHandler;
+import org.apache.plexus.lifecycle.LifecycleHandlerFactory;
import org.apache.plexus.logging.AbstractLogEnabled;
import org.apache.plexus.logging.ConsoleLogger;
import org.apache.plexus.logging.LoggerManager;
@@ -158,8 +159,7 @@
/** Default Configuration Builder. */
private DefaultConfigurationBuilder builder;
- /** Default Configuration. */
- private PlexusDefaults plexusDefaults;
+ private Configuration defaultConfiguration;
// ----------------------------------------------------------------------
// Constructors
@@ -350,17 +350,17 @@
throws Exception
{
InputStream is = getClassLoader().getResourceAsStream( "org/apache/plexus/plexus.conf" );
- setPlexusDefaults( new PlexusDefaults( builder.build( new InputSource( new InputStreamReader( is ) ) ) ) );
+ setDefaultConfiguration( builder.build( new InputSource( new InputStreamReader( is ) ) ) );
}
- public PlexusDefaults getPlexusDefaults()
+ public Configuration getDefaultConfiguration()
{
- return plexusDefaults;
+ return defaultConfiguration;
}
- public void setPlexusDefaults( PlexusDefaults plexusDefaults )
+ public void setDefaultConfiguration( Configuration defaultConfiguration )
{
- this.plexusDefaults = plexusDefaults;
+ this.defaultConfiguration = defaultConfiguration;
}
/** Initialize the configuration.
@@ -463,10 +463,11 @@
protected void initializeLifecycleHandler()
throws Exception
{
- Class c = getClassLoader().loadClass( getPlexusDefaults().getDefaultLifecycleHandler() );
- LifecycleHandler lh = (LifecycleHandler) c.newInstance();
+ LifecycleHandler lh = LifecycleHandlerFactory.create(
+ getDefaultConfiguration().getChild( "lifecycle-handler" ), getClassLoader() );
+
+ // This is where lifecycle handler specific entities are created.
lh.initialize();
- lh.assembleSegments();
// Add some standard entities to the lifecycle handler. The lifecycle
// handler may wish to use some of these entities to create new types
--- PlexusDefaults.java DELETED ---
lmpx.com only provides a reader for public news (NNTP) servers. It is not
affiliated with the servers or forums shown here and is not responsible for
the content of articles, which is written by their respective authors.