Uploaded image for project: 'ActiveMQ Classic'
  1. ActiveMQ Classic
  2. AMQ-3168

Broker XSD: boolean attributes should permit value injection via Srping's PropertyPlaceholderConfigurer

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 5.4.2
    • 5.6.0
    • Broker
    • None
    • Linux (tested), probably all

    Description

      i'm working on upgrading from AMQ 5.3.0 to 5.4.2. i'd like to keep schema validation enabled, so i'm carefully re-ordering the elements in activemq.xml.
      Our configuration uses PropertyPlaceholderConfigurer to insert values into activemq.xml. One of our configured values is of XSD type "boolean":

      <managementContext>
      <managementContext createConnector="${enableJmx}" connectorPort="${jmxConnectorPort}"/>
      </managementContext>

      i'm seeing this error in the console when i run "activemq/bin/activemq-admin start":

      ERROR: java.lang.RuntimeException: Failed to execute start task. Reason: org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException: Line 128 in XML document from class path resource [activemq.xml] is invalid; nested exception is org.xml.sax.SAXParseException: cvc-datatype-valid.1.2.1: '${enableJmx}' is not a valid value for 'boolean'.

      Other replacement tokens that precede this in the file don't produce errors, but they're for string or numeric values, not booleans. Issue AMQ-2939 mentions accomodating numeric vbalues in the broker.xsd. It would be very useful to accomodate boolean values as well, for both configurability and backward compatibility with existing configurations.

      Attachments

        Activity

          People

            dejanb Dejan Bosanac
            joeniski Joe Shisei Niski
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: