Return-Path: Delivered-To: apmail-activemq-dev-archive@www.apache.org Received: (qmail 97569 invoked from network); 15 Feb 2011 00:23:22 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 15 Feb 2011 00:23:22 -0000 Received: (qmail 4580 invoked by uid 500); 15 Feb 2011 00:23:22 -0000 Delivered-To: apmail-activemq-dev-archive@activemq.apache.org Received: (qmail 4369 invoked by uid 500); 15 Feb 2011 00:23:21 -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 4294 invoked by uid 99); 15 Feb 2011 00:23:20 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 15 Feb 2011 00:23:20 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED,T_RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 15 Feb 2011 00:23:18 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id 7662C1A5FF4 for ; Tue, 15 Feb 2011 00:22:57 +0000 (UTC) Date: Tue, 15 Feb 2011 00:22:57 +0000 (UTC) From: "Arthur Naseef (JIRA)" To: dev@activemq.apache.org Message-ID: <1395666256.16313.1297729377466.JavaMail.tomcat@hel.zones.apache.org> In-Reply-To: <4290097.257801296193063262.JavaMail.jira@thor> Subject: [jira] Updated: (AMQ-3166) client calls to createProducer() and send() successful even though BrokerFilter methods throw exceptions MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/AMQ-3166?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Arthur Naseef updated AMQ-3166: ------------------------------- Attachment: AMQ3166Test.java JUnit test program with 3 test cases: 1. Transacted sends which illustrate the problem 2. Transacted sends using a work-around 3. Non-transacted sends which do not have this problem > client calls to createProducer() and send() successful even though BrokerFilter methods throw exceptions > -------------------------------------------------------------------------------------------------------- > > Key: AMQ-3166 > URL: https://issues.apache.org/jira/browse/AMQ-3166 > Project: ActiveMQ > Issue Type: Bug > Components: Broker, JMS client > Affects Versions: 5.4.2 > Reporter: Arthur Naseef > Attachments: AMQ3166Test.java > > > Client calls to createProducer() always return without an error even though a BrokerFilter's addProducer() method throws an exception on the request. In contrast, createConsumer() throws an exception, as expected, when BrokerFilter's addConsumer() throws an exception. > Clients using transacted sessions always return successfully from send() when a BrokerFilter's send() method throws an exception. > Below is a broker configuration file using to illustrate the problem. > To reproduce the problem With this configuration, a test client only needs to connect with user = "user" and password = "password", and then attempt to produce messages with a transacted session to any queue other than ABC (e.g. DEF). > Tracing the cause of the issue has lead to finding that the client code for creating a producer uses an Async send for the producer information. The analogous code for consumers uses a Sync send. > I will work on a patch. It would be very helpful to have feedback on the operation of the bus and the best way to resolve this problem. Based on my research, it seems that createProducer() should be using a Sync send in place of the Async one. Not yet sure about send(). Another possibility is to move the security operations to earlier in the internal broker flow. > === SAMPLE BROKER XML === > xmlns="http://www.springframework.org/schema/beans" > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" > xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd > http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd"> > brokerName="localhost" > dataDirectory="${activemq.base}/data" > destroyApplicationContextOnStop="true" > > > > > > > > > groups="users"/> > > > > > > > > > > > > > > > > > > -- This message is automatically generated by JIRA. - For more information on JIRA, see: http://www.atlassian.com/software/jira