cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Giacomo Pati <giac...@apache.org>
Subject Re: [C2] DataSourcese Proposal (first draft)
Date Fri, 12 Jan 2001 06:14:18 GMT
Berin Loritsch wrote:
> 
> Giacomo Pati wrote:
> 
> > Berin Loritsch wrote:
> 
> >>>
> >>> Ok. But as for the code in the CVS if you use the dburl to specify
> >>> user/password or if you have a user without a password and you only
> >>> specify empty user and/or password elements you'll get an exception,
> >>> right?
> >
> >>
> >> Huh?  That's a mouthful.  Lets see if I can answer it a piece at a time:
> 
> >> user--OPTIONAL (not everyone in test environments deals with logins)--No Exception
thrown unless JDBC driver throws it
> >
> > Optional mean what? Empty element or no element at all?
> 
> Meaning no element at all
> 
> >> password--REQUIRED when user is supplied--Exception is thrown on violation
> 
> > When you talk about test environment there are cases where you don't
> >
> > have a password for a user. Or the DBMS dosn't allow logins without a
> >
> > name but without a password. I work with postgresql DBMS which allows
> >
> > you to login without a password if your connection comes from localhost
> >
> > but requires one if you login from remote.
> 
> OK.  I can change it to make username AND password optional.

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.

Giacomo

> 
> No problem there.
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
> For additional commands, email: cocoon-dev-help@xml.apache.org

Mime
View raw message