I have same desgin like Max's book. ... I have seprate Data class instance for each client
Second problem is, when I create 15 client(threads) it works fine but above that I get exception (something like SocketFactory) but program ends proper way.
About exception I searched the forum and come to a conclusion that either my O.S(XP)or RMI has a bug.
May be I am wrong.
Well, yes, but it is a little more complex than that - it is also important to work out when unreferenced is called with respect to when the client disconnected.
My comprehension about it is that unreferenced() was called when Client unconnceted.
Try taking it out and see how the program works . The program does still work - just be patient. Then you tell me why I put it in there.
why this sentence used?
I don't understand what you are suggesting - perhaps you could post a code snippet so I can see.
if i use command rmiregistry instead LocateRegistry.createRegistry(1234);then unreferenced() would not be called?
Take a look at Sun's jGuru: Remote Method Invocation (RMI) tutorial. I would recommend going through it thoroughly.
Maybe what i need is some tutorial about interface Unreferenced.