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/merlin/assembly/src/java/org/apache/avalon/assembly/lifecycle/context DefaultContextualizationService.java
Date Fri, 04 Apr 2003 11:05:48 GMT
mcconnell    2003/04/04 03:05:48

  Modified:    merlin/assembly/src/java/org/apache/avalon/assembly/lifecycle/context
                        DefaultContextualizationService.java
  Log:
  Correction to the default contextualization service to properly support custom context types
when handling a classic Avalon Contextualization phase.
  
  Revision  Changes    Path
  1.2       +8 -3      avalon-sandbox/merlin/assembly/src/java/org/apache/avalon/assembly/lifecycle/context/DefaultContextualizationService.java
  
  Index: DefaultContextualizationService.java
  ===================================================================
  RCS file: /home/cvs/avalon-sandbox/merlin/assembly/src/java/org/apache/avalon/assembly/lifecycle/context/DefaultContextualizationService.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- DefaultContextualizationService.java	13 Mar 2003 01:04:08 -0000	1.1
  +++ DefaultContextualizationService.java	4 Apr 2003 11:05:48 -0000	1.2
  @@ -54,6 +54,7 @@
   import java.lang.reflect.Constructor;
   import java.util.HashMap;
   
  +
   import org.apache.avalon.framework.context.Contextualizable;
   import org.apache.avalon.framework.context.Context;
   import org.apache.avalon.framework.context.DefaultContext;
  @@ -138,7 +139,7 @@
               {
   
                   //
  -                // otherwise, its classic Avalon contextulization
  +                // its classic Avalon contextulization
                   //
   
                   if( getLogger().isDebugEnabled() )
  @@ -148,7 +149,11 @@
                   }
                   try
                   {
  -                    ((Contextualizable)object).contextualize( new DefaultContext( context
) );
  +                    Contextualization contextualizer = new AvalonContextualizer();
  +                    contextualizer.contextualize( 
  +                      appliance.getContextDirective(), object, context );
  +
  +                   //((Contextualizable)object).contextualize( new DefaultContext( context
) );
                   }
                   catch( ContextException e )
                   {
  
  
  

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


Mime
View raw message