请问怎样lookup一个在另一台机器上的EJB?

我用单独的tomcat访问jboss3.2.1-tomcat4.1.24怎么不行呢?

Properties cosNamingProperties = new Properties();
cosNamingProperties.put("java.naming.factory.initial","org.jnp.interfaces.NamingContextFactory");
cosNamingProperties.put("java.naming.factory.url.pkgs","org.jboss.naming:org.jnp.interfaces");
cosNamingProperties.put("java.naming.provider.url", "rmi://127.0.0.1:1099");
InitialContext ctx = new InitialContext(cosNamingProperties);

怎么没人回呀

127.0.0.1是本地机器!

"jnp://xxx.xxx.xxx.xxx:1099"试试