activemq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Adam Lewandowski (JIRA)" <j...@apache.org>
Subject [jira] Created: (AMQ-1161) PooledConnectionFactory / PooledSession generates UnsupportedOperationException when publishing to a topic
Date Mon, 12 Feb 2007 16:10:03 GMT
PooledConnectionFactory / PooledSession generates UnsupportedOperationException when publishing
to a topic
----------------------------------------------------------------------------------------------------------

                 Key: AMQ-1161
                 URL: https://issues.apache.org/activemq/browse/AMQ-1161
             Project: ActiveMQ
          Issue Type: Bug
          Components: JMS client
    Affects Versions: 4.1.0
            Reporter: Adam Lewandowski
         Attachments: PooledTopicPublisherTest.java

PooledSession does not appear to use the Topic supplied to the createPublisher(topic) method.
When the publish(Message) method is called on the returned TopicPublisher instance, an UnsupportedOperationException
is thrown ("A destination must be specified.").
Some simple digging turns up the fact that the ActiveMQTopicPublisher instance nested inside
PooledTopicPublisher gets initialized with a ProducerInfo whose destination is null. Looks
like PooledSession.getTopicPublisher() is responsible for creating the publisher from the
contained ActiveMQSession, but does not supply a destination (explicitly passes null).

Sample code to recreate issue (also attached is Junit test case):
		ActiveMQTopic topic = new ActiveMQTopic("test");
		PooledConnectionFactory pcf = new PooledConnectionFactory();
		pcf.setConnectionFactory(new ActiveMQConnectionFactory("vm://test"));

		TopicConnection conn = (TopicConnection)pcf.createConnection();
		TopicSession session = conn.createTopicSession(false, Session.AUTO_ACKNOWLEDGE);
		TopicPublisher publisher = session.createPublisher(topic);
		publisher.publish(session.createMessage());


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message