You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-commits@db.apache.org by km...@apache.org on 2011/11/30 21:58:23 UTC
svn commit: r1208775 -
/db/derby/code/trunk/java/engine/org/apache/derby/impl/services/monitor/StorageFactoryService.java
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();