[jboss-jira] [JBoss JIRA] (WFWIP-14) [Artemis upgrade] MDB cannot connect to remote server via RA if destination is not deployed locally

Martyn Taylor (JIRA) issues at jboss.org
Thu May 3 08:07:06 EDT 2018


     [ https://issues.jboss.org/browse/WFWIP-14?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Martyn Taylor moved JBEAP-14168 to WFWIP-14:
--------------------------------------------

              Project: WildFly WIP  (was: JBoss Enterprise Application Platform)
                  Key: WFWIP-14  (was: JBEAP-14168)
             Workflow: GIT Pull Request workflow   (was: CDW with loose statuses v1)
          Component/s: JMS
                           (was: JMS)
       Target Release:   (was: 7.2.0.GA)
    Affects Version/s:     (was: 7.2.0.GA)


> [Artemis upgrade] MDB cannot connect to remote server via RA if destination is not deployed locally
> ---------------------------------------------------------------------------------------------------
>
>                 Key: WFWIP-14
>                 URL: https://issues.jboss.org/browse/WFWIP-14
>             Project: WildFly WIP
>          Issue Type: Bug
>          Components: JMS
>            Reporter: Erich Duda
>            Assignee: Martyn Taylor
>            Priority: Blocker
>              Labels: activemq, feature-branch-blocker
>
> For more information about origin of this issue see JBEAP-13857.
> *Scenario*
> * There are two servers called JMS servers which have deployed destinations
> * There are two servers called MDB servers which have configured RA to connect to JMS servers and have deployed MDBs
> * MDBs resend messages from InQueue to OutQueue
> *Issue:* RA on MDB servers is not able to connect to JMS servers.
> *Detailed description of the issue*
> There is an MDB with following activation config:
> {code}
> @MessageDriven(name = "mdb1",
>         activationConfig = {
>                 @ActivationConfigProperty(propertyName = "destinationType", propertyValue = "javax.jms.Queue"),
>                 @ActivationConfigProperty(propertyName = "destination", propertyValue = "jms/queue/InQueue"),
>                 @ActivationConfigProperty(propertyName = "rebalanceConnections", propertyValue = "true"),
>                 @ActivationConfigProperty(propertyName = "hA", propertyValue = "true"),
>                 @ActivationConfigProperty(propertyName = "messageSelector", propertyValue = "color = 'RED'")})
> {code}
> In ActiveMQActivation::setupDestination method there is a code which tries to do a JNDI lookup. If it fails the destination is created using the ActiveMQJMSClient::createQueue where the destination name is created from the JNDI name.
> {code}
> try {
>                destination = (ActiveMQDestination) ActiveMQRaUtils.lookup(ctx, destinationName, destinationType);
>             } catch (Exception e) {
>                if (destinationName == null) {
>                   throw ActiveMQRABundle.BUNDLE.noDestinationName();
>                }
>                String calculatedDestinationName = destinationName.substring(destinationName.lastIndexOf('/') + 1);
>                logger.debug("Unable to retrieve " + destinationName +
>                                                 " from JNDI. Creating a new " + destinationType.getName() +
>                                                 " named " + calculatedDestinationName + " to be used by the MDB.");
>                // If there is no binding on naming, we will just create a new instance
>                if (isTopic) {
>                   destination = (ActiveMQDestination) ActiveMQJMSClient.createTopic(calculatedDestinationName);
>                } else {
>                   destination = (ActiveMQDestination) ActiveMQJMSClient.createQueue(calculatedDestinationName);
>                }
>             }
> {code}
> When the destination is not deployed locally (on the same server as MDB is deployed), the lookup fails and the destination is created using {{ActiveMQJMSClient::createQueue}} method, where {{calculatedDestinationName}} is {{InQueue}}.
> Later in the code, when RA tries to connect to the remote EAP server, it uses this destination when it creates a consumer. Since on the remote server there is no destination with core address {{InQueue}}, the request to create the consumer fails and it is being periodically retried.



--
This message was sent by Atlassian JIRA
(v7.5.0#75005)


More information about the jboss-jira mailing list