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, set the AllowDurableConnections property to yes.
- Save the configuration.
5.1.1 Enabling Durable Connections for a Client Application
Code Block |
---|
// 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); |
Overview
Content Tools
ThemeBuilder