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

2018-12-17 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/ARTEMIS-2085?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16722846#comment-16722846
 ] 

ASF GitHub Bot commented on ARTEMIS-2085:
-

Github user rpelisse commented on the issue:

https://github.com/apache/activemq-artemis/pull/2312
  
> I merged this on master and 2.6.x. @rpelisse, can you please close this?

Gladly! 


> 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)


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

2018-12-17 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/ARTEMIS-2085?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16722847#comment-16722847
 ] 

ASF GitHub Bot commented on ARTEMIS-2085:
-

Github user rpelisse closed the pull request at:

https://github.com/apache/activemq-artemis/pull/2312


> 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)


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

2018-12-13 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/ARTEMIS-2085?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16720420#comment-16720420
 ] 

ASF GitHub Bot commented on ARTEMIS-2085:
-

Github user jbertram commented on the issue:

https://github.com/apache/activemq-artemis/pull/2312
  
I merged this on master and 2.6.x. @rpelisse, can you please close this?


> 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)


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

2018-12-13 Thread ASF subversion and git services (JIRA)


[ 
https://issues.apache.org/jira/browse/ARTEMIS-2085?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16720418#comment-16720418
 ] 

ASF subversion and git services commented on ARTEMIS-2085:
--

Commit cec5bbdfd9c7e1478f9198193eed7be920485d31 in activemq-artemis's branch 
refs/heads/2.6.x from Romain Pelisse
[ https://git-wip-us.apache.org/repos/asf?p=activemq-artemis.git;h=cec5bbd ]

ARTEMIS-2085 - Improve validation of MDB activation config properties values

(cherry picked from commit 39b177d0274886159c6006b83de52d7af6436ee4)


> 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)


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

2018-12-13 Thread ASF subversion and git services (JIRA)


[ 
https://issues.apache.org/jira/browse/ARTEMIS-2085?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16720413#comment-16720413
 ] 

ASF subversion and git services commented on ARTEMIS-2085:
--

Commit 39b177d0274886159c6006b83de52d7af6436ee4 in activemq-artemis's branch 
refs/heads/master from Romain Pelisse
[ https://git-wip-us.apache.org/repos/asf?p=activemq-artemis.git;h=39b177d ]

ARTEMIS-2085 - Improve validation of MDB activation config properties values


> 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)


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

2018-10-11 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/ARTEMIS-2085?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16646949#comment-16646949
 ] 

ASF GitHub Bot commented on ARTEMIS-2085:
-

Github user rpelisse commented on the issue:

https://github.com/apache/activemq-artemis/pull/2312
  
@jbertram thanks!


> 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)


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

2018-10-11 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/ARTEMIS-2085?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16646938#comment-16646938
 ] 

ASF GitHub Bot commented on ARTEMIS-2085:
-

Github user jbertram commented on the issue:

https://github.com/apache/activemq-artemis/pull/2312
  
@rpelisse, to restart the Travis CI build you'll need to do something like 
`git commit --amend` and then `git push -f `.


> 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)


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

2018-10-11 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/ARTEMIS-2085?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16646924#comment-16646924
 ] 

ASF GitHub Bot commented on ARTEMIS-2085:
-

Github user rpelisse commented on the issue:

https://github.com/apache/activemq-artemis/pull/2312
  
retest this please


> 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)


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

2018-10-11 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/ARTEMIS-2085?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16646716#comment-16646716
 ] 

ASF GitHub Bot commented on ARTEMIS-2085:
-

Github user rpelisse commented on the issue:

https://github.com/apache/activemq-artemis/pull/2312
  
@michaelandrepearce ok all fix now, let me know if you want me to change 
anything else!


> 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)


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

2018-10-11 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/ARTEMIS-2085?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16646459#comment-16646459
 ] 

ASF GitHub Bot commented on ARTEMIS-2085:
-

Github user rpelisse commented on a diff in the pull request:

https://github.com/apache/activemq-artemis/pull/2312#discussion_r224460169
  
--- Diff: 
artemis-ra/src/main/java/org/apache/activemq/artemis/ra/inflow/ActiveMQActivationValidationUtils.java
 ---
@@ -0,0 +1,80 @@
+package org.apache.activemq.artemis.ra.inflow;
--- End diff --

Same, my bad. I knew I needed to double check the license headers and 
forgot to do it. I'll update the PR accordingly.


> 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)


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

2018-10-11 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/ARTEMIS-2085?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16646463#comment-16646463
 ] 

ASF GitHub Bot commented on ARTEMIS-2085:
-

Github user rpelisse commented on a diff in the pull request:

https://github.com/apache/activemq-artemis/pull/2312#discussion_r224460300
  
--- Diff: 
artemis-ra/src/main/java/org/apache/activemq/artemis/ra/inflow/ActiveMQActivationValidationUtils.java
 ---
