You should call .close() for the following objects:
QueueSender, QueueSession, QueueConnection (same for Topic)
This should be done whitin a finally block to ensure it will be done in error cases!
With JBoss 5.1 I saw a WARNING like 'Looks client exit, cleanup connection' with this the behaviour is might avoided.
But the correct way is to close the connection by yourself.