avalon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From l...@apache.org
Subject cvs commit: jakarta-avalon-excalibur/component/examples/instrument-manager/src/java/org/apache/avalon/excalibur/component/example_im Main.java
Date Thu, 07 Nov 2002 11:46:13 GMT
leif        2002/11/07 03:46:13

  Modified:    component/examples/instrument-manager build.xml
                        default.properties
               component/examples/instrument-manager/conf logkit.xml
               component/examples/instrument-manager/src/java/org/apache/avalon/excalibur/component/example_im
                        Main.java
  Log:
  Bring the example up to date so it builds.
  
  Revision  Changes    Path
  1.2       +6 -11     jakarta-avalon-excalibur/component/examples/instrument-manager/build.xml
  
  Index: build.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-excalibur/component/examples/instrument-manager/build.xml,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- build.xml	6 Aug 2002 16:28:37 -0000	1.1
  +++ build.xml	7 Nov 2002 11:46:13 -0000	1.2
  @@ -44,17 +44,6 @@
       <target name="help" depends="usage"/>
   
       <!-- =================================================================== -->
  -    <!-- Dependency Checker                                                  -->
  -    <!-- =================================================================== -->
  -    <target name="dependencies" description="Check dependencies" unless="skip.dependencies">
  -        <ant antfile="${depchecker.prefix}/depchecker.xml" target="checkCommon"/>
  -        <ant antfile="${depchecker.prefix}/depchecker.xml" target="checkFramework"/>
  -        <ant antfile="${depchecker.prefix}/depchecker.xml" target="checkComponent"/>
  -        <ant antfile="${depchecker.prefix}/depchecker.xml" target="checkAltrmiServer"/>
  -        <ant antfile="${depchecker.prefix}/depchecker.xml" target="checkAltrmiCommon"/>
  -    </target>
  -    
  -    <!-- =================================================================== -->
       <!-- Help on usage                                                       -->
       <!-- =================================================================== -->
       <target name="collect-jars">
  @@ -85,6 +74,10 @@
           <copy file="${excalibur-component.jar}"
               todir="${lib.dir}" preservelastmodified="yes"/>
   
  +        <!-- Avalon Excalibur Container -->
  +        <copy file="${excalibur-container.jar}"
  +            todir="${lib.dir}" preservelastmodified="yes"/>
  +
           <!-- Avalon Excalibur Logger -->
           <copy file="${excalibur-logger.jar}"
               todir="${lib.dir}" preservelastmodified="yes"/>
  @@ -96,6 +89,8 @@
           <!-- Avalon Excalibur Instrument -->
           <copy file="${excalibur-instrument.jar}"
               todir="${lib.dir}" preservelastmodified="yes"/>
  +        
  +        <!-- Avalon Excalibur Instrument Manager-->
           <copy file="${excalibur-instrument-manager.jar}"
               todir="${lib.dir}" preservelastmodified="yes"/>
           <copy file="${excalibur-instrument-manager-interfaces.jar}"
  
  
  
  1.5       +4 -0      jakarta-avalon-excalibur/component/examples/instrument-manager/default.properties
  
  Index: default.properties
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-excalibur/component/examples/instrument-manager/default.properties,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- default.properties	6 Sep 2002 06:48:22 -0000	1.4
  +++ default.properties	7 Nov 2002 11:46:13 -0000	1.5
  @@ -42,6 +42,10 @@
   excalibur-component.home=${excalibur.dir}/component/dist
   excalibur-component.jar=${excalibur-component.home}/excalibur-component-1.0.jar
   
  +# ----- Excalibur Container -----
  +excalibur-container.home=${excalibur.dir}/container/dist
  +excalibur-container.jar=${excalibur-container.home}/excalibur-container-1.0.jar
  +
   # ----- Excalibur Logger -----
   excalibur-logger.home=${excalibur.dir}/logger/dist
   excalibur-logger.jar=${excalibur-logger.home}/excalibur-logger-1.0.jar
  
  
  
  1.3       +4 -4      jakarta-avalon-excalibur/component/examples/instrument-manager/conf/logkit.xml
  
  Index: logkit.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-excalibur/component/examples/instrument-manager/conf/logkit.xml,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- logkit.xml	16 Aug 2002 03:44:14 -0000	1.2
  +++ logkit.xml	7 Nov 2002 11:46:13 -0000	1.3
  @@ -1,4 +1,4 @@
  -<logkit logger="system.logkit" log-level="INFO">
  +<logkit logger="system.logkit" log-level="DEBUG">
       <factories>
           <factory type="stream" 
                    class="org.apache.avalon.excalibur.logger.factory.StreamTargetFactory"/>
  @@ -18,8 +18,8 @@
       <categories>
           <!-- System loggers -->
           <category name="system" log-level="DEBUG">
  -            <!-- Profiler Manager Logger -->
  -            <category name="instrument" log-level="DEBUG">
  +            <!-- Instrument Manager Logger -->
  +            <category name="instrument" log-level="INFO">
                   <log-target id-ref="console"/>
                   
                   <!-- The values child logger can dump out a lot of data. -->
  @@ -35,7 +35,7 @@
               </category>
               
               <!-- Component Manager Logger -->
  -            <category name="components" log-level="INFO">
  +            <category name="components" log-level="DEBUG">
                   <log-target id-ref="console"/>
               </category>
           </category>
  
  
  
  1.4       +8 -22     jakarta-avalon-excalibur/component/examples/instrument-manager/src/java/org/apache/avalon/excalibur/component/example_im/Main.java
  
  Index: Main.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-excalibur/component/examples/instrument-manager/src/java/org/apache/avalon/excalibur/component/example_im/Main.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- Main.java	7 Nov 2002 05:11:51 -0000	1.3
  +++ Main.java	7 Nov 2002 11:46:13 -0000	1.4
  @@ -14,17 +14,7 @@
   import org.apache.avalon.excalibur.concurrent.ThreadBarrier;
   import org.apache.avalon.framework.component.ComponentManager;
   
  -//import org.apache.avalon.framework.configuration.Configuration;
  -//import org.apache.avalon.framework.configuration.ConfigurationException;
  -//import org.apache.avalon.framework.configuration.DefaultConfigurationBuilder;
  -//import org.apache.avalon.framework.context.DefaultContext;
  -//import org.apache.avalon.framework.logger.LogKitLogger;
  -
  -//import org.apache.excalibur.instrument.manager.DefaultInstrumentManager;
  -
  -//import org.apache.log.Hierarchy;
  -//import org.apache.log.Logger;
  -//import org.apache.log.Priority;
  +import org.apache.avalon.framework.service.ServiceManager;
   
   /**
    * This example application loads a component which publishes a series
  @@ -64,15 +54,15 @@
           //  utility class.  See the contents of that class if you wish to do the
           //  initialization yourself.
           m_componentManagerCreator = new ExcaliburComponentManagerCreator( null,
  -                                                                          new File( "../conf/logkit.xml"
), new File( "../conf/roles.xml" ),
  -                                                                          new File( "../conf/components.xml"
), new File( "../conf/instrument.xml" ) );
  +            new File( "../conf/logkit.xml" ), new File( "../conf/roles.xml" ),
  +            new File( "../conf/components.xml" ), new File( "../conf/instrument.xml" )
);
   
  -        // Get a reference to the component manager
  -        ComponentManager componentManager = m_componentManagerCreator.getComponentManager();
  +        // Get a reference to the service manager
  +        ServiceManager serviceManager = m_componentManagerCreator.getServiceManager();
   
           // Get a reference to the example component.
           ExampleInstrumentable instrumentable =
  -            (ExampleInstrumentable)componentManager.lookup( ExampleInstrumentable.ROLE
);
  +            (ExampleInstrumentable)serviceManager.lookup( ExampleInstrumentable.ROLE );
           try
           {
               boolean quit = false;
  @@ -129,7 +119,7 @@
           finally
           {
               // Release the component
  -            componentManager.release( instrumentable );
  +            serviceManager.release( instrumentable );
               instrumentable = null;
   
               // Dispose of the ComponentManagerCreator.  It will dispose all
  @@ -170,10 +160,6 @@
               {
               }
           }
  -    }
  -}
  -
  -     }
       }
   }
   
  
  
  

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