the code just looks like this:
public static void main(String[] args) {
try {
System.setProperty("java.naming.factory.initial",
"org.jnp.interfaces.NamingContextFactory");
System.setProperty("java.naming.provider.url","jnp://localhost:1099");
Context initial = new InitialContext();
Object ref = initial.lookup("PubManagementBean");
PubManagementHome home = (PubManagementHome)PortableRemoteObject
.narrow(ref,PubManagementHome.class);
}
catch(Exception e) {
System.err.println("MESSAGE:" + e.getMessage());
e.printStackTrace(System.err);
}
}
> Hi everybody!
>
[quoted text clipped - 55 lines]
> at javax.naming.InitialContext.lookup(Unknown Source)
> at client.Client.main(Client.java:17)
Frank Langelage - 27 Nov 2005 12:56 GMT
> the code just looks like this:
> public static void main(String[] args) {
[quoted text clipped - 13 lines]
> }
> }
What's the classpath you use?
The simpliest way is to use jbossall-client.jar.
We use file jndi.properties which set one more property:
java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
java.naming.provider.url=jnp://localhost:1099
*java.naming.factory.url.pkgs=org.jboss.naming:org.jboss.jnp.interfaces*