Java Memory Management
Posted
by Tara Singh
on Stack Overflow
See other posts from Stack Overflow
or by Tara Singh
Published on 2010-04-11T06:25:14Z
Indexed on
2010/04/11
6:33 UTC
Read the original article
Hit count: 356
java
I am designing a client-server chat application in Java. This is a secure application where the messages are exchanged using cryptographic algorithms. I have one server and it can support many clients. My problem is that when one client logs on the server it works fine, but when another user logs into the system, the server starts giving me bad padding exceptions for the encrypted text.
I am not able to figure out the problem, according to my logic, when new connection request to server is made, the server creates a thread for listening to the client. Is it possible that once the instance of thread class is created, it does all the processing correctly for the first client, but not for the second client because the variables in server listener thread class already have some previous value, and thus the encrypted text is not decrypted properly?
Please advise how I can make this process more robust so that the number of clients does not affect how well the server functions.
© Stack Overflow or respective owner