[ 
http://issues.apache.org/jira/browse/DERBY-406?page=comments#action_12315168 ] 

Daniel John Debrunner commented on DERBY-406:
---------------------------------------------

Committed Revision: 209498 ( Derby406_409_410.patch)
As Phil pointed out,  DERBY-273 already covers the test failure.

I do not believe that this patch fully addresses these issues so they should 
not be closed, though it is good progress.
My concern is about the concept of defaults for DataSource properties, in these 
cases

406 - user - default of APP
409 - connectionAttributes - default of  empty string
410 - serverName -  default of localhost

All these properties are set to the default when the object is created, however 
if the values are set to null
(e.g. setConnecitonAttributes(null)) then should their values revert to the 
default or remain at null?
Existing data sources do not have any properties that have a default.

In the case that the property remains at null, then tests would be needed to 
ensure null is handled correctly,
at least for connectionAttributes I think a NullPointerException will occur.


> Client DataSource should not require user property to be set
> ------------------------------------------------------------
>
>          Key: DERBY-406
>          URL: http://issues.apache.org/jira/browse/DERBY-406
>      Project: Derby
>         Type: Bug
>   Components: Network Client
>     Versions: 10.1.1.0, 10.2.0.0
>     Reporter: Kathey Marsden
>     Assignee: Philip Wilder
>  Attachments: DataSourceNoUser.java, Derby406_409_410.patch
>
> ClientDataSource should not require user to be set.  It should default to 
> user APP as described in:
> http://incubator.apache.org/derby/docs/adminguide/cadminappsclient.html
> This all seems to work ok for for DriverManager connections but fails for 
> ClientDataSource 
> run the attached repro 
> $ java DataSourceNoUser
> embedded no userid/password
> client userid/password set
> client no password
> client no userid/no password
> org.apache.derby.client.am.SqlException: null userid not supported
>         at 
> org.apache.derby.client.net.NetConnection.checkUser(NetConnection.java:998)
>         at 
> org.apache.derby.client.net.NetConnection.flowConnect(NetConnection.java:380)
>         at 
> org.apache.derby.client.net.NetConnection.initialize(NetConnection.java:233)
>         at 
> org.apache.derby.client.net.NetConnection.<init>(NetConnection.java:201)
>         at 
> org.apache.derby.jdbc.ClientDataSource.getConnection(ClientDataSource.java:156)
>         at 
> org.apache.derby.jdbc.ClientDataSource.getConnection(ClientDataSource.java:135)
>         at DataSourceNoUser.main(DataSourceNoUser.java:42)

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira

Reply via email to