avalon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mcconn...@apache.org
Subject cvs commit: avalon/merlin/kernel/impl/src/java/org/apache/avalon/merlin/impl DefaultCriteria.java DefaultFactory.java
Date Mon, 01 Mar 2004 16:46:03 GMT
mcconnell    2004/03/01 08:46:03

  Modified:    merlin/kernel/api/src/java/org/apache/avalon/merlin
                        KernelCriteria.java
               merlin/kernel/impl/src/java/org/apache/avalon/merlin/impl
                        DefaultCriteria.java DefaultFactory.java
  Log:
  Fix changes related to system context handling.
  
  Revision  Changes    Path
  1.11      +2 -2      avalon/merlin/kernel/api/src/java/org/apache/avalon/merlin/KernelCriteria.java
  
  Index: KernelCriteria.java
  ===================================================================
  RCS file: /home/cvs/avalon/merlin/kernel/api/src/java/org/apache/avalon/merlin/KernelCriteria.java,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- KernelCriteria.java	1 Mar 2004 16:31:41 -0000	1.10
  +++ KernelCriteria.java	1 Mar 2004 16:46:03 -0000	1.11
  @@ -324,6 +324,6 @@
       *
       * @return TRUE if code security is enabled
       */
  -    boolean isCodeSecurityEnabled();
  +    boolean isSecurityEnabled();
   
   }
  
  
  
  1.28      +2 -2      avalon/merlin/kernel/impl/src/java/org/apache/avalon/merlin/impl/DefaultCriteria.java
  
  Index: DefaultCriteria.java
  ===================================================================
  RCS file: /home/cvs/avalon/merlin/kernel/impl/src/java/org/apache/avalon/merlin/impl/DefaultCriteria.java,v
  retrieving revision 1.27
  retrieving revision 1.28
  diff -u -r1.27 -r1.28
  --- DefaultCriteria.java	1 Mar 2004 16:31:42 -0000	1.27
  +++ DefaultCriteria.java	1 Mar 2004 16:46:03 -0000	1.28
  @@ -606,7 +606,7 @@
       *
       * @return TRUE if code security is enabled - default is false
       */
  -    public boolean isCodeSecurityEnabled()
  +    public boolean isSecurityEnabled()
       {
           Boolean value = (Boolean) get( MERLIN_CODE_SECURITY_ENABLED );
           if( null != value ) return value.booleanValue();
  
  
  
  1.37      +6 -66     avalon/merlin/kernel/impl/src/java/org/apache/avalon/merlin/impl/DefaultFactory.java
  
  Index: DefaultFactory.java
  ===================================================================
  RCS file: /home/cvs/avalon/merlin/kernel/impl/src/java/org/apache/avalon/merlin/impl/DefaultFactory.java,v
  retrieving revision 1.36
  retrieving revision 1.37
  diff -u -r1.36 -r1.37
  --- DefaultFactory.java	1 Mar 2004 16:31:42 -0000	1.36
  +++ DefaultFactory.java	1 Mar 2004 16:46:03 -0000	1.37
  @@ -410,14 +410,15 @@
           // add the security profiles
           //
   
  -        Configuration secConfig = config.getChild( "security" );
  -        if( context.isCodeSecurityEnabled() )
  +        boolean secure = criteria.isSecurityEnabled();
  +        factory.setSecurityEnabled( secure );
  +        if( secure )
           {
  +            Configuration secConfig = config.getChild( "security" );
               SecurityProfile[] profiles = 
                 SECURITY_CREATOR.createSecurityProfiles( secConfig );
               factory.setSecurityProfiles( profiles );
           }
  -        factory.
   
           //
           // create the application repository
  @@ -466,31 +467,7 @@
           // create the system context
           //
   
  -        SystemContext system = factory.createSystemContext();
  -        return system;
  -
  -        /*
  -        File anchor = criteria.getAnchorDirectory();
  -
  -        DefaultSystemContext system = 
  -          new DefaultSystemContext( 
  -            context, 
  -            runtime, 
  -            logging,
  -            anchor,
  -            criteria.getContextDirectory(),
  -            criteria.getTempDirectory(),
  -            repository,
  -            name,
  -            criteria.isDebugEnabled(),
  -            criteria.getDeploymentTimeout(),
  -            security );
  -
  -        system.put( "urn:composition:dir", criteria.getWorkingDirectory() );
  -        system.put( "urn:composition:anchor", criteria.getAnchorDirectory() );
  -
  -        return system;
  -        */
  +        return factory.createSystemContext();
       }
   
       private ContainmentModel createApplicationModel( 
  @@ -501,46 +478,9 @@
           final Logger logger = logging.getLoggerForCategory("");
           ClassLoader api = system.getAPIClassLoader();
           ContainmentProfile profile = getContainmentProfile( config );
  -
           return system.getModelFactory().createRootContainmentModel( profile );
  -        //ContainmentContext context = 
  -        //  createContainmentContext( system, logger, api, profile );
  -        //return new DefaultContainmentModel( context );
       }
   
  -   /**
  -    * Creation of a new root containment context.
  -    *
  -    * @param profile a containment profile 
  -    * @return the containment context
  -    */
  -    private ContainmentContext createContainmentContext( 
  -      SystemContext context, Logger logger, ClassLoader parent, 
  -      ContainmentProfile profile ) 
  -      throws Exception
  -    {
  -        LoggingManager logging = context.getLoggingManager();
  -        logging.addCategories( profile.getCategories() );
  -
  -        ClassLoaderContext classLoaderContext =
  -          new DefaultClassLoaderContext( 
  -            logger, 
  -            context.getRepository(),
  -            context.getBaseDirectory(),
  -            parent,
  -            profile.getClassLoaderDirective() );
  -
  -        ClassLoaderModel classLoaderModel =
  -          new DefaultClassLoaderModel( classLoaderContext );
  -
  -        return new DefaultContainmentContext( 
  -          logger, 
  -          context, 
  -          classLoaderModel,
  -          null,
  -          null,
  -          profile );
  -    }
   
       private ContainmentProfile getContainmentProfile( Configuration config )
         throws KernelException
  @@ -859,7 +799,7 @@
   
           buffer.append( 
             "\n  ${merlin.code.security.enabled} == " 
  -          + criteria.isCodeSecurityEnabled() );
  +          + criteria.isSecurityEnabled() );
   
           buffer.append( 
             "\n  ${merlin.deployment.timeout} == " 
  
  
  

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


Mime
View raw message