【发布时间】:2011-11-25 17:11:23
【问题描述】:
我在几台 Linux 机器上运行了 JBoss。如果我想将 JMS 消息从框 1 发送到框 2 上的队列,我可以这样做:
Hashtable<String,String> jndiProperties = new Hashtable<String,String>();
jndiProperties.put(javax.naming.Context.INITIAL_CONTEXT_FACTORY, "org.jnp.interfaces.NamingContextFactory");
jndiProperties.put(javax.naming.Context.URL_PKG_PREFIXES, "org.jboss.naming:org.jnp.interfaces");
jndiProperties.put(javax.naming.Context.PROVIDER_URL, "jnp://<ip of box2>:1099"); //
InitialContext context = new InitialContext(m_jndiProperties);
Queue queue = (Queue)context.lookup("queue/myqueue");
然后将消息放入队列。显然,box2 上需要打开 1099 端口,但我很好奇该通信还涉及哪些其他端口?
谢谢。
【问题讨论】: