Hello Avalon gurus,

I have configured a datasource selector component like this:

<data-sources>
   <data-source name="oracle" 
        class="org.apache.avalon.excalibur.datasource.JdbcDataSource">
     <pool-controller min="5" max="10" 
 
connection-class="org.apache.avalon.excalibur.datasource.JdbcConnection">
       <keep-alive disable="false">select 1 from dual</keep-alive>
     </pool-controller>
     <driver>oracle.jdbc.driver.OracleDriver</driver>
     <dburl>jdbc:oracle:thin:@10.0.0.1:1521:SRV</dburl>
     <user>XXX</user>
     <password>XXX</password>
   </data-source>
 </data-sources>

The other configuration part is:
<db-pool pickup="oracle" submit="oracle"/>

But when I am trying to retrieve the Datasource component with the name
"oracle" from the Datasource selector I get the following error
(Reason: Unable to provide DataSourceComponent for oracle)

The block is declared.

Here is my code snippet:
private DataSourceComponent dsPickup = null;
private DataSourceComponent dsSubmit = null;

dsSelector = (ComponentSelector)manager.lookup(
                DataSourceSelector.ROLE);
dsPickup = (DataSourceComponent)
            dsSelector.select (poolConfig.getAttribute("pickup"));

Could you provide me some infos on this.

THX a lot,
Guillaume Kieffer

Reply via email to