From kalumet-commits-return-137-apmail-incubator-kalumet-commits-archive=incubator.apache.org@incubator.apache.org Fri Jun 8 15:40:24 2012 Return-Path: X-Original-To: apmail-incubator-kalumet-commits-archive@minotaur.apache.org Delivered-To: apmail-incubator-kalumet-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 5D1C89F29 for ; Fri, 8 Jun 2012 15:40:24 +0000 (UTC) Received: (qmail 42507 invoked by uid 500); 8 Jun 2012 15:40:24 -0000 Delivered-To: apmail-incubator-kalumet-commits-archive@incubator.apache.org Received: (qmail 42488 invoked by uid 500); 8 Jun 2012 15:40:24 -0000 Mailing-List: contact kalumet-commits-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: kalumet-dev@incubator.apache.org Delivered-To: mailing list kalumet-commits@incubator.apache.org Received: (qmail 42481 invoked by uid 99); 8 Jun 2012 15:40:24 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 08 Jun 2012 15:40:24 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 08 Jun 2012 15:40:23 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 3375423889BB; Fri, 8 Jun 2012 15:40:03 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1348121 - /incubator/kalumet/trunk/console/src/main/java/org/apache/kalumet/console/configuration/ConfigurationManager.java Date: Fri, 08 Jun 2012 15:40:03 -0000 To: kalumet-commits@incubator.apache.org From: jbonofre@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20120608154003.3375423889BB@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: jbonofre Date: Fri Jun 8 15:40:02 2012 New Revision: 1348121 URL: http://svn.apache.org/viewvc?rev=1348121&view=rev Log: [KALUMET-38] Fix the location of the environment journals Modified: incubator/kalumet/trunk/console/src/main/java/org/apache/kalumet/console/configuration/ConfigurationManager.java Modified: incubator/kalumet/trunk/console/src/main/java/org/apache/kalumet/console/configuration/ConfigurationManager.java URL: http://svn.apache.org/viewvc/incubator/kalumet/trunk/console/src/main/java/org/apache/kalumet/console/configuration/ConfigurationManager.java?rev=1348121&r1=1348120&r2=1348121&view=diff ============================================================================== --- incubator/kalumet/trunk/console/src/main/java/org/apache/kalumet/console/configuration/ConfigurationManager.java (original) +++ incubator/kalumet/trunk/console/src/main/java/org/apache/kalumet/console/configuration/ConfigurationManager.java Fri Jun 8 15:40:02 2012 @@ -174,15 +174,14 @@ public class ConfigurationManager throw new IllegalArgumentException( "The property JournalsLocation is not found in the Apache Kalumet Console configuration. This property is required to store the environment journals and must contain the directory path for the journal files." ); } - File journalDir = new File( kalumetConsoleProperty.getValue() ); - journalDir.mkdirs(); - if ( System.getProperty( "kalumet.home" ) != null ) - { - return System.getProperty( "kalumet.home" ) + "/" + kalumetConsoleProperty.getValue() + "/" + environment - + ConfigurationManager.ENVIRONMENT_JOURNAL_FILE_EXTENSION; - } - return kalumetConsoleProperty.getValue() + "/" + environment - + ConfigurationManager.ENVIRONMENT_JOURNAL_FILE_EXTENSION; + String journalPath; + if (System.getProperty( "kalumet.home" ) != null) + journalPath = System.getProperty( "kalumet.home" ) + "/" + kalumetConsoleProperty.getValue() + "/" + environment + ConfigurationManager.ENVIRONMENT_JOURNAL_FILE_EXTENSION; + else journalPath = kalumetConsoleProperty.getValue() + "/" + environment + ConfigurationManager.ENVIRONMENT_JOURNAL_FILE_EXTENSION; + + File journalDir = new File( journalPath ); + journalDir.getParentFile().mkdirs(); + return journalPath; } /**