tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From r...@apache.org
Subject cvs commit: jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/mbeans ServerLifecycleListener.java
Date Sat, 27 Oct 2001 02:58:35 GMT
remm        01/10/26 19:58:35

  Modified:    catalina/src/share/org/apache/catalina/mbeans
                        ServerLifecycleListener.java
  Log:
  - If a context is privileged, a reference to the MBeanServer will be added to
    its servlet context.
  
  Revision  Changes    Path
  1.3       +12 -4     jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/mbeans/ServerLifecycleListener.java
  
  Index: ServerLifecycleListener.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/mbeans/ServerLifecycleListener.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- ServerLifecycleListener.java	2001/10/26 22:53:26	1.2
  +++ ServerLifecycleListener.java	2001/10/27 02:58:35	1.3
  @@ -1,7 +1,7 @@
   /*
  - * $Header: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/mbeans/ServerLifecycleListener.java,v
1.2 2001/10/26 22:53:26 remm Exp $
  - * $Revision: 1.2 $
  - * $Date: 2001/10/26 22:53:26 $
  + * $Header: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/mbeans/ServerLifecycleListener.java,v
1.3 2001/10/27 02:58:35 remm Exp $
  + * $Revision: 1.3 $
  + * $Date: 2001/10/27 02:58:35 $
    *
    * ====================================================================
    *
  @@ -78,6 +78,7 @@
   import org.apache.catalina.ContainerListener;
   import org.apache.catalina.Context;
   import org.apache.catalina.Engine;
  +import org.apache.catalina.Globals;
   import org.apache.catalina.Host;
   import org.apache.catalina.Lifecycle;
   import org.apache.catalina.LifecycleEvent;
  @@ -95,7 +96,7 @@
    *
    * @author Craig R. McClanahan
    * @author Amy Roh
  - * @version $Revision: 1.2 $ $Date: 2001/10/26 22:53:26 $
  + * @version $Revision: 1.3 $ $Date: 2001/10/27 02:58:35 $
    */
   
   public class ServerLifecycleListener
  @@ -310,6 +311,13 @@
                               log("Creating MBean for Context " + context);
                           MBeanUtils.createMBean(context);
                           // context.addContainerListener(this);
  +                        // If the context is privileged, give a reference to it
  +                        // in a servlet context attribute
  +                        if (context.getPrivileged()) {
  +                            context.getServletContext().setAttribute
  +                                (Globals.MBEAN_SERVER_ATTR, 
  +                                 MBeanUtils.createServer());
  +                        }
                       }
   
                   }
  
  
  

Mime
View raw message