cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Berin Loritsch <blorit...@apache.org>
Subject Re: [C2] DataSourcese Proposal (first draft)
Date Fri, 12 Jan 2001 14:02:16 GMT
Giacomo Pati wrote:

> Berin Loritsch wrote:
> 
> 
>> Giacomo Pati wrote:
> 
> 
> The point is I cannot see how one make one thing mandatore or optional.
> 
> The code found in the JdbcDataSource is
> 
> 
> 
>             String dburl = conf.getChild("dburl").getValue();
> 
>             String user = conf.getChild("user").getValue();
> 
>             String passwd = conf.getChild("password").getValue();
> 
> 
> 
> You've said that dburl is required but user can be optional and password
> 
> depends if a user was specified. But the code above dosn't show how this
> 
> is validated.
> 

You are right, I am wrong.  The code has been changed (will be committed
soon) to reflect that.  (I know what I was thinking... ;))

The .getValue() still throws an exception when none is available.

I added checks to see if the "user" and "password" configuration elements
were generated, and then the JdbcConnectionPool is initialized with two
potentially null values (user/password).  The actual logic for how those
attributes are used is in the JdbcConnectionPool code.


Mime
View raw message