You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by m0thra <mi...@varolii.com> on 2012/04/04 01:15:45 UTC

using property for broker dataDirectory

I have been struggling trying to get this to work using various syntax.

	<bean id="jms" class="org.apache.camel.component.jms.JmsComponent">
		<property name="connectionFactory">
			<bean class="org.apache.activemq.ActiveMQConnectionFactory"> 
				<property name="brokerURL" value="vm://apiServiceBroker" />
			</bean>
		</property>
	</bean>	

	<amq:broker brokerName="apiServiceBroker"
dataDirectory="${env:AMQ_DATA_DIR}">
		<amq:transportConnectors>
			<amq:transportConnector uri="tcp://localhost:61616"/>
		</amq:transportConnectors>
	 </amq:broker>	

Is using a replacement property going to work for the broker dataDirectory
in Camel Spring DSL?  It is getting interpreted as a literal


16:11:29,945 INFO  [KahaStore] Kaha Store using data directory
${env:AMQ_DATA_DIR}/apiServiceBroker/tmp_storage

Thanks for any help that can be supplied.

MJ


--
View this message in context: http://camel.465427.n5.nabble.com/using-property-for-broker-dataDirectory-tp5616593p5616593.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: using property for broker dataDirectory

Posted by Claus Ibsen <cl...@gmail.com>.
Hi

You need to add some spring property placeholder in the XML file to
let it trigger the ${env:xxx}.


On Wed, Apr 4, 2012 at 1:15 AM, m0thra <mi...@varolii.com> wrote:
> I have been struggling trying to get this to work using various syntax.
>
>        <bean id="jms" class="org.apache.camel.component.jms.JmsComponent">
>                <property name="connectionFactory">
>                        <bean class="org.apache.activemq.ActiveMQConnectionFactory">
>                                <property name="brokerURL" value="vm://apiServiceBroker" />
>                        </bean>
>                </property>
>        </bean>
>
>        <amq:broker brokerName="apiServiceBroker"
> dataDirectory="${env:AMQ_DATA_DIR}">
>                <amq:transportConnectors>
>                        <amq:transportConnector uri="tcp://localhost:61616"/>
>                </amq:transportConnectors>
>         </amq:broker>
>
> Is using a replacement property going to work for the broker dataDirectory
> in Camel Spring DSL?  It is getting interpreted as a literal
>
>
> 16:11:29,945 INFO  [KahaStore] Kaha Store using data directory
> ${env:AMQ_DATA_DIR}/apiServiceBroker/tmp_storage
>
> Thanks for any help that can be supplied.
>
> MJ
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/using-property-for-broker-dataDirectory-tp5616593p5616593.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
CamelOne 2012 Conference, May 15-16, 2012: http://camelone.com
FuseSource
Email: cibsen@fusesource.com
Web: http://fusesource.com
Twitter: davsclaus, fusenews
Blog: http://davsclaus.blogspot.com/
Author of Camel in Action: http://www.manning.com/ibsen/

Re: using property for broker dataDirectory

Posted by Stefan Burkard <sb...@gmail.com>.
Here is an example from the ActiveMQ in Action book. Therefore I guess
that property values should work... did you tried a simple property
without a default value?

<amq:broker brokerName="localhost" dataDirectory="${activemq.base}/data">
...
</amq:broker>

Stefan


On Wed, Apr 4, 2012 at 01:15, m0thra <mi...@varolii.com> wrote:
> I have been struggling trying to get this to work using various syntax.
>
>        <bean id="jms" class="org.apache.camel.component.jms.JmsComponent">
>                <property name="connectionFactory">
>                        <bean class="org.apache.activemq.ActiveMQConnectionFactory">
>                                <property name="brokerURL" value="vm://apiServiceBroker" />
>                        </bean>
>                </property>
>        </bean>
>
>        <amq:broker brokerName="apiServiceBroker"
> dataDirectory="${env:AMQ_DATA_DIR}">
>                <amq:transportConnectors>
>                        <amq:transportConnector uri="tcp://localhost:61616"/>
>                </amq:transportConnectors>
>         </amq:broker>
>
> Is using a replacement property going to work for the broker dataDirectory
> in Camel Spring DSL?  It is getting interpreted as a literal
>
>
> 16:11:29,945 INFO  [KahaStore] Kaha Store using data directory
> ${env:AMQ_DATA_DIR}/apiServiceBroker/tmp_storage
>
> Thanks for any help that can be supplied.
>
> MJ
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/using-property-for-broker-dataDirectory-tp5616593p5616593.html
> Sent from the Camel - Users mailing list archive at Nabble.com.