avalon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mcconn...@apache.org
Subject cvs commit: avalon-sandbox/assembly/src/test/org/apache/avalon/playground DemoManager.xinfo ExploitationManager.xinfo
Date Tue, 17 Dec 2002 11:35:50 GMT
mcconnell    2002/12/17 03:35:50

  Modified:    assembly/src/java/org/apache/avalon/assembly/engine
                        DefaultAssemblyService.java
               assembly/src/java/org/apache/avalon/assembly/lifecycle
                        DefaultDeploymentService.java
                        DeploymentService.java
               assembly/src/java/org/apache/avalon/assembly/lifestyle
                        AbstractLifestyleHandler.java
                        TransientLifestyleHandler.java
               assembly/src/test/org/apache/avalon/playground
                        DemoManager.xinfo ExploitationManager.xinfo
  Log:
  Updates to the transient lifestyle handling.
  
  Revision  Changes    Path
  1.3       +5 -1      avalon-sandbox/assembly/src/java/org/apache/avalon/assembly/engine/DefaultAssemblyService.java
  
  Index: DefaultAssemblyService.java
  ===================================================================
  RCS file: /home/cvs/avalon-sandbox/assembly/src/java/org/apache/avalon/assembly/engine/DefaultAssemblyService.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- DefaultAssemblyService.java	17 Dec 2002 04:54:07 -0000	1.2
  +++ DefaultAssemblyService.java	17 Dec 2002 11:35:50 -0000	1.3
  @@ -205,6 +205,10 @@
           for( int i=0; i<consumers.length; i++ )
           {
               Appliance consumer = consumers[i];
  +            if( getLogger().isDebugEnabled() )
  +            {
  +                getLogger().debug("terminating consumer: " + consumer );
  +            }
               consumer.terminate();
               m_map.remove( consumer );
           }
  
  
  
  1.7       +18 -3     avalon-sandbox/assembly/src/java/org/apache/avalon/assembly/lifecycle/DefaultDeploymentService.java
  
  Index: DefaultDeploymentService.java
  ===================================================================
  RCS file: /home/cvs/avalon-sandbox/assembly/src/java/org/apache/avalon/assembly/lifecycle/DefaultDeploymentService.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- DefaultDeploymentService.java	17 Dec 2002 04:56:34 -0000	1.6
  +++ DefaultDeploymentService.java	17 Dec 2002 11:35:50 -0000	1.7
  @@ -381,15 +381,30 @@
   
      /**
       * Destroy an appliance.
  -    * @param appliance the appliance to destroy
  +    * @param appliance the object's appliance
  +    * @param instance the object to decommission
       */
       public void decommission( Appliance appliance, Object instance )
       {
  +        decommission( appliance, instance, true );
  +    }
  +
  +   /**
  +    * Destroy an appliance.
  +    * @param appliance the object's appliance
  +    * @param instance the object to decommission
  +    * @param disassemble TRUE if the appliance should be dissasembled
  +    */
  +    public void decommission( Appliance appliance, Object instance, boolean disassemble
)
  +    {
           //
           // make sure all dependent components are decommissioned
           //
   
  -        m_assembly.disassemble( appliance );
  +        if( disassemble )
  +        {
  +            m_assembly.disassemble( appliance );
  +        }
   
           try
           {
  
  
  
  1.3       +7 -1      avalon-sandbox/assembly/src/java/org/apache/avalon/assembly/lifecycle/DeploymentService.java
  
  Index: DeploymentService.java
  ===================================================================
  RCS file: /home/cvs/avalon-sandbox/assembly/src/java/org/apache/avalon/assembly/lifecycle/DeploymentService.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- DeploymentService.java	3 Dec 2002 06:57:26 -0000	1.2
  +++ DeploymentService.java	17 Dec 2002 11:35:50 -0000	1.3
  @@ -88,4 +88,10 @@
       * @param object the object to decommission
       */
       void decommission( Appliance appliance, Object object );
  +
  +   /**
  +    * Destroy an appliance.
  +    * @param appliance the appliance to destroy
  +    */
  +    public void decommission( Appliance appliance, Object instance, boolean disassemble
);
   }
  
  
  
  1.10      +4 -4      avalon-sandbox/assembly/src/java/org/apache/avalon/assembly/lifestyle/AbstractLifestyleHandler.java
  
  Index: AbstractLifestyleHandler.java
  ===================================================================
  RCS file: /home/cvs/avalon-sandbox/assembly/src/java/org/apache/avalon/assembly/lifestyle/AbstractLifestyleHandler.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- AbstractLifestyleHandler.java	17 Dec 2002 04:57:20 -0000	1.9
  +++ AbstractLifestyleHandler.java	17 Dec 2002 11:35:50 -0000	1.10
  @@ -101,7 +101,7 @@
       * The deplyment service to handle lifecycle processing of 
       * component implementations established by this handler.
       */
  -    private DeploymentService m_deployment;
  +    protected DeploymentService m_deployment;
   
      /**
       * The deplyment context.
  @@ -294,7 +294,7 @@
        */
       protected void processAccessStage( Object object ) throws LifestyleException
       {
  -        StageDescriptor[] phases = m_appliance.getProfile().getType().getStages();
  +        StageDescriptor[] phases = getAppliance().getProfile().getType().getStages();
           for( int i = 0; i < phases.length; i++ )
           {
               StageDescriptor stage = phases[ i ];
  @@ -308,7 +308,7 @@
        */
       protected void processReleaseStage( Object object )
       {
  -        StageDescriptor[] phases = m_appliance.getProfile().getType().getStages();
  +        StageDescriptor[] phases = getAppliance().getProfile().getType().getStages();
           for( int i = ( phases.length - 1 ); i > -1; i-- )
           {
               StageDescriptor stage = phases[ i ];
  
  
  
  1.6       +3 -3      avalon-sandbox/assembly/src/java/org/apache/avalon/assembly/lifestyle/TransientLifestyleHandler.java
  
  Index: TransientLifestyleHandler.java
  ===================================================================
  RCS file: /home/cvs/avalon-sandbox/assembly/src/java/org/apache/avalon/assembly/lifestyle/TransientLifestyleHandler.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- TransientLifestyleHandler.java	17 Dec 2002 04:57:20 -0000	1.5
  +++ TransientLifestyleHandler.java	17 Dec 2002 11:35:50 -0000	1.6
  @@ -125,7 +125,8 @@
       */
       public void release( Object object )
       {
  -        super.release( object );
  +        processReleaseStage( object );
  +        m_deployment.decommission( getAppliance(), object, false );
           synchronized( m_instances )
           {
               m_instances.remove( object );
  @@ -151,5 +152,4 @@
           }
           super.dispose();
       }
  -
   }
  
  
  
  1.4       +0 -3      avalon-sandbox/assembly/src/test/org/apache/avalon/playground/DemoManager.xinfo
  
  Index: DemoManager.xinfo
  ===================================================================
  RCS file: /home/cvs/avalon-sandbox/assembly/src/test/org/apache/avalon/playground/DemoManager.xinfo,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- DemoManager.xinfo	17 Dec 2002 09:55:24 -0000	1.3
  +++ DemoManager.xinfo	17 Dec 2002 11:35:50 -0000	1.4
  @@ -22,9 +22,6 @@
   
     <info>
       <name>demonstrator</name>
  -    <attributes>
  -      <attribute key="urn:avalon:lifestyle" value="thread"/>
  -    </attributes>
     </info>
   
     <!--
  
  
  
  1.3       +3 -0      avalon-sandbox/assembly/src/test/org/apache/avalon/playground/ExploitationManager.xinfo
  
  Index: ExploitationManager.xinfo
  ===================================================================
  RCS file: /home/cvs/avalon-sandbox/assembly/src/test/org/apache/avalon/playground/ExploitationManager.xinfo,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- ExploitationManager.xinfo	17 Dec 2002 09:55:24 -0000	1.2
  +++ ExploitationManager.xinfo	17 Dec 2002 11:35:50 -0000	1.3
  @@ -21,6 +21,9 @@
   
     <info>
       <name>exploit</name>
  +    <attributes>
  +      <attribute key="urn:avalon:lifestyle" value="thread"/>
  +    </attributes>
     </info>
   
     <!--
  
  
  

--
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