Hi,
I've deployed an ear file containing a servlet, JSP, and EJB, together with a client which should be called from the command line.
From a web browser, I can open the JSP (acting as my web-client) and call the servlet which in turn calls the EJB.
What I want to do is to call the client from the command line but it seems I can only do this is if I have access to my client's .class file. One method of achieving this is to just call the class file directly, for example from a local copy or even from the local (but internal) copy JBOSS uses (stored under a directory, created at deployment). Unfortunately, neither of these options are really acceptable, because:
1. I can't determine where JBOSS will store the .class file.
2. I don't want to have a local copy of my client!
So, ideally, I want to be able to test my bean either from a web browser context (which works just fine) or the command line without having a local copy of the client - after all, why should I? - I've already deployed the client to JBOSS.
I guess another way of looking at it is like this: how can I deploy an application to JBOSS which simply displays "Hello World" at the command line if I call it using java.exe...
Thanks for reading!
You need the interface on the client unless you
are going to use reflection. Otherwise your
test program will NoClassDefFoundError.
Assuming you use reflection, you can install a security
manager in the client to enable RMI classloading.
Regards,
Adrian