Return-Path: Delivered-To: apmail-activemq-dev-archive@www.apache.org Received: (qmail 43748 invoked from network); 29 Mar 2011 10:12:43 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 29 Mar 2011 10:12:43 -0000 Received: (qmail 37954 invoked by uid 500); 29 Mar 2011 10:12:43 -0000 Delivered-To: apmail-activemq-dev-archive@activemq.apache.org Received: (qmail 37918 invoked by uid 500); 29 Mar 2011 10:12:43 -0000 Mailing-List: contact dev-help@activemq.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@activemq.apache.org Delivered-To: mailing list dev@activemq.apache.org Received: (qmail 37910 invoked by uid 99); 29 Mar 2011 10:12:43 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 29 Mar 2011 10:12:43 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED,T_RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 29 Mar 2011 10:12:42 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id A9A6785D97 for ; Tue, 29 Mar 2011 10:12:05 +0000 (UTC) Date: Tue, 29 Mar 2011 10:12:05 +0000 (UTC) From: "Torsten Mielke (JIRA)" To: dev@activemq.apache.org Message-ID: <34887857.18593.1301393525676.JavaMail.tomcat@hel.zones.apache.org> In-Reply-To: <1058403718.18592.1301393405664.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Updated] (AMQ-3248) Allow for easy externalization of ActiveMQ configuration MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/AMQ-3248?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Torsten Mielke updated AMQ-3248: -------------------------------- Attachment: MB-847.patch Attaching a proposed fix. It uses shell env variable ACTIVEMQ_CONFIG_DIR and maps it to JVM system property activemq.conf. All XML configuration files then use ${activemq.conf} instead of ${activemq.base}/conf > Allow for easy externalization of ActiveMQ configuration > -------------------------------------------------------- > > Key: AMQ-3248 > URL: https://issues.apache.org/jira/browse/AMQ-3248 > Project: ActiveMQ > Issue Type: Improvement > Components: Broker > Affects Versions: 5.4.2 > Reporter: Torsten Mielke > Labels: configuration > Attachments: MB-847.patch > > Original Estimate: 4h > Remaining Estimate: 4h > > Currently many of the AMQ configuration files use the property activemq.base to load in other configuration files, e.g. > activemq.xml: > {code:title=activmeq.xml} > > file:${activemq.base}/conf/credentials.properties > > {code} > jetty.xml: > {code:title=jetty.xml} > > > > > {code} > webconsole-embedded.xml: > {code:title=webconsole-embedded.xml} > > file:${activemq.base}/conf/credentials.properties > > {code} > and others. > In case where you want to externalize the entire ActiveMQ configuration into a folder that is not a sub folder of AMQ, there is the need to change multiple configuration files. This is error prone. > In order to make the use of external AMQ configuration more easy to use, I suggest to > 1. Make use of the already existing environment variable ACTIVEMQ_CONFIG_DIR which points to ${ACTIVEMQ_BASE}/conf by default in bin/activemq script. > 2. Map the environment variable to the Java variable activemq.conf in bin/activemq script > 2. Replace all occurences of ${activemq.base}/conf with {$activemq.conf} in all XML configuration files (including those in webapps/ folder) > That way one can simply point to an external ActiveMQ conf folder by setting the shell environment variable ACTIVE_CONFIG_DIR to that folder. It does not have to be set in the bin/activemq script, it can be set directly on the shell. -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira