activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pollotek <>
Subject ActiveMQ configuration and Spring Expression Language (SpEL)
Date Tue, 10 Apr 2012 21:17:55 GMT
I have to start multiple instances (separate JVMs) of this one service on the
same machine which has a persistent embedded broker. All config files are
pre-generated and have their variable substitutions done on compilation way
before the services start. I'm having problems with several instances trying
to get a lock of AMQ data directory and KahaDB, obviously the 1st instance
successfully gets the lock and the rest keep on trying unsuccessfully.

I need to set something like this:

<amq:broker dataDirectory="${}/data" id="broker"
persistent="true" useJmx="false" >

I tried PropertyPlaceholderConfigurer but as I understand it loads the
properties from a file specified in Spring configuration and at the time it
starts up is too late already. I'm trying to use Spring Expression Language
so I end up with something like this:

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns=""

dataDirectory="#{systemProperties['']}/data" id="broker"
persistent="true" useJmx="false" > 

I pass on the command line<my-directory>

On the log I see 
 nested exception is
org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean
named '{systemProperties['']}/data' is defined

Does it seem like I'm missing something with AMQ and Spring3 SpEL? Is there
some other Solution AMQ offers that can substitute variables on the fly
given command line property params?

I apologize in advance because I'm not sure if this question should be
posted here or Spring's website.


View this message in context:
Sent from the ActiveMQ - User mailing list archive at

View raw message