General J2EE: Exception in Websphere JMS Topic
I am facing a small issue with WebSphere Topic ,
- Posted by: Ajith Prabhakar
- Posted on: February 25 2005 16:27 EST
I am using embedded WebSphere MQ and creating a Topic
Following are the steps That I had done for creating a Topic
1) Installed WebSphere Application Server with Embedded Messaging Server and Client
2) Created a Topic Connection Factory
(Given a Name and JNDI Name for it)
3) Created a Topic
(Given a Name JNDI name and Topic Name)
I have an application deployed on Websphere, This has a servlet which starts a Thread which uses recieve() on this Topic for new messages.
javax.jms.IllegalStateException: Non-durable subscriber invalidated on transaction boundary
[2/24/05 17:43:55:061 PST] 7049048d SystemErr R at com.ibm.ejs.jms.JMSTopicSubscriberHandle.getOpenTopicSubscriber(JMSTopicSubscriberHandle.java(Compiled Code))
[2/24/05 17:43:55:061 PST] 7049048d SystemErr R at com.ibm.ejs.jms.JMSTopicSubscriberHandle.getOpenMessageConsumer(JMSTopicSubscriberHandle.java(Compiled Code))
[2/24/05 17:43:55:061 PST] 7049048d SystemErr R at com.ibm.ejs.jms.JMSMessageConsumerHandle.receive(JMSMessageConsumerHandle.java(Compiled Code))
When I started this application I am getting following error in the Error log
Can you please guide me where I am going wrong ?
I am using Websphere 184.108.40.206 version
Thanks in Advance
"a non-durable subscriber can only be used in the same transactional context (for example, a global transaction or an unspecified transaction context) that existed when the subscriber was created. A non-durable subscriber is invalidated whenever a sharing boundary (in general, a local or global transaction boundary) is crossed, resulting in a javax.jms.IllegalStateException with message text Non-durable subscriber invalidated on transaction boundary...If you want to cache a subscriber (to wait to receive messages that arrived since it was created), then use a durable subscriber (for which this restriction does not apply). Do not cache non-durable subscribers."
I guess the problem is arising coz i am spawning a Thread from the Servlet, when i tried the same code as a standalone application its working well.
i guess i have to deploy listener application as MDB.
Thanks for ur comments