src/java/org/apache/cassandra/service/AbstractCassandraDaemon.java
/**
     * A convenience method to initialize and start the daemon in one shot.
     */
A convenience method to initialize and start the daemon in one shot.
A convenience method to initialize and start the daemon in one shot .
public void activate()
    {
        String pidFile = System.getProperty("cassandra-pidfile");
        try
        {
            setup();
            if (pidFile != null)
            {
                new File(pidFile).deleteOnExit();
            }
            if (System.getProperty("cassandra-foreground") == null)
            {
                System.out.close();
                System.err.close();
            }
            start();
        }
        catch (Throwable e)
        {
            logger.error("Exception encountered during startup", e);
            e.printStackTrace();
            System.out.println("Exception encountered during startup: " + e.getMessage());
            System.exit(3);
        }
    }
public void activate ( ) { String pidFile = System . getProperty ( "cassandra-pidfile" ) ; try { setup ( ) ; if ( pidFile != null ) { new File ( pidFile ) . deleteOnExit ( ) ; } if ( System . getProperty ( "cassandra-foreground" ) == null ) { System . out . close ( ) ; System . err . close ( ) ; } start ( ) ; } catch ( Throwable e ) { logger . error ( "Exception encountered during startup" , e ) ; e . printStackTrace ( ) ; System . out . println ( "Exception encountered during startup: " + e . getMessage ( ) ) ; System . exit ( 3 ) ; } }
A convenience method to initialize and start the daemon in one shot.
A convenience method to initialize and start the daemon in one shot .
// try to warn user on stdout too, if we haven't already detached