There is no such thing as an 'RMI connection', but you can accomplish what you want via the RMI Remote Session pattern (Google it) plus implementing the Unreferenced interface on the remote session objects, which will tell you when the client is no longer current, if they haven't already called the session logout method, if you provide it.
See this answer for details of the Remote Session pattern.