I am using JBoss 3.0.4 on Linux. My remote client is on a WinXP box. My JVM in both cases is 1.4.2.
I use EJBs from this server successfully with web clients. I also want to use the EJBs from a remote client, but am getting a null returned for a session bean home. Here's some client code:
Properties p = new Properties();
p.put(Context.INITIAL_CONTEXT_FACTORY, "org.jnp.interfaces.NamingContextFactory");
p.put(Context.PROVIDER_URL, "192.168.1.105:1099");
p.put("jnp.discoveryPort", "192.168.1.105:1099");
p.put("java.naming.factory.url.pkgs", "org.jboss.naming.jnp.interfaces");
p.put("java.rmi.server.hostname", "192.168.1.105");
p.put("java.security.policy", "C:\\tacplanner\\security-conf\\java.policy");
InitialContext ic = new InitialContext(p);
Object homeObj = ic.lookup("registerBean");
RegisterHome home = (RegisterHome) PortableRemoteObject.narrow(homeObj, RegisterHome.class);
Register register = (Register) PortableRemoteObject.narrow(home.create(), Register.class);
home comes back null.
Any ideas on how to fix this?
Thanks,
--BobC