db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kmars...@apache.org
Subject svn commit: r1208775 - /db/derby/code/trunk/java/engine/org/apache/derby/impl/services/monitor/StorageFactoryService.java
Date Wed, 30 Nov 2011 20:58:23 GMT
Author: kmarsden
Date: Wed Nov 30 20:58:23 2011
New Revision: 1208775

URL: http://svn.apache.org/viewvc?rev=1208775&view=rev
Log:
DERBY-5096 DisconnectException: "Connection was refused because the database DB was not found"
when 
creating db for first time

Change to unconditionally setCononicalName after the database directory is created.



Modified:
    db/derby/code/trunk/java/engine/org/apache/derby/impl/services/monitor/StorageFactoryService.java

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/services/monitor/StorageFactoryService.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/services/monitor/StorageFactoryService.java?rev=1208775&r1=1208774&r2=1208775&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/services/monitor/StorageFactoryService.java
(original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/services/monitor/StorageFactoryService.java
Wed Nov 30 20:58:23 2011
@@ -760,12 +760,11 @@ final class StorageFactoryService implem
                             if (serviceDirectory.mkdirs())
                             {
                                 serviceDirectory.limitAccessToOwner();
-                                // DERBY-5096 On iseries, the storageFactory canonicalName
may need to be adjusted
-                                // for casing after the directory is created.
+                                // DERBY-5096. The storageFactory canonicalName may need
to be adjusted
+                                // for casing after the directory is created. Just reset
it after making the 
+                                // the directory to make sure.
                                 String serviceDirCanonicalPath = serviceDirectory.getCanonicalPath();
-                                if (storageFactory.getCanonicalName() != serviceDirCanonicalPath)
{
-                                    storageFactory.setCanonicalName(serviceDirCanonicalPath);
-                                }
+                                storageFactory.setCanonicalName(serviceDirCanonicalPath);
                                 try
                                 {
                                     return storageFactory.getCanonicalName();



Mime
View raw message