Return-Path: Delivered-To: apmail-camel-commits-archive@www.apache.org Received: (qmail 1291 invoked from network); 7 May 2009 15:43:32 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 7 May 2009 15:43:32 -0000 Received: (qmail 83806 invoked by uid 500); 7 May 2009 15:43:32 -0000 Delivered-To: apmail-camel-commits-archive@camel.apache.org Received: (qmail 83762 invoked by uid 500); 7 May 2009 15:43:32 -0000 Mailing-List: contact commits-help@camel.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@camel.apache.org Delivered-To: mailing list commits@camel.apache.org Received: (qmail 83753 invoked by uid 99); 7 May 2009 15:43:32 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 07 May 2009 15:43:32 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.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; Thu, 07 May 2009 15:43:29 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 68775238893B; Thu, 7 May 2009 15:43:08 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r772683 - /camel/trunk/components/camel-test/src/main/java/org/apache/camel/test/CamelTestSupport.java Date: Thu, 07 May 2009 15:43:08 -0000 To: commits@camel.apache.org From: davsclaus@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20090507154308.68775238893B@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: davsclaus Date: Thu May 7 15:43:07 2009 New Revision: 772683 URL: http://svn.apache.org/viewvc?rev=772683&view=rev Log: CAMEL-1590: jndi.properties should be optional for camel-test.jar Modified: camel/trunk/components/camel-test/src/main/java/org/apache/camel/test/CamelTestSupport.java Modified: camel/trunk/components/camel-test/src/main/java/org/apache/camel/test/CamelTestSupport.java URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-test/src/main/java/org/apache/camel/test/CamelTestSupport.java?rev=772683&r1=772682&r2=772683&view=diff ============================================================================== --- camel/trunk/components/camel-test/src/main/java/org/apache/camel/test/CamelTestSupport.java (original) +++ camel/trunk/components/camel-test/src/main/java/org/apache/camel/test/CamelTestSupport.java Thu May 7 15:43:07 2009 @@ -151,10 +151,14 @@ } protected Context createJndiContext() throws Exception { - InputStream in = getClass().getClassLoader().getResourceAsStream("jndi.properties"); - assertNotNull("Cannot find jndi.properties on the classpath!", in); Properties properties = new Properties(); - properties.load(in); + + // jndi.properties is optional + InputStream in = getClass().getClassLoader().getResourceAsStream("jndi.properties"); + if (in != null) { + log.debug("Using jndi.properties from classpath root"); + properties.load(in); + } return new InitialContext(new Hashtable(properties)); }