db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Deepa Remesh <drem...@gmail.com>
Subject Re: [jira] Commented: (DERBY-597) Enhance ij connect statement to work in J2ME/CDC/FP
Date Tue, 25 Oct 2005 16:52:18 GMT
>
> As for ij.dataSource.createDatabase, why should we ignore it for  subsequent connects?
>

When we make a connection using connect statement, we want to use the
information in the URL. If the database has to be created,
'create=true' will be specified as part of the URL. If 'create'
attribute is not specified, it means we are trying to get a connection
to an existing database. So ij.dataSource.createDatabase is not used
when we are using the information in the URL.

When I looked into this some more, I think we have to use only the
information in the URL when getting a connection from
'connectStatement'. Currently, I use some values from the URL and some
from ij.dataSource.* properties. This may cause conflicts as in the
following example.

For e.g if I have set the following property
ij.dataSource.connectionAttributes=logDevice=C:/dbLog

and then I call
ij> connect 'newDB;logDevice=C:/newDBLog';

This will cause a conflict in the value of 'logDevice' attribute. In
this case, I think we should be using the value specified in the URL.

To avoid such conflicts, I would like to use two methods I had
mentioned in my previous comment:
1. setupDataSoureFromProperties, which will use values in
ij.dataSource.* properties. This method will be called from startJBMS.
2. setupDataSourceFromUrl, which will use *only* values in the URL.
This will be called from connectStatement.

If this seems okay, I can submit a follow-on patch for this.

Thanks,
Deepa

Mime
View raw message