db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Myrna van Lunteren (JIRA)" <j...@apache.org>
Subject [jira] Commented: (DERBY-2296) getProperties method deprecated on ClientDataSource
Date Mon, 23 Apr 2007 02:59:15 GMT

    [ 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.


Mime
View raw message