activemq-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF subversion and git services (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (ARTEMIS-1475) NPE when deploying 2 MDBs with same clientID/subscriptionName
Date Mon, 23 Oct 2017 19:01:00 GMT

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

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

Commit 16446c1a6e6fdae9e0f35bb2211e45b8da5bfbc2 in activemq-artemis's branch refs/heads/master
from [~jmesnil]
[ https://git-wip-us.apache.org/repos/asf?p=activemq-artemis.git;h=16446c1 ]

[ARTEMIS-1475] Fix NPE in ActiveMQMessageHandler#setup

* initialize ActiveMQActivationSpec#shareSubscriptions to false
* i18n of the exception thrown by ActiveMQMessageHandler if it is not
  possible to create a non-shared subscriber

JIRA: https://issues.apache.org/jira/browse/ARTEMIS-1475


> NPE when deploying 2 MDBs with same clientID/subscriptionName
> -------------------------------------------------------------
>
>                 Key: ARTEMIS-1475
>                 URL: https://issues.apache.org/jira/browse/ARTEMIS-1475
>             Project: ActiveMQ Artemis
>          Issue Type: Bug
>          Components: Broker
>    Affects Versions: 1.5.5
>            Reporter: Jeff Mesnil
>
> Steps to reproduce:
> * deploy an application in an app server using the Artemis Resource adapters with 2 MDBs
that have the same clientID and subscriptionName activation config properties:
> {code}
> @MessageDriven(name = "HelloWorldQTopicMDB2", activationConfig = {
>         @ActivationConfigProperty(propertyName = "destinationLookup", propertyValue =
"topic/HELLOWORLDMDBTopic"),
>         @ActivationConfigProperty(propertyName = "destinationType", propertyValue = "javax.jms.Topic"),
>         @ActivationConfigProperty(propertyName = "subscriptionName", propertyValue =
"mySubscription"),
>         @ActivationConfigProperty(propertyName = "clientID", propertyValue = "myClientId"),
>         @ActivationConfigProperty(propertyName = "subscriptionDurability", propertyValue
= "Durable"),
>         @ActivationConfigProperty(propertyName = "acknowledgeMode", propertyValue = "Auto-acknowledge")})
> {code}
> Result:
> * when the application is deployed, it fails with the error: 
> {code}
> 13:38:40,187 ERROR [org.apache.activemq.artemis.ra] (default-threads - 3) AMQ154003:
Unable to reconnect org.apache.activemq.artemis.ra.inflow.ActiveMQActivatio
> nSpec(ra=org.wildfly.extension.messaging.activemq.ActiveMQResourceAdapter@2bd07716 destination=topic/HELLOWORLDMDBTopic
destinationType=javax.jms.Topic ack=Auto
> -acknowledge durable=true clientID=myClientId subscription=mySubscription user=null maxSession=15):
java.lang.NullPointerException
>         at org.apache.activemq.artemis.ra.inflow.ActiveMQMessageHandler.setup(ActiveMQMessageHandler.java:125)
>         at org.apache.activemq.artemis.ra.inflow.ActiveMQActivation.setup(ActiveMQActivation.java:314)
>         at org.apache.activemq.artemis.ra.inflow.ActiveMQActivation.reconnect(ActiveMQActivation.java:658)
>         at org.apache.activemq.artemis.ra.inflow.ActiveMQActivation$SetupActivation.run(ActiveMQActivation.java:698)
> {code}
> Expected outcome:
> The deployment should fail with the correct exception from throw new javax.jms.IllegalStateException("Cannot
create a subscriber on the durable subscription since it already has subscriber(s)");
>           
> The NPE is caused by ActiveMQActivationSpec#shareSubscriptions that is not instantiated
to false in the default constructor.
> In addition, the error message should be i18nized.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Mime
View raw message