Hello,
I'm having a problem getting the property replacement to work when setting
up the encrypted passwords to access my data source.
I've been following the instructions here;
http://activemq.apache.org/encrypted-passwords.html
Maybe my understanding of this is not correct, but I was expecting to see
the ${jdbc.password} property replaced in my activemq config after activemq
is started. This is not happening.
Should i expect this? Or should the config file always show
${jdbc.password}?
My activemq config is below. As well as my credentials-enc.properties file.
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:amq="http://activemq.apache.org/schema/core"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
http://activemq.apache.org/schema/core
http://activemq.apache.org/schema/core/activemq-core.xsd">
<bean id="environmentVariablesConfiguration"
class="org.jasypt.encryption.pbe.config.EnvironmentStringPBEConfig">
<property name="algorithm" value="PBEWithMD5AndDES" />
<property name="password" value="password" />
</bean>
<bean id="configurationEncryptor"
class="org.jasypt.encryption.pbe.StandardPBEStringEncryptor">
<property name="config" ref="environmentVariablesConfiguration" />
</bean>
<bean id="propertyConfigurer"
class="org.jasypt.spring.properties.EncryptablePropertyPlaceholderConfigurer">
<constructor-arg ref="configurationEncryptor" />
<property name="location"
value="file:${activemq.base}/conf/credentials-enc.properties" />
</bean>
<bean id="oscarDataSource" class="org.apache.commons.dbcp.BasicDataSource"
destroy-method="close">
<property name="driverClassName" value="com.mysql.jdbc.Driver" />
<property name="url" value="url" />
<property name="username" value="user" />
<property name="password" value="${jdbc.password}"/>
<property name="maxActive" value="200" />
<property name="poolPreparedStatements" value="true" />
</bean>
<amq:broker useJmx="true" persistent="true" schedulerSupport="false"
advisorySupport="true" dataDirectory="/var/data" brokerName="activemq">
<amq:destinationPolicy>
<amq:policyMap>
<amq:policyEntries>
<amq:policyEntry queue=">">
<amq:deadLetterStrategy>
<amq:individualDeadLetterStrategy
queueSuffix="DeadLetterQueue" useQueueForQueueMessages="true" />
</amq:deadLetterStrategy>
</amq:policyEntry>
<amq:policyEntry queue="myQueue" producerFlowControl="true"
enableAudit="false" />
</amq:policyEntries>
</amq:policyMap>
</amq:destinationPolicy>
<amq:persistenceAdapter>
<amq:jdbcPersistenceAdapter dataDirectory="activemq-data"
dataSource="#oscarDataSource" />
</amq:persistenceAdapter>
</amq:broker>
</beans>
credentials-enc.properties
jdbc.password=ENC(jkosfdjkpA==)
--
View this message in context:
http://activemq.2283324.n4.nabble.com/ActiveMq-Encypted-Passwords-tp4679811.html
Sent from the ActiveMQ - Dev mailing list archive at Nabble.com.