Java Reference
In-Depth Information
Figure 6.3
Using a super class to
send and persist
notifications sent from
an MBean. The super
class must ensure that
the notification will be
sent even if the persis-
tence attempt fails.
Listing 6.4
NotificationBroadcasterPersister.java
package jmxbook.ch6;
import java.sql.*;
import java.io.Serializable;
import javax.management.*;
public class NotificationBroadcasterPersister extends
NotificationBroadcasterSupport
{
private Connection con = null;
private boolean enable = false;
public NotificationBroadcasterPersister( Connection con )
{
this.con = con;
}
public void setStorage( boolean enable )
{
this.enable = enable;
}
public boolean getStorage()
{
return enable;
}
Search WWH ::




Custom Search