Menu Search

Chapter 6. JNDI Properties Format

The Qpid JMS Client comes with own JNDI context factory org.apache.qpid.jndi.PropertiesFileInitialContextFactory which utilises a Java properties file for declaring the JMS administered objects: connection factories, queues, topics and destinations. It uses the following syntax:

connectionfactory.<jndi name>=<connection url>
queue.<jndi name>=<queue name>
topic.<jndi name>=<topic name>
destination.<jndi name>=<binding url>

An arbitrary number of connection factories, queues, topics, queues or destinations or can be declared in the JNDI properties file. Each JNDI name must be unique.

The application looks up the objects via an InitialContext. This lookup and an example JNDI properties file is provided in Chapter 4, Examples

We now consider each JMS administered object type in turn.

6.1. ConnectionFactory

connectionfactory.name declares a ConnectionFactory with the given JNDI name. The value must be a legal Connection URL.

See Chapter 7, Connection URLs for format of the URL and its permitted options.