avalon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mcconn...@apache.org
Subject cvs commit: jakarta-avalon-apps/enterprise/time/src/java/org/apache/time Initializer.java package.html
Date Tue, 12 Mar 2002 22:18:02 GMT
mcconnell    02/03/12 14:18:02

  Modified:    enterprise/orb build.xml
               enterprise/orb/src/etc factory.mf
               enterprise/orb/src/java/org/apache/orb ORB.java
               enterprise/pss build.xml
               enterprise/pss/src/etc overview.html
               enterprise/pss/src/java/org/apache/pss Initializer.java
               enterprise/pss/src/java/org/apache/pss/connector
                        AbstractCatalog.java ConnectorBase.java
               enterprise/pss/src/java/org/apache/pss/connector/database
                        DatabaseConnector.java DatabaseSession.java
               enterprise/pss/src/java/org/apache/pss/connector/file
                        FileCatalog.java FileConnector.java
                        FileSession.java
               enterprise/pss/src/java/org/apache/pss/connector/memory
                        MemorySession.java
               enterprise/time build.xml
               enterprise/time/src/etc time.mf
               enterprise/time/src/java/org/apache/time Initializer.java
                        package.html
  Log:
  no message
  
  Revision  Changes    Path
  1.8       +20 -19    jakarta-avalon-apps/enterprise/orb/build.xml
  
  Index: build.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-apps/enterprise/orb/build.xml,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- build.xml	9 Mar 2002 04:50:20 -0000	1.7
  +++ build.xml	12 Mar 2002 22:18:01 -0000	1.8
  @@ -203,35 +203,36 @@
     </target>
   
     <target name="loader.context">
  -    <available property="loader.available" file="${tools.lib.path}/merlin.jar"/>
  +    <available property="merlin.available" file="${ant.home}/lib/merlin.jar"/>
     </target>
   
  -  <target name="loader.defintion" depends="loader.context" if="loader.available">
  -    <taskdef name="load" classname="org.apache.avalon.excalibur.service.ant.Load">
  -      <classpath>
  -        <pathelement location="${tools.lib.path}/merlin.jar"/>
  -        <pathelement location="${tools.lib.path}/avalon-framework.jar"/>
  -        <pathelement location="${tools.lib.path}/logkit.jar"/>
  -      </classpath>
  -    </taskdef>
  +  <target name="loader.defintion" depends="loader.context" if="merlin.available">
  +    <taskdef resource="merlin.properties"/>
     </target>
    
  -  <target name="load-hello" depends="loader.defintion,examples" if="loader.available">
  +  <target name="loader.validation" depends="loader.defintion" unless="merlin.available">
  +    <echo>
  +
  +     Merlin is not installed in your Ant library.
  +     In order to use the "load" task the following jar files 
  +     must be added to your ${ant.home}/lib directory:
  +
  +       - merlin.jar
  +       - avalon-framework.jar
  +       - logkit.jar
  +       - xerces.jar (pre JRE 1.4 only)
  +    </echo>
  +  </target>
  +
  +  <target name="load-hello" depends="loader.validation,examples" if="merlin.available">
   
       <!-- 
       After loading jar files declared under a fileset, apply lifecycle
       pipeline processing to the class referenced in the target attribute.
       -->
   
  -    <load target="hello.HelloDemo" priority="${hello.priority}" disposal="${hello.disposal}"
verbose="${hello.verbose}">
  -
  -      <classpath>
  -         <fileset dir="${tools.lib.path}">
  -             <include name="merlin.jar"/>
  -             <include name="avalon-framework.jar"/>
  -             <include name="logkit.jar"/>
  -         </fileset>
  -      </classpath>
  +    <load target="hello.HelloDemo" priority="${hello.priority}" 
  +        disposal="${hello.disposal}" verbose="${hello.verbose}">
   
         <!--
         For all of the jar files in the fileset, load the jar file
  
  
  
  1.2       +3 -0      jakarta-avalon-apps/enterprise/orb/src/etc/factory.mf
  
  Index: factory.mf
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-apps/enterprise/orb/src/etc/factory.mf,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- factory.mf	28 Feb 2002 16:29:37 -0000	1.1
  +++ factory.mf	12 Mar 2002 22:18:01 -0000	1.2
  @@ -10,3 +10,6 @@
   
   Name: org/apache/orb/DefaultORBFactory.class
   Avalon-Block: true
  +
  +Name: org/apache/orb/ORB.class
  +Avalon-Block: true
  
  
  
  1.2       +17 -24    jakarta-avalon-apps/enterprise/orb/src/java/org/apache/orb/ORB.java
  
  Index: ORB.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-apps/enterprise/orb/src/java/org/apache/orb/ORB.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- ORB.java	28 Feb 2002 16:29:37 -0000	1.1
  +++ ORB.java	12 Mar 2002 22:18:01 -0000	1.2
  @@ -35,10 +35,10 @@
    * 
    * <p><table border="1" cellpadding="3" cellspacing="0" width="100%">
    * <tr bgcolor="#ccccff">
  - * <td colspan="2"><b>ORB Lifecycle Phases</b></td>
  + * <td colspan="2"><b><font size="+2">Lifecycle</font></b></td>
    * <tr><td width="20%"><b>Phase</b></td><td><b>Description</b></td></tr>
    * <tr>
  - * <td width="20%" valign="top">Configurable</td>
  + * <td valign="top">Configurable</td>
    * <td>
    * The configuration contains the default ORB bootstrap properties including
    * property and initalizer declarations.  The implementation looks for child
  @@ -52,7 +52,7 @@
    * </pre>
    * </td></tr>
    * <tr>
  - * <td width="20%" valign="top">Contextualizable</td>
  + * <td valign="top">Contextualizable</td>
    * <td>
    * The <code>Context</code> value passed to the <code>ORB</code>
