Posted this in the JSP thread. my goal is to have tomcat/apache on one machine and JBoss on another.
Here is how I got the interest app to work on a diff machine (both solaris)
I got the Interest-client app to run on a different box, so I guess the procedure to run a jsp (thus tomcat) on a different server would be the same.
I had to copy the contents of the JBOSS_DIST/client dir to an accessible location so I could build the client app (I still can't find the jar that contains the javax.rmi.PortableRemoteObject class, but this works). This allowed me to compile, but not run the app. The second thing was to tweek the resource file for the client (under examples/resource, called jndi.properties). I tweeked the java.naming.provider.url from localhost to my jboss server. Now this app runs on a seperate machine. I just got to figure out how to map this to a jsp container.
Thanks for your suggestion, we have just figured out what was causing our problem. The documentation for JBoss 2.4.3 indicates that the file jboss.properties "currently contains no properties". As far as we can tell, what that actually means is that critical configuration parameters are commented out to default to "localhost". Upon uncommenting and changing these values (the first 3 in the file) our remote client worked first time. Our next question, I suppose, is this: If jboss.properties has no necessary configuration parameters, where are the ones we just changed to make it work supposed to be?
The problem that you are encountering is classic. The issue is that the JNDI knows your server as "localhost". However, your client machines resolves localhost to its own address. Basically the client asks the JNDI for the location of the bean and JNDI tells the client that it is localhost. And so the client uses that address to get to the bean. Localhost to the client is its own address and therefore the call fails.
All you have to do is go into the configuration file JBOSS_DIST\conf\default\jboss.properties and replace the word "localhost" to the IP address or the well known host name of the machine..
oops. That is what happens when you don't read the other responses.
Well I am glad the you figured it out.
I do that all the time. Your explaintation as to why this was needed was very useful, esp. to a newbie.