Bug 1016081 - qpid java client example use AMQConnection instead of proper JMS Connection Factory
qpid java client example use AMQConnection instead of proper JMS Connection F...
Status: NEW
Product: Red Hat Enterprise MRG
Classification: Red Hat
Component: qpid-java (Show other bugs)
3.0
Unspecified Unspecified
medium Severity low
: ---
: ---
Assigned To: Rajith Attapattu
Messaging QE
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-10-07 09:05 EDT by Zdenek Kraus
Modified: 2014-07-30 16:37 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed:
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Zdenek Kraus 2013-10-07 09:05:23 EDT
Description of problem:
In our example client qpid-java-example, there is AMQConnection used, instead of proper JMS Connection Factory.

Version-Release number of selected component (if applicable):
qpid-java-example-0.23-1.el6.noarch

How reproducible:
100%

Steps to Reproduce:
1. rpm -ql "qpid-java-example"
/usr/share/doc/qpid-java-0.23/examples
/usr/share/doc/qpid-java-0.23/examples/example.log4j
/usr/share/doc/qpid-java-0.23/examples/org
/usr/share/doc/qpid-java-0.23/examples/org/apache
/usr/share/doc/qpid-java-0.23/examples/org/apache/qpid
/usr/share/doc/qpid-java-0.23/examples/org/apache/qpid/example
/usr/share/doc/qpid-java-0.23/examples/org/apache/qpid/example/Drain.java
/usr/share/doc/qpid-java-0.23/examples/org/apache/qpid/example/Hello.java
/usr/share/doc/qpid-java-0.23/examples/org/apache/qpid/example/ListReceiver.java
/usr/share/doc/qpid-java-0.23/examples/org/apache/qpid/example/ListSender.java
/usr/share/doc/qpid-java-0.23/examples/org/apache/qpid/example/MapReceiver.java
/usr/share/doc/qpid-java-0.23/examples/org/apache/qpid/example/MapSender.java
/usr/share/doc/qpid-java-0.23/examples/org/apache/qpid/example/OptionParser.java
/usr/share/doc/qpid-java-0.23/examples/org/apache/qpid/example/Spout.java
/usr/share/doc/qpid-java-0.23/examples/org/apache/qpid/example/hello.properties
/usr/share/doc/qpid-java-0.23/examples/run_example.sh

2. grep 'AMQConnection' /usr/share/doc/qpid-java-0.23/examples/org/apache/qpid/example/*.java
/usr/share/doc/qpid-java-0.23/examples/org/apache/qpid/example/ListReceiver.java:import org.apache.qpid.client.AMQConnection;
/usr/share/doc/qpid-java-0.23/examples/org/apache/qpid/example/ListReceiver.java:            new AMQConnection("amqp://guest:guest@test/?brokerlist='tcp://localhost:5672'");
/usr/share/doc/qpid-java-0.23/examples/org/apache/qpid/example/ListSender.java:import org.apache.qpid.client.AMQConnection;
/usr/share/doc/qpid-java-0.23/examples/org/apache/qpid/example/ListSender.java:            new AMQConnection("amqp://guest:guest@test/?brokerlist='tcp://localhost:5672'");
/usr/share/doc/qpid-java-0.23/examples/org/apache/qpid/example/MapReceiver.java:import org.apache.qpid.client.AMQConnection;
/usr/share/doc/qpid-java-0.23/examples/org/apache/qpid/example/MapReceiver.java:            new AMQConnection("amqp://guest:guest@test/?brokerlist='tcp://localhost:5672'");
/usr/share/doc/qpid-java-0.23/examples/org/apache/qpid/example/MapSender.java:import org.apache.qpid.client.AMQConnection;
/usr/share/doc/qpid-java-0.23/examples/org/apache/qpid/example/MapSender.java:            new AMQConnection("amqp://guest:guest@test/?brokerlist='tcp://localhost:5672'");
/usr/share/doc/qpid-java-0.23/examples/org/apache/qpid/example/OptionParser.java:import org.apache.qpid.client.AMQConnection;
/usr/share/doc/qpid-java-0.23/examples/org/apache/qpid/example/OptionParser.java:        Connection con = new AMQConnection(buf.toString());



Actual results:
AMQConnection is used

Expected results:
Use proper JMS Connection Factory

Additional info:
Also in Doc: Messaging programming reference in Example 20.1. Sending a Java JMS MapMessage the client imports the AMQConnection, but the actual code is snipped. But the presence of such include is quite disturbing.

Note You need to log in before you can comment on or make changes to this bug.