Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Message consumer closing due to error in listening thread & Also message is not delete from the que

 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Report post to moderator
Hi,
I have a process which puts a message on a queue and then reading message from queue and insert in DB. When it inserted to DB, it tries to close the
queue, which it does successfully, but I quickly get:
16:19:26,429 WARN [SpyMessageConsumer] Message consumer closing due to error in listening thread.
javax.jms.IllegalStateException: The session is closed
at org.jboss.mq.SpySession.checkClosed(SpySession.java:1149)
at org.jboss.mq.SpySession.doAcknowledge(SpySession.java:175)
at org.jboss.mq.SpyMessage.doAcknowledge(SpyMessage.java:353)
at org.jboss.mq.SpyMessageConsumer.run(SpyMessageConsumer.java:704)
at java.lang.Thread.run(Thread.java:595)

When I close the queue, I do a

finally
{
if(qConnection!=null){
try {
qConnection.close();

} catch (JMSException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
}

What am I doing wrong, if anything?

When I reading message from queue.I will Redelivered same Message.
also message is not delete from the queue.


16 Nov 09 16:42:34,663]Thread specific :: Received Message: org.jboss.mq.SpyObjectMessage {
Header {
jmsDestination : QUEUE.Open_NMS_Evnet_Queue
jmsDeliveryMode : 2
jmsExpiration : 0
jmsPriority : 4
jmsMessageID : ID:2-12583698243211
jmsTimeStamp : 1258369824321
jmsCorrelationID: null
jmsReplyTo : null
jmsType : null
jmsRedelivered : true
jmsProperties : {JMSXDeliveryCount=252, JMS_JBOSS_REDELIVERY_COUNT=251}
jmsPropReadWrite: false
msgReadOnly : true
producerClientId: ID:2
}
}


I am awaiting your reply.
Please Quick response

Thanks & Regards
Jay Prakash
 
Sheriff
Posts: 22781
131
Eclipse IDE Spring VI Editor Chrome Java Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Report post to moderator
Please use code tags.
 
Rob Spoor
Sheriff
Posts: 22781
131
Eclipse IDE Spring VI Editor Chrome Java Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Report post to moderator
Duplicated here with a bit more info. Closing this one.
 
Don't get me started about those stupid light bulbs.
    Bookmark Topic Watch Topic
  • New Topic