I kind of have an idea how to implement a socket solution but not an RMI one. I am looking into doing it the RMI way since I have read that that is the easier option as you don't have to implement a threadsafe server as that is done for you (although I have read that the dissadvantage is that you can't use the thread's hashcode as the magic cookie). What I'd like to know is in the case of sockets the settings I would save to the .properties file on the client side are the ip address and port number of the server. For RMI what counterparts to this would I need to save?
Indeed. RMI does takes care of Multi-threading for you via an in built thread pool (ie you don't have to worry about to creating threads for each request). However it is still up to you to ensure that these RMI threads behave in a thread safe manner in your server code.
Mark. [ January 25, 2007: Message edited by: Mark Smyth ]
Before I entered this post, I want to find out the disadvantages and advantages of RMI and sockect respectively. But my requirement failed to meet.So could you talk on that differences in this post? In other word, why do you choose RMI instead of sockect, or maybe reversely.
SCJP 1.4 SCJD
Joined: Feb 04, 2004
Too lazy today to go into it however these are some good discussions of RMI vs Sockets here: