Following configuration throws exception because the placeholder is not replaced with system property com.barra.activemq.MEMORY_SIZE. Spring placeholders work in all other places in the configration, except the memory manager, because it is customized by AMQ.
<beans>
<bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"/> <!-- Allows us to use system properties as variables in this configuration file -->
<broker useJmx="true" deleteAllMessagesOnStartup="false" persistent="true" xmlns="http://activemq.org/config/1.0">
<memoryManager>
<usageManager id="memory-manager" limit="${com.barra.activemq.MEMORY_SIZE} MB"/>
</memoryManager>
<managementContext>
<managementContext connectorPort="${com.barra.activemq.jmx.PORT}" jmxDomainName="apache.activemq"/>
</managementContext>