for the exchanges between your client's and server.protocol
andlogin
are handled (Hence, why it's so important to call the close() of the java.sql.Connection when the process is finished using it). In order to manage these differentdisconnect
that can occur through the connection, you will likely need define something of a message protocol (if you haven't already) that denotes the type of message being sent over the connection. That way on the client side, when the client exits or disconnects, you can send the appropriate message to the server indicating that you want it to terminate any thread associated with that client (i.e. clean up any server side resources).events