@@ -0,0 +1,80 @@
+package org.apache.activemq.artemis.ra.inflow;
+
+import java.beans.IntrospectionException;
+import java.beans.PropertyDescriptor;
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.jms.Queue;
+import javax.jms.Session;
+import javax.jms.Topic;
+import javax.resource.spi.InvalidPropertyException;
+
+import org.apache.activemq.artemis.ra.ActiveMQRALogger;
+
+/**
+ * A set of validation methods, isolated here to be easily testable.
+ * 
+ * @author rpelisse
--- End diff --

Done.


> 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)


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

2018-10-11 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/ARTEMIS-2085?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16646457#comment-16646457
 ] 

ASF GitHub Bot commented on ARTEMIS-2085:
-

Github user rpelisse commented on a diff in the pull request:

https://github.com/apache/activemq-artemis/pull/2312#discussion_r224459911
  
--- Diff: 
artemis-ra/src/main/java/org/apache/activemq/artemis/ra/inflow/ActiveMQActivationSpec.java
 ---
@@ -603,7 +596,11 @@ public void setMaxSession(final Integer value) {
  logger.trace("setMaxSession(" + value + ")");
   }
 
-  maxSession = value;
+  if ( value < 1 ) {
+ logger.warn("Invalid number of session (negative):" + value + ", 
defaulting to 1.");
--- End diff --

Quite sorry about that. I forgot about those. I'll fix it up right away.


> 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)


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

2018-10-10 Thread ASF GitHub Bot (JIRA)


[ 
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)


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

2018-10-10 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/ARTEMIS-2085?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16645223#comment-16645223
 ] 

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_r224151533
  
--- Diff: 
artemis-ra/src/main/java/org/apache/activemq/artemis/ra/inflow/ActiveMQActivationValidationUtils.java
 ---
@@ -0,0 +1,80 @@
+package org.apache.activemq.artemis.ra.inflow;
+
+import java.beans.IntrospectionException;
+import java.beans.PropertyDescriptor;
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.jms.Queue;
+import javax.jms.Session;
+import javax.jms.Topic;
+import javax.resource.spi.InvalidPropertyException;
+
+import org.apache.activemq.artemis.ra.ActiveMQRALogger;
+
+/**
+ * A set of validation methods, isolated here to be easily testable.
+ * 
+ * @author rpelisse
--- End diff --

remove please


> 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)


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

2018-10-10 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/ARTEMIS-2085?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16645221#comment-16645221
 ] 

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_r224151461
  
--- Diff: 
artemis-ra/src/main/java/org/apache/activemq/artemis/ra/inflow/ActiveMQActivationValidationUtils.java
 ---
@@ -0,0 +1,80 @@
+package org.apache.activemq.artemis.ra.inflow;
--- End diff --

RAT failure, requires license headers


> 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)


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

2018-10-10 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/ARTEMIS-2085?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16645211#comment-16645211
 ] 

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_r224148916
  
--- Diff: 
artemis-ra/src/main/java/org/apache/activemq/artemis/ra/inflow/ActiveMQActivationSpec.java
 ---
@@ -603,7 +596,11 @@ public void setMaxSession(final Integer value) {
  logger.trace("setMaxSession(" + value + ")");
   }
 
-  maxSession = value;
+  if ( value < 1 ) {
+ logger.warn("Invalid number of session (negative):" + value + ", 
defaulting to 1.");
--- End diff --

this requires a declared  logger in ActiveMQRALogger and logger code


> 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)


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

2018-10-10 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/ARTEMIS-2085?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16645208#comment-16645208
 ] 

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_r224148249
  
--- Diff: 
artemis-ra/src/main/java/org/apache/activemq/artemis/ra/inflow/ActiveMQActivation.java
 ---
@@ -556,7 +556,7 @@ protected void setupDestination() throws Exception {
   calculatedDestinationName = spec.getQueuePrefix() + 
calculatedDestinationName;
}
 
-   logger.debug("Unable to retrieve " + destinationName + " 
from JNDI. Creating a new " + destinationType.getName() + " named " + 
calculatedDestinationName + " to be used by the MDB.");
+   logger.warn("Unable to retrieve " + destinationName + " 
from JNDI. Creating a new " + destinationType.getName() + " named " + 
calculatedDestinationName + " to be used by the MDB.");
--- End diff --

if this is no longer debug, it requires to user proper logger, with a 
defined logger code.


> 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)


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

2018-10-10 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/ARTEMIS-2085?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16644976#comment-16644976
 ] 

ASF GitHub Bot commented on ARTEMIS-2085:
-

Github user rpelisse commented on the issue:

https://github.com/apache/activemq-artemis/pull/2312
  
@michaelandrepearce I've updated this branch with my Unit tests. I did a 
bit of refactor also, I hope it's fine with you and let me know if you want me 
to change something!


> 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)


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

2018-09-27 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/ARTEMIS-2085?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16630007#comment-16630007
 ] 

ASF GitHub Bot commented on ARTEMIS-2085:
-

Github user rpelisse commented on the issue:

https://github.com/apache/activemq-artemis/pull/2312
  
@michaelandrepearce maybe it's me, but it feels a bit like an overkill to 
add such a test into the integration test. I would rather move the validation 
logic into an Utils class (with static method) and add a simple JUnit test, 
with some mock object if needed. This way the validation logic can tested, 
enhance and modified completely out of the container. Would you mind if I did 
just that?


> 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)


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

2018-09-26 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/ARTEMIS-2085?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16628913#comment-16628913
 ] 

ASF GitHub Bot commented on ARTEMIS-2085:
-

Github user michaelandrepearce commented on the issue:

https://github.com/apache/activemq-artemis/pull/2312
  
@rpelisse theres a suite of tests i believe under 
(org.apache.activemq.artemis.tests.integration.ra ) package in the integration 
test module, this would probably where i would look to add such test.


> 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)


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

2018-09-14 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/ARTEMIS-2085?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16614550#comment-16614550
 ] 

ASF GitHub Bot commented on ARTEMIS-2085:
-

Github user rpelisse commented on the issue:

https://github.com/apache/activemq-artemis/pull/2312
  
@michaelandrepearce there is no unit test in the artemis-ra, do you want me 
to add a first unit to validate this behavior? (I'm fine doing so, I just want 
to be sure it is what you meant).



> 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)


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

2018-09-14 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/ARTEMIS-2085?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16614552#comment-16614552
 ] 

ASF GitHub Bot commented on ARTEMIS-2085:
-

Github user rpelisse commented on the issue:

https://github.com/apache/activemq-artemis/pull/2312
  
@jbertram logger methodize - let me know if you want me to change something 
there.


> 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)


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

2018-09-13 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/ARTEMIS-2085?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16613856#comment-16613856
 ] 

ASF GitHub Bot commented on ARTEMIS-2085:
-

Github user clebertsuconic commented on the issue:

https://github.com/apache/activemq-artemis/pull/2313
  
No need. I will cherry pick it myself. 


Unless there are conflicts.  But I do not think it’s the case. 


> 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)


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

2018-09-13 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/ARTEMIS-2085?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16613846#comment-16613846
 ] 

ASF GitHub Bot commented on ARTEMIS-2085:
-

Github user rpelisse commented on the issue:

https://github.com/apache/activemq-artemis/pull/2313
  
OK! I'll re open it when it is merge in master.


> 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)


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

2018-09-13 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/ARTEMIS-2085?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16613847#comment-16613847
 ] 

ASF GitHub Bot commented on ARTEMIS-2085:
-

Github user rpelisse closed the pull request at:

https://github.com/apache/activemq-artemis/pull/2313


> 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)


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

2018-09-13 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/ARTEMIS-2085?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16613840#comment-16613840
 ] 

ASF GitHub Bot commented on ARTEMIS-2085:
-

Github user clebertsuconic commented on the issue:

https://github.com/apache/activemq-artemis/pull/2313
  
close this one please...


We merge into master.. than cherry-pick -x into 2.6.x


> 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)


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

2018-09-13 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/ARTEMIS-2085?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16613699#comment-16613699
 ] 

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/2313#discussion_r217442584
  
--- Diff: 
artemis-ra/src/main/java/org/apache/activemq/artemis/ra/inflow/ActiveMQActivationSpec.java
 ---
@@ -406,7 +406,9 @@ public void setAcknowledgeMode(final String value) {
   } else if ("AUTO_ACKNOWLEDGE".equalsIgnoreCase(value) || 
"Auto-acknowledge".equalsIgnoreCase(value)) {
  acknowledgeMode = Session.AUTO_ACKNOWLEDGE;
   } else {
- throw new IllegalArgumentException("Unsupported acknowledgement 
mode " + value);
+ final String message = "Unsupported acknowledgement mode " + 
value;
+ logger.warn(message);
--- End diff --

As warn requires a registered logger and logger code


> 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)


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

2018-09-13 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/ARTEMIS-2085?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16613698#comment-16613698
 ] 

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/2313#discussion_r217442386
  
--- Diff: 
artemis-ra/src/main/java/org/apache/activemq/artemis/ra/inflow/ActiveMQActivation.java
 ---
@@ -556,7 +556,7 @@ protected void setupDestination() throws Exception {
   calculatedDestinationName = spec.getQueuePrefix() + 
calculatedDestinationName;
}
 
-   logger.debug("Unable to retrieve " + destinationName + " 
from JNDI. Creating a new " + destinationType.getName() + " named " + 
calculatedDestinationName + " to be used by the MDB.");
+   logger.warn("Unable to retrieve " + destinationName + " 
from JNDI. Creating a new " + destinationType.getName() + " named " + 
calculatedDestinationName + " to be used by the MDB.");
--- End diff --

As a warn this should use a registered logger with a logger code


> 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)


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

2018-09-13 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/ARTEMIS-2085?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16613700#comment-16613700
 ] 

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/2313#discussion_r217442671
  
--- Diff: 
artemis-ra/src/main/java/org/apache/activemq/artemis/ra/inflow/ActiveMQActivationSpec.java
 ---
@@ -603,7 +605,11 @@ public void setMaxSession(final Integer value) {
  logger.trace("setMaxSession(" + value + ")");
   }
 
-  maxSession = value;
+  if ( value < 0 ) {
+ logger.warn("Invalid number of session (negative):" + value +", 
defaulting to 1.");
--- End diff --

Ditto


> 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)