that
    * provides the runtime execution context.  The home directory shall be 
  @@ -62,11 +62,11 @@
    * Initates the ORB parameterization phase during which Interceptors 
    * and pluggable Features are instantiated. 
    * </td></tr>
  - * <tr><td width="20%" valign="top">Startable</td>
  + * <tr><td valign="top">Startable</td>
    * <td>
    * Provides support starting and stopping the ORB.
    * </td></tr>
  - * <tr><td width="20%" valign="top">Disposable</td>
  + * <tr><td valign="top">Disposable</td>
    * <td>
    * Cleanup and disposal of state members.
    * </td></tr>
  @@ -112,16 +112,13 @@
       */
       private Context m_context;
   
  -   /**
  -    * Base directory from where default property statements containing 
  -    * file based attributes are resolved.
  -    */
  -    private File m_root;
  -
       private Thread m_thread;
   
       private ORB orb; // self
   
  +    private boolean m_stopped = false;
  +    private boolean m_disposed = false;
  +
       //=================================================================
       // constructor
       //=================================================================
  @@ -143,11 +140,7 @@
       */
       public void contextualize( Context context ) throws ContextException
       {
  -        this.m_context = context;
  -        if( context instanceof BlockContext )
  -        {
  -            m_root = ((BlockContext)context).getBaseDirectory();
  -        }
  +        m_context = context;
       }
   
       //==========================================================================
  @@ -164,7 +157,7 @@
       public void configure( final Configuration config )
       throws ConfigurationException
       {
  -        this.m_config = config;
  +        m_config = config;
       }
   
       //=================================================================
  @@ -190,12 +183,11 @@
           //
   
           Properties p = new Properties();
  -
           p.setProperty("openorb.ORBLoader","org.apache.orb.CORBA.kernel.DefaultLoader");
           p.setProperty("org.omg.CORBA.ORBClass", "org.openorb.CORBA.ORB" );
   	  p.setProperty("org.omg.CORBA.ORBSingletonClass", "org.openorb.CORBA.ORBSingleton" );
           p.put( "CONFIGURATION", m_config );
  -        p.put( "LOGGER", getLogger().getChildLogger("orb") );
  +        p.put( "LOGGER", getLogger() );
           p.put( "CONTEXT", m_context );
   
           try
  @@ -221,12 +213,11 @@
       public void start()
       throws Exception
       {
  -        final String status = "start";
  +        if( getLogger().isDebugEnabled() ) getLogger().debug( "starting" );
           m_thread = new Thread(
             new Runnable() {
               public void run()
               {
  -                if( getLogger().isDebugEnabled() ) getLogger().debug( status );
                   try
                   {
                       orb.run();
  @@ -241,7 +232,7 @@
             }
           );
           m_thread.start();
  -	  final String debug = "startup complete";
  +	  final String debug = "started";
           if( getLogger().isDebugEnabled() ) getLogger().debug( debug );
       }
       
  @@ -249,12 +240,12 @@
        * Stop the ORB.
        */
       public void stop()
  -    throws Exception
       {
           if( getLogger().isDebugEnabled() ) getLogger().debug( "stop" );
   	  try
   	  {
               shutdown( true );
  +            m_stopped = true;
   	  }
   	  catch( Throwable e )
   	  {
  @@ -272,9 +263,11 @@
       */ 
       public void dispose()
       {
  +        if( m_disposed ) return;
  +        if( !m_stopped ) stop();
  +        m_disposed = true;
           m_config = null;
           m_context = null;
  -        m_root = null;
       }
   
   }
  
  
  
  1.2       +3 -1      jakarta-avalon-apps/enterprise/pss/build.xml
  
  Index: build.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-apps/enterprise/pss/build.xml,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- build.xml	28 Feb 2002 19:07:17 -0000	1.1
  +++ build.xml	12 Mar 2002 22:18:01 -0000	1.2
  @@ -123,7 +123,9 @@
   	    <path refid="project.classpath" />
   	  </classpath>
         </javac>
  -      <jar jarfile="${dist}/${compiler.jar}" basedir="${build}/compiler/lib" />
  +      <jar jarfile="${dist}/${compiler.jar}" basedir="${build}/compiler/lib">
  +        <zipfileset dir="${idl}" includes="*.idl" prefix="org/openorb/idl" />
  +      </jar>
         <touch>
           <fileset dir="${psdl}">
             <include name="*.psdl"/>
  
  
  
  1.2       +25 -24    jakarta-avalon-apps/enterprise/pss/src/etc/overview.html
  
  Index: overview.html
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-apps/enterprise/pss/src/etc/overview.html,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- overview.html	28 Feb 2002 19:10:49 -0000	1.1
  +++ overview.html	12 Mar 2002 22:18:01 -0000	1.2
  @@ -1,24 +1,25 @@
  -    <body> 
  -      <h3>Package Description</h3>
  -      <p>
  -      OMG Persistent State Service (PSS) incorporating the latest 
  -      specification revisions (OMG document number ptc/01-12-02).  The PSS service 
  -      leverages Avalon logging, configuration and component management services
  -      and part of the overall integration architecture.  The PSS service provides
  -      file and database persistence based on PSDL (Persitent State Defintion 
  -      Language).
  -      </p>
  -      <h3>Related Packages</h3>
  -      <ul>
  -      <li><a href="{$docRoot}/../.." target="_top">Package Index.</a>
  -      <li><a href="{$docRoot}/../../gateway" target="_top">OSM Process Management
and Collaboration Gateway.</a>
  -      <li><a href="{$docRoot}/../../orb" target="_top">ORB, Object Request
Broker Block.</a>
  -      <li><a href="{$docRoot}/../../avalon" target="_top">Avalon Component
Managagement Framework and Phoenix Application Server Platform.</a>
  -      </ul>
  -      </p>
  -      <p><i>Copyright (c) OSM SARL 2000, 2001, 2002, All rights reserved.</br>
  -      The Avalon Framework, Phoenix and Excalibur are Copyright Apache Foundation.</br>
  -      ORB and PSS Service are Copyright OSM, Apache Foundation, and Exolab.
  -      </i>
  -      </p>
  -  </body>
  +<body> 
  +<h3>Package Description</h3>
  +<p>
  +OMG Persistent State Service (PSS) incorporating the final adpted and available 
  +specification revisions (OMG document number ptc/01-12-02).  The PSS service 
  +leverages Avalon logging, configuration and component management services
  +and part of the overall integration architecture.  The PSS service provides
  +file and database persistence based on PSDL (Persitent State Defintion 
  +Language).</p>
  +<table border="1" cellpadding="3" cellspacing="0" width="100%">
  +<tr bgcolor="#ccccff">
  +<td colspan="2"><font size="+2"><b>Components</b></font></td>
  +<tr><td width="20%" valign="top"><strong>{@link org.apache.pss.ORB}</strong></td>
  +<td><code>ORB</code> component provides industry standard Object Request
Broker services
  +combined with formal component semantics.  ORB parameterization equivalent to the classic
  +ORB.init() static operation is achieved through configuration of the ORB with a configuration
  +instance containing property and initializer declarations.  The PSS ORB includes default
  +initialization of a underlying PSS persitent state service.</td></tr>
  +</table>
  +<h4>Related Packages</h4>
  +
  +Related packages and services are available under the <a href="{$docRoot}/../../index.html"
target="_top">Package Index.</a>
  +
  +</body>
  + 
  \ No newline at end of file
  
  
  
  1.2       +10 -6     jakarta-avalon-apps/enterprise/pss/src/java/org/apache/pss/Initializer.java
  
  Index: Initializer.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-apps/enterprise/pss/src/java/org/apache/pss/Initializer.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- Initializer.java	28 Feb 2002 19:10:50 -0000	1.1
  +++ Initializer.java	12 Mar 2002 22:18:01 -0000	1.2
  @@ -50,6 +50,8 @@
   import org.apache.pss.connector.memory.MemoryConnector;
   import org.apache.pss.util.debug;
   
  +import org.openorb.util.Trace;
  +
   /**
    * PSS initializer that handles the establishment of inital references to a 
    * file, database and memory connector.
  @@ -193,7 +195,7 @@
       */
       public void contextualize( Context context )
       {
  -        if( getLogger().isDebugEnabled() ) getLogger().debug("contetualization");
  +        if( getLogger().isDebugEnabled() && Trace.isMedium() ) getLogger().debug("contetualization");
           this.m_context = context;
       }
   
  @@ -246,7 +248,7 @@
       {
           if( m_config != null ) throw new IllegalStateException(
               "Illegal attempt to reconfigure.");
  -        if( getLogger().isDebugEnabled() ) getLogger().debug("configure");
  +        if( getLogger().isDebugEnabled() && Trace.isMedium() ) getLogger().debug("configure");
           this.m_config = config;
       }
   
  @@ -289,7 +291,7 @@
   
           try
           {
  -            if( getLogger().isDebugEnabled() ) getLogger().debug("creating singleton file
connector");
  +            if( getLogger().isDebugEnabled() && Trace.isHigh() ) getLogger().debug("creating
singleton file connector");
               Configuration c = getConfiguration().getChild("connector").getChild("file");
               final FileConnector connector = new FileConnector( m_context, c, orbinitinfo
);
               connector.enableLogging( getLogger().getChildLogger("file") );
  @@ -308,7 +310,7 @@
   
           try
           {
  -            if( getLogger().isDebugEnabled() ) getLogger().debug(
  +            if( getLogger().isDebugEnabled() && Trace.isHigh() ) getLogger().debug(
                  "creating singleton database connector");
               Configuration c = getConfiguration().getChild("connector").getChild("database");
               final DatabaseConnector connector = new DatabaseConnector( m_context, c, orbinitinfo
);
  @@ -328,7 +330,8 @@
   
           try
           {
  -            if( getLogger().isDebugEnabled() ) getLogger().debug("creating singleton memory
connector");
  +            if( getLogger().isDebugEnabled() && Trace.isHigh() ) getLogger().debug(
  +              "creating singleton memory connector");
               Configuration c = getConfiguration().getChild("connector").getChild("memory");
               final MemoryConnector connector = new MemoryConnector( m_context, c, orbinitinfo
);
               connector.enableLogging( getLogger().getChildLogger("memory") );
  @@ -366,7 +369,7 @@
               throw new CascadingRuntimeException( error, e );
           }
   
  -        if( getLogger().isDebugEnabled() ) getLogger().debug("pre-init cycle completed");
  +        if( getLogger().isDebugEnabled() && Trace.isMedium() ) getLogger().debug("pre-init
cycle completed");
   
       }
   
  @@ -399,6 +402,7 @@
   
       private Logger getBootstrapLogger( )
       {
  +        if( getLogger().isDebugEnabled() ) getLogger().debug("disposal");
           try
           {
               Hierarchy hierarchy = Hierarchy.getDefaultHierarchy();
  
  
  
  1.2       +2 -1      jakarta-avalon-apps/enterprise/pss/src/java/org/apache/pss/connector/AbstractCatalog.java
  
  Index: AbstractCatalog.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-apps/enterprise/pss/src/java/org/apache/pss/connector/AbstractCatalog.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- AbstractCatalog.java	28 Feb 2002 19:10:51 -0000	1.1
  +++ AbstractCatalog.java	12 Mar 2002 22:18:01 -0000	1.2
  @@ -32,6 +32,7 @@
   import org.omg.CosPersistentState.Connector;
   import org.omg.PortableInterceptor.ORBInitInfo;
   
  +import org.openorb.util.Trace;
   
   /**
    * Abstract impementation of a catalog.
  @@ -104,7 +105,7 @@
       public void stop()
       throws Exception
       {
  -	  if( getLogger().isDebugEnabled() ) getLogger().debug( "stop" );
  +	  if( getLogger().isDebugEnabled() && Trace.isMedium() ) getLogger().debug( "stop"
);
           try
           {
               flush();
  
  
  
  1.2       +6 -4      jakarta-avalon-apps/enterprise/pss/src/java/org/apache/pss/connector/ConnectorBase.java
  
  Index: ConnectorBase.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-apps/enterprise/pss/src/java/org/apache/pss/connector/ConnectorBase.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- ConnectorBase.java	28 Feb 2002 19:10:51 -0000	1.1
  +++ ConnectorBase.java	12 Mar 2002 22:18:01 -0000	1.2
  @@ -34,6 +34,8 @@
   
   import org.omg.CosTransactions.Coordinator;
   
  +import org.openorb.util.Trace;
  +
   /**
    * The <code>ConnectorBase</code> class is the implementation of an abstract
    * <code>Connector</code>.
  @@ -353,7 +355,7 @@
           }
           _object_factories.put( storage_type_name, storage_object_factory );
   
  -        if( getLogger().isDebugEnabled() ) getLogger().debug( 
  +        if( getLogger().isDebugEnabled() && Trace.isMedium() ) getLogger().debug(

             "registering storage object factory: " + storage_type_name );
           return clazz;
       }
  @@ -373,7 +375,7 @@
           }
           _home_factories.put( storage_home_type_name, storage_object_factory );
   
  -        if( getLogger().isDebugEnabled() ) getLogger().debug( 
  +        if( getLogger().isDebugEnabled() && Trace.isMedium() ) getLogger().debug(

             "registering storage home factory: " + storage_home_type_name );
           return clazz;
       }
  @@ -393,7 +395,7 @@
               _session_factories.remove( name );
           }
           _session_factories.put( name, session_factory );
  -        if( getLogger().isDebugEnabled() ) getLogger().debug( 
  +        if( getLogger().isDebugEnabled() && Trace.isMedium() ) getLogger().debug(

             "registering session factory: " + session_factory.getName() );
   
           return clazz;
  @@ -413,7 +415,7 @@
               _session_pool_factories.remove( name );
           }
           _session_pool_factories.put( name, session_pool_factory );
  -        if( getLogger().isDebugEnabled() ) getLogger().debug( 
  +        if( getLogger().isDebugEnabled() && Trace.isMedium() ) getLogger().debug(

             "registering session pool factory: " + session_pool_factory.getName() );
   
           return clazz;
  
  
  
  1.2       +0 -1      jakarta-avalon-apps/enterprise/pss/src/java/org/apache/pss/connector/database/DatabaseConnector.java
  
  Index: DatabaseConnector.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-apps/enterprise/pss/src/java/org/apache/pss/connector/database/DatabaseConnector.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- DatabaseConnector.java	28 Feb 2002 19:10:52 -0000	1.1
  +++ DatabaseConnector.java	12 Mar 2002 22:18:02 -0000	1.2
  @@ -30,7 +30,6 @@
   import org.apache.pss.connector.ConnectorBase;
   import org.apache.pss.connector.PID;
   
  -
   /**
    * JDBC based persistence connector that provides support for the 
    * creation of session, session pools, and transactional sessions.
  
  
  
  1.2       +25 -15    jakarta-avalon-apps/enterprise/pss/src/java/org/apache/pss/connector/database/DatabaseSession.java
  
  Index: DatabaseSession.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-apps/enterprise/pss/src/java/org/apache/pss/connector/database/DatabaseSession.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- DatabaseSession.java	28 Feb 2002 19:10:52 -0000	1.1
  +++ DatabaseSession.java	12 Mar 2002 22:18:02 -0000	1.2
  @@ -47,6 +47,7 @@
   import org.apache.pss.connector.NotFoundException;
   import org.apache.pss.util.debug;
   
  +import org.openorb.util.Trace;
   
   /**
    * Implementation of database persistent session.
  @@ -232,7 +233,7 @@
        */
       public synchronized void close()
       {
  -        if( getLogger().isDebugEnabled() ) getLogger().debug( "close" );
  +        if( getLogger().isDebugEnabled() && Trace.isMedium() ) getLogger().debug(
"close" );
           try
           {
               _datastore.close();
  @@ -267,7 +268,7 @@
        */
       public void destroy( StorageHomeBase storagehomebase )
       {
  -        if( getLogger().isDebugEnabled() ) getLogger().debug( "destroy " + storagehomebase
);
  +        if( getLogger().isDebugEnabled() && Trace.isMedium() ) getLogger().debug(
"destroy " + storagehomebase );
           flush();
           PID pid = ( ( PersistentObjectHome ) storagehomebase ).getPID();
           String s = ( String ) _tables.get( pid.catalog_value_str() );
  @@ -296,7 +297,8 @@
        */
       public boolean stored( PID home_pid, PID type_pid )
       {
  -        if( getLogger().isDebugEnabled() ) getLogger().debug( "stored [" + home_pid + ",
" + type_pid + "]"  );
  +        if( getLogger().isDebugEnabled() && Trace.isHigh() ) getLogger().debug(

  +          "stored [" + home_pid + ", " + type_pid + "]"  );
           String s = ( String ) _tables.get( home_pid.catalog_value_str() );
           ResultSet resultset = getLine( s, type_pid );
           try
  @@ -323,7 +325,8 @@
       public InputStream[] read( PID home_pid, PID type_pid, int i )
           throws NotFoundException
       {
  -        if( getLogger().isDebugEnabled() ) getLogger().debug( "read [" + home_pid + ",
" + type_pid + "]" );
  +        if( getLogger().isDebugEnabled() && Trace.isHigh() ) getLogger().debug(

  +          "read [" + home_pid + ", " + type_pid + "]" );
   
           InputStream ainputstream[] = null;
           DatabaseEntry databaseentry = ( DatabaseEntry ) _cache.get( type_pid.value_str()
);
  @@ -372,7 +375,8 @@
        */
       public void write( PID home_pid, PID type_pid, OutputStream[] output )
       {
  -        if( getLogger().isDebugEnabled() ) getLogger().debug( "write [ " + home_pid + ",
" + type_pid + " ]" );
  +        if( getLogger().isDebugEnabled() && Trace.isHigh() ) getLogger().debug(

  +          "write [ " + home_pid + ", " + type_pid + " ]" );
   
           DatabaseEntry databaseentry = ( DatabaseEntry ) _cache.get( type_pid.value_str()
);
           if ( databaseentry != null )
  @@ -397,7 +401,8 @@
        */
       public void write_entry_into_database( DatabaseEntry databaseentry )
       {
  -        if( getLogger().isDebugEnabled() ) getLogger().debug( "write_entry_into_database"
);
  +        if( getLogger().isDebugEnabled() && Trace.isHigh() ) getLogger().debug(

  +          "write_entry_into_database" );
           if( databaseentry == null ) throw new NullPointerException( 
             "Null database entry argument.");
   
  @@ -501,7 +506,7 @@
       public void remove( PID home_pid, PID type_pid )
       {
   
  -        if( getLogger().isDebugEnabled() ) getLogger().debug( 
  +        if( getLogger().isDebugEnabled() && Trace.isHigh() ) getLogger().debug(

              "remove [ " + home_pid + ", " + type_pid + " ]" );
   
           DatabaseEntry databaseentry = ( DatabaseEntry ) _cache.get( type_pid.value_str()
);
  @@ -537,7 +542,8 @@
       public PID find( PID home_pid, KeyBag[] keys )
           throws NotFoundException
       {
  -        if( getLogger().isDebugEnabled() ) getLogger().debug( "find [ " + home_pid + "
]" );
  +        if( getLogger().isDebugEnabled() && Trace.isHigh() ) getLogger().debug(

  +          "find [ " + home_pid + " ]" );
   
           flush();
           String s = ( String ) _tables.get( home_pid.catalog_value_str() );
  @@ -601,7 +607,8 @@
        */
       public PID[] find_pids( PID pid )
       {
  -        if( getLogger().isDebugEnabled() ) getLogger().debug( "find_pids [ " + pid + "
]" );
  +        if( getLogger().isDebugEnabled() && Trace.isHigh() ) getLogger().debug(

  +          "find_pids [ " + pid + " ]" );
   
           flush();
           String s = ( String ) _tables.get( pid.catalog_value_str() );
  @@ -702,7 +709,8 @@
        */
       public StorageObject create_object( StorageHomeBase storagehomebase, String storage_type_id
)
       {
  -        if( getLogger().isDebugEnabled() ) getLogger().debug( "create_object " + storage_type_id
);
  +        if( getLogger().isDebugEnabled() && Trace.isHigh() ) getLogger().debug(

  +          "create_object " + storage_type_id );
           Class class1 = _connector.get_storage_type_factory( storage_type_id );
           if ( class1 == null )
           {
  @@ -732,7 +740,8 @@
        */
       public StorageObject create_empty_object( StorageHomeBase storagehomebase, String storage_type_id
)
       {
  -        if( getLogger().isDebugEnabled() ) getLogger().debug( "create_empty_object " +
storage_type_id );
  +        if( getLogger().isDebugEnabled() && Trace.isHigh() ) getLogger().debug(

  +          "create_empty_object " + storage_type_id );
           Class class1 = _connector.get_storage_type_factory( storage_type_id );
           if ( class1 == null )
           {
  @@ -798,7 +807,7 @@
           if ( !tableExist( tableName( psdl ) ) ) createTable( tableName( psdl ), home );
           _tables.put( pid.catalog_value_str(), tableName( psdl ) );
   
  -        if( getLogger().isDebugEnabled() ) getLogger().debug( 
  +        if( getLogger().isDebugEnabled() && Trace.isHigh() ) getLogger().debug(

             "register_home_incarnation\n\t" 
             + psdl
             + "\n\thash: " + psdl.hashCode()
  @@ -818,7 +827,7 @@
        */
       protected Connection connectToDatabase()
       {
  -        if( getLogger().isDebugEnabled() ) getLogger().debug( "connectToDatabase" );
  +        if( getLogger().isDebugEnabled() && Trace.isMedium() ) getLogger().debug(
"connectToDatabase" );
           Connection connection = null;
           String s = getParameter( "User" );
           String s1 = getParameter( "Password" );
  @@ -910,7 +919,7 @@
        */
       private boolean tableExist( String table_name )
       {
  -        if( getLogger().isDebugEnabled() ) getLogger().debug( "tableExist" );
  +        if( getLogger().isDebugEnabled() && Trace.isHigh() ) getLogger().debug(
"tableExist" );
           try
           {
               DatabaseMetaData databasemetadata = _datastore.getMetaData();
  @@ -933,7 +942,8 @@
        */
       private void createTable( String table_name, PersistentObjectHome persistentobjecthome
)
       {
  -        if( getLogger().isDebugEnabled() ) getLogger().debug( "createTable: " + table_name
);
  +        if( getLogger().isDebugEnabled() && Trace.isHigh() ) getLogger().debug(

  +          "createTable: " + table_name );
           try
           {
               Statement statement = _datastore.createStatement();
  
  
  
  1.2       +3 -1      jakarta-avalon-apps/enterprise/pss/src/java/org/apache/pss/connector/file/FileCatalog.java
  
  Index: FileCatalog.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-apps/enterprise/pss/src/java/org/apache/pss/connector/file/FileCatalog.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- FileCatalog.java	28 Feb 2002 19:10:53 -0000	1.1
  +++ FileCatalog.java	12 Mar 2002 22:18:02 -0000	1.2
  @@ -36,6 +36,8 @@
   import org.apache.pss.connector.PIDFactory;
   import org.apache.pss.connector.AbstractCatalog;
   
  +import org.openorb.util.Trace;
  +
   /**
    * Impementation of a catalog for file based persistence.
    */
  @@ -92,7 +94,7 @@
           throws NotFound
       {
   
  -        if( getLogger().isDebugEnabled() ) getLogger().debug( 
  +        if( getLogger().isDebugEnabled() && Trace.isHigh() ) getLogger().debug(

             "find_storage_home: " + psdl );
   
           StorageHomeBase storagehomebase = ( StorageHomeBase ) _home_incarnations.get( psdl
);
  
  
  
  1.2       +6 -5      jakarta-avalon-apps/enterprise/pss/src/java/org/apache/pss/connector/file/FileConnector.java
  
  Index: FileConnector.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-apps/enterprise/pss/src/java/org/apache/pss/connector/file/FileConnector.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- FileConnector.java	28 Feb 2002 19:10:53 -0000	1.1
  +++ FileConnector.java	12 Mar 2002 22:18:02 -0000	1.2
  @@ -29,6 +29,8 @@
   
   import org.apache.pss.connector.*;
   
  +import org.openorb.util.Trace;
  +
   /**
    * File based persistence connector that provides support for the 
    * creation of session, session pools, and transactional sessions.
  @@ -129,7 +131,7 @@
       */
       public Session create_basic_session( short access, Parameter[] params )
       {
  -        if( getLogger().isDebugEnabled() ) getLogger().debug( 
  +        if( getLogger().isDebugEnabled() && Trace.isMedium()  ) getLogger().debug(

             "creating basic session");
           FileSession session = new FileSession( _info );
           session.enableLogging( getLogger().getChildLogger("session") );
  @@ -150,7 +152,7 @@
       */
       public TransactionalSession create_transactional_session( short access, short default_isolation_level,
EndOfAssociationCallback callback, Parameter[] params )
       {
  -        if( getLogger().isDebugEnabled() ) getLogger().debug( 
  +        if( getLogger().isDebugEnabled() && Trace.isMedium()  ) getLogger().debug(

             "creating transactional session");
   
           TransactionalFileSession session = new TransactionalFileSession( _info );
  @@ -171,7 +173,7 @@
        */
       public SessionPool create_session_pool( short access, short tx_policy, Parameter[]
params )
       {
  -        if( getLogger().isDebugEnabled() ) getLogger().debug( 
  +        if( getLogger().isDebugEnabled()  && Trace.isMedium() ) getLogger().debug(

             "creating session pool");
   
           FileSessionPool pool = new FileSessionPool( _info );
  @@ -189,7 +191,7 @@
        */
       public TransactionalSession current_session()
       {
  -        if( getLogger().isDebugEnabled() ) getLogger().debug( 
  +        if( getLogger().isDebugEnabled() && Trace.isHigh()  ) getLogger().debug(

             "retrieving current session");
   
           try
  @@ -222,7 +224,6 @@
           catch ( Exception exception )
           {
               final String error = "Unable to resolve transactional session.";
  -            if( getLogger().isErrorEnabled() ) getLogger().error( error, exception );
               throw new PersistenceException( error, exception );
           }
       }
  
  
  
  1.2       +12 -9     jakarta-avalon-apps/enterprise/pss/src/java/org/apache/pss/connector/file/FileSession.java
  
  Index: FileSession.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-apps/enterprise/pss/src/java/org/apache/pss/connector/file/FileSession.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- FileSession.java	28 Feb 2002 19:10:53 -0000	1.1
  +++ FileSession.java	12 Mar 2002 22:18:02 -0000	1.2
  @@ -41,6 +41,7 @@
   import org.openorb.iiop.CDROutputStream;
   import org.openorb.io.MarshalBuffer;
   import org.openorb.io.StorageBuffer;
  +import org.openorb.util.Trace;
   
   import org.apache.pss.Session;
   import org.apache.pss.connector.PID;
  @@ -299,7 +300,8 @@
        */
       public void clean( StorageHomeBase storagehomebase )
       {
  -        if( getLogger().isDebugEnabled() ) getLogger().debug("cleaning: " + storagehomebase
);
  +        if( getLogger().isDebugEnabled()  && Trace.isHigh() ) getLogger().debug(
  +           "cleaning: " + storagehomebase );
   
           flush();
           PID pid = ( ( PersistentObjectHome ) storagehomebase ).getPID();
  @@ -319,7 +321,8 @@
        */
       public void destroy( StorageHomeBase storagehomebase )
       {
  -        if( getLogger().isDebugEnabled() ) getLogger().debug("destroying: " + storagehomebase
);
  +        if( getLogger().isDebugEnabled() && Trace.isHigh() ) getLogger().debug(
  +          "destroying: " + storagehomebase );
   
           flush();
           PID pid = ( ( PersistentObjectHome ) storagehomebase ).getPID();
  @@ -338,7 +341,7 @@
        */
       public synchronized void flush()
       {
  -        if( getLogger().isDebugEnabled() ) getLogger().debug("flush");
  +        if( getLogger().isDebugEnabled()  && Trace.isHigh() ) getLogger().debug("flush");
           Enumeration enumeration = _home_datastores.elements();
           Object obj = null;
           DataManager datamanager;
  @@ -355,7 +358,7 @@
        */
       public synchronized void refresh()
       {
  -        if( getLogger().isDebugEnabled() ) getLogger().debug("refresh");
  +        if( getLogger().isDebugEnabled()  && Trace.isHigh() ) getLogger().debug("refresh");
           Enumeration enumeration = _home_incarnations.elements();
           Object obj = null;
           PersistentObjectHome persistentobjecthome;
  @@ -372,7 +375,7 @@
        */
       public synchronized void free_all()
       {
  -        if( getLogger().isDebugEnabled() ) getLogger().debug("free all");
  +        if( getLogger().isDebugEnabled()  && Trace.isHigh() ) getLogger().debug("free
all");
           Enumeration enumeration = _home_datastores.elements();
           Object obj = null;
           DataManager datamanager;
  @@ -389,7 +392,7 @@
        */
       public synchronized void close()
       {
  -        if( getLogger().isDebugEnabled() ) getLogger().debug("closing session");
  +        if( getLogger().isDebugEnabled()  && Trace.isHigh() ) getLogger().debug("closing
session");
           Enumeration enumeration = _home_datastores.elements();
           DataManager datamanager = null;
           for ( ; enumeration.hasMoreElements(); datamanager.close() )
  @@ -415,7 +418,7 @@
       public synchronized StorageObject incarnate( StorageHomeBase base, byte[] pid, String
id )
           throws NotFoundException
       {
  -        if( getLogger().isDebugEnabled() ) getLogger().debug("incarnate: " + id );
  +        if( getLogger().isDebugEnabled()  && Trace.isHigh() ) getLogger().debug("incarnate:
" + id );
   
           Class class1 = _connector.get_storage_type_factory( id );
           if ( class1 == null )
  @@ -561,7 +564,7 @@
        */
       public StorageHomeBase find_home_base( PID pid )
       {
  -        if( getLogger().isDebugEnabled() ) getLogger().debug( 
  +        if( getLogger().isDebugEnabled()  && Trace.isHigh() ) getLogger().debug(

             "find_home_base: " + pid + ", size: " + _home_datastores.size() );
   
           for ( Enumeration enumeration = _home_datastores.keys(); enumeration.hasMoreElements();
 )
  @@ -648,7 +651,7 @@
           _home_incarnations.put( psdl, incarnation );
           _home_datastores.put( pid, getDataManager( psdl ) );
   
  -        if( getLogger().isDebugEnabled() ) getLogger().debug( 
  +        if( getLogger().isDebugEnabled()  && Trace.isHigh() ) getLogger().debug(

             "register_home_incarnation\n\t" 
             + psdl 
             + "\n\thash: " + psdl.hashCode()
  
  
  
  1.2       +3 -1      jakarta-avalon-apps/enterprise/pss/src/java/org/apache/pss/connector/memory/MemorySession.java
  
  Index: MemorySession.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-apps/enterprise/pss/src/java/org/apache/pss/connector/memory/MemorySession.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- MemorySession.java	28 Feb 2002 19:10:53 -0000	1.1
  +++ MemorySession.java	12 Mar 2002 22:18:02 -0000	1.2
  @@ -32,6 +32,8 @@
   import org.apache.pss.connector.NotFoundException;
   import org.apache.pss.connector.PersistenceException;
   
  +import org.openorb.util.Trace;
  +
   /**
    * Memory basic session implementation.
    */
  @@ -286,7 +288,7 @@
           home.setPersistentLinks( this, pid );
           _home_incarnations.put( pid, incarnation );
           _home_pid.put( psdl, pid );
  -        if( getLogger().isDebugEnabled() ) getLogger().debug( 
  +        if( getLogger().isDebugEnabled()  && Trace.isHigh() ) getLogger().debug(

             "register_home_incarnation\n\t" 
             + psdl 
             + "\n\thash: " + psdl.hashCode()
  
  
  
  1.3       +19 -34    jakarta-avalon-apps/enterprise/time/build.xml
  
  Index: build.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-apps/enterprise/time/build.xml,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- build.xml	9 Mar 2002 04:50:20 -0000	1.2
  +++ build.xml	12 Mar 2002 22:18:02 -0000	1.3
  @@ -166,21 +166,6 @@
   
         <echo message="Building ORB Time Implementation."/>
   
  -      <taskdef resource="checkstyletask.properties"/>
  -      <!--
  -      <checkstyle allowNoAuthor="true" 
  -         ignoreBraces="true" 
  -         lcurlyType="ignore"
  -         lcurlyMethod="ignore"
  -         lcurlyOther="ignore"
  -         rcurly="ignore"
  -        >
  -        <fileset dir="${src}/java">
  -           <include name="**/*.*"/>
  -        </fileset>
  -      </checkstyle>
  -      -->
  -
         <mkdir dir="${build}/time/lib"/>
   
         <javac debug="off" destdir="${build}/time/lib" deprecation="true" target="1.2">
  @@ -246,20 +231,28 @@
     </target>
   
     <target name="loader.context">
  -    <available property="loader.available" file="${tools.lib.path}/merlin.jar"/>
  +    <available property="merlin.available" file="${ant.home}/lib/merlin.jar"/>
     </target>
   
  -  <target name="loader.defintion" depends="loader.context" if="loader.available">
  -    <taskdef name="load" classname="org.apache.avalon.excalibur.service.ant.Load">
  -      <classpath>
  -        <pathelement location="${tools.lib.path}/merlin.jar"/>
  -        <pathelement location="${tools.lib.path}/avalon-framework.jar"/>
  -        <pathelement location="${tools.lib.path}/logkit.jar"/>
  -      </classpath>
  -    </taskdef>
  +  <target name="loader.defintion" depends="loader.context" if="merlin.available">
  +    <taskdef resource="merlin.properties"/>
     </target>
    
  -  <target name="demo" depends="loader.defintion,time" if="loader.available">
  +  <target name="loader.validation" depends="loader.defintion" unless="merlin.available">
  +    <echo>
  +
  +     Merlin is not installed in your Ant library.
  +     In order to use the "load" task the following jar files 
  +     must be added to your ${ant.home}/lib directory:
  +
  +       - merlin.jar
  +       - avalon-framework.jar
  +       - logkit.jar
  +       - xerces.jar (pre JRE 1.4 only)
  +    </echo>
  +  </target>
  +
  +  <target name="demo" depends="loader.validation,time" if="merlin.available">
   
       <echo message="Executing time service demo."/>
   
  @@ -268,15 +261,7 @@
       pipeline processing to the class referenced in the target attribute.
       -->
   
  -    <load target="org.apache.time.Provider" priority="DEBUG" disposal="${demo.disposal}"
verbose="${demo.verbose}">
  -
  -      <classpath>
  -         <fileset dir="${tools.lib.path}">
  -             <include name="merlin.jar"/>
  -             <include name="avalon-framework.jar"/>
  -             <include name="logkit.jar"/>
  -         </fileset>
  -      </classpath>
  +    <load target="org.apache.time.TimeProvider" priority="DEBUG" disposal="${demo.disposal}"
verbose="${demo.verbose}">
   
         <!--
         For all of the jar files in the fileset, load the jar file
  
  
  
  1.3       +1 -1      jakarta-avalon-apps/enterprise/time/src/etc/time.mf
  
  Index: time.mf
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-apps/enterprise/time/src/etc/time.mf,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- time.mf	9 Mar 2002 04:50:20 -0000	1.2
  +++ time.mf	12 Mar 2002 22:18:02 -0000	1.3
  @@ -8,5 +8,5 @@
   Implementation-Vendor: Apache Foundation
   Implementation-Version: 1.0
   
  -Name: org/apache/time/Provider.class
  +Name: org/apache/time/TimeProvider.class
   Avalon-Block: true
  
  
  
  1.2       +3 -3      jakarta-avalon-apps/enterprise/time/src/java/org/apache/time/Initializer.java
  
  Index: Initializer.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-apps/enterprise/time/src/java/org/apache/time/Initializer.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- Initializer.java	9 Mar 2002 04:51:51 -0000	1.1
  +++ Initializer.java	12 Mar 2002 22:18:02 -0000	1.2
  @@ -36,7 +36,7 @@
   
       private Configuration m_config;
       private Context m_context;
  -    private Provider m_poa;
  +    private TimeProvider m_poa;
       private boolean m_flag = false;
   
       //=================================================================
  @@ -92,7 +92,7 @@
           try
           {
               if( getLogger().isDebugEnabled() ) getLogger().debug("creating TimePOA" );
  -            m_poa = new Provider();
  +            m_poa = new TimeProvider();
               m_poa.enableLogging( getLogger().getChildLogger("provider") );
               m_poa.configure( m_config.getChild("provider") );
               m_poa.contextualize( m_context );
  @@ -141,7 +141,7 @@
           catch( Throwable e )
           {
               if( getLogger().isWarnEnabled() ) getLogger().warn(
  -              "ignoring exception while stopping Hello provider", e );
  +              "ignoring exception while stopping the time provider", e );
           }
           finally
           {
  
  
  
  1.2       +1 -1      jakarta-avalon-apps/enterprise/time/src/java/org/apache/time/package.html
  
  Index: package.html
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-apps/enterprise/time/src/java/org/apache/time/package.html,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- package.html	8 Mar 2002 05:55:06 -0000	1.1
  +++ package.html	12 Mar 2002 22:18:02 -0000	1.2
  @@ -1,7 +1,7 @@
   
   <body>
   <p>
  -The <code>org.apache.time</code> package contains an implementation of the

  +The <code>org.apache.time</code> package contains an component based implementation
of the 
   <code>org.omg.CosTime.TimeService</code>.
   </p>
   </body>
  
  
  

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