avalon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From blorit...@apache.org
Subject cvs commit: jakarta-avalon-excalibur/src/scratchpad/org/apache/avalon/excalibur/system/util ContextManager.java
Date Tue, 12 Mar 2002 21:51:24 GMT
bloritsch    02/03/12 13:51:24

  Modified:    examples/container/src/java/org/apache/avalon/example/container
                        Main.java
               src/scratchpad/org/apache/avalon/excalibur/source
                        SourceResolverImpl.java
               src/scratchpad/org/apache/avalon/excalibur/system/util
                        ContextManager.java
  Log:
  fix issue where the context root dir is not set correctly.
  
  Revision  Changes    Path
  1.2       +1 -1      jakarta-avalon-excalibur/examples/container/src/java/org/apache/avalon/example/container/Main.java
  
  Index: Main.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-excalibur/examples/container/src/java/org/apache/avalon/example/container/Main.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- Main.java	12 Mar 2002 21:36:56 -0000	1.1
  +++ Main.java	12 Mar 2002 21:51:24 -0000	1.2
  @@ -39,7 +39,7 @@
    * Note, this code ignores exceptions to keep the code simple.
    *
    * @author <a href="mailto:bloritsch@apache.org">Berin Loritsch</a>
  - * @version CVS $Revision: 1.1 $ $Date: 2002/03/12 21:36:56 $
  + * @version CVS $Revision: 1.2 $ $Date: 2002/03/12 21:51:24 $
    * @since 4.1
    */
   public class Main
  @@ -61,7 +61,7 @@
           // values it needs to do its job.
           ContextBuilder contextBuilder = new ContextBuilder ();
           contextBuilder.setContainerClass( ExampleContainer.class );
  -        contextBuilder.setContextDirectory( "../../" );
  +        contextBuilder.setContextDirectory( "../" );
           contextBuilder.setContainerConfiguration( "conf/components.xml" );
           contextBuilder.setLoggerManagerConfiguration( "conf/logkit.xml" );
           contextBuilder.setRoleManagerConfiguration( "resource://org/apache/avalon/example/container/container.roles"
);
  
  
  
  1.20      +3 -1      jakarta-avalon-excalibur/src/scratchpad/org/apache/avalon/excalibur/source/SourceResolverImpl.java
  
  Index: SourceResolverImpl.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-excalibur/src/scratchpad/org/apache/avalon/excalibur/source/SourceResolverImpl.java,v
  retrieving revision 1.19
  retrieving revision 1.20
  diff -u -r1.19 -r1.20
  --- SourceResolverImpl.java	19 Feb 2002 14:28:50 -0000	1.19
  +++ SourceResolverImpl.java	12 Mar 2002 21:51:24 -0000	1.20
  @@ -53,7 +53,7 @@
    *
    * @author <a href="mailto:cziegeler@apache.org">Carsten Ziegeler</a>
    * @author <a href="mailto:bloritsch@apache.org">Berin Loritsch</a>
  - * @version $Id: SourceResolverImpl.java,v 1.19 2002/02/19 14:28:50 cziegeler Exp $
  + * @version $Id: SourceResolverImpl.java,v 1.20 2002/03/12 21:51:24 bloritsch Exp $
    */
   public class SourceResolverImpl
   extends AbstractLogEnabled
  @@ -103,11 +103,13 @@
               }
               catch (MalformedURLException mue)
               {
  +                getLogger().warn("Malformed URL for user.dir, and no container.rootDir
exists", mue);
                   throw new ContextException("Malformed URL for user.dir, and no container.rootDir
exists", mue);
               }
           }
           catch (MalformedURLException mue)
           {
  +            getLogger().warn("Malformed URL for container.rootDir", mue);
               throw new ContextException("Malformed URL for container.rootDir", mue);
           }
       }
  
  
  
  1.8       +4 -4      jakarta-avalon-excalibur/src/scratchpad/org/apache/avalon/excalibur/system/util/ContextManager.java
  
  Index: ContextManager.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-excalibur/src/scratchpad/org/apache/avalon/excalibur/system/util/ContextManager.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- ContextManager.java	12 Mar 2002 20:51:12 -0000	1.7
  +++ ContextManager.java	12 Mar 2002 21:51:24 -0000	1.8
  @@ -56,7 +56,7 @@
    *
    * @author <a href="mailto:bloritsch@apache.org">Berin Loritsch</a>
    * @author <a href="mailto:leo.sutic@inspireinfrastructure.com">Leo Sutic</a>
  - * @version CVS $Revision: 1.7 $ $Date: 2002/03/12 20:51:12 $
  + * @version CVS $Revision: 1.8 $ $Date: 2002/03/12 21:51:24 $
    * @since 4.1
    */
   public class ContextManager implements ContextManagerConstants
  @@ -124,8 +124,8 @@
        */
       public ContextManager( Context rootContext, Context overrides, Logger logger )
       {
  -        this.rootContext = rootContext;
  -        this.childContext = new DefaultContext( rootContext );
  +        this.rootContext = (rootContext == null) ? overrides : rootContext;
  +        this.childContext = new DefaultContext( this.rootContext );
           this.containerManagerContext = new DefaultContext( childContext );
           this.overrideContext = overrides;
           this.logger = logger;
  @@ -552,7 +552,7 @@
           {
               // Should we set one up?
               // Try to get a configuration for it...
  -            Configuration profilerConfig = getConfiguration( INSTRUMENT_MANAGER, INSTRUMENT_MANAGER_CONFIGURATION_URI
);
  +            Configuration profilerConfig = getConfiguration( INSTRUMENT_MANAGER_CONFIGURATION,
INSTRUMENT_MANAGER_CONFIGURATION_URI );
               if (profilerConfig == null)
               {
                   // No config.
  
  
  

--
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