Durable Connections in the Server
To enable durable connections in the server, perform the following steps:
- Launch the admin studio and open the profile (which by default is FioranoMQ) in the offline mode.
- Navigate to FioranoMQ > Fiorano > etc > FMQConfigLoader. In the properties pane, enable the AllowDurableConnections property.
- Save the configuration.
Enabling Durable Connections for a Client Application
CODE
// Create the InitialContext Object used for looking up
// JMS administered objects on the Fiorano/EMS
// located on the default host.
//
Hashtable env = new Hashtable();
env.put(Context.SECURITY_PRINCIPAL, "anonymous");
env.put(Context.SECURITY_CREDENTIALS, "anonymous");
env.put(Context.PROVIDER_URL, m_url);
env.put(Context.INITIAL_CONTEXT_FACTORY, "fiorano.jms.runtime.naming.FioranoInitialContextFactory");
env.put(FioranoJNDIContext.ALLOW_DURABLE_CONNECTIONS, "true");
InitialContext ic = new InitialContext(env);
System.out.println("Created InitialContext :: " + ic);