[jboss-jira] [JBoss JIRA] (WFWIP-95) [Artemis 2.x Upgrade] Client is not able to instantiate destinations by names
Amine Belkoura (JIRA)
issues at jboss.org
Fri Aug 17 12:20:00 EDT 2018
[ https://issues.jboss.org/browse/WFWIP-95?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13620898#comment-13620898 ]
Amine Belkoura commented on WFWIP-95:
-------------------------------------
Agree with Miroslav. A lot of our customers do not go through JNDI. They connect to the broker directly and create message consumers. I feel that this should be supported, or it will create a lot of headache.
[~jmesnil]: you mentioned "Application should use JNDI to lookup JMS resources and not use broker-specific library." How about MDBs hosted inside EAP? MDBs can be configured to use JNDI name or straight queue names. Is using queue names without going trough JNDI also not supported in this case? I am not sure what if ActiveMQJMSClient library is used under the cover for that?
> [Artemis 2.x Upgrade] Client is not able to instantiate destinations by names
> -----------------------------------------------------------------------------
>
> Key: WFWIP-95
> URL: https://issues.jboss.org/browse/WFWIP-95
> Project: WildFly WIP
> Issue Type: Bug
> Components: JMS
> Reporter: Martin Styk
> Assignee: Martyn Taylor
> Priority: Blocker
> Labels: activemq
>
> Having queue defined as follows
> {code:xml}
> <jms-queue name="InQueue" entries="jms/queue/InQueue java:jboss/exported/jms/queue/InQueue" durable="true"/>
> {code}
> Client is instantiating it directly using its name.
> {code:title=Client}
> HashMap<String, Object> map = new HashMap<String, Object>();
> map.put("host", hostName);
> map.put(TransportConstants.HTTP_UPGRADE_ENABLED_PROP_NAME, true);
> map.put("port", httpPort);
> TransportConfiguration transportConfiguration = new TransportConfiguration(NettyConnectorFactory.class.getName(), map);
> try {
> ConnectionFactory cf = ActiveMQJMSClient.createConnectionFactoryWithoutHA(JMSFactoryType.CF, transportConfiguration);
> Queue orderQueue = ActiveMQJMSClient.createQueue("InQueue");
> connection = cf.createConnection();
> session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
> MessageProducer producer = session.createProducer(orderQueue);
> connection.start();
> ...
> {code}
> Client is not able to send messages to, because {{session.createProducer(orderQueue)}} throws following exception
> {code}
> javax.jms.InvalidDestinationException: Destination InQueue does not exist
> at org.apache.activemq.artemis.jms.client.ActiveMQSession.createProducer(ActiveMQSession.java:326)
> {code}
> This is regression against EAP 7.1.0
> Issue was hit with Artemis 2.5.0 with https://github.com/jmesnil/wildfly/tree/WFLY-9407_upgrade_artemis_2.4.0_with_prefix (commit 51dd8102f103ccb0470a3cfc8713d3f9bdb1b65d)
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
More information about the jboss-jira
mailing list