jboss 上下文环境

Properties pro = new Properties();
pro.put(Context.INITIAL_CONTEXT_FACTORY , "org.jnp.interfaces.NamingContextFactory");
pro.put(Context.URL_PKG_PREFIXES, "org.jboss.naming:org.jnp.interfaces");
pro.put(Context.PROVIDER_URL, "jnp://localhost:1099");

try {
Context c = new InitialContext(pro);

IHello ih = (IHello) c.lookup("HelloImpl/remote");
ih.sayHello();
} catch (NamingException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}

你可能感兴趣的:(C++,c,jboss,C#)