activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kmoore4now <...@jkmoore.net>
Subject how to configure JMX port from property file with Spring
Date Mon, 10 Sep 2007 21:25:49 GMT

I'd like to configure the ports in my broker from a property file using the
Ant expression syntax supported by Spring. Like this:

<amq:broker useJmx="true" persistent="true">  
    <amq:managementContext>
        <amq:managementContext connectorPort="${jms.jmx.port}"/>
    </amq:managementContext>    	
    <amq:transportConnectors>
        <amq:transportConnector uri="tcp://${host.name}:${jms.broker.port}"
/>
    </amq:transportConnectors>  
</amq:broker>

Although this works for the ${host.name} and ${jms.broker.port}", when I add
the management context element to the configuration it fails validation, as
the connectorPort is supposed to be an integer. The validation happens
before Spring can substitute the value from the property file.

The message is below. Am I missing something obvious?

 Sep 10, 2007 2:21:02 PM org.apache.catalina.core.StandardContext start
 org.xml.sax.SAXParseException: cvc-datatype-valid.1.2.1: '${jms.jmx.port}'
is not a valid value for 'integer'.
 SEVERE: Context [/messenger] startup failed due to previous errors
     at
com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:236)
-- 
View this message in context: http://www.nabble.com/how-to-configure-JMX-port-from-property-file-with-Spring-tf4418675s2354.html#a12603310
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Mime
View raw message