avalon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From craft...@apache.org
Subject cvs commit: jakarta-avalon-excalibur/fortress/src/java/org/apache/excalibur/fortress DefaultContainerManager.java
Date Fri, 12 Jul 2002 13:40:59 GMT
crafterm    2002/07/12 06:40:59

  Modified:    fortress/examples build.xml
               fortress/src/java/org/apache/excalibur/fortress
                        DefaultContainerManager.java
  Log:
  Reintroduced use of ComponentStateValidator to ensure Container class is
  validated during construction (now that AbstractContainer supports just
  Servicable validation of it will succeed).
  
  Updated examples build.xml to copy excalibur util jar into examples lib
  directory.
  
  Revision  Changes    Path
  1.5       +4 -0      jakarta-avalon-excalibur/fortress/examples/build.xml
  
  Index: build.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-excalibur/fortress/examples/build.xml,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- build.xml	4 Jul 2002 11:44:23 -0000	1.4
  +++ build.xml	12 Jul 2002 13:40:59 -0000	1.5
  @@ -80,6 +80,10 @@
           <!-- Excalibur concurrent jar -->
           <copy file="${excalibur-concurrent.jar}"
               todir="${lib.dir}" preservelastmodified="yes"/>
  +	    
  +        <!-- Excalibur util jar -->
  +        <copy file="${excalibur-util.jar}"
  +            todir="${lib.dir}" preservelastmodified="yes"/>
   
           <!-- Avalon logger jar -->
           <copy file="${logkit.jar}"
  
  
  
  1.14      +14 -14    jakarta-avalon-excalibur/fortress/src/java/org/apache/excalibur/fortress/DefaultContainerManager.java
  
  Index: DefaultContainerManager.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-excalibur/fortress/src/java/org/apache/excalibur/fortress/DefaultContainerManager.java,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- DefaultContainerManager.java	12 Jul 2002 12:53:44 -0000	1.13
  +++ DefaultContainerManager.java	12 Jul 2002 13:40:59 -0000	1.14
  @@ -52,7 +52,7 @@
       private final Context containerContext;
       private Logger logger;
       private Object containerInstance;
  -//    private ComponentStateValidator validator;
  +    private ComponentStateValidator validator;
   
       public DefaultContainerManager( ContextManager contextManager )
       {
  @@ -125,19 +125,19 @@
                   throw new InitializationException( "Cannot set up container. Unable to
create container class", e );
               }
   
  -//            validator = new ComponentStateValidator( instance );
  +            validator = new ComponentStateValidator( instance );
   
               try
               {
                   if( instance instanceof LogEnabled )
                   {
  -//                    validator.checkLogEnabled();
  +                    validator.checkLogEnabled();
                       ( (LogEnabled)instance ).enableLogging( logger );
                   }
   
                   if( instance instanceof Contextualizable )
                   {
  -//                    validator.checkContextualized();
  +                    validator.checkContextualized();
                       ( (Contextualizable)instance ).contextualize( containerContext );
                   }
   
  @@ -146,7 +146,7 @@
   
                   if( instance instanceof Composable )
                   {
  -//                    validator.checkComposed();
  +                    validator.checkComposed();
   
                       ComponentManager manager =
                           ( smanager == null ) ? cmanager : new ServiceComponentManager(
smanager );
  @@ -155,7 +155,7 @@
   
                   if( instance instanceof Serviceable )
                   {
  -//                    validator.checkServiced();
  +                    validator.checkServiced();
   
                       ServiceManager manager =
                           ( cmanager == null ) ? smanager : new ComponentServiceManager(
cmanager );
  @@ -164,25 +164,25 @@
   
                   if( instance instanceof Configurable )
                   {
  -//                    validator.checkConfigured();
  +                    validator.checkConfigured();
                       ( (Configurable)instance ).configure( (Configuration)initParameters.get(
CONFIGURATION ) );
                   }
   
                   if( instance instanceof Parameterizable )
                   {
  -//                    validator.checkParameterized();
  +                    validator.checkParameterized();
                       ( (Parameterizable)instance ).parameterize( (Parameters)initParameters.get(
PARAMETERS ) );
                   }
   
                   if( instance instanceof Initializable )
                   {
  -//                    validator.checkInitialized();
  +                    validator.checkInitialized();
                       ( (Initializable)instance ).initialize();
                   }
   
                   if( instance instanceof Startable )
                   {
  -//                    validator.checkStarted();
  +                    validator.checkStarted();
                       ( (Startable)instance ).start();
                   }
               }
  @@ -241,7 +241,7 @@
               {
                   try
                   {
  -//                    validator.checkStopped();
  +                    validator.checkStopped();
                       ( (Startable)containerInstance ).stop();
                   }
                   catch( Exception e )
  @@ -255,11 +255,11 @@
   
               if( containerInstance instanceof Disposable )
               {
  -//                validator.checkDisposed();
  +                validator.checkDisposed();
                   ( (Disposable)containerInstance ).dispose();
               }
   
  -//            validator = null;
  +            validator = null;
               containerInstance = null;
           }
       }
  
  
  

--
To unsubscribe, e-mail:   <mailto:avalon-cvs-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:avalon-cvs-help@jakarta.apache.org>


Mime
View raw message