db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kmars...@apache.org
Subject svn commit: r1209580 - in /db/derby/code/branches/10.7: ./ java/engine/org/apache/derby/impl/io/ java/engine/org/apache/derby/impl/services/monitor/ java/engine/org/apache/derby/io/ java/testing/org/apache/derbyTesting/functionTests/util/corruptio/
Date Fri, 02 Dec 2011 16:57:00 GMT
Author: kmarsden
Date: Fri Dec  2 16:56:59 2011
New Revision: 1209580

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



Modified:
    db/derby/code/branches/10.7/   (props changed)
    db/derby/code/branches/10.7/java/engine/org/apache/derby/impl/io/BaseStorageFactory.java
    db/derby/code/branches/10.7/java/engine/org/apache/derby/impl/io/VFMemoryStorageFactory.java
    db/derby/code/branches/10.7/java/engine/org/apache/derby/impl/services/monitor/StorageFactoryService.java
    db/derby/code/branches/10.7/java/engine/org/apache/derby/io/StorageFactory.java
    db/derby/code/branches/10.7/java/testing/org/apache/derbyTesting/functionTests/util/corruptio/CorruptBaseStorageFactory.java

Propchange: db/derby/code/branches/10.7/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri Dec  2 16:56:59 2011
@@ -1 +1,2 @@
-/db/derby/code/trunk:1035603,1036769,1038514,1038813,1039084,1039268,1040658,1041338,1043227,1043389,1044096,1051026,1053724,1055169,1059888,1060480,1062096,1063809,1065061,1066290,1067250,1067357,1069661,1071463,1071886,1076335,1076387,1078461,1078608,1078693,1081072,1081455,1081568,1085078,1091000,1097247,1103681,1103718,1128243,1129136,1130632,1130895,1131272,1132664,1136363,1138341,1138444,1139449,1141924,1164370
+/db/derby/code/branches/10.8:1209228,1209284
+/db/derby/code/trunk:1035603,1036769,1038514,1038813,1039084,1039268,1040658,1041338,1043227,1043389,1044096,1051026,1053724,1055169,1059888,1060480,1062096,1063809,1065061,1066290,1067250,1067357,1069661,1071463,1071886,1076335,1076387,1078461,1078608,1078693,1081072,1081455,1081568,1085078,1091000,1097247,1103681,1103718,1128243,1129136,1130632,1130895,1131272,1132664,1136363,1138341,1138444,1139449,1141924,1164370,1203050,1207729,1208775,1209228

Modified: db/derby/code/branches/10.7/java/engine/org/apache/derby/impl/io/BaseStorageFactory.java
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.7/java/engine/org/apache/derby/impl/io/BaseStorageFactory.java?rev=1209580&r1=1209579&r2=1209580&view=diff
==============================================================================
--- db/derby/code/branches/10.7/java/engine/org/apache/derby/impl/io/BaseStorageFactory.java
(original)
+++ db/derby/code/branches/10.7/java/engine/org/apache/derby/impl/io/BaseStorageFactory.java
Fri Dec  2 16:56:59 2011
@@ -111,6 +111,15 @@ abstract class BaseStorageFactory implem
     }
     
     /**
+     * Set the canonicalName. May need adjustment due to DERBY-5096
+     * 
+     * @param name uniquely identifiable name for this database
+     */
+    public void setCanonicalName(String name) {
+       canonicalName = name;
+    }
+    
+    /**
      * Construct a StorageFile from a path name.
      *
      * @param path The path name of the file

Modified: db/derby/code/branches/10.7/java/engine/org/apache/derby/impl/io/VFMemoryStorageFactory.java
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.7/java/engine/org/apache/derby/impl/io/VFMemoryStorageFactory.java?rev=1209580&r1=1209579&r2=1209580&view=diff
==============================================================================
--- db/derby/code/branches/10.7/java/engine/org/apache/derby/impl/io/VFMemoryStorageFactory.java
(original)
+++ db/derby/code/branches/10.7/java/engine/org/apache/derby/impl/io/VFMemoryStorageFactory.java
Fri Dec  2 16:56:59 2011
@@ -189,6 +189,15 @@ public class VFMemoryStorageFactory
     }
 
     /**
+     * Set the canonicalName. May need adjustment due to DERBY-5096
+     * 
+     * @param name uniquely identifiable name for this database
+     */
+    public void setCanonicalName(String name) {
+       canonicalName = name;
+    }
+    
+    /**
      * Returns a handle to the specific storage file.
      *
      * @param path the path of the file or directory

Modified: db/derby/code/branches/10.7/java/engine/org/apache/derby/impl/services/monitor/StorageFactoryService.java
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.7/java/engine/org/apache/derby/impl/services/monitor/StorageFactoryService.java?rev=1209580&r1=1209579&r2=1209580&view=diff
==============================================================================
--- db/derby/code/branches/10.7/java/engine/org/apache/derby/impl/services/monitor/StorageFactoryService.java
(original)
+++ db/derby/code/branches/10.7/java/engine/org/apache/derby/impl/services/monitor/StorageFactoryService.java
Fri Dec  2 16:56:59 2011
@@ -665,6 +665,11 @@ final class StorageFactoryService implem
 
                             if (serviceDirectory.mkdirs())
                             {
+                                // 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();
+                                storageFactory.setCanonicalName(serviceDirCanonicalPath);
                                 try
                                 {
                                     return storageFactory.getCanonicalName();

Modified: db/derby/code/branches/10.7/java/engine/org/apache/derby/io/StorageFactory.java
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.7/java/engine/org/apache/derby/io/StorageFactory.java?rev=1209580&r1=1209579&r2=1209580&view=diff
==============================================================================
--- db/derby/code/branches/10.7/java/engine/org/apache/derby/io/StorageFactory.java (original)
+++ db/derby/code/branches/10.7/java/engine/org/apache/derby/io/StorageFactory.java Fri Dec
 2 16:56:59 2011
@@ -231,4 +231,12 @@ public interface StorageFactory
      */
     public StorageFile createTemporaryFile (String prefix, String suffix)
                                                             throws IOException;
+    
+    /**
+     * Set the canonicalName. May need adjustment due to DERBY-5096
+     * 
+     * @param name uniquely identifiable name for this database
+     */
+    public void setCanonicalName(String name);
+    
 }

Modified: db/derby/code/branches/10.7/java/testing/org/apache/derbyTesting/functionTests/util/corruptio/CorruptBaseStorageFactory.java
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.7/java/testing/org/apache/derbyTesting/functionTests/util/corruptio/CorruptBaseStorageFactory.java?rev=1209580&r1=1209579&r2=1209580&view=diff
==============================================================================
--- db/derby/code/branches/10.7/java/testing/org/apache/derbyTesting/functionTests/util/corruptio/CorruptBaseStorageFactory.java
(original)
+++ db/derby/code/branches/10.7/java/testing/org/apache/derbyTesting/functionTests/util/corruptio/CorruptBaseStorageFactory.java
Fri Dec  2 16:56:59 2011
@@ -118,6 +118,15 @@ abstract class CorruptBaseStorageFactory
     }
     
     /**
+     * Set the canonicalName. May need adjustment due to DERBY-5096
+     * 
+     * @param name uniquely identifiable name for this database
+     */
+    public void setCanonicalName(String name) {
+       realStorageFactory.setCanonicalName(name);
+    }
+    
+    /**
      * Construct a StorageFile from a path name.
      *
      * @param path The path name of the file



Mime
View raw message