[ https://issues.apache.org/jira/browse/ARTEMIS-2085?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16645224#comment-16645224 ]
ASF GitHub Bot commented on ARTEMIS-2085: ----------------------------------------- Github user michaelandrepearce commented on a diff in the pull request: https://github.com/apache/activemq-artemis/pull/2312#discussion_r224151789 --- Diff: artemis-ra/src/test/java/org/apache/activemq/artemis/ra/inflow/ActiveMQActivationsSpecTest.java --- @@ -0,0 +1,46 @@ +package org.apache.activemq.artemis.ra.inflow; --- End diff -- RAT failure, requires license header > Improve validation of MDB activation config properties values > ------------------------------------------------------------- > > Key: ARTEMIS-2085 > URL: https://issues.apache.org/jira/browse/ARTEMIS-2085 > Project: ActiveMQ Artemis > Issue Type: Bug > Reporter: Romain PELISSE > Priority: Major > > 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. -- This message was sent by Atlassian JIRA (v7.6.3#76005)