Menu Search

5.2. ConnectionFactory

A ConnectionFactory allows an application to create a Connection.

The application obtains the ConnectionFactory from an InitialContext. The InitialContext is itself obtained from an InitialContextFactory.

The Qpid JMS client provides a single implementation of the InitialContextFactory in class org.apache.qpid.jndi.PropertiesFileInitialContextFactory. This implementation is backed by a Properties object which can of course be loaded from an external properties file, or created programatically.

The examples in the previous chapter illustrated the Java code required to create the InitialContext and an example properties file.

Note that the Qpid Broker does not present a JNDI interface to the application.

Figure 5.2. JNDI overview

JNDI overview