[jboss-user] [Messaging, JMS & JBossMQ] - Connection not authorized to addMessages to destination

teodoro21 do-not-reply at jboss.com
Fri Jul 6 17:12:04 EDT 2007


I have configured a durable topic and I have deployed my simple MDB.

my Oracle'jms_tables contains:

JMS_SUBSCRIPTIONS:

CLIENTID            SUBNAME            TOPIC                   SELECTOR                                                                                                                                                                                                                                                        
-------------------------------------------------------------------------
ID:1                     myTopic             myTopic                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

JMS_USERS:


USERID   PASSWD                     CLIENTID                                                                                                                         
dynsub    dynsub                                                                                                                                                            
nobody    nobody                                                                                                                                                            
john        needle                        DurableSubscriberExample                                                                                                         
j2ee        j2ee                                                                                                                                                              
guest      guest                                                                                                                                                             



When I try to publish a text message:
......
TopicConnectionFactory tcf = (TopicConnectionFactory)tmp;
conn = tcf.createTopicConnection("john","needle");
topic = (Topic)jndiContext.lookup("topic/myTopic");
session = conn.createTopicSession(false,
                        TopicSession.AUTO_ACKNOWLEDGE);
conn.start();     
TopicPublisher send = session.createPublisher(topic);
TextMessage tm = session.createTextMessage("test message!");
send.publish(tm);
send.close();


I receive the following exception:

javax.jms.JMSSecurityException: Connection not authorized to addMessages to destination: myTopic
at org.jboss.mq.security.ServerSecurityInterceptor.addMessage(ServerSecurityInterceptor.java:167)
	at org.jboss.mq.server.TracingInterceptor.addMessage(TracingInterceptor.java:226)
	at org.jboss.mq.server.JMSServerInvoker.addMessage(JMSServerInvoker.java:112)
	at org.jboss.mq.il.uil2.ServerSocketManagerHandler.handleMsg(ServerSocketManagerHandler.java:111)
	at org.jboss.mq.il.uil2.SocketManager$ReadTask.handleMsg(SocketManager.java:395)
	at org.jboss.mq.il.uil2.msgs.BaseMsg.run(BaseMsg.java:398)
	at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:748)
	at java.lang.Thread.run(Thread.java:595)
Process exited with exit code 0.


Please help me.
teo




View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4061486#4061486

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4061486



More information about the jboss-user mailing list