JMS message to remote server
问题 I need to send a message to a remote server's queue (running "JBoss MQ") so that it can process the message and act on it. Properties properties = new Properties(); properties.put(Context.INITIAL_CONTEXT_FACTORY, "org.jnp.interfaces.NamingContextFactory"); properties.put(Context.URL_PKG_PREFIXES, "org.jnp.interfaces"); properties.put(Context.PROVIDER_URL, "jnp://192.168.1.131.129:1299"); InitialContext jndiContext = new InitialContext(properties); //[2] Look up connection factory and queue.