avalon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dona...@apache.org
Subject cvs commit: jakarta-avalon-phoenix/src/java/org/apache/avalon/phoenix/components/embeddor DefaultEmbeddor.java
Date Sat, 02 Feb 2002 09:42:12 GMT
donaldp     02/02/02 01:42:12

  Modified:    src/java/org/apache/avalon/phoenix/components/embeddor
                        DefaultEmbeddor.java
  Log:
  Make it possible for the kernel to be persistent (ie run even when no applications are present)
by specifying persistent=true in parameters.
  
  Revision  Changes    Path
  1.42      +12 -1     jakarta-avalon-phoenix/src/java/org/apache/avalon/phoenix/components/embeddor/DefaultEmbeddor.java
  
  Index: DefaultEmbeddor.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-phoenix/src/java/org/apache/avalon/phoenix/components/embeddor/DefaultEmbeddor.java,v
  retrieving revision 1.41
  retrieving revision 1.42
  diff -u -r1.41 -r1.42
  --- DefaultEmbeddor.java	1 Feb 2002 12:47:15 -0000	1.41
  +++ DefaultEmbeddor.java	2 Feb 2002 09:42:12 -0000	1.42
  @@ -83,6 +83,14 @@
       private SystemManager m_systemManager;
       private PackageRepository m_packageRepository;
   
  +    /**
  +     * If true, flag indicates that the Embeddor should continue running 
  +     * even when there are no applications in kernel. Otherwise the 
  +     * Embeddor will shutdown when it detects there is no longer any 
  +     * applications running.
  +     */
  +    private boolean m_persistent;
  +
       private boolean m_shutdown;
   
       private long m_startTime;
  @@ -133,6 +141,7 @@
           m_parameters.merge( parameters );
   
           m_phoenixHome = m_parameters.getParameter( "phoenix.home" );
  +        m_persistent = m_parameters.getParameterAsBoolean( "persistent" );
       }
   
       /**
  @@ -185,7 +194,8 @@
           while( true )
           {
               // wait() for shutdown() to take action...
  -            if( m_shutdown || emptyKernel() )
  +            if( m_shutdown || 
  +                ( emptyKernel() && !m_persistent ) )
               {
                   break;
               }
  @@ -598,6 +608,7 @@
       {
           final Parameters defaults = new Parameters();
           defaults.setParameter( "phoenix.home", ".." );
  +        defaults.setParameter( "persistent", "false" );
   
           final String PREFIX = "org.apache.avalon.phoenix.components.";
           defaults.setParameter( Deployer.ROLE, PREFIX + "deployer.DefaultDeployer" );
  
  
  

--
To unsubscribe, e-mail:   <mailto:avalon-cvs-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:avalon-cvs-help@jakarta.apache.org>


Mime
View raw message