Author: fmeschbe
Date: Thu May 29 07:48:17 2008
New Revision: 661341

URL: http://svn.apache.org/viewvc?rev=661341&view=rev
Log:
Set the derby.stream.error.file system property if not set to have the derby.log
file created by the Derby database in the current working directory. This is
kind of a hack which assumes the Jackrabbit instance is actually using the
Derby PersistenceManager, which is actually the case right now.
        

Modified:
    
incubator/sling/trunk/jcr/jackrabbit-server/src/main/java/org/apache/sling/jcr/jackrabbit/server/SlingServerRepository.java

Modified: 
incubator/sling/trunk/jcr/jackrabbit-server/src/main/java/org/apache/sling/jcr/jackrabbit/server/SlingServerRepository.java
URL: 
http://svn.apache.org/viewvc/incubator/sling/trunk/jcr/jackrabbit-server/src/main/java/org/apache/sling/jcr/jackrabbit/server/SlingServerRepository.java?rev=661341&r1=661340&r2=661341&view=diff
==============================================================================
--- 
incubator/sling/trunk/jcr/jackrabbit-server/src/main/java/org/apache/sling/jcr/jackrabbit/server/SlingServerRepository.java
 (original)
+++ 
incubator/sling/trunk/jcr/jackrabbit-server/src/main/java/org/apache/sling/jcr/jackrabbit/server/SlingServerRepository.java
 Thu May 29 07:48:17 2008
@@ -93,6 +93,13 @@
         String configURLObj = (String) environment.get(REPOSITORY_CONFIG_URL);
         String home = (String) environment.get(REPOSITORY_HOME_DIR);
 
+        // somewhat dirty hack to have the derby.log file in a sensible
+        // location, but don't overwrite anything already set
+        if (System.getProperty("derby.stream.error.file") == null) {
+            String derbyLog = home + "/derby.log";
+            System.setProperty("derby.stream.error.file", derbyLog);
+        }
+        
         InputStream ins = null;
         try {
 


Reply via email to