noticationsand take appropriate action. For details on developing a custom MBean and
deployingit, see Chapter 14, “Developing Custom MBeans,”in Sun GlassFish Enterprise
Server2.1 Developer’s Guide.
TheEnterprise Server provides some useful events, which you can further extend by writing
customMBeans to emit notications. Each event can be further customized by changing its
properties.
Thefollowing event types are available:
Monitorevents: Monitors an attribute of an MBean. Monitor events have similar
capabilitiesto javax.management.monitor package capabilities. In addition to monitoring
simpleattributes, as Java SE 5 javax.management.monitor does, monitor events also
supportmonitoring complex attributes.
Noticationevents: Noties of events from a custom MBean. Use these events to write
customevents and thus extend the event dictionary. Any MBeans which can emit a
noticationcan be an event.
Systemevents:
Lifecycle:Events for sever startup, showdown, and termination.
Log:Events triggered when the specied logger writes a log entry. For example, you
couldcreate a management rule to send an alert to an administrator when an EJB
containerlogger logs a SEVERE log entry.
Timer:Events triggered at the specied date and time, at the specied interval, and so on.
Theseevents have capabilities similar to the javax.management.timer package.
Trace:Events triggered on Entry and Exit of HTTP/IIOP request methods, EJB methods,
andWeb methods. For example, you can design a servlet lter used to log interactions
witha servlet as a management rule using Web method Entry and Exit events.
Cluster:Events triggered when a cluster or instance starts, stops, or fails. These events
usethe Group Management System cluster monitoring.
ConguringManagement Rules
Tocongure management rules in the Admin Console:
Inthe developer prole, go to Conguration Management Rules
Inthe cluster and enterprise proles, go to Congurations Conguration
ManagementRules
Note– On this page, check All Rules Enabled to enable management rules globally. If
managementrules are not enabled globally, none of the management rules are executed.
ConguringManagementRules
SunGlassFishEnterprise Ser ver2.1 Administration Guide • December 2008216