Return-Path: X-Original-To: apmail-tomcat-users-archive@www.apache.org Delivered-To: apmail-tomcat-users-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id A0964D7CC for ; Tue, 4 Dec 2012 13:33:48 +0000 (UTC) Received: (qmail 16856 invoked by uid 500); 4 Dec 2012 13:33:45 -0000 Delivered-To: apmail-tomcat-users-archive@tomcat.apache.org Received: (qmail 16753 invoked by uid 500); 4 Dec 2012 13:33:44 -0000 Mailing-List: contact users-help@tomcat.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Tomcat Users List" Delivered-To: mailing list users@tomcat.apache.org Received: (qmail 16722 invoked by uid 99); 4 Dec 2012 13:33:43 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 04 Dec 2012 13:33:43 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of knst.kolinko@gmail.com designates 209.85.212.45 as permitted sender) Received: from [209.85.212.45] (HELO mail-vb0-f45.google.com) (209.85.212.45) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 04 Dec 2012 13:33:38 +0000 Received: by mail-vb0-f45.google.com with SMTP id p1so2926779vbi.4 for ; Tue, 04 Dec 2012 05:33:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=n7uYmiMVsArzutjGv7hFQHDM0v8HxSLPU6kw9GWAe14=; b=G8VoEq3jORUoWBhYnOJdkmagAc+yf3VZr6nEb/wJLlBLw0W/LmyJFazuoFjSKMeIjb eK2jd6PP9dhf8WhDePM/FoMeFvVXVJ91rj2zHu8h9LJOUwa9ukB+/FXM3bB9yn2z0OeK u0zXljI4vUsDzrLUYaGGg0MgR9IGKfSZsZ3ntKnm8YEuEPCqlT8aBkEwT9fO6Vlcr5QI KxtDvniP28D8yE38soGwo67F3MsQ983c4w2AZGE0i8/TU6yCJVZTiDas7pkQgXV0puSU mtDkl4vczYDUi8a1dGezprTbYjX+bbgSBDTbiBji1/RNMnq1vBYO0p7he9pQ8lBGC7Wq /srg== MIME-Version: 1.0 Received: by 10.220.247.204 with SMTP id md12mr11636776vcb.27.1354627997627; Tue, 04 Dec 2012 05:33:17 -0800 (PST) Received: by 10.58.249.199 with HTTP; Tue, 4 Dec 2012 05:33:17 -0800 (PST) In-Reply-To: <50BCC4CC.30700@christopherschultz.net> References: <50BCC4CC.30700@christopherschultz.net> Date: Tue, 4 Dec 2012 17:33:17 +0400 Message-ID: Subject: Re: Reuse JNDI Properties From: Konstantin Kolinko To: Tomcat Users List Content-Type: text/plain; charset=ISO-8859-1 X-Virus-Checked: Checked by ClamAV on apache.org 2012/12/3 Christopher Schultz : > On 12/3/12 8:03 AM, Martin Gamper wrote: >> Hey everybody! >> >> I am looking for a solution to reuse a JNDI Property which is set >> in the context.xml : in my "${catalina.home}/conf/context.xml" >> following > value="superFantasticNode" override="false" /> I use this value for >> several different purposes. >> >> Now I want to define (for my J2EE application) another value for >> special Log- Files. And therefore I use another JNDI property ... >> and in this Property I'd like to "reuse" the previously set >> "nodeName"-variable. >> >> In my Fantasy it would work like this: > name="loggingPath" value="${catalina.home}/logs/${nodeName}.log" >> type="java.lang.String" override="false" /> >> >> But it does not. > > Tomcat has a very limited set of cases where ${...} will do > replacements for system properties. I think it's definitely worth > filing an enhancement request for this kind of thing: it's a *very* > useful feature to have. The ${...} handling can be extended by defining a class that implements PropertySource interface, http://tomcat.apache.org/tomcat-7.0-doc/config/systemprops.html BTW, in your case where you are specifying a global setting, you can define nodeName property in conf/catalina.properties file. Best regards, Konstantin Kolinko --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org For additional commands, e-mail: users-help@tomcat.apache.org