As per JMS specifications, an application uses a connection factory to fetch the details of a Connection instance to connect to the server. The connection factory instance encapsulates all the parameters (like URL, protocol, and so on) required to connect to the server. These parameters are configured to use the default socket acceptor settings and must be modified if the server uses a socket acceptor with a non-default configuration. The server creates the default connection to factories when it is launched for the first time. These connection factories are automatically created based on the configuration of the socket acceptor being used.
Parameter Name | Description |
| Default Value | |
ConnectURL | The server URL format. |
| ||
BackupURLs | Semi-colon separates lists of URLs that should be tried when creating connections (or when revalidating a connection) in those cases where a connection with the server specified in the connectURL cannot be established (fails). |
|
| |
IsForLPC | ||||
isConnectURLUpdationAllowed | If set to true, the connection factory will record the IP address and port of the server through which it is looked up. This is useful for machines where IP address or port is changed. | False |
| |
ConnectionClientID | If not null, represents a client ID that is automatically set on a connection created through this connection factory. | Null |
| |
PingDisabled | If set to true, a connection created will not be pinged even if pinging is turned ON at the server. | False |
|
Obtaining a Connection Factory Instance
A connection factory is a stateless object that encapsulates information on how to connect to the server.
JNDI Lookup
A connection factory instance is a serializable object that can be stored and later looked up through any JNDI-compliant directory server. FioranoMQ provides the JNDI interface to lookup all admin objects.
Creating a new instance
An application can create a new instance of connection factory and use it after setting various configurable parameters.