donaldp     2003/03/15 17:48:35

  Modified:    src/java/org/apache/avalon/phoenix/components/deployer
                        DefaultDeployer.java
  Log:
  Reorder log creation to avoid cast class exceptions
  
  Revision  Changes    Path
  1.71      +8 -4      
avalon-phoenix/src/java/org/apache/avalon/phoenix/components/deployer/DefaultDeployer.java
  
  Index: DefaultDeployer.java
  ===================================================================
  RCS file: 
/home/cvs/avalon-phoenix/src/java/org/apache/avalon/phoenix/components/deployer/DefaultDeployer.java,v
  retrieving revision 1.70
  retrieving revision 1.71
  diff -u -r1.70 -r1.71
  --- DefaultDeployer.java      1 Mar 2003 08:39:14 -0000       1.70
  +++ DefaultDeployer.java      16 Mar 2003 01:48:35 -0000      1.71
  @@ -256,6 +256,14 @@
               context.put( BlockContext.APP_NAME, name );
               context.put( BlockContext.APP_HOME_DIR, directory );
   
  +            final Configuration logs = environment.getChild( "logs" );
  +            //Load hierarchy before classloader placed in context as
  +            //that way the logFactory will not try to use the application
  +            //specific classloader to load the targets which will cause
  +            //CastClassExceptions 
  +            final Logger logger =
  +                m_logManager.createHierarchy( logs, context );
  +
               final ClassLoaderSet classLoaderSet =
                   m_classLoaderManager.createClassLoaderSet( environment,
                                                              
installation.getHomeDirectory(),
  @@ -277,10 +285,6 @@
   
               //Setup configuration for all the applications blocks
               setupConfiguration( profile.getMetaData(), config.getChildren() );
  -
  -            final Configuration logs = environment.getChild( "logs" );
  -            final Logger logger =
  -                m_logManager.createHierarchy( logs, context );
   
               //Finally add application to kernel
               m_kernel.addApplication( profile,
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to