db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andrew McIntyre (JIRA)" <derby-...@db.apache.org>
Subject [jira] Updated: (DERBY-1217) ij should default to protocol 'jdbc:derby:' if no protocol is passed in through ij.protocol
Date Mon, 17 Jul 2006 05:57:15 GMT
     [ http://issues.apache.org/jira/browse/DERBY-1217?page=all ]

Andrew McIntyre updated DERBY-1217:

    Attachment: derby-1217-pre.diff

Attaching preliminary patch to set the default protocol for ij to "jdbc:derby:"

This allows a user to not set the system property ij.protocol, and connect to an embedded
Derby db by default. This is meant for discussion only.

This allows you to do the following in ij, if network server is running:

connect 'mydb;create=true';  -- //embedded
create table t1 (i1 int);
insert into t1 values (1);
select * from t1;
connect 'jdbc:derby://localhost/mydb2;create=true';
create table t1 (i1 int, i2 int);
insert into t1 values (1, 2);
select * from t1;
set connection CONNECTION0;
select * from t1; -- // shows the one column from the embedded db
set connection CONNECTION1;
select * from t1; -- // shows the two columns from network server

I haven't checked the behavior w/r/t to J2ME and datasources but from inspection of the code,
I don't think they are affected. Also, any negative effect w/r/t/ J2ME could be handled as
a part of DERBY-1218. which is related to this issue.

The intended effect is that in a simple scenario, with derby embedded, one could connect to
one or more databases without needing to know the JDBC URL syntax. This is intended as an
ease-of-development feature for ij. If it turns out to be seriously problematic in some environment,
we should probably close this bug as Won't Fix. However, initial discussion of this issue
seemed encouraging:


Runs of derbylang and derbytools look encouraging. However, i have not yet tested this patch
with ij and databases whose URL does not begin with 'jdbc:'. There is a potential for problem
in that case, so I would appreciate it if others could take a look at the patch and provide

Any feedback as to whether this would be useful or not would be great. There i clearly some
doc impact if we decide to go this route.

Opinions, thoughts?


> ij should default to protocol 'jdbc:derby:' if no protocol is passed in through ij.protocol
> -------------------------------------------------------------------------------------------
>                 Key: DERBY-1217
>                 URL: http://issues.apache.org/jira/browse/DERBY-1217
>             Project: Derby
>          Issue Type: Improvement
>          Components: Tools
>    Affects Versions:,
>            Reporter: Andrew McIntyre
>            Priority: Minor
>         Attachments: derby-1217-pre.diff
> If no default protocol is set by passing in one with ij.protocol, ij should default to
'jdbc:derby:' .
> See the thread 'default ij protocol' for details:
> http://mail-archives.apache.org/mod_mbox/db-derby-dev/200602.mbox/%3c54ac72d70602241019r21243835m87072f683e7bcae1@mail.gmail.com%3e

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


View raw message