Author: denisF Message: In the infocenter, in section "Example 4: Automatically stopping an MDB when no exception destination is specified", it is stated that when an MDB activator is stopped, "A JMX notification is emitted by the JCA MBean and a log entry alerts the system administrator that the MDB has stopped"
When this happend we see in the log the following message: ActivationSpe I J2CA0524I: The Message Endpoint for ActivationSpec jms/act/tp_commandes (com.ibm.ws.sib.api.jmsra.impl.JmsJcaActivationSpecImpl) and MDB Application TitulairesPermis#TitulairesPermisEJB.jar#TestConsumerControleurImpl is deactivated. Fine. Now we want to write a stateless session been with a method that will catch the JMX notification when this event arises Here is the code : @Stateless public class TestJMXImpl extends AbstractControleur implements TestJMX, NotificationListener, Serializable { private static final long serialVersionUID = 1L; public void init() { System.out.println("init"); AdminService as = AdminServiceFactory.getAdminService(); try { ObjectName queryName = new ObjectName("WebSphere:*,type=J2CMessageEndpoint"); Set<ObjectName> s = as.queryNames(queryName, null); for (ObjectName objectName : s) { System.out.println("name=" + objectName.getCanonicalKeyPropertyListString()); as.addNotificationListener(objectName, this, null, null); } } catch (...) { ... } } public void handleNotification(Notification n, Object handback) { System.out.println("* Notification received at " + new Date().toString()); } } We call the init method and the MBean if found : name=ActivationSpec=jms/act/tp_commandes,J2CResourceAdapter=SIB JMS Resource Adapter,J2EEApplication=TitulairesPermis,J2EEServer=server1,MessageDrivenBean=TitulairesPermis#TitulairesPermisEJB.jar#TestConsumerControleurImpl,Server=server1,cell=pt6704Node01Cell,j2eeType=JCAMessageEndpoint,mbeanIdentifier=cells/pt6704Node01Cell/nodes/pt6704Node01/servers/server1/resources.xml#J2CResourceAdapter_1223569418301#TitulairesPermis#TitulairesPermisEJB.jar#TestConsumerControleurImpl_J2CMessageEndpoint,name=TitulairesPermis#TitulairesPermisEJB.jar#TestConsumerControleurImpl_J2CMessageEndpoint,node=pt6704Node01,platform=dynamicproxy,process=server1,spec=1.0,type=J2CMessageEndpoint,version=7.0.0.9 but the handleNotification() method is never called if we pause/resume the activator Nothing in the logs, nothing in FFDC... Any idea? To respond to this post, please click the following link: <http://www.ibm.com/developerworks/forums/thread.jspa?messageID=14475441> ____________________________________ Unsubscribe via the "binocular" icon on the web