db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jean T. Anderson" <...@bristowhill.com>
Subject Re: Driver autoloading and engine booting
Date Mon, 19 Jun 2006 22:45:03 GMT
Jean T. Anderson wrote:
> Rick Hillegas wrote:
>>Jean T. Anderson wrote:
>>>Rick Hillegas wrote:
> ...
>>>Does the "precedence for properties" documentation need to be updated to
>>>mention jdbc 4/jdk 1.6 behavior?
>>>
>>>http://db.apache.org/derby/docs/dev/tuning/ctunsetprop23308.html
> 
>>I don't see that the precedence of properties has changed. What has
>>changed is when we read properties during the lifetime of a vm.
>>
>>Driver-autoloading does require many other edits to the user guides.
>>They are summarized in DERBY-1271.
>  
> ok, good, thanks for the clarification.

I take the "ok" back based on Kathey's post to derby-user [1].

The actual precedence for a static variable will be whatever was visible
when another driver caused derby to be autoloaded, possibly before the
application set that property.

Kathey's derby.system.home example is probably the most likely confusion
to occur.

Let's say my application connects to MySQL to migrate a database to
Derby. When I connect to that MySQL database, the embedded derby driver
gets loaded and the embedded engine gets booted. Later, my application
calls System.setProperty("derby.system.home",
"/home/jta/DerbyDatabases") and creates the new derby database. But it
doesn't get created where I expected -- the derby.system.home I set is
ignored because the derby engine was already booted.

 -jean

[1]
http://mail-archives.apache.org/mod_mbox/db-derby-user/200606.mbox/%3c449712A1.8090507@sbcglobal.net%3e



Mime
View raw message