Aneesh Babu
asked on
ActiveMQ store path
I am using a java web application on Tomcat 9.0 server with ActiveMQ 5. Below is the broker config at context.xml, it works.
<Resource name="jms/ConnectionFactor y"
auth="Container"
type="org.apache.activemq. ActiveMQCo nnectionFa ctory"
description="JMS Connection Factory"
factory="org.apache.active mq.jndi.JN DIReferenc eFactory"
brokerURL="vm://localhost"
brokerName="LocalActiveMQB roker"
useEmbeddedBroker="true"/>
<Resource name="jms/queue/MyQueue"
auth="Container"
type="org.apache.activemq. command.Ac tiveMQQueu e"
factory="org.apache.active mq.jndi.JN DIReferenc eFactory"
physicalName="MTFQ"/>
It always creates the persistence store directory activemq-data inside tomcat bin folder, adding what parameter I can redirect the store content to my own directory which is outside of tomcat folder. Please help.
<Resource name="jms/ConnectionFactor
auth="Container"
type="org.apache.activemq.
description="JMS Connection Factory"
factory="org.apache.active
brokerURL="vm://localhost"
brokerName="LocalActiveMQB
useEmbeddedBroker="true"/>
<Resource name="jms/queue/MyQueue"
auth="Container"
type="org.apache.activemq.
factory="org.apache.active
physicalName="MTFQ"/>
It always creates the persistence store directory activemq-data inside tomcat bin folder, adding what parameter I can redirect the store content to my own directory which is outside of tomcat folder. Please help.
ASKER
Thanks for your response, I have tried it having like below setting in setenv.bat, but no luck. It still creates in bin folder.
set JAVA_OPTS="... -Dactivemq.store.dir=C:\Te mp"
set JAVA_OPTS="... -Dactivemq.store.dir=C:\Te
Do you change it in the right place? Look at Tomcat's log, at the startup options, and verify it's there.
ASKER
Yes, i could see it in the startup log, it has been taken as a command line argument.
ASKER
Guys, any resolution for me? Thanks ...
Can you try this?
-Dorg.apache.activemq.default.directory.prefix
ASKER
I used it this way in setenv.bat, but no luck.
set JAVA_OPTS="... -Dorg.apache.activemq.defa ult.direct ory.prefix =C:\Temp"
set JAVA_OPTS="... -Dorg.apache.activemq.defa
Well, these are the official switches, if they do not work I am not sure what else to try.
This question needs an answer!
Become an EE member today
7 DAY FREE TRIALMembers can start a 7-Day Free trial then enjoy unlimited access to the platform.
View membership options
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Open in new window