1
我的JBoss运行在几台Linux机器上。如果我想从盒1发送JMS消息上BOX2队列,我可以做这样的事情:Java(和JBoss)JNDI和RMI端口
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");
,然后把一个消息队列。显然,端口1099需要在box2上打开,但我很好奇其他端口在该通信中涉及的是什么?
谢谢。
RMI只使用端口为1098激活守护进程,这是没有广泛使用。 – EJP