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/java/org/apache/avalon/assembly/lifestyle AbstractLifestyleHandler.java DefaultLifestyleService.java PooledLifestyleHandler.java
Date Fri, 20 Dec 2002 11:54:29 GMT
mcconnell    2002/12/20 03:54:29

  Modified:    assembly build.xml
               assembly/src/java/org/apache/avalon/assembly/appliance
                        Appliance.java ApplianceContext.java
                        DefaultAppliance.java DefaultApplianceManager.java
                        DependencyGraph.java
               assembly/src/java/org/apache/avalon/assembly/engine
                        EngineClassLoader.java
               assembly/src/java/org/apache/avalon/assembly/lifecycle
                        ContextHandler.java DefaultAssemblyService.java
                        DefaultDeploymentService.java
               assembly/src/java/org/apache/avalon/assembly/lifecycle/composition
                        StandardServiceManager.java
               assembly/src/java/org/apache/avalon/assembly/lifecycle/context
                        DefaultContextualizationService.java
               assembly/src/java/org/apache/avalon/assembly/lifecycle/disposal
                        ExtendedDisposalService.java
               assembly/src/java/org/apache/avalon/assembly/lifecycle/initialization
                        ExtendedInitializationService.java
               assembly/src/java/org/apache/avalon/assembly/lifestyle
                        AbstractLifestyleHandler.java
                        DefaultLifestyleService.java
                        PooledLifestyleHandler.java
  Log:
  Updates to resolve partition name consistency in nested containment scenarios.
  
  Revision  Changes    Path
  1.9       +2 -7      avalon-sandbox/assembly/build.xml
  
  Index: build.xml
  ===================================================================
  RCS file: /home/cvs/avalon-sandbox/assembly/build.xml,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- build.xml	19 Dec 2002 10:47:13 -0000	1.8
  +++ build.xml	20 Dec 2002 11:54:28 -0000	1.9
  @@ -427,13 +427,8 @@
   
     <target name="patch">
       <replace dir="src" summary="true"
  -       token="org.apache.avalon.assembly.engine.AssemblyService"
  -       value="org.apache.avalon.assembly.lifecycle.AssemblyService" >
  -     <include name="**/*.*"/>
  -    </replace>
  -    <replace dir="src" summary="true"
  -       token="org.apache.avalon.assembly.engine.DefaultAssemblyService"
  -       value="org.apache.avalon.assembly.lifecycle.DefaultAssemblyService" >
  +       token=".getProfile().getType()"
  +       value=".getType()" >
        <include name="**/*.*"/>
       </replace>
     </target>
  
  
  
  1.10      +16 -2     avalon-sandbox/assembly/src/java/org/apache/avalon/assembly/appliance/Appliance.java
  
  Index: Appliance.java
  ===================================================================
  RCS file: /home/cvs/avalon-sandbox/assembly/src/java/org/apache/avalon/assembly/appliance/Appliance.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- Appliance.java	19 Dec 2002 10:35:13 -0000	1.9
  +++ Appliance.java	20 Dec 2002 11:54:28 -0000	1.10
  @@ -58,6 +58,7 @@
   import org.apache.avalon.meta.info.DependencyDescriptor;
   import org.apache.avalon.meta.info.StageDescriptor;
   import org.apache.avalon.meta.model.Profile;
  +import org.apache.avalon.meta.info.Type;
   
   /**
    * An appliance is a class that encapsulates the deployment criteria
  @@ -85,6 +86,11 @@
       Map getDeploymentContext();
   
      /**
  +    * Get the appliance name.
  +    */
  +    String getName();
  +
  +   /**
       * Get the appliance partition name.
       */
       String getPartitionName();
  @@ -101,6 +107,12 @@
       URL getURL();
   
       /**
  +     * Return the component type backing the appliance.
  +     * @return the type that this appliance is managing
  +     */
  +    Type getType();
  +
  +    /**
        * Return the profile backing the appliance.
        * @return the profile that this appliance is managing
        */
  @@ -187,7 +199,9 @@
       void addExtensionProvider( StageDescriptor stage, Appliance appliance );
   
      /**
  -    * Activate of the appliance.
  +    * Creation of a instance of the component type managed by the appliance
  +    * in accordance with the lifestyle policy declared by the component type.
  +    *
       * @return the implementation object
       */
       Object access() throws LifestyleException;
  
  
  
  1.4       +45 -2     avalon-sandbox/assembly/src/java/org/apache/avalon/assembly/appliance/ApplianceContext.java
  
  Index: ApplianceContext.java
  ===================================================================
  RCS file: /home/cvs/avalon-sandbox/assembly/src/java/org/apache/avalon/assembly/appliance/ApplianceContext.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- ApplianceContext.java	19 Dec 2002 10:34:28 -0000	1.3
  +++ ApplianceContext.java	20 Dec 2002 11:54:28 -0000	1.4
  @@ -82,13 +82,18 @@
    * @author <a href="mailto:avalon-dev@jakarta.apache.org">Avalon Development Team</a>
    * @version $Revision$ $Date$
    */
  -public class ApplianceContext
  +public class ApplianceContext extends DefaultContext
   {
       //=====================================================================
       // state
       //=====================================================================
   
       /**
  +     * The map of values managed by the context.
  +     */
  +     private Map m_map = new Hashtable();
  +
  +    /**
        * The underlying profile that this appliance is managing.
        */
        private Profile m_profile;
  @@ -119,6 +124,11 @@
        */
       private Map m_context;
   
  +    /**
  +     * The appliance name.
  +     */
  +    private String m_name;
  +
       //==============================================================
       // constructor
       //==============================================================
  @@ -128,6 +138,8 @@
       */
       public ApplianceContext()
       {
  +        super();
  +        m_map = getContextData();
       }
   
      /**
  @@ -136,16 +148,47 @@
       */
       public ApplianceContext( Profile profile )
       {
  +        super();
           if( profile == null )
           {
               throw new NullPointerException( "profile" );
           }
  +        m_map = getContextData();
           m_profile = profile;
       }
   
       //==============================================================
       // parameters
       //==============================================================
  +
  +   /**
  +    * Set the appliance name.
  +    * @param the name
  +    */
  +    public void setName( String name )
  +    {
  +        if( m_name != null )
  +        {
  +            throw new IllegalStateException("name");
  +        }
  +        m_name = name;
  +    }
  +
  +   /**
  +    * Get the appliance name.
  +    * @return the name
  +    */
  +    public String getName()
  +    {
  +        if( m_name == null )
  +        {
  +            return getProfile().getName();
  +        }
  +        else
  +        {
  +            return m_name;
  +        }
  +    }
   
      /**
       * Set the appliance profile.
  
  
  
  1.13      +40 -10    avalon-sandbox/assembly/src/java/org/apache/avalon/assembly/appliance/DefaultAppliance.java
  
  Index: DefaultAppliance.java
  ===================================================================
  RCS file: /home/cvs/avalon-sandbox/assembly/src/java/org/apache/avalon/assembly/appliance/DefaultAppliance.java,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- DefaultAppliance.java	19 Dec 2002 10:34:00 -0000	1.12
  +++ DefaultAppliance.java	20 Dec 2002 11:54:28 -0000	1.13
  @@ -75,6 +75,7 @@
   import org.apache.avalon.meta.info.DependencyDescriptor;
   import org.apache.avalon.meta.info.StageDescriptor;
   import org.apache.avalon.meta.model.Profile;
  +import org.apache.avalon.meta.info.Type;
   
   /**
    * Default implementation of an applaince.
  @@ -169,6 +170,11 @@
       */
       private boolean m_activation;
   
  +   /**
  +    * The appliance name.
  +    */
  +    private String m_name;
  +
       //==============================================================
       // constructor
       //==============================================================
  @@ -202,11 +208,6 @@
           m_partition = context.getPartitionName();
           m_profile = (Profile) context.getProfile();
   
  -        if( m_partition == null )
  -        {
  -            m_partition = "";
  -        }
  -
           try
           {
               m_domain = (String) m_system.get( "urn:assembly:domain" );
  @@ -216,15 +217,27 @@
               m_domain = "localhost";
           }
   
  -        if( m_partition.endsWith("/") )
  +        if( m_partition == null )
  +        {
  +            m_partition = "/";
  +        }
  +
  +        if( !m_partition.endsWith("/") )
           {
  -            m_path = m_partition + context.getProfile().getName();
  +            m_partition = m_partition + "/";
  +        }
  +
  +        if( context.getName() == null )
  +        {
  +            m_name = context.getProfile().getName();
           }
           else
           {
  -            m_path = m_partition + "/" + context.getProfile().getName();
  +            m_name = context.getName();
           }
   
  +        m_path = m_partition + m_name;
  +
           //
           // make sure that the deployment context is fully populated
           //
  @@ -237,7 +250,7 @@
               // setup the name and the partition
               //
   
  -            map.put( "urn:avalon:name", m_profile.getName() );
  +            map.put( "urn:avalon:name", m_name );
               map.put( "urn:avalon:partition.name", m_partition );
   
               //
  @@ -296,6 +309,23 @@
       //=====================================================================
       // implementation
       //=====================================================================
  +
  +   /**
  +    * Get the appliance name.
  +    */
  +    public String getName()
  +    {
  +        return m_name;
  +    }
  +
  +    /**
  +     * Return the component type backing the appliance.
  +     * @return the type that this appliance is managing
  +     */
  +    public Type getType()
  +    {
  +        return m_profile.getType();
  +    }
   
      /**
       * Return the loging channel for the appliance.
  
  
  
  1.9       +3 -3      avalon-sandbox/assembly/src/java/org/apache/avalon/assembly/appliance/DefaultApplianceManager.java
  
  Index: DefaultApplianceManager.java
  ===================================================================
  RCS file: /home/cvs/avalon-sandbox/assembly/src/java/org/apache/avalon/assembly/appliance/DefaultApplianceManager.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- DefaultApplianceManager.java	17 Dec 2002 04:52:50 -0000	1.8
  +++ DefaultApplianceManager.java	20 Dec 2002 11:54:28 -0000	1.9
  @@ -239,7 +239,7 @@
           while( iterator.hasNext() )
           {
               Appliance appliance = (Appliance) iterator.next();
  -            Object service = appliance.getProfile().getType().getService( reference );
  +            Object service = appliance.getType().getService( reference );
               if( service != null )
               {
                   list.add( appliance );
  @@ -272,7 +272,7 @@
               Appliance appliance = (Appliance) iterator.next();
               
               if( appliance.isEnabled() 
  -              && ( appliance.getProfile().getType().getExtension( stage ) != null
) )
  +              && ( appliance.getType().getExtension( stage ) != null ) )
               {
                   list.add( appliance );
               }
  
  
  
  1.3       +25 -25    avalon-sandbox/assembly/src/java/org/apache/avalon/assembly/appliance/DependencyGraph.java
  
  Index: DependencyGraph.java
  ===================================================================
  RCS file: /home/cvs/avalon-sandbox/assembly/src/java/org/apache/avalon/assembly/appliance/DependencyGraph.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- DependencyGraph.java	17 Dec 2002 04:53:09 -0000	1.2
  +++ DependencyGraph.java	20 Dec 2002 11:54:28 -0000	1.3
  @@ -56,7 +56,6 @@
   package org.apache.avalon.assembly.appliance;
   
   import java.util.ArrayList;
  -import org.apache.avalon.meta.model.Profile;
   import org.apache.avalon.meta.info.DependencyDescriptor;
   import org.apache.avalon.meta.info.StageDescriptor;
   import org.apache.avalon.assembly.appliance.Appliance;
  @@ -76,7 +75,8 @@
       /**
        * Parent Map. Components in parent
        * Map are potential Providers for services
  -     * if no profile in current assembly satisfies dependency.
  +     * if no appliance in the current assembly satisfies 
  +     * a dependency.
        */
       private final DependencyGraph m_parent;
   
  @@ -102,8 +102,8 @@
   
       /**
        * Creation of a new dependecy graph holding a reference to a parent
  -     * graph.  Profiles in the parent graph are potential providers for services
  -     * if no profile in current assembly satisfies a dependency.
  +     * graph.  Appliance instances in the parent graph are potential providers 
  +     * for services if no appliance in current assembly satisfies a dependency.
        *
        * @param parent the parent graph
        */
  @@ -171,10 +171,10 @@
       /**
        * Get the serilized graph of {@link Appliance} objects
        * required when shutting down all the components. This makes
  -     * sure that all consumer shutdows occur before their coresponding
  -     * providers in graph.
  +     * sure that all consumer shutdown actions occur before their 
  +     * coresponding providers in graph.
        *
  -     * @return the ordered list of components
  +     * @return the ordered list of appliance instances
        */
       public Appliance[] getShutdownGraph()
       {
  @@ -182,11 +182,11 @@
       }
   
       /**
  -     * Get the serilized graph of {@link Profile} objects
  -     * that use services of specified profile.
  +     * Get the serilized graph of {@link Appliance} objects
  +     * that use services of the specified appliance.
        *
  -     * @param profile the profile
  -     * @return the ordered list of consumers
  +     * @param appliance the appliance
  +     * @return the ordered list of consumer appliance instances
        */
       public Appliance[] getConsumerGraph( final Appliance appliance )
       {
  @@ -194,10 +194,10 @@
       }
   
       /**
  -     * Get the serilized graph of {@link Profile} objects
  -     * that provide specified profile with services.
  +     * Get the serilized graph of {@link Appliance} objects
  +     * that provide specified appliance with services.
        *
  -     * @param profile the profile
  +     * @param appliance the appliance
        * @return the ordered list of providers
        */
       public Appliance[] getProviderGraph( final Appliance appliance )
  @@ -206,7 +206,7 @@
       }
   
       /**
  -     * Return a profile array that does not include the provided profile.
  +     * Return an appliance array that does not include the provided appliance.
        */
       private Appliance[] referencedAppliances( final Appliance appliance, Appliance[] appliances
)
       {
  @@ -224,7 +224,7 @@
       /**
        * Get the graph of a single appliance.
        *
  -     * @param profile the profile
  +     * @param appliance the appliance
        * @param providers true if traversing providers, false if consumers
        * @return the list of components in graph
        */
  @@ -284,7 +284,7 @@
                                    final ArrayList order )
       {
   
  -        //If already visited this profile return
  +        //If already visited this appliance return
   
           if( done.contains( appliance ) )
           {
  @@ -316,10 +316,10 @@
       {
           //
           // get all of the extensions the provide extension
  -        // support to the subject profile
  +        // support to the subject appliance
           //
   
  -        final StageDescriptor[] stages = appliance.getProfile().getType().getStages();
  +        final StageDescriptor[] stages = appliance.getType().getStages();
           for( int i = ( stages.length - 1 ); i > -1; i-- )
           {
               StageDescriptor stage = stages[ i ];
  @@ -331,12 +331,12 @@
           }
   
           //
  -        // get all of the profiles that are service providers
  -        // towards the target profile
  +        // get all of the appliance instances that are service providers
  +        // towards the target appliance
           //
   
           final DependencyDescriptor[] descriptors =
  -            appliance.getProfile().getType().getDependencies();
  +            appliance.getType().getDependencies();
   
           for( int i = 0; i < descriptors.length; i++ )
           {
  @@ -396,11 +396,11 @@
               }
   
               //
  -            // check if the 'other' profile is used by this 'profile'
  +            // check if the 'other' appliance is used by this 'appliance'
               // as an extension provider
               //
   
  -            final StageDescriptor[] stages = other.getProfile().getType().getStages();
  +            final StageDescriptor[] stages = other.getType().getStages();
               for( int j = 0; j < stages.length; j++ )
               {
                   StageDescriptor stage = stages[j];
  
  
  
  1.13      +7 -2      avalon-sandbox/assembly/src/java/org/apache/avalon/assembly/engine/EngineClassLoader.java
  
  Index: EngineClassLoader.java
  ===================================================================
  RCS file: /home/cvs/avalon-sandbox/assembly/src/java/org/apache/avalon/assembly/engine/EngineClassLoader.java,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- EngineClassLoader.java	19 Dec 2002 10:37:26 -0000	1.12
  +++ EngineClassLoader.java	20 Dec 2002 11:54:28 -0000	1.13
  @@ -952,7 +952,7 @@
           Appliance appliance;
           try
           {
  -            String name = context.getProfile().getType().getInfo().getName();
  +            String name = context.getName();
               Logger logger = getLogger().getChildLogger( name );
               appliance = buildAppliance( context, getSystemContext(), logger );
           }
  @@ -968,6 +968,11 @@
           if( shared )
           {
               m_appliances.addAppliance( appliance );
  +        }
  +
  +        if( getLogger().isDebugEnabled() )
  +        {
  +            getLogger().debug( "created " + appliance.getURL() );
           }
   
           return appliance;
  
  
  
  1.9       +2 -2      avalon-sandbox/assembly/src/java/org/apache/avalon/assembly/lifecycle/ContextHandler.java
  
  Index: ContextHandler.java
  ===================================================================
  RCS file: /home/cvs/avalon-sandbox/assembly/src/java/org/apache/avalon/assembly/lifecycle/ContextHandler.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- ContextHandler.java	20 Dec 2002 06:38:18 -0000	1.8
  +++ ContextHandler.java	20 Dec 2002 11:54:28 -0000	1.9
  @@ -226,7 +226,7 @@
       protected Context buildContext( Appliance appliance, Context context )
         throws Exception
       {
  -        ContextDescriptor descriptor = appliance.getProfile().getType().getContext();
  +        ContextDescriptor descriptor = appliance.getType().getContext();
           ContextDirective directive = appliance.getProfile().getContext();
           return buildContext( appliance, descriptor, directive, context );
       }
  
  
  
  1.2       +4 -4      avalon-sandbox/assembly/src/java/org/apache/avalon/assembly/lifecycle/DefaultAssemblyService.java
  
  Index: DefaultAssemblyService.java
  ===================================================================
  RCS file: /home/cvs/avalon-sandbox/assembly/src/java/org/apache/avalon/assembly/lifecycle/DefaultAssemblyService.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- DefaultAssemblyService.java	19 Dec 2002 10:38:30 -0000	1.1
  +++ DefaultAssemblyService.java	20 Dec 2002 11:54:28 -0000	1.2
  @@ -276,7 +276,7 @@
   
           visited.add( appliance );
   
  -        ContextDescriptor context = appliance.getProfile().getType().getContext();
  +        ContextDescriptor context = appliance.getType().getContext();
           String ext = context.getAttribute( "urn:assembly:lifecycle.context.extension" );
           if(( ext != null ) && ( appliance.getContextProvider() == null ))
           {
  @@ -324,7 +324,7 @@
           // dependency is satisfied
           //
   
  -        DependencyDescriptor[] dependencies = appliance.getProfile().getType().getDependencies();
  +        DependencyDescriptor[] dependencies = appliance.getType().getDependencies();
           for( int i = 0; i < dependencies.length; i++ )
           {
               DependencyDescriptor dependency = dependencies[ i ];
  @@ -387,7 +387,7 @@
           // manager
           //
   
  -        StageDescriptor[] stages = appliance.getProfile().getType().getStages();
  +        StageDescriptor[] stages = appliance.getType().getStages();
           for( int i = 0; i < stages.length; i++ )
           {
               StageDescriptor stage = stages[ i ];
  
  
  
  1.9       +2 -2      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.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- DefaultDeploymentService.java	19 Dec 2002 10:39:19 -0000	1.8
  +++ DefaultDeploymentService.java	20 Dec 2002 11:54:28 -0000	1.9
  @@ -344,7 +344,7 @@
           Object instance;
           try
           {
  -            String classname = appliance.getProfile().getType().getInfo().getClassname();
  +            String classname = appliance.getType().getInfo().getClassname();
               Class clazz = classloader.loadClass( classname );
               instance = clazz.newInstance();
           }
  
  
  
  1.2       +1 -1      avalon-sandbox/assembly/src/java/org/apache/avalon/assembly/lifecycle/composition/StandardServiceManager.java
  
  Index: StandardServiceManager.java
  ===================================================================
  RCS file: /home/cvs/avalon-sandbox/assembly/src/java/org/apache/avalon/assembly/lifecycle/composition/StandardServiceManager.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- StandardServiceManager.java	17 Dec 2002 05:00:08 -0000	1.1
  +++ StandardServiceManager.java	20 Dec 2002 11:54:28 -0000	1.2
  @@ -127,7 +127,7 @@
           }
   
           DependencyDescriptor dependency = 
  -          m_appliance.getProfile().getType().getDependency( role );
  +          m_appliance.getType().getDependency( role );
           Appliance provider = m_appliance.getServiceProvider( role );
           if( provider == null )
           {
  
  
  
  1.8       +2 -2      avalon-sandbox/assembly/src/java/org/apache/avalon/assembly/lifecycle/context/DefaultContextualizationService.java
  
  Index: DefaultContextualizationService.java
  ===================================================================
  RCS file: /home/cvs/avalon-sandbox/assembly/src/java/org/apache/avalon/assembly/lifecycle/context/DefaultContextualizationService.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- DefaultContextualizationService.java	20 Dec 2002 06:38:18 -0000	1.7
  +++ DefaultContextualizationService.java	20 Dec 2002 11:54:28 -0000	1.8
  @@ -204,7 +204,7 @@
                   final String error = 
                     "Target component is requesting a context entry that has not been declared."
                     + " Please check component xinfo descriptor context criteria in type:
"
  -                  + appliance.getProfile().getType();
  +                  + appliance.getType();
                   throw new ContextException( error, e );
               }
               catch( Throwable e )
  
  
  
  1.7       +3 -3      avalon-sandbox/assembly/src/java/org/apache/avalon/assembly/lifecycle/disposal/ExtendedDisposalService.java
  
  Index: ExtendedDisposalService.java
  ===================================================================
  RCS file: /home/cvs/avalon-sandbox/assembly/src/java/org/apache/avalon/assembly/lifecycle/disposal/ExtendedDisposalService.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- ExtendedDisposalService.java	20 Dec 2002 06:38:18 -0000	1.6
  +++ ExtendedDisposalService.java	20 Dec 2002 11:54:28 -0000	1.7
  @@ -120,7 +120,7 @@
               throw new NullPointerException("object");
           }
   
  -        StageDescriptor[] stages = appliance.getProfile().getType().getStages();
  +        StageDescriptor[] stages = appliance.getType().getStages();
           if( stages.length > 0 )
           {
               if( getLogger().isDebugEnabled() )
  @@ -180,7 +180,7 @@
               Context context;
               try
               {
  -                Type type = provider.getProfile().getType();
  +                Type type = provider.getType();
                   final ExtensionDescriptor descriptor = type.getExtension( stage );
                   context = createContext( provider, descriptor, m_context );
               }
  
  
  
  1.8       +3 -3      avalon-sandbox/assembly/src/java/org/apache/avalon/assembly/lifecycle/initialization/ExtendedInitializationService.java
  
  Index: ExtendedInitializationService.java
  ===================================================================
  RCS file: /home/cvs/avalon-sandbox/assembly/src/java/org/apache/avalon/assembly/lifecycle/initialization/ExtendedInitializationService.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- ExtendedInitializationService.java	20 Dec 2002 06:38:19 -0000	1.7
  +++ ExtendedInitializationService.java	20 Dec 2002 11:54:29 -0000	1.8
  @@ -122,7 +122,7 @@
               throw new NullPointerException("object");
           }
   
  -        StageDescriptor[] stages = appliance.getProfile().getType().getStages();
  +        StageDescriptor[] stages = appliance.getType().getStages();
           if( stages.length > 0 )
           {
               for( int i = 0; i < stages.length; i++ )
  @@ -162,7 +162,7 @@
                   Context context;
                   try
                   {
  -                    Type type = provider.getProfile().getType();
  +                    Type type = provider.getType();
                       final ExtensionDescriptor descriptor = type.getExtension( stage );
                       context = createContext( provider, descriptor, m_context );
                   }
  
  
  
  1.12      +5 -5      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.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- AbstractLifestyleHandler.java	20 Dec 2002 06:38:19 -0000	1.11
  +++ AbstractLifestyleHandler.java	20 Dec 2002 11:54:29 -0000	1.12
  @@ -294,7 +294,7 @@
        */
       protected void processAccessStage( Object object ) throws LifestyleException
       {
  -        StageDescriptor[] phases = getAppliance().getProfile().getType().getStages();
  +        StageDescriptor[] phases = getAppliance().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 = getAppliance().getProfile().getType().getStages();
  +        StageDescriptor[] phases = getAppliance().getType().getStages();
           for( int i = ( phases.length - 1 ); i > -1; i-- )
           {
               StageDescriptor stage = phases[ i ];
  @@ -410,7 +410,7 @@
       {
           try
           {
  -            String classname = m_appliance.getProfile().getType().getInfo().getClassname();
  +            String classname = m_appliance.getType().getInfo().getClassname();
               return m_classloader.loadClass( classname );
           }
           catch( Throwable e )
  @@ -460,7 +460,7 @@
                   throw new NullPointerException( "provider" );
               }
   
  -            Type type = provider.getProfile().getType();
  +            Type type = provider.getType();
               final ExtensionDescriptor ext = type.getExtension( stage );
               try
               {
  
  
  
  1.5       +2 -2      avalon-sandbox/assembly/src/java/org/apache/avalon/assembly/lifestyle/DefaultLifestyleService.java
  
  Index: DefaultLifestyleService.java
  ===================================================================
  RCS file: /home/cvs/avalon-sandbox/assembly/src/java/org/apache/avalon/assembly/lifestyle/DefaultLifestyleService.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- DefaultLifestyleService.java	7 Dec 2002 09:34:28 -0000	1.4
  +++ DefaultLifestyleService.java	20 Dec 2002 11:54:29 -0000	1.5
  @@ -242,7 +242,7 @@
           //
   
           final String policy =
  -            appliance.getProfile().getType().getInfo().getAttribute( 
  +            appliance.getType().getInfo().getAttribute( 
                 "urn:avalon:lifestyle", "singleton" );
   
           if( policy.equalsIgnoreCase( "singleton" ) )
  
  
  
  1.5       +2 -2      avalon-sandbox/assembly/src/java/org/apache/avalon/assembly/lifestyle/PooledLifestyleHandler.java
  
  Index: PooledLifestyleHandler.java
  ===================================================================
  RCS file: /home/cvs/avalon-sandbox/assembly/src/java/org/apache/avalon/assembly/lifestyle/PooledLifestyleHandler.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- PooledLifestyleHandler.java	12 Dec 2002 00:32:32 -0000	1.4
  +++ PooledLifestyleHandler.java	20 Dec 2002 11:54:29 -0000	1.5
  @@ -172,7 +172,7 @@
           m_pool = m_poolManager.getManagedPool( this, m_size );
           m_appliance = (Appliance) m_context.get( "urn:assembly:appliance.target" );
           ClassLoader classloader = (ClassLoader) m_context.get( "urn:avalon:classloader"
);
  -        m_class = classloader.loadClass( m_appliance.getProfile().getType().getInfo().getClassname()
);
  +        m_class = classloader.loadClass( m_appliance.getType().getInfo().getClassname()
);
       }
   
       //==============================================================
  
  
  

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