Qpid
  1. Qpid
  2. QPID-3270

JMS Connection.getMetaData returns a usable enumeration only on the first call to getMetaData

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 0.6, 0.8, 0.10
    • Fix Version/s: 0.11
    • Component/s: Java Client
    • Labels:
      None

      Description

      JMS Connection.getMetaData returns a usable enumeration only on the first call to getMetaData.
      Invoking getMetaData multiple times, either on the same connection or even completely different connections results in an empty Enumeration.

      Steps to Reproduce:
      1. Run a client with the following code

      <code>
      Connection conn = factory.createConnection();
      for (Enumeration meta = conn.getMetaData().getJMSXPropertyNames();
      meta.hasMoreElements()

      { System.out.println(meta.nextElement()); }

      System.out.println("Getting connection meta data again");
      for (Enumeration meta = conn.getMetaData().getJMSXPropertyNames();
      meta.hasMoreElements(){ System.out.println(meta.nextElement()); }

      </code>

      2. Observe that the second time around nothing is printed, since the enumeration is empty.

      Actual results:
      If conn.getMetaData().getJMSXPropertyNames() is called a second time on the same connection or in a different connection (from the same JVM) an empty enumeration is returned.

      Expected results:
      Every time getJMSXPropertyNames() is called, a enumeration with the property names should be returned.

        Activity

        Transition Time In Source Status Execution Times Last Executer Last Execution Date
        Open Open Resolved Resolved
        39d 15h 7m 1 Rajith Attapattu 29/Jun/11 17:21
        Rajith Attapattu made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Rajith Attapattu made changes -
        Field Original Value New Value
        Description JMS Connection.getMetaData returns a usable enumeration only on the first call to getMetaData.
        Invoking getMetaData multiple times, either on the same connection or even completely different connections results in an empty Enumeration.

        Steps to Reproduce:
        1. Run a client with the following code

        Connection conn = factory.createConnection();
        for (Enumeration meta = conn.getMetaData().getJMSXPropertyNames();
        meta.hasMoreElements();)
        {
          System.out.println(meta.nextElement());
        }

        System.out.println("Getting connection meta data again");
        for (Enumeration meta = conn.getMetaData().getJMSXPropertyNames();
        meta.hasMoreElements();)
        {
          System.out.println(meta.nextElement());
        }

        2. Observe that the second time around nothing is printed, since the enumeration is empty.


        Actual results:
        If conn.getMetaData().getJMSXPropertyNames() is called a second time on the same connection or in a different connection (from the same JVM) an empty enumeration is returned.

        Expected results:
        Every time getJMSXPropertyNames() is called, a enumeration with the property names should be returned.
        JMS Connection.getMetaData returns a usable enumeration only on the first call to getMetaData.
        Invoking getMetaData multiple times, either on the same connection or even completely different connections results in an empty Enumeration.

        Steps to Reproduce:
        1. Run a client with the following code

        <code>
        Connection conn = factory.createConnection();
        for (Enumeration meta = conn.getMetaData().getJMSXPropertyNames();
        meta.hasMoreElements();)
        {
          System.out.println(meta.nextElement());
        }

        System.out.println("Getting connection meta data again");
        for (Enumeration meta = conn.getMetaData().getJMSXPropertyNames();
        meta.hasMoreElements();)
        {
          System.out.println(meta.nextElement());
        }
        </code>

        2. Observe that the second time around nothing is printed, since the enumeration is empty.


        Actual results:
        If conn.getMetaData().getJMSXPropertyNames() is called a second time on the same connection or in a different connection (from the same JVM) an empty enumeration is returned.

        Expected results:
        Every time getJMSXPropertyNames() is called, a enumeration with the property names should be returned.
        Rajith Attapattu created issue -

          People

          • Assignee:
            Rajith Attapattu
            Reporter:
            Rajith Attapattu
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development