activemq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Arthur Naseef (JIRA)" <>
Subject [jira] Created: (AMQ-3166) client calls to createProducer() and send() successful even though BrokerFilter methods throw exceptions
Date Fri, 28 Jan 2011 05:37:43 GMT
client calls to createProducer() and send() successful even though BrokerFilter methods throw

                 Key: AMQ-3166
             Project: ActiveMQ
          Issue Type: Bug
          Components: Broker, JMS client
    Affects Versions: 5.4.2
            Reporter: Arthur Naseef

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 <authorizationPlugin> 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.



    <broker xmlns=""
            destroyApplicationContextOnStop="true" >

            <kahaDB directory="${activemq.base}/data/kahadb"/>
          <simpleAuthenticationPlugin anonymousAccessAllowed="true">
                  <authenticationUser username="user" password="password"

                      <authorizationEntry queue="ABC" read="users" write="users" admin="users"
                      <authorizationEntry topic="ActiveMQ.Advisory.>" read="users" write="users"
admin="users" />

            <transportConnector name="openwire" uri="tcp://"/>

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

View raw message