proyal      2003/02/06 08:38:37

  Modified:    src/java/org/apache/avalon/phoenix/components/kernel
                        DefaultKernel.java
  Log:
  patch from Peter Donald to fix classloader deadlock upon startup
  
  Revision  Changes    Path
  1.84      +11 -1     
avalon-phoenix/src/java/org/apache/avalon/phoenix/components/kernel/DefaultKernel.java
  
  Index: DefaultKernel.java
  ===================================================================
  RCS file: 
/home/cvs/avalon-phoenix/src/java/org/apache/avalon/phoenix/components/kernel/DefaultKernel.java,v
  retrieving revision 1.83
  retrieving revision 1.84
  diff -u -r1.83 -r1.84
  --- DefaultKernel.java        25 Jan 2003 15:47:17 -0000      1.83
  +++ DefaultKernel.java        6 Feb 2003 16:38:37 -0000       1.84
  @@ -57,6 +57,16 @@
       private static final Resources REZ =
           ResourceManager.getPackageResources( DefaultKernel.class );
   
  +    /**
  +     * The interfaces of application that are exported to Management system.
  +     * Declared up here to avoid classloader deadlock issues where ApplicationMBean
  +     * is loaded after the application starts. If the application is also loading
  +     * classes and happens to recursively enter the bootstrap classloader a deadlock
  +     * can be caused. P{lacing class interfaces up here avoids this deadlock.
  +     */
  +    private static final Class[] APPLICATION_INTERFACES =
  +        new Class[]{ApplicationMBean.class};
  +
       ///SystemManager provided by Embeddor
       private SystemManager m_systemManager;
   
  @@ -206,7 +216,7 @@
                   {
                       m_applicationManager.register( name,
                                                      application,
  -                                                   new 
Class[]{ApplicationMBean.class} );
  +                                                   APPLICATION_INTERFACES );
                   }
                   catch( final Throwable t )
                   {
  
  
  

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

Reply via email to