billbarker    2004/01/15 19:57:59

  Modified:    jk/java/org/apache/jk/common HandlerRequest.java
  Log:
  Add an option to allow the admin to *not* JMX register the requests.
  
  This is mostly because it may take awhile to plug the memory leaks that registering 
the requests causes (esp. for channel.jni :).
  
  Revision  Changes    Path
  1.30      +17 -2     
jakarta-tomcat-connectors/jk/java/org/apache/jk/common/HandlerRequest.java
  
  Index: HandlerRequest.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-tomcat-connectors/jk/java/org/apache/jk/common/HandlerRequest.java,v
  retrieving revision 1.29
  retrieving revision 1.30
  diff -u -r1.29 -r1.30
  --- HandlerRequest.java       3 Dec 2003 05:37:42 -0000       1.29
  +++ HandlerRequest.java       16 Jan 2004 03:57:59 -0000      1.30
  @@ -295,7 +295,21 @@
           if( "".equals( path ) ) path=null;
           ajpidDir=path;
       }
  -    
  +
  +    /**
  +     * Set the flag to tell if we JMX register requests.
  +     */
  +    public void setRegisterRequests(boolean srr) {
  +        registerRequests = srr;
  +    }
  +
  +    /**
  +     * Get the flag to tell if we JMX register requests.
  +     */
  +    public boolean getRegisterRequests() {
  +        return registerRequests;
  +    }
  +
       // -------------------- Ajp13.id --------------------
   
       private void generateAjp13Id() {
  @@ -345,6 +359,7 @@
   
       boolean decoded=true;
       boolean tomcatAuthentication=true;
  +    boolean registerRequests=true;
       
       public int invoke(Msg msg, MsgContext ep ) 
           throws IOException
  @@ -462,7 +477,7 @@
               Response res=new Response();
               req.setResponse(res);
               ep.setRequest( req );
  -            if( this.getDomain() != null ) {
  +            if( registerRequests && this.getDomain() != null ) {
                   try {
                       if( global==null ) {
                           global=new RequestGroupInfo();
  
  
  

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

Reply via email to