Hi,I have defined a bean in activemq.xml with a placeholder for environment
variable:
<bean id="sqlserverDataSource"
class="org.apache.commons.dbcp.BasicDataSource" destroy-method="close">
<property name="driverClassName"
value="net.sourceforge.jtds.jdbc.Driver"/> <property name="url"
value="jdbc:jtds:sqlserver://*${RDB_ADDRESS}*:1433"/>
...</bean>
I added the following property to the PropertyPlaceholderConfigurerBean:
<property name="systemEnvironment" value="true"/>
And even though, I get the following exception:
2015-02-12 13:20:01,796 | ERROR | Failed to load: class path resource
[activemq.xml], reason:Invalid bean definition with name
'sqlserverDataSource' defined in class path resource [activemq.xml]:*Could
not resolve placeholder 'RDB_ADDRESS'* in string
value"jdbc:jtds:sqlserver://${RDB_ADDRESS}:1433" |
org.apache.activemq.xbean.XBeanBrokerFactory
|mainorg.springframework.beans.factory.BeanDefinitionStoreException: Invalid
bean definition with name'sqlserverDataSource' defined in class path
resource [activemq.xml]: Could not resolve placeholder'RDB_ADDRESS' in
string value "jdbc:jtds:sqlserver://${RDB_ADDRESS}:1433"
Any idea why it happens?
--
View this message in context:
http://activemq.2283324.n4.nabble.com/ActiveMQ-cannot-resolve-environment-variables-in-activemq-xml-tp4691435.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.