tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From amy...@apache.org
Subject cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/core StandardEngine.java
Date Tue, 22 Apr 2003 03:16:46 GMT
amyroh      2003/04/21 20:16:45

  Modified:    catalina/src/share/org/apache/catalina/core
                        StandardEngine.java
  Log:
  Comment out redundant engine registration to service in embedded.
  
  Revision  Changes    Path
  1.14      +24 -18    jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/core/StandardEngine.java
  
  Index: StandardEngine.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/core/StandardEngine.java,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- StandardEngine.java	19 Apr 2003 21:14:16 -0000	1.13
  +++ StandardEngine.java	22 Apr 2003 03:16:45 -0000	1.14
  @@ -427,23 +427,25 @@
               }
           }
           
  -        if( service==null ) {
  -            try {
  -                ObjectName serviceName=getParentName();        
  -                if( mserver.isRegistered( serviceName )) {
  -                    log.info("Registering with the service ");
  -                    try {
  -                        mserver.invoke( serviceName, "setContainer",
  -                                new Object[] { this },
  -                                new String[] { "org.apache.catalina.Container" } );
  -                    } catch( Exception ex ) {
  -                        ex.printStackTrace();
  -                    }
  -                }
  -            } catch( Exception ex ) {
  -                log.error("Error registering with service ");
  -            }
  -        }
  +        // not needed since the following if statement does the same thing the right way
  +        // remove later after checking
  +        //if( service==null ) {
  +        //    try {
  +        //        ObjectName serviceName=getParentName();        
  +        //        if( mserver.isRegistered( serviceName )) {
  +        //            log.info("Registering with the service ");
  +        //            try {
  +        //                mserver.invoke( serviceName, "setContainer",
  +        //                        new Object[] { this },
  +        //                        new String[] { "org.apache.catalina.Container" } );
  +        //            } catch( Exception ex ) {
  +        //               ex.printStackTrace();
  +        //            }
  +        //        }
  +        //    } catch( Exception ex ) {
  +        //        log.error("Error registering with service ");
  +        //    }
  +        //}
           
           if( service==null ) {
               // for consistency...: we are probably in embeded mode
  @@ -571,7 +573,11 @@
           return name;
       }
   
  +    // FIXME Remove -- not used 
       public ObjectName getParentName() throws MalformedObjectNameException {
  +        if (getService()==null) {
  +            return null;
  +        }
           String name = getService().getName();
           ObjectName serviceName=new ObjectName(domain +
                           ":type=Service,serviceName="+name);
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org


Mime
View raw message