Connection factory A connection factory is an object that a JMS client uses to create a connection with a JMS provider. Connection factories are stored in a JNDI namespace, which is a defined location within the naming and directory service. The initial context defines the root of the JNDI namespace.