I would like to do some experiments with JMS on jBoss WildFly 8.2.
The WildFly configuration file standalone-full.xmlhas the following fragments by default:
<hornetq-server>
<connectors>
...
<in-vm-connector name="in-vm" server-id="0"/>
</connectors>
...
<jms-connection-factories>
<connection-factory name="InVmConnectionFactory">
<connectors>
<connector-ref connector-name="in-vm"/>
</connectors>
<entries>
<entry name="java:/ConnectionFactory"/>
</entries>
</connection-factory>
...
</jms-connection-factories>
<jms-destinations>
<jms-topic name="MyTestTopic">
<entry name="java:/jms/topic/MyTestTopic"/>
</jms-topic>
</jms-destinations>
</hornetq-server>
I am trying to introduce this factory connection and this question in EJB as follows:
@Stateless
public class JmsPublisher {
@Resource(mappedName = "java:/ConnectionFactory")
ConnectionFactory jmsConnectionFactory;
@Resource(mappedName = "java:/jms/topic/MyTestTopic")
Topic topic;
But during deployment, the following error message appears:
Operation ("deploy") failed ... Services with missing/unavailable dependencies" => ...
...JmsPublisher\".jmsConnectionFactory is missing [jboss.naming.context.java.ConnectionFactory]"
...JmsPublisher\".topic is missing [jboss.naming.context.java.jms.topic.MyTestTopic]"
What am I doing wrong?
source
share