[jboss-user] [Messaging, JMS & JBossMQ] - Re: Connection not authorized to addMessages to destination
teodoro21
do-not-reply at jboss.com
Tue Jul 10 17:29:23 EDT 2007
Hi, Thanks Adrian for your reply.
The following is my configuration's files:
----- jbossmq-destinations-service.xml: -----
<depends optional-attribute-name="DestinationManager">jboss.mq:service=DestinationManager
<depends optional-attribute-name="SecurityManager">jboss.mq:service=SecurityManager
-----------------------------------------------------------------------------
----- jbossmq-service.xml: -----
<?xml version="1.0" encoding="UTF-8"?>
<!-- $Id: jbossmq-service.xml 38187 2005-11-16 23:55:44Z adrian $ -->
<!-- ==================================================================== -->
<!-- JBossMQ -->
<!-- ==================================================================== -->
<!-- ==================================================================== -->
<!-- JBossMQ Interceptor chain configuration -->
<!-- ==================================================================== -->
<!-- To tune performance, you can have the Invoker skip over the TracingInterceptor -->
<!-- and/or the SecurityManager, but then you loose the ability to trace and/or enforce security. -->
<depends optional-attribute-name="NextInterceptor">jboss.mq:service=TracingInterceptor
jboss:service=Naming
org.jboss.mq.server.TracingInterceptor
<depends optional-attribute-name="NextInterceptor">jboss.mq:service=SecurityManager
java:/jaas/jbossmq
<depends optional-attribute-name="NextInterceptor">jboss.mq:service=DestinationManager
<!--
| The ClientMonitorInterceptor disconnects clients that have been idle for to long.
| This interceptor is not enabled by default since the server might disconnect clients
| when the it is under high load.
-->
<!--
80000
<depends optional-attribute-name="NextInterceptor">jboss.mq:service=DestinationManager
-->
<!-- A Thread pool service -->
JMSThread
JBossMQ Server Threads
<!-- The max number of threads in the pool -->
10
<!-- The max number of tasks before the queue is full -->
1000
<!-- The behavior of the pool when a task is added and the queue is full.
abort - a RuntimeException is thrown
run - the calling thread executes the task
wait - the calling thread blocks until the queue has room
discard - the task is silently discarded without being run
discardOldest - check to see if a task is about to complete and enque
the new task if possible, else run the task in the calling thread
-->
run
<!-- ==================================================================== -->
<!-- System Destinations -->
<!-- ==================================================================== -->
<!-- Dead Letter Queue -->
<depends optional-attribute-name="DestinationManager">jboss.mq:service=DestinationManager
<depends optional-attribute-name="SecurityManager">jboss.mq:service=SecurityManager
john
needle
DurableSubscriberExample
DurableSubscriberExample
test
myTopic
-------------------------------------------------------------------------
TABLES:
JMS_ROLES:
ROLEID USERID
-------------------------------- ---------
durpublisher dynsub
publisher dynsub
guest guest
j2ee guest
john guest
durpublisher john
publisher john
subscriber john
noacc nobody
JMS_USERS :
USERID PASSWD CLIENTID
----------------- ---------------------
dynsub dynsub
nobody nobody
john needle DurableSubscriberExample
j2ee j2ee
guest guest
Now the error is changed, when I'm try to deploy my MDB I receive this error:
22:49:40,975 INFO [EjbModule] Deploying MessageDrivenEJB
22:49:41,223 WARN [JMSContainerInvoker] JMS provider failure detected for MessageDrivenEJB
org.jboss.deployment.DeploymentException: Error during topic setup; - nested throwable: (javax.jms.JMSSecurityException: Connection not authorized to do durable subscription on topic: myTopic)
at org.jboss.deployment.DeploymentException.rethrowAsDeploymentException(DeploymentException.java:53)
at org.jboss.ejb.plugins.jms.JMSContainerInvoker.innerStartDelivery(JMSContainerInvoker.java:720)
at org.jboss.ejb.plugins.jms.JMSContainerInvoker.startService(JMSContainerInvoker.java:839)
at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:289)
at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:245)
at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
But If I use I do it without errors!
This is my ejb-jar.xml:
<message-driven>
Message Driven Bean
<display-name>MessageDrivenEJB</display-name>
<ejb-name>MessageDrivenEJB</ejb-name>
<ejb-class>it.java.lab.mdb.MessageDrivenEJBBean</ejb-class>
<messaging-type>javax.jms.MessageListener</messaging-type>
<transaction-type>Container</transaction-type>
<message-destination-type>javax.jms.Topic</message-destination-type>
<activation-config>
<activation-config-property>
<activation-config-property-name>destinationType</activation-config-property-name>
<activation-config-property-value>javax.jms.Topic</activation-config-property-value>
</activation-config-property>
<activation-config-property>
<activation-config-property-name>subscriptionDurability</activation-config-property-name>
<activation-config-property-value>Durable</activation-config-property-value>
</activation-config-property>
<activation-config-property>
<activation-config-property-name>subscriptionName</activation-config-property-name>
<activation-config-property-value>myTopic</activation-config-property-value>
</activation-config-property>
<activation-config-property>
<activation-config-property-name>destination</activation-config-property-name>
<activation-config-property-value>topic/myTopic</activation-config-property-value>
</activation-config-property>
</activation-config>
</message-driven>
Please let me know if you need any others details to help me!
Thanks in advance
Teo
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4062692#4062692
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4062692
More information about the jboss-user
mailing list