[ 
https://issues.apache.org/jira/browse/QPID-3270?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Rajith Attapattu updated QPID-3270:
-----------------------------------

    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.

  was:
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
> ---------------------------------------------------------------------------------------------
>
>                 Key: QPID-3270
>                 URL: https://issues.apache.org/jira/browse/QPID-3270
>             Project: Qpid
>          Issue Type: Bug
>          Components: Java Client
>    Affects Versions: 0.6, 0.8, 0.10
>            Reporter: Rajith Attapattu
>            Assignee: Rajith Attapattu
>            Priority: Minor
>             Fix For: 0.11
>
>
> 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.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:[email protected]

Reply via email to