[
https://issues.jboss.org/browse/WFLY-5049?page=com.atlassian.jira.plugin....
]
Jeff Mesnil commented on WFLY-5049:
-----------------------------------
I can not reproduce your issue. Could you add DEBUG logs for the
org.apache.activemq.artemis.ra logger please?
The attached configuration files does not correspond to the issue description. The JNDI
entry for the MDBTriggerQueue is java:jboss/MDBTriggerQueue. Why would you expect
"queue/MDBTriggerQueue" to work?
I believe you are hit by
https://issues.apache.org/jira/browse/ARTEMIS-246
Your JNDI lookup fails because it tries to lookup the "queue/MDBTriggerQueue" in
the app server with the deployed MDB but there is no such entry.
Since that fails, Artemis will automatically create a JMS Queue based on the last portion
of the destination name. So it will create a MDBTriggerQueue JMS queue that does
correspond to the queue on the remote server.
Could you run your code with the DEBUG logs to confirm this behaviour?
Please note that you can not expect the MDB using a remote Artemis server to lookup
magically the destination on the remote server.
You need to configure the MDB by either
* using the destination+useJNDI=false setup that I documented in WildFly 10 doc[1]
* using the destinationLookup + JNDIParams to create a correct initial context to lookup
the the queue on the remote server
* create an naming's external context federation to have local lookups go to the
remote server.
The setup you have use can work by "accident" and should not be kept.
ARTEMIS-246 is to warn the user that such configuration is not correct.
[1]
https://docs.jboss.org/author/display/WFLY10/Connect+a+pooled-connection-...
AMQ Artemis does not support slash character used in activation
property of MDB
-------------------------------------------------------------------------------
Key: WFLY-5049
URL:
https://issues.jboss.org/browse/WFLY-5049
Project: WildFly
Issue Type: Bug
Components: JMS
Affects Versions: 10.0.0.Alpha6
Reporter: Miroslav Novak
Assignee: Jeff Mesnil
Attachments: ejb-jar.xml, mdb-deployed-standalone-full.xml,
remote-activemq-broker-standalone-full.xml
When using slash character {{/}} in configuration of artemis messaging subsystem as jms
queue name then MDB fails to connect to remote messaging server.
My settings is following - I have a remote messaging server where queue is defined like
{code}
<jms-queue name="queue/crashRecoveryQueue"
entries="java:jboss/queue/crashRecoveryQueue"/>
{code}
Then there is a server where MDB is deployed. That server configures connection factory
{code}
<pooled-connection-factory name="messaging-broker-remote"
transaction="xa" entries="java:/RemoteJmsXA"
connectors="messaging-broker-http-remote"/>
{code}
http connector
{code}
<http-connector name="messaging-broker-http-remote"
socket-binding="remote-messaging">
<param name="http-upgrade-endpoint" value="http-acceptor"/>
</http-connector>
{code}
outbound socket binding
{code}
<outbound-socket-binding name="remote-messaging">
<remote-destination host="127.0.0.1" port="8280"/>
</outbound-socket-binding>
{code}
and resource reference for ejb subsystem
{code}
<mdb>
<resource-adapter-ref
resource-adapter-name="messaging-broker-remote"/>
<bean-instance-pool-ref pool-name="mdb-strict-max-pool"/>
</mdb>
{code}
The MDB uses ejb-jar with activation properties
{code}
<?xml version="1.0" encoding="UTF-8"?>
<ejb-jar id="EJBJar_1060639024453" version="3.0"
xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/ejb-jar_3_0.xsd"
metadata-complete="false">
<enterprise-beans>
<message-driven>
<ejb-name>JMSCrashMessageDrivenBean</ejb-name>
<ejb-class>org.jboss.as.test.jbossts.crashrec.jms.mdb.JMSCrashMessageDrivenBean</ejb-class>
<activation-config>
<activation-config-property>
<activation-config-property-name>destination</activation-config-property-name>
<activation-config-property-value>queue/MDBTriggerQueue</activation-config-property-value>
</activation-config-property>
<activation-config-property>
<activation-config-property-name>destinationType</activation-config-property-name>
<activation-config-property-value>javax.jms.Queue</activation-config-property-value>
</activation-config-property>
</activation-config>
</message-driven>
</enterprise-beans>
</ejb-jar>
{code}
The server does not show any warning that the connection was not found, just MDB does not
receive any message from the queue.
If I use {{MDBTriggerQueue}} instead of {{queue/MDBTriggerQueue}} the same setup starts
working perfectly.
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)