mcconnell    2002/08/17 18:06:30

  Modified:    src/java/org/apache/avalon/cornerstone/blocks/threads
                        DefaultThreadManager.java
  Log:
  While attempted to build James based on the current Avalon CVS of Cornerstone and 
I'm experiencing a ClassCastException.  The James implementation is referencing 
DefaultThreadManager as a Component, however, the "implements Component" clause has 
been removed from the defintion without modification of any versioning information 
breaking backward compatibility with the James implementation.
  The solution is to re-include the Component interface into the implements statement 
which has no side-effects and will not impact any other usage of this class.  If 
someone has an objectition to this, please feel free to post a detailed explination to 
the Avalon Dev list.
  A stack trace demonstrating the issue is included below:
  
  [ERROR  ] (root.james): Container disposal triggered by abnormal condition.
  org.apache.excalibur.merlin.container.ContainerException: Unexpected error during 
container execution.
          at org.apache.excalibur.merlin.container.DefaultContainer.run(Unknown Source)
          at java.lang.Thread.run(Thread.java:536)
  Caused by: org.apache.excalibur.merlin.resource.LifecycleException: Component named 
"/root/james/spool" failed to pass through the Composing
   stage. (Reason: org.apache.avalon.framework.component.ComponentException: Service 
provider returned a non-Component: class 
org.apache.avalon.cornerstone.blocks.threads.DefaultThreadManager).
          at org.apache.excalibur.merlin.resource.LifecycleHelper.fail(Unknown Source)
          at org.apache.excalibur.merlin.resource.LifecycleHelper.startup(Unknown 
Source)
          at 
org.apache.excalibur.merlin.resource.AbstractLifestyleHandler.createInstance(Unknown 
Source)
          at 
org.apache.excalibur.merlin.resource.SingletonLifestyleHandler.get(Unknown Source)
  
  Revision  Changes    Path
  1.16      +3 -1      
jakarta-avalon-cornerstone/src/java/org/apache/avalon/cornerstone/blocks/threads/DefaultThreadManager.java
  
  Index: DefaultThreadManager.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-avalon-cornerstone/src/java/org/apache/avalon/cornerstone/blocks/threads/DefaultThreadManager.java,v
  retrieving revision 1.15
  retrieving revision 1.16
  diff -u -r1.15 -r1.16
  --- DefaultThreadManager.java 17 Aug 2002 02:24:25 -0000      1.15
  +++ DefaultThreadManager.java 18 Aug 2002 01:06:30 -0000      1.16
  @@ -12,6 +12,7 @@
   import org.apache.excalibur.threadcontext.ThreadContext;
   import org.apache.avalon.excalibur.thread.ThreadPool;
   import org.apache.avalon.excalibur.thread.impl.DefaultThreadPool;
  +import org.apache.avalon.framework.component.Component;
   import org.apache.avalon.framework.configuration.Configurable;
   import org.apache.avalon.framework.configuration.Configuration;
   import org.apache.avalon.framework.configuration.ConfigurationException;
  @@ -23,11 +24,12 @@
    * @phoenix:block
    * @phoenix:service 
name="org.apache.avalon.cornerstone.services.threads.ThreadManager"
    *
  + * @author <a href="mailto:[EMAIL PROTECTED]";>Stephen McConnell</a>
    * @author <a href="mailto:peter at apache.org">Peter Donald</a>
    */
   public class DefaultThreadManager
       extends AbstractLogEnabled
  -    implements ThreadManager, Configurable
  +    implements ThreadManager, Configurable, Component
   {
       ///Map of thread pools for application
       private HashMap m_threadPools = new HashMap();
  
  
  

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to