• Post Reply 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
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Frits Walraven
Bartenders:
  • Piet Souris
  • Himai Minh

MDB port listener dies on exception - help!

 
Ranch Hand
Posts: 61
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm a newbie at MQ and MDBs.

So when a message comes in to my message-driven EJB, and, say, I have a temporary issue, I want to put it back on the queue. (Nevermind for now that it will just immediately retry a millisecond later).

I thought it would be easy to do this by just throwing a RuntimeException. My Head First EJB was telling me that the container just puts the message back on the queue. But what's happening is that the listener port on that JMS queue halts after the retries are done, and I can no longer receive messages. I don't see ejbRemove() in my logs and it looks like my bean is still alive.

Is this normal and expected behavior for the EJB container? Or is it some quirk of MQ or WebSphere Application Server?

I'm running the embedded MQ (5.3) messaging server on WebSphere Application Server 5.1 on my laptop.

P.S. I haven't tried rolling back a container-managed transaction yet, but I'd rather not increase the complexity of my code with that. Then again, if everyone thinks that's the best option, and my port listener won't die...
 
Hey! Wanna see my flashlight? It looks like this tiny ad:
Free, earth friendly heat - from the CodeRanch trailboss
https://www.kickstarter.com/projects/paulwheaton/free-heat
reply
    Bookmark Topic Watch Topic
  • New Topic