Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>Using the example JBoss NotificationListener and assuming an EJB3 MDB deploymentas follows:</p> <ul> <li><strong>EAR</strong>: myear.ear</li> <li><strong>JAR</strong>: myjar.jar</li> <li><strong>MDB Name</strong>: MyMDB</li> </ul> <p>the deployment descriptor for the listener MBean would be like this:</p> <pre><code> &lt;server&gt; &lt;mbean code="jboss.example.NotificationListener" name="jboss.example:name=NotificationListener"&gt; &lt;attribute name="SubscriptionList"&gt; &lt;subscription-list&gt; &lt;mbean name="jboss.j2ee:ear=myear.ear,jar=myjar.jar,service=EJB3,name=MyMDB" handback="MyMDB"&gt; &lt;notification type="jmx.attribute.change"&gt; &lt;/mbean&gt; &lt;/subscription-list&gt; &lt;/attribute&gt; &lt;/mbean&gt; &lt;/server&gt; </code></pre> <p>If you were to simply log the <strong>toString</strong> of the notification when stopping the MDB, it would look something like this:</p> <p><strong>State 3 (Started) --> State 1 (Stopping)</strong></p> <pre><code> NOTIFICATION:&lt;javax.management.AttributeChangeNotification@60de8209 attributeName=State attributeType=java.lang.Integer **oldValue=3 newValue=1 type=jmx.attribute.change** sequenceNumber=7 timeStamp=1305033720266 userData=null message=MdbDelegateWrapper stopping source=jboss.j2ee:ear=myear.ear,jar=myear.jar,name=MyMDB,service=EJB3 source=jboss.j2ee:ear=myear.ear,jar=myear.jar,name=MyMDB,service=EJB3&gt; </code></pre> <p><strong>State 1 (Stopping) --> State 0 (Stopped)</strong></p> <pre><code>NOTIFICATION:&lt;javax.management.AttributeChangeNotification@296e41ab attributeName=State attributeType=java.lang.Integer **oldValue=1 newValue=0 type=jmx.attribute.change** sequenceNumber=8 timeStamp=1305033720320 userData=null message=MdbDelegateWrapper stopped source=jboss.j2ee:ear=myear.ear,jar=myear.jar,name=MyMDB,service=EJB3 source=jboss.j2ee:ear=myear.ear,jar=myear.jar,name=MyMDB,service=EJB3&gt; </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload