cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeremy Quinn <jer...@media.demon.co.uk>
Subject Re: Problems with Quartz JobStore
Date Mon, 08 Nov 2004 14:26:56 GMT

On 8 Nov 2004, at 14:15, Vadim Gritsenko wrote:

> Unico Hommes wrote:
>> What if, instead of using the short names <datasources> and <jdbc>, 

>> you declare the datasource like so:
>> <component  
>> role="org.apache.avalon.excalibur.datasource.DataSourceComponent/ 
>> quartz"
>>   
>> class="org.apache.avalon.excalibur.datasource.ResourceLimitingJdbcData 
>> Source">      <pool-controller max="10" min="5"/>
>>      <dburl>jdbc:postgresql://localhost/quartz</dburl>
>>      <user>cocoon</user>
>>      <password>*************</password>
>> </component>
>> I was under the impression that ECM would transparently map the short  
>> name form and the above form to the same lookup semantics.  
>> (serviceManager.lookup(DataSourceComponent.ROLE + "/quartz")) Perhaps  
>> I was wrong and it is only Fortress that does that.
>
> You have to lookup selector first, and then, "quartz" from selector.

I adjusted DataSourceComponentConnectionProvider to do it this way, but  
I still get no datasource found .... all of the database samples that  
use 'personnel' still work fine though.

     public DataSourceComponentConnectionProvider(String dsName,  
ServiceManager manager) throws ConfigurationException {
         m_manager = manager;
         try {
             // used to do it like this :
             //m_ds = (DataSourceComponent)  
m_manager.lookup(DataSourceComponent.ROLE + "/" + dsName);

             dbselector = (ServiceSelector)  
m_manager.lookup(DataSourceComponent.ROLE + "Selector");
             m_ds = (DataSourceComponent) this.dbselector.select(dsName);

         }
         catch (ServiceException e) {
             //throw new ConfigurationException("No datasource available  
by that name: " + dsName);
             throw new ConfigurationException(e.getMessage());
         }
     }

ERROR   (2004-11-08) 14:25.32:313   [core.manager] (Unknown-URI)  
Unknown-thread/ExcaliburComponentManager: Caught an exception trying to  
initialize the component handler.
org.apache.avalon.framework.configuration.ConfigurationException:  
datasources: ComponentSelector could not find the component for hint  
[quartz] (key [quartz])  
(Key='org.apache.avalon.excalibur.datasource.DataSourceComponentSelector 
/quartz')
	at  
org.apache.cocoon.components.cron.DataSourceComponentConnectionProvider. 
<init>(DataSourceComponentConnectionProvider.java:50)
	at  
org.apache.cocoon.components.cron.QuartzJobScheduler.createJobStore(Quar 
tzJobScheduler.java:738)

  . . . .

So still no idea what I am doing wrong with <datasources/>

regards Jeremy

--------------------------------------------------------

                   If email from this address is not signed
                                 IT IS NOT FROM ME

                         Always check the label, folks !!!!!
--------------------------------------------------------


Mime
View raw message