-
1. Re: JMS: durableTopic
adrian.brock Jun 6, 2003 2:43 PM (in response to dafei)In jbossmq-destinations-service.xml
look at the roles that have "create"
authority.
Then in jbossmq-state.xml
make sure your user is in one of those roles.
Regards,
Adrian -
2. Re: JMS: durableTopic
dafei Jun 6, 2003 3:22 PM (in response to dafei)andrian:
thank you again for your help. i went into these two files and used john needle and it worked very well:)) -
3. Re: JMS: durableTopic
dafei Jun 6, 2003 4:49 PM (in response to dafei)here is a new question:
it seems that in order for the receiver/subscriber to sit there waiting for new messages, their connections cannot be closed. if this is true, then imagine lots of people are running the receiver/subscriber...i wonder how it will impact JBOSS the server? -
4. Re: JMS: durableTopic
adrian.brock Jun 7, 2003 6:06 AM (in response to dafei)No, durable subsriptions are maintained
when the clients aren't connected.
Post new questions in new threads.
Regards,
Adrian -
5. Re: JMS: durableTopic
constant Jun 9, 2003 10:35 PM (in response to dafei)Hi!
I encounter the same problem. I follow the advice above, but it does'nt work. I present the relevant detail as follows:
I have the following items contained in the jbossmq-destinations-service.xml file:
<depends optional-attribute-name="DestinationManager">jboss.mq:service=DestinationManager
<depends optional-attribute-name="SecurityManager">jboss.mq:service=SecurityManager
I have the following items contained in the jbossmq-state.xml file:
Wrox
Wrox
DurableSubscriberWrox
john
dynsub
Wrox
Wrox
DurableSubscriberWrox
WroxPublications
I have the following code in my subscriber file:
Context jndiContext = JMSContextGetter.getInitialContext();
topicConnectionFactory = (TopicConnectionFactory)jndiContext.lookup("ConnectionFactory");
topic = (Topic)jndiContext.lookup("topic/WroxPublications");
topicConnection = topicConnectionFactory.createTopicConnection();
TopicSession topicSession = topicConnection.createTopicSession(false, Session.AUTO_ACKNOWLEDGE);
TopicSubscriber topicSubscriberDurableJ2EE = topicSession.createDurableSubscriber(topic, "Wrox", "MetaData LIKE '%J2EE%'", false);
When I run the subscriber class, I receive the following message:
Exception: javax.jms.JMSSecurityException: Connection not authorized to do durable subscription on topic: WroxPublications
Could anyone tell me the way out? Thanks! -
6. Re: JMS: durableTopic
xtazsf Jun 12, 2003 2:48 AM (in response to dafei)I use jboss of 3.2.1?
I encounter the same problem
14:41:43,851 INFO [JMSContainerInvoker] Reconnected to JMS provider
14:41:43,851 WARN [JMSContainerInvoker] JMS provider failure detected:
org.jboss.mq.SpyJMSException: Cannot subscribe to this Destination: null; - nest
ed throwable: (java.lang.NullPointerException)
at org.jboss.mq.Connection.addConsumer(Connection.java:1094)
at org.jboss.mq.SpyConnectionConsumer.(SpyConnectionConsumer.java:
73)
at org.jboss.mq.SpyConnection.createDurableConnectionConsumer(SpyConnect
ion.java:102)
at org.jboss.ejb.plugins.jms.JMSContainerInvoker.innerCreate(JMSContaine
rInvoker.java:509)
at org.jboss.ejb.plugins.jms.JMSContainerInvoker.startService(JMSContain
erInvoker.java:579)
at org.jboss.ejb.plugins.jms.JMSContainerInvoker$ExceptionListenerImpl.o
nException(JMSContainerInvoker.java:1079)
at org.jboss.ejb.plugins.jms.JMSContainerInvoker$1.run(JMSContainerInvok
er.java:591)
+ nested throwable:
java.lang.NullPointerException
at org.jboss.mq.DurableSubscriptionID.hashCode(DurableSubscriptionID.jav
a:79)
at java.util.HashMap.get(HashMap.java:266)
at org.jboss.mq.server.JMSTopic.addSubscriber(JMSTopic.java:77)
at org.jboss.mq.server.ClientConsumer.addSubscription(ClientConsumer.jav
a:137)
at org.jboss.mq.server.JMSDestinationManager.subscribe(JMSDestinationMan
ager.java:611)
at org.jboss.mq.server.JMSServerInterceptorSupport.subscribe(JMSServerIn
terceptorSupport.java:296)
at org.jboss.mq.security.ServerSecurityInterceptor.subscribe(ServerSecur
ityInterceptor.java:150)
at org.jboss.mq.server.TracingInterceptor.subscribe(TracingInterceptor.j
ava:677)
at org.jboss.mq.server.JMSServerInvoker.subscribe(JMSServerInvoker.java:
298)
at org.jboss.mq.il.jvm.JVMServerIL.subscribe(JVMServerIL.java:315)
at org.jboss.mq.Connection.addConsumer(Connection.java:1082)
at org.jboss.mq.SpyConnectionConsumer.(SpyConnectionConsumer.java:
73)
at org.jboss.mq.SpyConnection.createDurableConnectionConsumer(SpyConnect
ion.java:102)
at org.jboss.ejb.plugins.jms.JMSContainerInvoker.innerCreate(JMSContaine
rInvoker.java:509)
at org.jboss.ejb.plugins.jms.JMSContainerInvoker.startService(JMSContain
erInvoker.java:579)
at org.jboss.ejb.plugins.jms.JMSContainerInvoker$ExceptionListenerImpl.o
nException(JMSContainerInvoker.java:1079)
at org.jboss.ejb.plugins.jms.JMSContainerInvoker$1.run(JMSContainerInvok
er.java:591)
14:41:43,861 INFO [JMSContainerInvoker] Trying to reconnect to JMS provider
Could anyone tell me the way out? Thanks! -
7. Re: JMS: durableTopic
dafei Jun 13, 2003 8:37 PM (in response to dafei)help, help.
i was doing topic publising and subscribing very well on windows 2000, when i moved the code to a windows xp )home edition_, i am getting a SpyJMSException: cannot authenitcate user. dont know why it is so. please help.