title: JMS producer/consumer for queue in JBOSS 7.1 Final
body: <p>I am unable to create Producer/consumer for JMS queue. I tried using port 1099 as well as 4447.</p>
  
  <pre><code>private static InitialContext getInitialContext() throws NamingException {
          Properties p = new Properties( );
          p.put(Context.INITIAL_CONTEXT_FACTORY,"org.jnp.interfaces.NamingContextFactory");
          p.put(Context.URL_PKG_PREFIXES," org.jboss.naming:org.jnp.interfaces");
          p.put(Context.PROVIDER_URL, "jnp://localhost:1099");
  
          return new javax.naming.InitialContext();
  
  }
  </code></pre>
  
  <p>Getting error : unable to connect to port 1099.</p>
  
  <p>Can anyone suggest how to provide property for InitialContext.</p>