Java Reference
In-Depth Information
Optimizing JMS connections
Going back to our example, we have used an In-VM connection factory since our
client service is a local JMS client:
public class JMSService {
@Resource(mappedName = "java:/
ConnectionFactory")
private ConnectionFactory cf;
. . . . .
}
The connection factory is in turn used to create new JMS connections:
public void sendMessage(String txt) {
. . . .
connection = cf.createConnection();
}
Search WWH ::




Custom Search