【发布时间】:2015-10-27 19:45:46
【问题描述】:
我查看了 SO 建议的线程,但无法通过以下配置的 JNDI 查找阶段。
我的 HornetQ 会议。是这个。
<?xml version="1.0" encoding="UTF-8"?>
<messaging-deployment xmlns="urn:jboss:messaging-deployment:1.0">
<hornetq-server>
<connection-factory name="ConnectionFactory">
<connectors>
<connector-ref connector-name="in-vm"/>
</connectors>
<entries>
<entry name="java:/ConnectionFactory"/>
</entries>
<consumer-window-size>0</consumer-window-size>
<retry-interval>1000</retry-interval>
<retry-interval-multiplier>1.5</retry-interval-multiplier>
<max-retry-interval>60000</max-retry-interval>
<reconnect-attempts>1000</reconnect-attempts>
</connection-factory>
<!--the queue used by the example-->
<jms-destinations>
<jms-queue name="test4">
<entry name="jms/queue/test4"/>
<entry name="java:jboss/exported/jms/queue/test4"/>
</jms-queue>
</jms-destinations>
</hornetq-server>
我的春季会议。文件是这个。
<bean id="jmsConnectionFactory" class="org.springframework.jndi.JndiObjectFactoryBean">
<property name="jndiName" value="java:/ConnectionFactory" />
<property name="lookupOnStartup" value="false"/>
<property name="proxyInterface" value="javax.jms.ConnectionFactory"/>
</bean>
<bean id="myBrokerSendDestination" class="org.springframework.jndi.JndiObjectFactoryBean">
<property name="jndiName">
<value>jms/queue/test4</value>
</property>
<property name="resourceRef"><value>true</value></property>
</bean>
<bean id="myJmsTemplate" class="org.springframework.jms.core.JmsTemplate">
<property name="connectionFactory" ref="jmsConnectionFactory" />
<property name="defaultDestination" ref="myBrokerSendDestination" />
</bean>
我无法理解 JNDI 语法,我尝试了很多组合。我明白了
Caused by: javax.naming.NameNotFoundException: jms/queue/test4 -- service jboss.naming.context.java.jms.queue.test4
我在 JBOSS WildFly 9 中使用 Arquillian 部署我的 EAR。我不知道 Arquillian 是否与此有关。但是我看到了成功的部署消息,但它仅因这个特定错误而失败。
更新:我已经根据https://docs.jboss.org/author/display/WFLY9/Messaging+configuration修改了
但还是失败了。
更新:问题似乎是 hornetq-jms.xml。所以这个问题目前是无关紧要的。
【问题讨论】:
标签: wildfly hornetq spring-jms