ActiveMQ
  1. ActiveMQ
  2. AMQ-3457

temp destinations should only be deleted once all users of a pooled connection call close

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 5.x
    • Fix Version/s: 5.6.0
    • Component/s: None
    • Labels:
      None
    • Environment:

      5.6-SNAPSHOT

    • Patch Info:
      Patch Available

      Description

      AMQ-2349 added some code to clean up temp destinations once close() is called on a pooled connection. This caused pretty much all the JMS request-reply tests to fail in Camel with "javax.jms.InvalidDestinationException: Cannot publish to a deleted Destination"

      The problem is that with a pooled connection, multiple users can be using a Connection at the same time (a reference count is kept of how many there are) so if once calls close() the temp destinations of several others could be deleted while they are still using them. I think the correct behavior would be to only delete the temp destinations when all connection users call close() (i.e. when the reference count becomes zero).

      Attaching a proposed fix for this shortly for review.

      1. PooledSessionTempDestEventListener.java
        0.5 kB
        Arthur Naseef
      2. TestConnectionPoolTempCleanup.java
        8 kB
        Arthur Naseef
      3. pooledConnCleanupOwnTemps.patch
        7 kB
        Arthur Naseef
      4. TestConnectionPoolLingeringTemps.java
        6 kB
        Arthur Naseef
      5. amqpool.diff
        3 kB
        Jonathan Anstey

        Activity

        Arthur Naseef made changes -
        Attachment PooledSessionTempDestEventListener.java [ 12511271 ]
        Arthur Naseef made changes -
        Attachment TestConnectionPoolTempCleanup.java [ 12511152 ]
        Arthur Naseef made changes -
        Attachment pooledConnCleanupOwnTemps.patch [ 12511148 ]
        Arthur Naseef made changes -
        Attachment pooledConnCleanupOwnTemps.patch [ 12511150 ]
        Arthur Naseef made changes -
        Attachment pooledConnCleanupOwnTemps.patch [ 12511133 ]
        Arthur Naseef made changes -
        Attachment pooledConnCleanupOwnTemps.patch [ 12511148 ]
        Arthur Naseef made changes -
        Attachment TestConnectionPoolLingeringTemps.java [ 12511147 ]
        Arthur Naseef made changes -
        Attachment pooledConnCleanupOwnTemps.patch [ 12511133 ]
        Jonathan Anstey made changes -
        Status Reopened [ 4 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Jonathan Anstey made changes -
        Resolution Fixed [ 1 ]
        Status Resolved [ 5 ] Reopened [ 4 ]
        Assignee Timothy Bish [ tabish121 ] Jonathan Anstey [ janstey ]
        Gary Tully made changes -
        Fix Version/s 5.6.0 [ 12317974 ]
        Fix Version/s 5.x [ 12316331 ]
        Timothy Bish made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Assignee Timothy Bish [ tabish121 ]
        Fix Version/s 5.6.0 [ 12316331 ]
        Resolution Fixed [ 1 ]
        Jonathan Anstey made changes -
        Field Original Value New Value
        Attachment amqpool.diff [ 12490646 ]
        Jonathan Anstey created issue -

          People

          • Assignee:
            Jonathan Anstey
            Reporter:
            Jonathan Anstey
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development