You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@activemq.apache.org by "clebert suconic (JIRA)" <ji...@apache.org> on 2019/01/18 02:21:05 UTC

[jira] [Closed] (ARTEMIS-2085) Improve validation of MDB activation config properties values

     [ https://issues.apache.org/jira/browse/ARTEMIS-2085?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

clebert suconic closed ARTEMIS-2085.
------------------------------------

> 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: Improvement
>            Reporter: Romain PELISSE
>            Priority: Minor
>             Fix For: 2.7.0, 2.6.4
>
>
> 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)