RMI Applet/server communication and connecting to a database
Posted on 2002-04-20
I am using RMI between an applet and a server. The RMI server is located on a machine called sun4 and part of what I needed to do was to allow a user to query, through the applet in a browser , a database located on another machine called macneill.
I kept getting security exceptions and couldn't understand why. Eventually on "guess" advice from someone who suggested that the problem might be the second connection (ie the connection to macneill) since an applet can only connect to a server from which it is downloaded.
I relocated my RMI server to macneill and sure enough all is working. I don't understand why this should be. This implies that the applet was trying to connect to macneill but I understood the whole point of RMI was that the server would carry out such connections and therefore working around the problem of an applet not being able to make a separate connection.
Why should it be a problem for the server to connect to a separate machine? Was I doing something wrong or is this to be expected? Unfortunately I need to clarify this for a detailed write up on the project
any help would be really appreciated.