Return-Path: Delivered-To: apmail-db-derby-user-archive@www.apache.org Received: (qmail 79200 invoked from network); 22 Oct 2005 20:03:16 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 22 Oct 2005 20:03:16 -0000 Received: (qmail 10524 invoked by uid 500); 22 Oct 2005 20:03:15 -0000 Delivered-To: apmail-db-derby-user-archive@db.apache.org Received: (qmail 10502 invoked by uid 500); 22 Oct 2005 20:03:15 -0000 Mailing-List: contact derby-user-help@db.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: List-Id: Reply-To: "Derby Discussion" Delivered-To: mailing list derby-user@db.apache.org Received: (qmail 10487 invoked by uid 99); 22 Oct 2005 20:03:15 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 22 Oct 2005 13:03:15 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: neutral (asf.osuosl.org: local policy) Received: from [32.97.110.153] (HELO e35.co.us.ibm.com) (32.97.110.153) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 22 Oct 2005 13:03:13 -0700 Received: from d03relay04.boulder.ibm.com (d03relay04.boulder.ibm.com [9.17.195.106]) by e35.co.us.ibm.com (8.12.11/8.12.11) with ESMTP id j9MK2r85008463 for ; Sat, 22 Oct 2005 16:02:53 -0400 Received: from d03av02.boulder.ibm.com (d03av02.boulder.ibm.com [9.17.195.168]) by d03relay04.boulder.ibm.com (8.12.10/NCO/VERS6.7) with ESMTP id j9MK3mth543112 for ; Sat, 22 Oct 2005 14:03:48 -0600 Received: from d03av02.boulder.ibm.com (loopback [127.0.0.1]) by d03av02.boulder.ibm.com (8.12.11/8.13.3) with ESMTP id j9MK2q8x030471 for ; Sat, 22 Oct 2005 14:02:52 -0600 Received: from [127.0.0.1] (sig-9-48-121-113.mts.ibm.com [9.48.121.113]) by d03av02.boulder.ibm.com (8.12.11/8.12.11) with ESMTP id j9MK2ifg030386 for ; Sat, 22 Oct 2005 14:02:48 -0600 Message-ID: <435A9AE2.7020204@debrunners.com> Date: Sat, 22 Oct 2005 13:02:42 -0700 From: Daniel John Debrunner User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.3) Gecko/20040910 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Derby Discussion Subject: Re: SQL Exception: Connection refused : Invalid authentication. References: <58ed70f50510210833r1f9f1585m1060ab190aa97037@mail.gmail.com> <435A8FA2.4040606@debrunners.com> In-Reply-To: X-Enigmail-Version: 0.90.0.0 X-Enigmail-Supports: pgp-inline, pgp-mime Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N 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. Dan.