avalon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From blorit...@apache.org
Subject cvs commit: avalon-excalibur/fortress/src/java/org/apache/avalon/fortress/impl/role AbstractRoleManager.java ConfigurableRoleManager.java
Date Tue, 25 Feb 2003 15:23:48 GMT
bloritsch    2003/02/25 07:23:47

  Modified:    event/src/silk/test/org/apache/excalibur/event/seda/example1
                        StageManagerExample.java
               fortress/src/java/org/apache/avalon/fortress/util
                        ContextBuilder.java FortressConfig.java
                        ContextManager.java
               datasource/src/test/org/apache/avalon/excalibur/datasource/test
                        DataSourceJdbcTestCase.java
               fortress/src/java/org/apache/avalon/fortress/impl/role
                        AbstractRoleManager.java
                        ConfigurableRoleManager.java
  Log:
  Removed some warnings from Eclipse.
  
  CVS: ----------------------------------------------------------------------
  CVS: PR:
  CVS:   If this change addresses a PR in the problem report tracking
  CVS:   database, then enter the PR number(s) here.
  CVS: Obtained from:
  CVS:   If this change has been taken from another system, such as NCSA,
  CVS:   then name the system in this line, otherwise delete it.
  CVS: Submitted by:
  CVS:   If this code has been contributed to Apache by someone else; i.e.,
  CVS:   they sent us a patch or a new module, then include their name/email
  CVS:   address here. If this is your work then delete this line.
  CVS: Reviewed by:
  CVS:   If we are doing pre-commit code reviews and someone else has
  CVS:   reviewed your changes, include their name(s) here.
  CVS:   If you have not had it reviewed then delete this line.
  
  Revision  Changes    Path
  1.2       +131 -131  avalon-excalibur/event/src/silk/test/org/apache/excalibur/event/seda/example1/StageManagerExample.java
  
  Index: StageManagerExample.java
  ===================================================================
  RCS file: /home/cvs/avalon-excalibur/event/src/silk/test/org/apache/excalibur/event/seda/example1/StageManagerExample.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- StageManagerExample.java	29 Jan 2003 05:59:30 -0000	1.1
  +++ StageManagerExample.java	25 Feb 2003 15:23:43 -0000	1.2
  @@ -1,132 +1,132 @@
  -/*
  - * Copyright (C) The Apache Software Foundation. All rights reserved.
  - *
  - * This software is published under the terms of the Apache Software License
  - * version 1.1, a copy of which has been included with this distribution in
  - * the LICENSE.txt file.
  - */
  -
  -package org.apache.excalibur.event.seda.example1;
  -
  -import org.apache.avalon.framework.logger.Logger;
  -import org.apache.avalon.framework.service.ServiceManager;
  -import org.apache.excalibur.event.seda.StageManager;
  -import org.apache.excalibur.fortress.ContainerManager;
  -import org.apache.excalibur.fortress.DefaultContainerManager;
  -import org.apache.excalibur.fortress.container.DefaultContainer;
  -import org.apache.excalibur.fortress.util.ContextBuilder;
  -import org.apache.excalibur.fortress.util.ContextManager;
  -
  -
  -/**
  - * Tests the stage container default implementation 
  - * by setting up the container manager.
  - *
  - * @version $Revision$
  - * @author  <a href="mailto:schierma@users.sourceforge.net">schierma</a>
  - */
  -public class StageManagerExample
  -{
  -    private static final long EXECUTION_TIME = 100000000;
  -    
  -    /** A logger to log messages to */
  -    private static Logger m_logger = null;
  -    /** The container manager */
  -    private static ContainerManager m_containerManager = null;
  -    /** The context manager */
  -    private static ContextManager m_contextManager = null;
  -    /** The container instance */
  -    private static DefaultContainer m_container = null;
  -
  -    //------------------------- HttpConnector specific implementation
  -    /**
  -     * Main entry method for the application.
  -     * @since Sep 16, 2002
  -     * 
  -     * @throws Exception
  -     *  If an error ocurrs
  -     */
  -    public static final void main(String[] args) throws Exception
  -    {
  -        setup();
  -                
  -        // Runs the example
  -        run();
  -
  -        m_containerManager.dispose();
  -        m_contextManager.dispose();
  -    }
  -    
  -    /** 
  -     * Sets up the container for the example application
  -     * @since Sep 16, 2002
  -     * 
  -     * @throws Exception
  -     *  If an error ocurrs
  -     */
  -    public static void setup() throws Exception
  -    {
  -        // create a new context builder to set the context of the container
  -        final ContextBuilder contextBuilder = new ContextBuilder();
  -
  -        // container class is the stage container to test
  -        contextBuilder.setContainerClass(DefaultContainer.class.getName());
  -        contextBuilder.setContextDirectory("./");
  -        contextBuilder.setWorkDirectory("./");
  -        contextBuilder.setLoggerCategory(null);
  -        //contextBuilder.setComponentManagerParent(kernelManager);
  -        contextBuilder.setContextClassLoader(
  -            Thread.currentThread().getContextClassLoader());
  -
  -        contextBuilder.setContainerConfiguration(
  -            "resource://org/apache/excalibur/event/seda/example1/StageManagerExample.xconf");
  -        contextBuilder.setLoggerManagerConfiguration(
  -            "resource://org/apache/excalibur/event/seda/example1/StageManagerExample.xlog");
  -
  -        m_contextManager =
  -            new ContextManager(contextBuilder.getContext(), null);
  -
  -        // initialize the context manager
  -        m_contextManager.initialize();
  -        // then set the context manager to be used by the container's manager
  -        m_containerManager = new DefaultContainerManager(m_contextManager);
  -        // init the manager
  -        m_containerManager.initialize();
  -
  -        m_container = (DefaultContainer) m_containerManager.getContainer();
  -
  -        m_logger = m_containerManager.getLogger();
  -    }
  -
  -    /**
  -     * Runs the example by providing an initial event.
  -     * The stages inside the container will then
  -     * communicate and print something to the logger.
  -     * @since Sep 16, 2002
  -     * 
  -     * @throws Exception
  -     *  If an error ocurrs
  -     */
  -    public static void run() throws Exception
  -    {
  -        final ServiceManager manager = m_container.getServiceManager();
  -        final StageManager stageManager =
  -            (StageManager) manager.lookup(StageManager.ROLE);
  -
  -        try
  -        {
  -            // get the map for stage 2.
  -            stageManager.enqueue(new FooMessage("Start"), "foo-stage");
  -
  -            // wait some time and have all stages execute
  -            Thread.sleep(EXECUTION_TIME);
  -
  -            m_logger.info("Done!");
  -        }
  -        finally
  -        {
  -            m_container.getServiceManager().release(stageManager);
  -        }
  -    }
  -
  +/*
  + * Copyright (C) The Apache Software Foundation. All rights reserved.
  + *
  + * This software is published under the terms of the Apache Software License
  + * version 1.1, a copy of which has been included with this distribution in
  + * the LICENSE.txt file.
  + */
  +
  +package org.apache.excalibur.event.seda.example1;
  +
  +import org.apache.avalon.framework.container.ContainerUtil;
  +import org.apache.avalon.framework.logger.Logger;
  +import org.apache.avalon.framework.service.ServiceManager;
  +import org.apache.excalibur.event.seda.StageManager;
  +import org.apache.avalon.fortress.impl.DefaultContainerManager;
  +import org.apache.avalon.fortress.impl.DefaultContainer;
  +import org.apache.avalon.fortress.util.ContextBuilder;
  +import org.apache.avalon.fortress.util.ContextManager;
  +
  +
  +/**
  + * Tests the stage container default implementation 
  + * by setting up the container manager.
  + *
  + * @version $Revision$
  + * @author  <a href="mailto:schierma@users.sourceforge.net">schierma</a>
  + */
  +public class StageManagerExample
  +{
  +    private static final long EXECUTION_TIME = 100000000;
  +    
  +    /** A logger to log messages to */
  +    private static Logger m_logger = null;
  +    /** The container manager */
  +    private static DefaultContainerManager m_containerManager = null;
  +    /** The context manager */
  +    private static ContextManager m_contextManager = null;
  +    /** The container instance */
  +    private static DefaultContainer m_container = null;
  +
  +    //------------------------- HttpConnector specific implementation
  +    /**
  +     * Main entry method for the application.
  +     * @since Sep 16, 2002
  +     * 
  +     * @throws Exception
  +     *  If an error ocurrs
  +     */
  +    public static final void main(String[] args) throws Exception
  +    {
  +        setup();
  +                
  +        // Runs the example
  +        run();
  +
  +        ContainerUtil.dispose(m_containerManager);
  +        ContainerUtil.dispose(m_contextManager);
  +    }
  +    
  +    /** 
  +     * Sets up the container for the example application
  +     * @since Sep 16, 2002
  +     * 
  +     * @throws Exception
  +     *  If an error ocurrs
  +     */
  +    public static void setup() throws Exception
  +    {
  +        // create a new context builder to set the context of the container
  +        final ContextBuilder contextBuilder = new ContextBuilder();
  +
  +        // container class is the stage container to test
  +        contextBuilder.setContainerClass(DefaultContainer.class.getName());
  +        contextBuilder.setContextDirectory("./");
  +        contextBuilder.setWorkDirectory("./");
  +        contextBuilder.setLoggerCategory(null);
  +        //contextBuilder.setComponentManagerParent(kernelManager);
  +        contextBuilder.setContextClassLoader(
  +            Thread.currentThread().getContextClassLoader());
  +
  +        contextBuilder.setContainerConfiguration(
  +            "resource://org/apache/excalibur/event/seda/example1/StageManagerExample.xconf");
  +        contextBuilder.setLoggerManagerConfiguration(
  +            "resource://org/apache/excalibur/event/seda/example1/StageManagerExample.xlog");
  +
  +        m_contextManager =
  +            new ContextManager(contextBuilder.getContext(), null);
  +
  +        // initialize the context manager
  +        m_contextManager.initialize();
  +        // then set the context manager to be used by the container's manager
  +        m_containerManager = new DefaultContainerManager(m_contextManager);
  +        // init the manager
  +        ContainerUtil.initialize(m_containerManager);
  +
  +        m_container = (DefaultContainer) m_containerManager.getContainer();
  +
  +        m_logger = m_containerManager.getLogger();
  +    }
  +
  +    /**
  +     * Runs the example by providing an initial event.
  +     * The stages inside the container will then
  +     * communicate and print something to the logger.
  +     * @since Sep 16, 2002
  +     * 
  +     * @throws Exception
  +     *  If an error ocurrs
  +     */
  +    public static void run() throws Exception
  +    {
  +        final ServiceManager manager = m_container.getServiceManager();
  +        final StageManager stageManager =
  +            (StageManager) manager.lookup(StageManager.ROLE);
  +
  +        try
  +        {
  +            // get the map for stage 2.
  +            stageManager.enqueue(new FooMessage("Start"), "foo-stage");
  +
  +            // wait some time and have all stages execute
  +            Thread.sleep(EXECUTION_TIME);
  +
  +            m_logger.info("Done!");
  +        }
  +        finally
  +        {
  +            m_container.getServiceManager().release(stageManager);
  +        }
  +    }
  +
   }
  
  
  
  1.3       +1 -2      avalon-excalibur/fortress/src/java/org/apache/avalon/fortress/util/ContextBuilder.java
  
  Index: ContextBuilder.java
  ===================================================================
  RCS file: /home/cvs/avalon-excalibur/fortress/src/java/org/apache/avalon/fortress/util/ContextBuilder.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- ContextBuilder.java	7 Feb 2003 16:08:12 -0000	1.2
  +++ ContextBuilder.java	25 Feb 2003 15:23:46 -0000	1.3
  @@ -55,7 +55,6 @@
   import org.apache.avalon.framework.context.Context;
   import org.apache.avalon.framework.service.ServiceManager;
   import org.apache.excalibur.event.Queue;
  -import org.apache.avalon.fortress.RoleManager;
   import org.apache.excalibur.instrument.InstrumentManager;
   import org.apache.excalibur.mpool.PoolManager;
   
  
  
  
  1.2       +1 -2      avalon-excalibur/fortress/src/java/org/apache/avalon/fortress/util/FortressConfig.java
  
  Index: FortressConfig.java
  ===================================================================
  RCS file: /home/cvs/avalon-excalibur/fortress/src/java/org/apache/avalon/fortress/util/FortressConfig.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- FortressConfig.java	27 Jan 2003 16:55:43 -0000	1.1
  +++ FortressConfig.java	25 Feb 2003 15:23:46 -0000	1.2
  @@ -58,7 +58,6 @@
   import org.apache.avalon.framework.service.ServiceManager;
   import org.apache.excalibur.event.Queue;
   import org.apache.avalon.fortress.impl.DefaultContainer;
  -import org.apache.avalon.fortress.RoleManager;
   import org.apache.excalibur.instrument.InstrumentManager;
   import org.apache.excalibur.mpool.PoolManager;
   
  
  
  
  1.6       +3 -3      avalon-excalibur/fortress/src/java/org/apache/avalon/fortress/util/ContextManager.java
  
  Index: ContextManager.java
  ===================================================================
  RCS file: /home/cvs/avalon-excalibur/fortress/src/java/org/apache/avalon/fortress/util/ContextManager.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- ContextManager.java	10 Feb 2003 14:52:27 -0000	1.5
  +++ ContextManager.java	25 Feb 2003 15:23:46 -0000	1.6
  @@ -606,7 +606,7 @@
           resource.enableLogging( getLogger() );
           selector.put( "resource", resource );
   
  -        manager.put( resource.ROLE + "Selector", selector );
  +        manager.put( ResourceSourceFactory.ROLE + "Selector", selector );
   
           final SourceResolverImpl resolver = new SourceResolverImpl();
           ContainerUtil.enableLogging( resolver, getLogger() );
  @@ -614,7 +614,7 @@
           ContainerUtil.service( resolver, manager );
           ContainerUtil.parameterize( resolver, new Parameters() );
   
  -        manager.put( resolver.ROLE, resolver );
  +        manager.put( SourceResolver.ROLE, resolver );
   
           manager.makeReadOnly();
   
  
  
  
  1.9       +1 -1      avalon-excalibur/datasource/src/test/org/apache/avalon/excalibur/datasource/test/DataSourceJdbcTestCase.java
  
  Index: DataSourceJdbcTestCase.java
  ===================================================================
  RCS file: /home/cvs/avalon-excalibur/datasource/src/test/org/apache/avalon/excalibur/datasource/test/DataSourceJdbcTestCase.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- DataSourceJdbcTestCase.java	5 Feb 2003 02:28:36 -0000	1.8
  +++ DataSourceJdbcTestCase.java	25 Feb 2003 15:23:47 -0000	1.9
  @@ -12,7 +12,7 @@
   import java.util.Iterator;
   import java.util.LinkedList;
   import java.util.Random;
  -import EDU.oswego.cs.util.concurrent.CyclicBarrier;
  +import EDU.oswego.cs.dl.util.concurrent.CyclicBarrier;
   import org.apache.avalon.excalibur.datasource.DataSourceComponent;
   import org.apache.avalon.excalibur.testcase.CascadingAssertionFailedError;
   import org.apache.avalon.excalibur.testcase.ExcaliburTestCase;
  
  
  
  1.3       +1 -4      avalon-excalibur/fortress/src/java/org/apache/avalon/fortress/impl/role/AbstractRoleManager.java
  
  Index: AbstractRoleManager.java
  ===================================================================
  RCS file: /home/cvs/avalon-excalibur/fortress/src/java/org/apache/avalon/fortress/impl/role/AbstractRoleManager.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- AbstractRoleManager.java	7 Feb 2003 16:08:12 -0000	1.2
  +++ AbstractRoleManager.java	25 Feb 2003 15:23:47 -0000	1.3
  @@ -49,10 +49,7 @@
   */
   package org.apache.avalon.fortress.impl.role;
   
  -import java.util.Hashtable;
  -import java.util.Map;
   import org.apache.avalon.framework.logger.AbstractLogEnabled;
  -import org.apache.avalon.fortress.impl.handler.PerThreadComponentHandler;
   
   /**
    * The Excalibur Role Manager is used for Excalibur Role Mappings.  All of
  
  
  
  1.3       +1 -2      avalon-excalibur/fortress/src/java/org/apache/avalon/fortress/impl/role/ConfigurableRoleManager.java
  
  Index: ConfigurableRoleManager.java
  ===================================================================
  RCS file: /home/cvs/avalon-excalibur/fortress/src/java/org/apache/avalon/fortress/impl/role/ConfigurableRoleManager.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- ConfigurableRoleManager.java	7 Feb 2003 16:08:12 -0000	1.2
  +++ ConfigurableRoleManager.java	25 Feb 2003 15:23:47 -0000	1.3
  @@ -52,7 +52,6 @@
   import org.apache.avalon.framework.configuration.Configurable;
   import org.apache.avalon.framework.configuration.Configuration;
   import org.apache.avalon.framework.configuration.ConfigurationException;
  -import org.apache.avalon.fortress.impl.handler.PerThreadComponentHandler;
   
   /**
    * Configurable RoleManager implementation.  It populates the RoleManager
  
  
  

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


Mime
View raw message