Java Reference
In-Depth Information
Figure 14.3
Combining an entity EJB
with JMX MBean
Figure 14.3 shows how the pieces of our solution fit together.
The entity bean runs in the JBoss container and accepts login requests
from the UserLogin screen. Each time users successfully log in, their login count
is incremented.
An MBean running in a JMX agent can request the login count from the entity
bean and expose it in the management console. In addition, the MBean exposes
the operations of the EJB that enables and disables a user's login permission.
14.3 Developing the login monitor
Now that we have explained the example, it is time to write some code. The fol-
lowing list shows all the tasks we will be discussing as you build the solution to
this problem:
Creating the application's entity bean
Constructing the MBean
Creating a client test class
After you complete these three tasks, we will move on to setting up the application
environment in JBoss and deploying the EJB . The first thing you need to do is
construct the entity bean that users will contact when logging in to the application.
Search WWH ::




Custom Search