CVS: plexus-container-new/src/java/org/apache/plexus/lifecycle/avalon AvalonLifecycleHandler.java,1.5,1.6

[email protected]
Newsgroups gmane.comp.java.plexus.devel
Message-ID <[email protected]>
Update of /cvsroot/plexus/plexus-container-new/src/java/org/apache/plexus/lifecycle/avalon
In directory eng.werken.com:/tmp/cvs-serv18188

Modified Files:
	AvalonLifecycleHandler.java 
Log Message:
o Attempting to make the avalon lifecycle handler completely
  self-contained.

Index: AvalonLifecycleHandler.java
===================================================================
RCS file: /cvsroot/plexus/plexus-container-new/src/java/org/apache/plexus/lifecycle/avalon/AvalonLifecycleHandler.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- AvalonLifecycleHandler.java	24 Apr 2003 15:03:39 -0000	1.5
+++ AvalonLifecycleHandler.java	25 Apr 2003 17:42:36 -0000	1.6
@@ -57,6 +57,7 @@
  */
 
 import org.apache.plexus.lifecycle.AbstractLifecycleHandler;
+import org.apache.plexus.lifecycle.LifecycleHandler;
 import org.apache.plexus.lifecycle.phase.ConfigurePhase;
 import org.apache.plexus.lifecycle.phase.ContextualizePhase;
 import org.apache.plexus.lifecycle.phase.DisposePhase;
@@ -73,6 +74,7 @@
 import org.apache.plexus.lifecycle.phase.StopPhase;
 import org.apache.plexus.lifecycle.phase.SuspendPhase;
 import org.apache.plexus.service.repository.ServiceCapsule;
+import org.apache.plexus.service.repository.ServiceRepository;
 
 import java.util.ArrayList;
 import java.util.Iterator;
@@ -98,10 +100,6 @@
     extends AbstractLifecycleHandler
 {
     /** */
-    public static String LOGGER = "logger";
-    /** */
-    public static String CONTEXT = "context";
-    /** */
     public static String SERVICE_MANAGER = "service.manager";
 
     List beginSegment;
@@ -115,10 +113,17 @@
 
     public AvalonLifecycleHandler()
     {
-        assembleSegments();
+    }
+
+    public void initialize()
+        throws Exception
+    {
+        addEntity( SERVICE_MANAGER, new AvalonServiceManager(
+            (ServiceRepository) getEntities().get( LifecycleHandler.SERVICE_REPOSITORY ) ) );
     }
 
     public void assembleSegments()
+        throws Exception
     {
         // I'm sure we could make this more configurable. A little properties file in the
         // same package would probably do and be good for j2me environments. We'll avoid
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.