Women in Technology

Hear us Roar



Article:
  Designing Messaging Applications with Temporary Queues
Subject:   Lifetime of Temporary Destination
Date:   2007-04-23 13:14:05
From:   VenugopalJ



The session should be closed as soon as processing is completed so that TemporaryQueues will be deleted on the server side


As per my understanding of the JMS Specification closing a connection closes all the TemporaryQueues created on that connection. The lifetime of the TemporaryQueues does not depend on the Session in which they were created. Right?


Main Topics Oldest First

Showing messages 1 through 1 of 1.

  • Lifetime of Temporary Destination
    2007-04-23 18:28:41  ThribhuvanThakur [View]

    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.