Posted: June 09, 2011 02:34 by duindain
Each pc i have is a server and can be multiple clients to each other server
I currently am getting alot of these errors when connecting between machines
When i click connect at similiar times it seems to work a bit more often but sometimes this can go on forever and the machines will never connect
Usually in this scenario 1 machine will connect to a server but that connected machine cannot connect back to the first machine and will stream these errors for a long time if not forever
Some quick research on this issue I found out it can be caused by the java garbage collector collecting the references to service objects
I initilise the server like so
Remote.config(null, 1198, null, 0); // use cajo port 1198 myLocalEntities = new networkFactoryEntityManagerImpl(); //assign to a varible to prevent it being garbage collected item = ItemServer.bind(myLocalEntities, getSharedRMIObjectName());
I added in the varible item to stop this issue with no effect so far
protected Remote item;
Does anyone know what could be the cause of this error and a way to stop it happening?
Its getting a little insane lately i used to be able to ignore it because within a few minutes the machines would eventually connect regardless now however they can be trying to connect thousands of times and still fail with this issue.
Thanks for any help