Uploaded image for project: 'WildFly'
  1. WildFly
  2. WFLY-11608

Improve validation of MDB activation config properties values

    Details

      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.

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  rpelisse Romain Pelisse
                  Reporter:
                  ehugonnet Emmanuel Hugonnet
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  2 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: