BTM
  1. BTM
  2. BTM-93

Detect dead JMS connections with a javax.jms.ExceptionListener

    Details

    • Type: Improvement Improvement
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Won't Fix
    • Affects Version/s: 2.0.1
    • Fix Version/s: 2.1.0
    • Labels:
      None
    • Number of attachments :
      0

      Description

      The standard JMS mechanism to detect dead connections is to register a javax.jms.ExceptionListener on a JMS connection. BTM's JMS pool should do this and close the offending connection when the proper exception is received by the listener.

      This will require testing against a large et of JMS servers to make sure this feature can work reliably.

        Activity

        Hide
        Ludovic Orban added a comment -

        When ExceptionListener.onException() any kind of JMS exception can be passed to the method, it's not possible to know if the problem has to do with the connection being invalid or not with the exception type.

        The official way to discriminate between error types is to check JMSException.getErrorCode(). Unfortunately this code is vendor-specific, there's no standard error code and some JMS servers don't even bother to fill it in.

        This feature basically is useless to detect JMS connection problems.

        Show
        Ludovic Orban added a comment - When ExceptionListener.onException() any kind of JMS exception can be passed to the method, it's not possible to know if the problem has to do with the connection being invalid or not with the exception type. The official way to discriminate between error types is to check JMSException.getErrorCode(). Unfortunately this code is vendor-specific, there's no standard error code and some JMS servers don't even bother to fill it in. This feature basically is useless to detect JMS connection problems.
        Hide
        Gérald Quintana added a comment -

        This Spring JIRA SPR-4448 comments are interesting.

        Using SimpleMessageListenerContainer insteadof DefaultMessageListenerContainer might help to detected connection loss

        Show
        Gérald Quintana added a comment - This Spring JIRA SPR-4448 comments are interesting. Using SimpleMessageListenerContainer insteadof DefaultMessageListenerContainer might help to detected connection loss

          People

          • Assignee:
            Ludovic Orban
            Reporter:
            Ludovic Orban
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: