avalon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Berin Loritsch" <blorit...@apache.org>
Subject RE: [DataSource] Newbie question..
Date Fri, 14 Jun 2002 13:39:39 GMT
> From: Kieffer, Guillaume [mailto:Guillaume.Kieffer@paybox.net] 
> 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.JdbcC
> onnection">
>        <keep-alive disable="false">select 1 from dual</keep-alive>
>      </pool-controller>
>      <driver>oracle.jdbc.driver.OracleDriver</driver>
>      <dburl>jdbc:oracle:thin:@</dburl>
>      <user>XXX</user>
>      <password>XXX</password>
>    </data-source>
>  </data-sources>

The first thing I would suggest to you is to remove the
The JdbcDataSourceComponent can detect at runtime if you are using JDK
or JDK 1.2-1.3.  If you explicitly declare the connection-class, then
you are effectively forcing yourself into a specific JDK class.

It provides problems when you develop on JDK 1.3 and then deploy on JDK

It should only be used in rare circumstances where you absolutely need
provide that functionality.

> 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.

First question is are you using this from the ExcaliburComponentManager
(ECM), or from Pheonix?  your use of the word "block" suggests the

The most detail is derived from the logs.  Please check out what the
logs tell you, as they print out the exact cause of the error.

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

View raw message