are you sending a non persistent message or a message within a transaction?

If you are, then those messages are sent async.  The
jms.useAsyncSend=true option is only used to relax the JMS requirement
that persistent messages be sent sync.

Regards,
Hiram

On 10/31/06, massive.boisson <[EMAIL PROTECTED]> wrote:

Hi,

I am using AMQs securty with ssl authorization and authentication features
provided by recent changes to AMQ 4.1. So I am in fact using what Sepand and
my collegue ngcutura have done recently.

When I send a message to queue that I have no privilages to neither create
nor write to (the queue does not even exist to begin with), the call to
amqProducer.send(myDest, jmsMessage) passes successfully!
I only get exception throught exception listener. Obviously this is a big
problem for me, because my program continiues to function as if all is ok,
loosing the data from the message that it thought it sent.

The url my clien connects to is:
failover:(ssl://localhost:61616)?soTimeout=10000&connectionTimeout=0&trace=false&jms.closeTimeout=15000&jms.useAsyncSend=false&jms.copyMessageOnSend=false&jms.optimizeAcknowledge=false&wireFormat.maxInactivityDuration=30000&wireFormat.stackTraceEnabled=true&wireFormat.tightEncodingEnabled=true

Well long, but it does say: jms.useAsyncSend=false!

The async exception I get is:
javax.jms.JMSException: User KB is not authorized to write to:
queue://APPLICATIONS
        at
org.apache.activemq.util.JMSExceptionSupport.create(JMSExceptionSupport.java:46)
        at
org.apache.activemq.ActiveMQConnection.onAsyncException(ActiveMQConnection.java:1487)
        at
org.apache.activemq.ActiveMQConnection$2.run(ActiveMQConnection.java:1460)
        at
edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)
        at
edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)
        at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.SecurityException: User KB is not authorized to write
to: queue://APPLICATIONS
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown
Source)
        at java.lang.reflect.Constructor.newInstance(Unknown Source)
        at
org.apache.activemq.openwire.v2.BaseDataStreamMarshaller.createThrowable(BaseDataStreamMarshaller.java:216)
        at
org.apache.activemq.openwire.v2.BaseDataStreamMarshaller.tightUnmarsalThrowable(BaseDataStreamMarshaller.java:176)
        at
org.apache.activemq.openwire.v2.ConnectionErrorMarshaller.tightUnmarshal(ConnectionErrorMarshaller.java:69)
        at
org.apache.activemq.openwire.OpenWireFormat.doUnmarshal(OpenWireFormat.java:349)
        at
org.apache.activemq.openwire.OpenWireFormat.unmarshal(OpenWireFormat.java:275)
        at
org.apache.activemq.transport.tcp.TcpTransport.run(TcpTransport.java:136)
        at java.lang.Thread.run(Unknown Source)


Any ideas what is going on? I looked for the similar bug on the JIRA, but
found none.

Is this intended behaviour?

--MB


--
View this message in context: 
http://www.nabble.com/receiving-async-exception-when-not-appropriate-tf2545596.html#a7093182
Sent from the ActiveMQ - User mailing list archive at Nabble.com.




--
Regards,
Hiram

Blog: http://hiramchirino.com

Reply via email to