db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daniel John Debrunner <...@debrunners.com>
Subject Re: SQL Exception: Connection refused : Invalid authentication.
Date Sat, 22 Oct 2005 20:02:42 GMT
Arne Anka wrote:

>> You use SYSCS_SET_DATABASE_PROPERTY to define the user in the database
>> for the builtin authentication scheme. Eg.
>> SYSCS_UTIL.SYSCS_SET_DATABASE_PROPERTY('derby.user.arne','cat76dog')");
>> Then when you connect to derby you pass in the user name and password
>> values using the property keys 'user' and 'password'. This is because
>> user/password is the standard as defined by JDBC.
>> E.g.
>> prop.setProperty("user", "arne");
>> prop.setProperty("password", "cat76dog");
> sounds good (and obvious ;-). have to test monday when i'm back in office.
> but it's not really clear to me why it works the first time. after all,
> to  read from my db a acquire a new connection with the
> properties-object ...

I think it's because with the first connection, a newly created
database, there is no authentication enabled so Derby allows any
connection request to succeed, even those where a user name is not supplied.


View raw message