Java Reference
In-Depth Information
Note
As you can see from the preceding code, the messaging system also contains
the definition of a pooled transacted factory , which is bound in the JNDI at
java:/JmsXA . We will discuss this further in the Optimizing JMS connections
section.
The connection factory can be injected just like any other Java EE resource; the fol-
lowing 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 JBoss AS using a 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:
standalone.sh -c standalone-full.xml
Using JMS destinations
Along with the definition of connection factories, you will need to learn how to config-
ure the JMS destinations (queues and topics).
That can be achieved with a variety of instruments. Since we started to deal with the
web console, just navigate to the Profile tab and pick the Messaging subsystem
Search WWH ::




Custom Search