It consists of mobile clients and server side. Some events need to be delivered to mobile clients from server side. I have decided to implement this in the following way:
Mobile client calls server via soap and asks server to create JMS queue with unique name (JMX management API is used for this purpose).
Mobile client subscribes to previously created queue using STOMP protocol.
Everything works as expected but there is one moment: when client disconnects (normal disconnect or client/network failure) server side code needs to be notified about this event in order to remove queue created at the first step. Also some code needs to be executed in order to mark client as offline.
So my question: is it possible to track client connection state at server side (i.e handle when client connects/disconnects from certain queue).