Win a copy of Practical SVG this week in the HTML/CSS/JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Need to stop getting the messages from the Message driven Bean

 
Rahul Babbar
Ranch Hand
Posts: 210
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I am facing the following issue.

I have a Message driven bean, which accepts messages of type TextMessage. However, just for testing, i wrote some Client which posts the msg in the queue being listened to by the MDB, and i posted MapMessage from that client.
Now, it fails with a class cast exception but the problem is that the messages just keep on coming, one after the other, after a certain interval of time, and exceptions keep getting thrown on the console, probably because the subscription is durable.
Basically, i want to get rid of the exceptions by making the subscription as non-durable(if it can be made).
Where does the Server store that it needs to post this message in the queue again and again, so that probably i can remove the setting from there.
Or is there any other way i can stop getting the msg in the MDB.
Also, i would like to change minimal code, because its part of the application, like i would not like to modify the existing MDB to filter out the messages.

I am using Weblogic 10.

Thanks a lot,
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 35753
412
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can you configure WebLogic to use a dead letter queue after a certain number of retries?
 
Rahul Babbar
Ranch Hand
Posts: 210
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks,

Can you please explain how exactly to do it.

tried googling, but couldn't find...

 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 35753
412
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Rahul,
I was actually asking. I've used the dead letter queue, but not on WebLogic.

A google search tells me the answer is yes.
 
Rahul Babbar
Ranch Hand
Posts: 210
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,

I was able to get rid of it using from the weblogic management console.
Services->Messaging->JMS Modules -> <Queue>

Initially i tried to change the redelivery limit to some reasonable value of 10 instead of -1.
but it did not seem to work, because the redelivery had already been made more than 10 times, perhaps.

So, it changed the "Delivery Mode Override" of the queue to be non persistent instead of persistent.

and it works...

Thanks...

 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!