|
|
|
|
|
|
Key
These lines were removed. This word was removed.
These lines were added. This word was added.
|
View page history
|
There are 3 changes. View first change.
| | h1. Pausing SIBus MDBs |
| | |
| |  | Message-driven beans (MDBs) on the service integration bus (SIBus) can now be stopped and restarted. |
| | | 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. |
| | |
 |  | I've talked about the [Service Integration Bus] (SIBus), the [JMS|Java Message Service] provider built into [WAS|WebSphere Application Server] v6.0+. Since the SIBus implements JMS and WAS implements [J2EE|Java Enterprise Edition], the main/best way to receive messages is using message-driven beans (MDBs). |
| | | h2. Background |
| | |
 | | As I explained in my [Listener Port vs. Activation Spec|http://www.ibm.com/developerworks/blogs/page/woolf?entry=rad_6_listener_port_vs] 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|J2EE Connector Architecture] connectors, which makes them more standard. |
| | | I've talked about the [Service Integration Bus] (SIBus), the [JMS|Java Message Service] provider built into [WAS|WebSphere Application Server] v6.0+. Since the SIBus implements JMS and WAS implements [J2EE|Java Enterprise Edition], the main/best/[only|http://www.ibm.com/developerworks/blogs/page/woolf?entry=can_t_use_messagelisteners_in] way to receive messages is using message-driven beans (MDBs). |
| | |
| | As I explained in my [Listener Port vs. Activation Spec|http://www.ibm.com/developerworks/blogs/page/woolf?entry=rad_6_listener_port_vs] 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|J2EE Connector Architecture] 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. |
| | |
| | h2. 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|http://www-1.ibm.com/support/docview.wss?uid=swg1PK49507], 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. |
|
|
|