costin      2003/03/17 11:16:42

  Modified:    catalina/src/share/org/apache/catalina/core
                        StandardEngine.java
  Log:
  Same.
  
  Revision  Changes    Path
  1.6       +38 -14    
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.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- StandardEngine.java       17 Mar 2003 07:30:09 -0000      1.5
  +++ StandardEngine.java       17 Mar 2003 19:16:42 -0000      1.6
  @@ -357,7 +357,6 @@
   
       }
   
  -
       /**
        * Disallow any attempt to set a parent for this Container, since an
        * Engine is supposed to be at the top of the Container hierarchy.
  @@ -372,15 +371,12 @@
       }
   
   
  -    /**
  -     * Start this Engine component.
  -     *
  -     * @exception LifecycleException if a startup error occurs
  -     */
  -    public void start() throws LifecycleException {
  -        if( started ) {
  -            return;
  -        }
  +    private boolean initialized=false;
  +    
  +    public void init() {
  +        if( initialized ) return;
  +        initialized=true;
  +
           if( oname==null ) {
               // not registered in JMX yet - standalone mode
               try {
  @@ -392,6 +388,34 @@
               }
           }
   
  +        if( service==null ) {
  +            // for consistency...
  +            try {
  +                service=new StandardService();
  +                service.initialize();
  +                service.setContainer( this );
  +            } catch( Throwable t ) {
  +                t.printStackTrace();
  +            }
  +        }
  +        
  +    }
  +    
  +    public void destroy() {
  +        if( ! initialized ) return;
  +        initialized=false;
  +        
  +    }
  +    
  +    /**
  +     * Start this Engine component.
  +     *
  +     * @exception LifecycleException if a startup error occurs
  +     */
  +    public void start() throws LifecycleException {
  +        if( started ) {
  +            return;
  +        }
           // Log our server identification information
           //System.out.println(ServerInfo.getServerInfo());
           log.info( "Starting Servlet Engine: " + ServerInfo.getServerInfo());
  
  
  

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

Reply via email to