avalon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mcconn...@apache.org
Subject cvs commit: avalon/merlin/activation/impl/src/java/org/apache/avalon/activation/appliance/impl DefaultAppliance.java
Date Mon, 08 Dec 2003 12:49:36 GMT
mcconnell    2003/12/08 04:49:36

  Modified:    merlin/activation/impl/src/java/org/apache/avalon/activation/appliance/impl
                        DefaultAppliance.java
  Log:
  Housekeeping.
  
  Revision  Changes    Path
  1.13      +11 -3     avalon/merlin/activation/impl/src/java/org/apache/avalon/activation/appliance/impl/DefaultAppliance.java
  
  Index: DefaultAppliance.java
  ===================================================================
  RCS file: /home/cvs/avalon/merlin/activation/impl/src/java/org/apache/avalon/activation/appliance/impl/DefaultAppliance.java,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- DefaultAppliance.java	28 Nov 2003 11:58:46 -0000	1.12
  +++ DefaultAppliance.java	8 Dec 2003 12:49:36 -0000	1.13
  @@ -161,6 +161,8 @@
       */
       private final Factory m_factory = new StandardFactory();
   
  +    private Object m_instance;
  +
       //-------------------------------------------------------------------
       // mutable state
       //-------------------------------------------------------------------
  @@ -511,10 +513,10 @@
   
               if( m_model.getActivationPolicy() )
               {
  -                Object instance = resolve();
  +                m_instance = resolve();
                   if( getLogger().isDebugEnabled() )
                   {
  -                    int id = System.identityHashCode( instance );
  +                    int id = System.identityHashCode( m_instance );
                       getLogger().debug( "activated instance: " + id );
                   }
               }
  @@ -531,6 +533,12 @@
           {
               if( !m_deployment.isEnabled() ) return;
               getLogger().debug( "decommissioning phase" );
  +
  +            if( m_model.getActivationPolicy() )
  +            {
  +                m_instance = null;
  +            }
  +
               if( m_lifestyle != null )
               {
                   if( m_lifestyle instanceof Disposable )
  
  
  

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


Mime
View raw message