Return-Path: Delivered-To: apmail-activemq-dev-archive@www.apache.org Received: (qmail 66995 invoked from network); 19 Feb 2007 13:46:36 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 19 Feb 2007 13:46:36 -0000 Received: (qmail 37643 invoked by uid 500); 19 Feb 2007 13:46:39 -0000 Delivered-To: apmail-activemq-dev-archive@activemq.apache.org Received: (qmail 37627 invoked by uid 500); 19 Feb 2007 13:46:39 -0000 Mailing-List: contact dev-help@activemq.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@activemq.apache.org Delivered-To: mailing list dev@activemq.apache.org Received: (qmail 37609 invoked by uid 99); 19 Feb 2007 13:46:39 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 19 Feb 2007 05:46:39 -0800 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO brutus.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 19 Feb 2007 05:46:31 -0800 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 288CB7141ED for ; Mon, 19 Feb 2007 05:46:09 -0800 (PST) Message-ID: <17558574.1171892769160.JavaMail.jira@brutus> Date: Mon, 19 Feb 2007 05:46:09 -0800 (PST) From: "james strachan (JIRA)" To: dev@activemq.apache.org Subject: [jira] Resolved: (AMQ-1161) PooledConnectionFactory / PooledSession generates UnsupportedOperationException when publishing to a topic In-Reply-To: <11711368.1171296603745.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/activemq/browse/AMQ-1161?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] james strachan resolved AMQ-1161. --------------------------------- Resolution: Fixed Fix Version/s: 4.2.0 > 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 > Fix For: 4.2.0 > > 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.