Great, thank you very much for the change. Would you also consider
changing the type of the "rmiServerPort" property to the same type in
order to allow it to be overridden through a system property?
Regarding AMQ-2939, there seems to be a way to disable XML validation
programatically as explained here:
https://jira.springframework.org/browse/SPR-5014?focusedCommentId=48116&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#action_48116
Unfortunately I was not able to find the location in ActiveMQ source
code to do the change by myself so I cannot tell you if this really works.
Thanks and cheers,
Reynald
On 10/28/2010 02:54 PM, Gary Tully wrote:
Made a small modification such that the port attributes of the
managementContext use a string type for the schema. This is something
we have used for the persistence adapters and memory usage elements to
allow them to be more descriptive.
This will allow you to use properties in the future, with validation.
see:
https://issues.apache.org/activemq/browse/AMQ-2939?focusedCommentId=62897&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#action_62897
On 27 October 2010 16:05, Reynald Borer<[email protected]> wrote:
Hello all,
Since ActiveMQ 5.4.1 it does not seems to be possible to override anymore
the JMX connector port through a system property. Here is how I used to do
it with version 5.3.0:
- in activemq.xml file I define the following configuration
<managementContext>
<managementContext createConnector="true"
connectorPort="${activemq.jmx.port}" />
</managementContext>
- then I add some system properties on the command line of the JVM:
Java Runtime: Sun Microsystems Inc. 1.6.0_20
/usr/lib/jvm/java-6-sun-1.6.0.20/jre
Heap sizes: current=253440k free=250641k max=506816k
JVM args: -Dorg.apache.activemq.UseDedicatedTaskRunner=true -Xms256M
-Xmx512M -Dactivemq.instance=testrbr -Dactivemq.jmx.port=1099
-Dactivemq.jetty.port=8161
-Djava.util.logging.config.file=logging.properties
-Dcom.sun.management.jmxremote
-Dactivemq.classpath=/mnt/export/activemq/testrbr/conf;/usr/share/activemq/conf;
-Dactivemq.home=/usr/share/activemq
-Dactivemq.base=/mnt/export/activemq/testrbr
Unfortunately this fails because of XML validation:
Caused by: org.xml.sax.SAXParseException: cvc-datatype-valid.1.2.1:
'${activemq.jmx.port}' is not a valid value for 'integer'.
This worked fine with version 5.3.0, and this also works fine in version
5.4.1 for the Jetty port parameter.
Any idea on how to solve this problem? I would really try to avoid having to
download and alter the XSD file for activemq.xml in order to relax the
Integer check. Maybe there exists some parameter in Spring to disable this
validation?
Thanks in advance for your help.
Cheers,
Reynald