Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Externalize Active MQ storage directory in application-context.xml #520

Closed
donaldoakes opened this issue Sep 28, 2018 · 1 comment
Closed
Assignees
Projects
Milestone

Comments

@donaldoakes
Copy link
Collaborator

donaldoakes commented Sep 28, 2018

In mdw-common/src/META-INF/mdw/spring/application-context.xml, change the hardwired amq:broker dataDirectory to use property syntax like the values in the MDWDataSource bean. The default dataDirectory when no property is specified should be the existing relative location (../activemq-data).

@donaldoakes donaldoakes added this to the 6.1.10 milestone Sep 28, 2018
@donaldoakes donaldoakes modified the milestones: 6.1.10, 6.x Oct 9, 2018
@jbrojdeCTL jbrojdeCTL self-assigned this Nov 1, 2018
@jbrojdeCTL jbrojdeCTL modified the milestones: 6.x, 6.1.10 Nov 1, 2018
jbrojdeCTL added a commit that referenced this issue Nov 1, 2018
jbrojdeCTL added a commit that referenced this issue Nov 1, 2018
@jbrojdeCTL
Copy link
Collaborator

New properties:
activemq:
location: activemq-data # Has to be relative to startup directory - default=../activemq-data
port: 61619 # default=61618
maxConnections: 10 # Max connections in JMS pool - default=8

Unfortunately, there's a problem with Spring Expression Language and the activemq schema that means the expression cannot be the first thing in the value, meaning the following doesn't work:

dataDirectory="#{T(com.centurylink.mdw.config.PropertyManager).getProperty('mdw.activemq.location', '../activemq-data')}">

But it does work if you add a leading space to it (but then the specified path doesn't work because it starts with a space), so instead, we're specifying ./ before the expression like this:

dataDirectory="./#{T(com.centurylink.mdw.config.PropertyManager).getProperty('mdw.activemq.location', '../activemq-data')}">

This means that the specified value via property has to be relative to the startup directory of the application. This is still better than having to override the entire application-context.xml file

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
mdw-common
Awaiting triage
Development

No branches or pull requests

3 participants