This week's book giveaway is in the Java 8 forum.
We're giving away four copies of Java 8 in Action and have Raoul-Gabriel Urma, Mario Fusco, and Alan Mycroft on-line!
See this thread for details.
The moose likes EJB and other Java EE Technologies and the fly likes MDB port listener dies on exception - help! Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "MDB port listener dies on exception - help!" Watch "MDB port listener dies on exception - help!" New topic

MDB port listener dies on exception - help!

Jimmy Ho
Ranch Hand

Joined: Jul 31, 2007
Posts: 56
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...
subject: MDB port listener dies on exception - help!
Similar Threads
Deploying MDBs in a Websphere Cluster
JMS client request/reply from WebSphere MQ Queue
Communication between Websphere MQ 6.0 and Websphere Application Server ND 6.1
MQJMS3037 Exception
WAS61: MDB listening to MQ - need help with deployment descriptor