Women in Technology

Hear us Roar



Article:
  Designing Messaging Applications with Temporary Queues
Subject:   Lifetime of Temporary Destination
Date:   2007-04-23 18:28:41
From:   ThribhuvanThakur
Response to: Lifetime of Temporary Destination

JMS Session is the factory for creating Topics and Queues (temporary as well as static resources). I was trying to stress on the point that the JMS resources should be closed as soon as you done using them and not rely on garbage collection.


You are right in that, as soon as the connection is closed, all the constituents of the closed connection and session are closed, like I outlined in the article


>There is no need to close the consumers (QueueReceiver) of a closed session. As soon as the connection that created the temporary queue is closed, all the constituents of the closed connection and session are closed. Relying on garbage collection to eventually reclaim these resources may not be timely enough, especially in the case of JMS resources that are created outside of JVM.


Thank for your time.