You dont nead to deploy the client on the server. you just do a lookup on the JNDI server for finding your bean. you nead to have one jndi.propeties file in your classpath.
java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory java.naming.provider.url=jnp://localhost:1099 java.naming.factory.url.pkgs=org.jboss.naming
Use a simple java class that can look up the JNDI name you have given.
Once the lookup is successfull you can access the application.
The stand alone java application need not be on the same server.
if putting this piece of code in your stand alone program does not work
put this part in the "jndi.properties" file and then put this file in the class path.
Thanks in advance
Thank you all for the replies.
It really was the missing link in the code.
I have an issue on this even though I included the properties code as suggested.
I can get the InitialContext but when I lookup the ejb I get:
javax.naming.CommunicationException [Root exception is java.lang.ClassNotFoundException: com.etc.etc.HomeInterface (no security manager: RMI class loader disabled)]
Is this a classpath issue? Any suggestions? I tried jbossall-client.jar etc...
Couldn't make it work..
Root exception is java.lang.ClassNotFoundException: com.etc.etc.HomeInterface
This class in not in the classpath. Put this class in the classpath
Ok that was as simple as that. I forgot to add the jar :)