Return-Path: Delivered-To: apmail-db-derby-dev-archive@www.apache.org Received: (qmail 96906 invoked from network); 23 Apr 2007 02:59:37 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 23 Apr 2007 02:59:37 -0000 Received: (qmail 22202 invoked by uid 500); 23 Apr 2007 02:59:44 -0000 Delivered-To: apmail-db-derby-dev-archive@db.apache.org Received: (qmail 21979 invoked by uid 500); 23 Apr 2007 02:59:43 -0000 Mailing-List: contact derby-dev-help@db.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: Delivered-To: mailing list derby-dev@db.apache.org Received: (qmail 21967 invoked by uid 99); 23 Apr 2007 02:59:43 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 22 Apr 2007 19:59:43 -0700 X-ASF-Spam-Status: No, hits=-100.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO brutus.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 22 Apr 2007 19:59:35 -0700 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 804F271406C for ; Sun, 22 Apr 2007 19:59:15 -0700 (PDT) Message-ID: <4247572.1177297155523.JavaMail.jira@brutus> Date: Sun, 22 Apr 2007 19:59:15 -0700 (PDT) From: "Myrna van Lunteren (JIRA)" To: derby-dev@db.apache.org Subject: [jira] Commented: (DERBY-2296) getProperties method deprecated on ClientDataSource In-Reply-To: <2182661.1170801425495.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/DERBY-2296?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12490767 ] Myrna van Lunteren commented on DERBY-2296: ------------------------------------------- Release Note text attempt: PROBLEM: With version 10.2.1.6 an incompatibility with 10.1.1.0 was introduced - since revision 393003, the undocumented, non-standard but previously public method, getProperties for Client DataSources was removed for security reasons. This leaves only the setConnectionAttributes method available for creating or shutting down a database. For instance, in Geronimo the getProperties method was previously used to inquire and set whether a create=true was set for a database. It would be helpful if ClientDataSource could have the same methods available as EmbeddedDataSource: setCreateDatabase (String) getCreateDatabase() setShutdownDatabase (String) getShutdownDatabase() SYMPTOM The getProperties() method is no longer available, nor are alternative methods except the setConnectionAttributes(String) and getConnectionAttributes() methods. CAUSE The getProperties() method was removed as part of DERBY-446; make ClientDataSource use public getter and setter methods as standard for Java bean properties. It should not have been public. SOLUTION 4 new public methods were created for ClientDataSource: setCreateDatabase (String) getCreateDatabase() setShutdownDatabase (String) getShutdownDatabase() These methods should behave similarly to the ones in Embedded, i.e. only valid value for setCreateDatabase is "create", and for setShutdownDatabase is "shutdown". In essence, at connection time, if set to a valid value, the property is passed on to the server side with the ConnectionAttributes. Note, that the result for setting contradicting properties for createDatabase and ShutdownDatabase, whether through setCreateDatabase("create") and setShutdownDatabase("shutdown") or via setConnectionAttributes("create=true") or ("shutdown=true") is undefined. WORKAROUND set and get of ConnectionAttributes can be used to create or shutdown a database. INCOMPATIBILITIES: none from 10.2.1.6 to 10.3 REQUIRED CHANGES TO EXISTING APPLICATIONS: there are no required changes. Applications can now use the setCreateDatabase, getCreateDatabase, setShutdownDatabase, and getShutdownDatabase methods with DerbyNetClient as well as with Embedded. > getProperties method deprecated on ClientDataSource > --------------------------------------------------- > > Key: DERBY-2296 > URL: https://issues.apache.org/jira/browse/DERBY-2296 > Project: Derby > Issue Type: Bug > Components: Network Client > Affects Versions: 10.2.1.6, 10.2.2.0 > Environment: All > Reporter: Matt Hogstrom > Assigned To: Myrna van Lunteren > Fix For: 10.3.0.0 > > Attachments: DERBY-2296_20070412.diff, DERBY-2296_20070413.diff > > > Not sure exactly where this was deprecated but on Client DataSources it appears that the getProperties method was made private. In Geronimo we were using this to inquire and set whether a create=true was set for a database. > We are moving from 10.1.3.1 to 10.2.1.6 (or perhaps 10.2.2.0) for our next version which we are targetting for April of this year. > Is it possible to add the following methods on the ClientDataSource: > setCreateDatabase (String) > getCreateDatabase() > setShutdownDatabase (String) > getShutdownDatabase() > as they are on the EmbeddedDataSource? -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.