APAR status
Closed as program error.
Error description
When using Message-driven beans (MDBs) within WebSphere
Application Server Version 5.x, a Listener Port must also be
defined. The Listener Port is used to deliver messages to the
MDBs. One of the properties of a Listener Port is Max retries,
which defines the number of times the Listener Port attempts to
deliver a message to an MDB before shutting itself down.
If a Message-driven bean (MDB) running within WebSphere
Application Server Version 5.x throws an error while processing
a message, the application server will roll the message back to
the queue where it originated from. The delivery count of the
message is then checked against the Max retries property of the
Listener Port associated with the MDB. If the delivery count is
greater than the value of Max retries, the Listener Port should
be shut down.
However, if an MDB throws a runtime exception while a message is
being processed, the Listener Port will continue to deliver
messages to the MDB even if the delivery count of the message is
greater than the value of Max retries!
For example, when a runtime exception is thrown from the
onMessage() method while processing message N, the Listener Port
continues to deliver messages (N+1), (N+2), etc. Sometimes it
stops after just delivering one more message, while at other
times it delivers several more messages before stopping. After
restarting the application server, the Listener Port redelivers
message N followed by (N+2), (N+3), etc. (assuming only (N+1)
was delivered following the exception).
This can lead to messages being processed out of their correct
sequence.
Local fix
NA
Problem summary
****************************************************************
* USERS AFFECTED: This problem affects customers who use the *
* Java Message Service (JMS) functionality *
* provided with WebSphere Application Server *
* Version 5.x. *
****************************************************************
* PROBLEM DESCRIPTION: When using Message-driven beans (MDBs) *
* within WebSphere Application Server *
* Version 5.x, a Listener Port must also *
* be defined. The Listener Port is used *
* to deliver messages to the MDBs. One *
* of the properties of a Listener Port *
* is Max retries, which defines the *
* number of times the Listener Port *
* attempts to deliver a message to an *
* MDB before shutting itself down. If *
* a Message-driven bean (MDB)running *
* within WebSphere Application Server *
* Version 5.x throws an error while *
* processing a message, the application *
* server will roll the message back to *
* the queue where it originated from. *
* The delivery count of the message is *
* then checked against the Max retries *
* property of the Listener Port *
* associated with the MDB. If the *
* delivery count is greater than the *
* value of Max retries, the Listener *
* Port should be shut down. *
* *
* However, if an MDB throws a runtime *
* exception while a message is being *
* processed, the Listener Port will *
* continue to deliver messages to the *
* MDB even if the delivery count of the *
* message is greater than the value of *
* Max retries! *
* *
* For example, when a runtime exception *
* is thrown from the onMessage() method *
* while processing message N, the *
* ListenerPort continues to deliver *
* messages (N+1), (N+2), etc. Sometimes *
* it stops after just delivering one more *
* message, while at other times it *
* delivers several more messages before *
* stopping. After restarting the *
* application server, the Listener Port *
* redelivers message N followed by (N+2), *
* (N+3), etc. (assuming only (N+1) was *
* delivered following the exception). *
* *
* This can lead to messages being *
* processed out of their correct *
* sequence. *
****************************************************************
* RECOMMENDATION: *
****************************************************************
When an MDB's onMessage() method generates a runtime
exception, the Server Session associated with the MDB is
notified. The Session returns itself to the Server Session
Pool, before making a check to see if the Listener Port for
the MDB needs to be stopped. This check is made against
certain flags on the Server Session.
However, in between the Server Session being put back in the
Session Pool, and the check being made, the Server Session
can be removed from the pool and reused. This results in the
Session being re-initialised, and the fields that are used
in the check are reset. In this situation, the check to see
if the Listener Port needs to be stopped always fails,
leaving the Listener Port running.
Problem conclusion
The behaviour of the Server Session and Server Session Pool
has changed, so that when the maximum retries limit has been
reached, the Server Session sets a flag on the Server Session
Pool to indicate that it should be closed. This prevents any
new Server Sessions being returned from the pool. The Server
Session then stops the Listener Port asynchronously, to
prevent a deadlock situation from occurring.
Temporary fix Comments
APAR information |
APAR number |
PQ89393 |
Reported component name |
WAS BASE 5.0 |
Reported component ID |
5630A3600 |
Reported release |
00W |
Status |
CLOSED PER |
PE |
NoPE |
HIPER |
NoHIPER |
Special Attention |
NoSpecatt |
Submitted date |
2004-05-26 |
Closed date |
2004-06-08 |
Last modified date |
2004-06-08 |
APAR is sysrouted FROM one or more of the following:
APAR is sysrouted TO one or more of the following:
Modules/Macros
Publications Referenced
Applicable component levels |
R003 PSY |
UP |
R00A PSY |
UP |
R00H PSY |
UP |
R00I PSY |
UP |
R00P PSY |
UP |
R00S PSY |
UP |
R00W PSY |
UP |
R103 PSY |
UP |
R10A PSY |
UP |
R10H PSY |
UP |
R10I PSY |
UP |
R10P PSY |
UP |
R10S PSY |
UP |
R10W PSY |
UP |
|