db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Suresh Thalamati <suresh.thalam...@gmail.com>
Subject [PATCH] fix for DERBY-235 ( unable to create a database using a different storage factory than the one provided by default with the engine)
Date Fri, 29 Apr 2005 23:15:40 GMT

Problem was service name on database creation  was getting just set to 
the canonical name of the database directory
without subsub protocol name added in the beginning. Whereas rest of the 
system seems to expect that the
subsub protocol name  also is part of the  service  name.  For example 
if "csf" is  subprotocol name ,
service name should be  "csf:C:\suresht\databases\wombat1" not just 
"C:\suresht\databases\wombat1".
Attached diff fixes the problem by  prefixing the subsub protocol name  
to the canonical name, to generate
the service name in the case of create also.

This was not an issue with default "directory"  subsub protocol because 
the system consistently generates
the service name as just the canonical name of  the service root.

Another doubt I had while fixing this issue why we generate the service 
name after creating the service root,
my guess is because of the following comment in the java docs for 
java.io.File.getCanonicalPath() method:
" Every pathname that denotes an existing file or directory has a unique 
canonical form. Every pathname that
 denotes a nonexistent file or directory also has a unique canonical 
form. The canonical form of the pathname of a
 nonexistent file or directory may be different  from the canonical form 
of the same pathname after the file or
directory is created. Similarly, the canonical form of the pathname of 
an existing file or directory may be different from the
canonical form of the same pathname after the file or directory is deleted.
"

Tests:  Ran derbyall ; all tests passed.


Thanks
-suresh


Mime
View raw message