-
1. Re: How to run a stand alone application client
poyge394 Jan 31, 2006 5:42 AM (in response to shaiwolf)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.
sample jndi.propertiesjava.naming.factory.initial=org.jnp.interfaces.NamingContextFactory java.naming.provider.url=jnp://localhost:1099 java.naming.factory.url.pkgs=org.jboss.naming
/ Poyan -
2. Re: How to run a stand alone application client
ayusman Feb 1, 2006 8:31 AM (in response to shaiwolf)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.
java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
java.naming.provider.url=jnp://localhost:1099
java.naming.factory.url.pkgs=org.jboss.naming
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
Ayusman -
3. Re: How to run a stand alone application client
shaiwolf Feb 1, 2006 10:36 AM (in response to shaiwolf)Hi,
Thank you all for the replies.
It really was the missing link in the code.
Cheers,
Shai :) -
4. Re: How to run a stand alone application client
erbora00 Feb 28, 2006 4:18 AM (in response to shaiwolf)Hi,
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..
Thanks. -
5. Re: How to run a stand alone application client
jaikiran Feb 28, 2006 5:42 AM (in response to shaiwolf)Root exception is java.lang.ClassNotFoundException: com.etc.etc.HomeInterface
This class in not in the classpath. Put this class in the classpath -
6. Re: How to run a stand alone application client
erbora00 Feb 28, 2006 7:28 AM (in response to shaiwolf)Ok that was as simple as that. I forgot to add the jar :)
Thanks mate.