You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-dev@db.apache.org by Mamta Satoor <ms...@gmail.com> on 2007/02/13 05:58:15 UTC

Duplicate attributes in JDBC url gives a warning and Derby uses the last value in the url for that attribute. Is that expected behavior?

Hi,

I wanted to check with the community before entering anything in the Jira. I
am adding a new jdbc url attribute for DERBY-1478 and while testing it out,
I tried giving multiple values for that attribute and found that the
existing Derby code gives warning for multiple occurence of the attribute in
the url and uses the last value specified in the url.

For instance, I tried following for the *existing* terriotry property to
test out Derby behavior for duplicate values
$ java -Dij.exceptionTrace=true org.apache.derby.tools.ij
ij version 10.3
ij> connect
'jdbc:derby:c:/dellater/db1;create=true;territory=it;territory=fr';
URL Attribute [territory=it]
   Attribute is a duplicate.
URL Attribute [territory=fr]
   Attribute is a duplicate.
ij> exit;

The value in services.properties is fr ie Derby picked the last value for
territory from the JDBC url.

My question is that is it ok to just give the warning and use the last value
for duplicate attributes in the jdbc url? I will enter something in Jira if
community thinks that this behavior should be changed. This is not a major
issue but I was just surprised by the behavior and had expected to see an
exception rather than a warning.

Mamta