Java Reference
In-Depth Information
<entries>
<entry name="java:/JmsXA"/>
<entry name="java:jboss/DefaultJMSConnectionFactory"/>
</entries>
</pooled-connection-factory>
The connection factory can be injected just like any other Java EE resource; the following
code fragment shows how a stateless EJB gets the default connection factory injected:
@Stateless
public class SampleEJB {
@Resource(mappedName = "java:/ConnectionFactory")
private ConnectionFactory cf;
}
Note
In order to use the messaging subsystem, you have to start WildFly using a Java EE full
profile, which includes the messaging subsystem. So, for example, if you want to start a
standalone server instance that is JMS-aware, you can simply use the following code:
standalone.sh -c standalone-full.xml
Search WWH ::




Custom Search