Okay. So I have a problem. I've written a server-client based chat application. Everything works as it should, except for one thing. When a user logs in (previous user, newly created user) or logs out, the server sends a userlist to all connected clients. A userlist is also sent whenever an alias is changed, or some other user information is changed. It seems to work right. When someone logs in, all clients are updated; when someone logs out, all clients are updated; but when someone changes user information, nothing is updated for any user. But when some user logs out and logs in again, the information in the userlist is updated for that user. If a new user logs in after the previous user changed his user information, the new user gets the new information. All information about a user is stored in a "User" object.
The objects that don't change are put in an arraylist in the userlist, so newly logged in users are placed in a new place in the arraylist, but already logged in users are placed in identical places as before. When testing, the information is sent from the server, but is not available when the client gets it. It seems to be a problem with storing it in the arraylist. Anyone know?
Now, it seems to me to be a pretty complex problem so I won't explain in further. My only question is, are any of you aware of any problems concerning deserialization and object streams (such as the object stream not recognizing the changed information but recognizing new information or mapping data to identical memory addresses or anything)?
It's pretty irritating, since I and a friend spent 7 hours trying to fix it before we admitted defeat. I'm almost certain we haven't done anything wrong.
The objects that don't change are put in an arraylist in the userlist, so newly logged in users are placed in a new place in the arraylist, but already logged in users are placed in identical places as before. When testing, the information is sent from the server, but is not available when the client gets it. It seems to be a problem with storing it in the arraylist. Anyone know?
Now, it seems to me to be a pretty complex problem so I won't explain in further. My only question is, are any of you aware of any problems concerning deserialization and object streams (such as the object stream not recognizing the changed information but recognizing new information or mapping data to identical memory addresses or anything)?
It's pretty irritating, since I and a friend spent 7 hours trying to fix it before we admitted defeat. I'm almost certain we haven't done anything wrong.