avalon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From blorit...@apache.org
Subject cvs commit: jakarta-avalon-excalibur/fortress/src/java/org/apache/avalon/fortress/impl AbstractContainer.java
Date Thu, 30 Jan 2003 17:37:12 GMT
bloritsch    2003/01/30 09:37:12

  Modified:    fortress build.xml
               fortress/src/java/org/apache/avalon/fortress/impl
                        AbstractContainer.java
  Log:
  committed code that provides a workaround for the SourceResolve--but it still does not address
the presumed contracts in SourceResolveImpl.
  
  Revision  Changes    Path
  1.69      +1 -8      jakarta-avalon-excalibur/fortress/build.xml
  
  Index: build.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-excalibur/fortress/build.xml,v
  retrieving revision 1.68
  retrieving revision 1.69
  diff -u -r1.68 -r1.69
  --- build.xml	29 Jan 2003 14:07:39 -0000	1.68
  +++ build.xml	30 Jan 2003 17:37:12 -0000	1.69
  @@ -94,15 +94,10 @@
             <attribute name="Implementation-Vendor" value="Apache Software Foundation"/>
             <attribute name="Implementation-Version" value="${package-version}"/>
           </manifest>
  -        <zipgroupfileset dir="${build.dir}/tempjars">
  -          <include name="*.jar"/>
  -<!--          <include name="merlin*/*.jar"/> -->
  -        </zipgroupfileset>
         </jar>
       </target>
   
       <target name="optional.dependencies" description="Check dependencies" if="include.meta">
  -<!--        <ant antfile="${depchecker.prefix}/depchecker.xml" target="checkMeta"/>
-->
       </target>
   
       <target name="dependencies" depends="optional.dependencies" description="Check dependencies"
unless="skip.dependencies">
  @@ -111,13 +106,12 @@
           <ant antfile="${depchecker.prefix}/depchecker.xml" target="checkLogkit"/>
           <ant antfile="${depchecker.prefix}/depchecker.xml" target="checkAltrmi"/>
           <ant antfile="${depchecker.prefix}/depchecker.xml" target="checkInstrument"/>
  +        <ant antfile="${depchecker.prefix}/depchecker.xml" target="checkI18n"/>
           <ant antfile="${depchecker.prefix}/depchecker.xml" target="checkInstrumentManager"/>
           <ant antfile="${depchecker.prefix}/depchecker.xml" target="checkSourceResolve"/>
           <ant antfile="${depchecker.prefix}/depchecker.xml" target="checkEvent"/>
  -<!--        <ant antfile="${depchecker.prefix}/depchecker.xml" target="checkThreadcontext"/>
 -->
           <ant antfile="${depchecker.prefix}/depchecker.xml" target="checkLogger"/>
           <ant antfile="${depchecker.prefix}/depchecker.xml" target="checkContainer"/>
  -<!--        <ant antfile="${depchecker.prefix}/depchecker.xml" target="checkMeta"/>
-->
           <ant antfile="${depchecker.prefix}/depchecker.xml" target="checkRequiredClass">
               <property name="proj.jar.name" value="xml-apis.jar"/>
               <property name="class" value="org.xml.sax.InputSource"/>
  @@ -138,7 +132,6 @@
           <ant antfile="${depchecker.prefix}/depchecker.xml" target="checkCache"/>
           <ant antfile="${depchecker.prefix}/depchecker.xml" target="checkMonitor"/>
           <ant antfile="${depchecker.prefix}/depchecker.xml" target="checkXMLUtil"/>
  -        <ant antfile="${depchecker.prefix}/depchecker.xml" target="checkI18n"/>
        </target>
   
       <target name="path-builder" depends="path-with-meta,path-without-meta"/>
  
  
  
  1.5       +18 -13    jakarta-avalon-excalibur/fortress/src/java/org/apache/avalon/fortress/impl/AbstractContainer.java
  
  Index: AbstractContainer.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-excalibur/fortress/src/java/org/apache/avalon/fortress/impl/AbstractContainer.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- AbstractContainer.java	28 Jan 2003 21:19:17 -0000	1.4
  +++ AbstractContainer.java	30 Jan 2003 17:37:12 -0000	1.5
  @@ -99,6 +99,11 @@
       extends AbstractLogEnabled
       implements Contextualizable, Serviceable, Initializable, Disposable, Container
   {
  +    /** The hint map's entry to get the default component type */
  +    protected static final String DEFAULT_ENTRY = "*";
  +    /** The component map's entry to get a ServiceSelector */
  +    protected static final String SELECTOR_ENTRY = "$";
  +
       /** contains the impl's context passed in through contextualize() */
       protected Context m_context;
       /** contains the ServiceManager the impl will use, based on the one passed in through
service() */
  @@ -269,8 +274,8 @@
           final String role = roleEntry.getRole();
   
           // put the role into our role mapper. If the role doesn't exist
  -        // yet, just stuff it in as "default". If it does, we create a
  -        // ServiceSelector and put that in as "selector".
  +        // yet, just stuff it in as DEFAULT_ENTRY. If it does, we create a
  +        // ServiceSelector and put that in as SELECTOR_ENTRY.
           if( null != role && null != classname && null != handler )
           {
               Map hintMap = (StaticBucketMap)m_mapper.get( role );
  @@ -279,24 +284,24 @@
               if( null == hintMap ) // never heard of this role before.
               {
                   hintMap = new StaticBucketMap();
  -                hintMap.put( "default", handler );
  +                hintMap.put( DEFAULT_ENTRY, handler );
                   m_mapper.put( role, hintMap );
               }
               else // know it already. add something to the hintmap
               {
                   hintMap.put( metaData.getName(), handler );
   
  -                if( hintMap.containsKey( "default" ) )
  +                if( hintMap.containsKey( DEFAULT_ENTRY ) )
                   {
  -                    if( !hintMap.containsKey( "selector" ) )
  +                    if( !hintMap.containsKey( SELECTOR_ENTRY ) )
                       {
  -                        hintMap.put( "selector",
  +                        hintMap.put( SELECTOR_ENTRY,
                                        new FortressServiceSelector( this, role ) );
                       }
                   }
                   else
                   {
  -                    hintMap.put( "default", handler );
  +                    hintMap.put( DEFAULT_ENTRY, handler );
                   }
               }
           }
  @@ -434,12 +439,12 @@
           if( null == hint )
           {
               // no hint -> try selector
  -            value = hintMap.get( "selector" );
  +            value = hintMap.get( SELECTOR_ENTRY );
   
               if( null == value )
               {
                   // no selector -> use default
  -                value = hintMap.get( "default" );
  +                value = hintMap.get( DEFAULT_ENTRY );
               }
   
               return value;
  @@ -499,12 +504,12 @@
               if( null == hint )
               {
                   // no hint -> try selector
  -                hasComponent = hintMap.containsKey( "selector" );
  +                hasComponent = hintMap.containsKey( SELECTOR_ENTRY );
   
                   if( !hasComponent )
                   {
  -                    // no hint -> try default
  -                    hasComponent = hintMap.containsKey( "default" );
  +                    // no hint -> try DEFAULT_ENTRY
  +                    hasComponent = hintMap.containsKey( DEFAULT_ENTRY );
                   }
               }
               else
  
  
  

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


Mime
View raw message