Uploaded image for project: 'JBoss Enterprise Application Platform'
  1. JBoss Enterprise Application Platform
  2. JBEAP-14106

Improve validation of MDB activation config properties values

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Major
    • 7.3.0.CD17
    • 7.2.0.GA
    • JMS
    • None

    Description

      Most of activation config properties values are not validated during MDB deploy. This might lead to successful deployment of misconfigured MDB without any warning.

      Customer scenario: Customer deploys MDB with misconfigured activation config property(wrong type, unsupported value). MDB deploys without any warning message. However, it doesn't work as expected. In worst case, MDB can not read any message.

      Current validation status
      Values of activation config properties are validated in ActiveMQActivationSpec.validate() method. Validation covers only 3 scenarios

      • not specified destination
      • wrong destination type (other than Queue / Topic)
      • no subscription name when MDB is durable topic subscriber

      Some ActiveMQActivationSpec properties try to validate supported values in setters. For example setAcknowledgeMode() throws IllegalArgumentException. However these exceptions only log message on finest level, which usually doesn't attract user's attention (see BeenUtils.mapJavaBeanProperties in jboss-common-beans)

      Other parameters are not validated.

      Possible issues
      Not validated activation config properties can be set to any value without warning. There is a possibility of misconfiguration which can be detected during deploy time.

      Examples
      Value of acknowledgeMode can be set to any string or number without warning. If that is the case, server uses default auto acknowledge. However, it doesn't warn user.

      If property maxSessions is configured with negative value, no warning is logged and MDB is unable to consume messages.

      If destination property specifies unknown destination, new destination with provided name is created. User should be informed about that at least on INFO log level (Currently it is debug in ActiveMQActivation.setupDestination()).

      MDB unable to consume messages should not successfully deploy, and user should be informed about the misconfigured values.

      Attachments

        Issue Links

          Activity

            People

              rpelisse@redhat.com Romain Pelisse
              mstyk_jira Martin Styk (Inactive)
              Peter Mackay Peter Mackay
              Peter Mackay Peter Mackay
              Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: