avalon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Carsten Ziegeler" <cziege...@s-und-n.de>
Subject RE: cvs commit: jakarta-avalon-excalibur/sourceresolve/src/java/org/apache/excalibur/source/impl SourceResolverImpl.java
Date Fri, 17 Jan 2003 06:50:51 GMT
Hi Berin,

where do you have classcast exceptions - inside Cocoon the old version was
successfully running - with your changes Cocoon is not running anymore
becase we don't have a ServiceSelector right now for the source factories
and afaik there is now implementation like the ExcaliburComponentSelector
for a ServiceSelector right now, right?

Carsten

> -----Original Message-----
> From: bloritsch@apache.org [mailto:bloritsch@apache.org]
> Sent: Thursday, January 16, 2003 10:27 PM
> To: jakarta-avalon-excalibur-cvs@apache.org
> Subject: cvs commit:
> jakarta-avalon-excalibur/sourceresolve/src/java/org/apache/excalibur/sou
> rce/impl SourceResolverImpl.java
> 
> 
> bloritsch    2003/01/16 13:27:05
> 
>   Modified:    sourceresolve/src/java/org/apache/excalibur/source/impl
>                         SourceResolverImpl.java
>   Log:
>   hopefully fix the runtime classcast exception.  A 
> ServiceManager should never return a ComponentSelector--it would 
> return a ServiceSelector if anything.
>   
>   Revision  Changes    Path
>   1.21      +6 -7      
> jakarta-avalon-excalibur/sourceresolve/src/java/org/apache/excalib
> ur/source/impl/SourceResolverImpl.java
>   
>   Index: SourceResolverImpl.java
>   ===================================================================
>   RCS file: 
> /home/cvs/jakarta-avalon-excalibur/sourceresolve/src/java/org/apac
> he/excalibur/source/impl/SourceResolverImpl.java,v
>   retrieving revision 1.20
>   retrieving revision 1.21
>   diff -u -r1.20 -r1.21
>   --- SourceResolverImpl.java	9 Jan 2003 09:37:20 -0000	1.20
>   +++ SourceResolverImpl.java	16 Jan 2003 21:27:05 -0000	1.21
>   @@ -61,8 +61,6 @@
>    import java.util.Map;
>    
>    import org.apache.avalon.framework.activity.Disposable;
>   -import org.apache.avalon.framework.component.ComponentSelector;
>   -import org.apache.avalon.framework.component.ComponentException;
>    import org.apache.avalon.framework.context.Context;
>    import org.apache.avalon.framework.context.ContextException;
>    import org.apache.avalon.framework.context.Contextualizable;
>   @@ -72,6 +70,7 @@
>    import org.apache.avalon.framework.parameters.Parameters;
>    import org.apache.avalon.framework.service.ServiceException;
>    import org.apache.avalon.framework.service.ServiceManager;
>   +import org.apache.avalon.framework.service.ServiceSelector;
>    import org.apache.avalon.framework.service.Serviceable;
>    import org.apache.avalon.framework.thread.ThreadSafe;
>    import org.apache.excalibur.source.Source;
>   @@ -115,7 +114,7 @@
>        protected ServiceManager m_manager;
>    
>        /** The special Source factories */
>   -    protected ComponentSelector m_factorySelector;
>   +    protected ServiceSelector m_factorySelector;
>    
>        /** The context */
>        protected Context m_context;
>   @@ -174,7 +173,7 @@
>            throws ServiceException
>        {
>            m_manager = manager;
>   -        m_factorySelector = 
> (ComponentSelector)m_manager.lookup( SourceFactory.ROLE + "Selector" );
>   +        m_factorySelector = (ServiceSelector)m_manager.lookup( 
> SourceFactory.ROLE + "Selector" );
>        }
>    
>        public void dispose()
>   @@ -308,7 +307,7 @@
>                    factory = 
> (SourceFactory)m_factorySelector.select( protocol );
>                    source = factory.getSource( systemID, parameters );
>                }
>   -            catch( final ComponentException ce )
>   +            catch( final ServiceException ce )
>                {
>                	// no selector available, use fallback
>                    //throw new SourceException( "Unable to select 
> source factory for protocol " + protocol, ce );
>   @@ -385,7 +384,7 @@
>                factory = (SourceFactory)m_factorySelector.select( 
> protocol );
>                factory.release( source );
>            }
>   -        catch( ComponentException ce )
>   +        catch( ServiceException ce )
>            {
>            	//no factory available, so use fallback
>                //throw new CascadingRuntimeException( "Unable to 
> select source factory for protocol " + protocol, ce );
>   
>   
>   
> 
> --
> To unsubscribe, e-mail:   
> <mailto:avalon-cvs-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail: 
> <mailto:avalon-cvs-help@jakarta.apache.org>
> 

--
To unsubscribe, e-mail:   <mailto:avalon-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:avalon-dev-help@jakarta.apache.org>


Mime
View raw message