IBM®
Skip to main content
    Country/region [select]      Terms of use
 
 
    
     Home      Products      Services & solutions      Support & downloads      My account     
 
developerworks > My developerWorks >  Dashboard > Bobby Woolf: WebSphere SOA and J2EE in Practice > ... > IBM Software Support > Pausing SIBus MDBs
developerWorks
Log In   View a printable version of the current page.
Overview Connect Spaces Forums Wikis
Pausing SIBus MDBs
Added by bwoolf, last edited by bwoolf on Dec 20, 2007  (view change)
Labels: 
(None)

Pausing SIBus MDBs

Message-driven beans (MDBs) on the service integration bus (SIBus) can now be stopped and restarted. This is in a new patch for WAS, PK49507.

Background

I've talked about the Service Integration Bus (SIBus), the JMS provider built into WAS v6.0+. Since the SIBus implements JMS and WAS implements J2EE, the main/best/only way to receive messages is using message-driven beans (MDBs).

As I explained in my Listener Port vs. Activation Spec posts, WAS 6 activation specs for connecting MDBs to the SIBus work differently from the listener ports used for the same purpose in WAS 5 and still used in WAS 6 to connect to WebSphere MQ. The main difference is that while listener ports are proprietary (each vendor invented their own approach), activation specs are implemented as J2C 1.5 connectors, which makes them more standard.

A feature of listener ports was that they could be stopped and started. Stopping a listener port prevented its pool of MDs from receiving messages, even when there were messages on the queue/topic. This could be used to prevent messages from being consumed when the MDBs were not working properly. The Message Consumer Rollback Pattern, one of my messaging patterns, explains that when a valid message cannot be processed successfully, it should be rolled back onto the destination to be retried later. A listener port could be configured such that if the same message rolled back too many times, the app server would stop the port, preventing it and its MDBs from wasting any more time processing messages unsuccessfully. When an admin fixed whatever the problem was (such as a database being down), they could then restart the listener port, which would go back to consuming and processing messages, this time successfully.

Activation specs lost this stop/start ability that listener ports have, mainly because J2C connectors historically did not have this ability. That ability has now been added to the J2C connector that implements activation specs and connects an MDB class to a JMS destinations in the SIBus.

PK49507

The patch that makes this improvement is PK49507: The SIBus resource adapter will now indicate that an MDB should be stopped if a certain number of failures are hit, which is part of WAS v6.0.2.23 and v6.1.0.13. The patch adds a new MBean class, J2CMessageEndpoint, which can be used to pause() and resume() its connector. It also introduces a new activation spec property, maxSequentialMessageFailure, to specify how many times a message can rollback; if the message rolls back that many times, the connector issues an error message, CWSIV0605W. An app can detect this error message and react by using the MBean to pause the connector.


 
    About IBM Privacy Contact