cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Harald Wehr <hw...@hs-harz.de>
Subject Re: ClassCastException for Postgres datasource in Generator
Date Mon, 15 Dec 2003 14:06:40 GMT
Carsten Ziegeler wrote:
> Vadim Gritsenko wrote:
> 
>>So, to answer Harald's question, he should use Serviceable instead of 
>>Composable, and may be file a bug against avalon excalibur component 
>>manager (Carsten? any info on this?)
>>
> 
> Afaik, this is not considered a bug :) Cocoon is based on the ECM which
> is a ComponentManager. But you can use Serviceable and in that case
> still the ComponentManager is used which requires the Component interface.
> 

So i changed my Generator to not implement the Composable but the 
Serviceable interface. But that didn't work either. Here is my 
service-method:

public void service(ServiceManager manager) throws ServiceException {
   System.out.println("in Service");
   serviceSelector selector =
			(ServiceSelector) manager.lookup(
				DataSourceComponent.ROLE + "Selector");
   this.datasource = (DataSourceComponent) selector.select("vrgis");
}

Is this method right or do I have to implement something else here?

Harald



Mime
View raw message