Java Reference
In-Depth Information
Suppose you have been hired to develop a point-of-sale system and a back-office
system that will allow visibility to data throughout the day. The store manager
may want to monitor the cash and credit sales on a particular cash register at a
given time of day, and this information needs to be presented on the manager's
console upon request.
For this situation, you could develop MBeans that access the application
entity beans for each of the registers and display that information to the man-
ager. In this case, the MBeans retrieve the information directly from the entity
beans (see figure 14.2).
However, the manager would also like to know when the cash amount in the till
has reached a particular level, so he can remove the money and put it in the safe.
In this case, the entity bean can signal your MBean when the cash level is reached,
at which time the MBean will automatically signal the manager that the till needs
to be emptied. By pushing data to an MBean, the EJB can use the MBean's ability
to send notifications to outside listeners.
Figure 14.2
MBeans retrieving
data from an EJB
Search WWH ::




Custom Search