Java Reference
In-Depth Information
Figure 14.7
Output from the agent
when the
UserInfoMgr
MBean is registered
method,
getQueryCount()
, retrieves the number of logins for the user specified
by the username parameter.
14.4.3
Counting user login attempts
At this point, you are ready for your first test. To simulate an attempted user
login, you need to execute the
UserLogin
class. Every time you execute the class,
another attempt will be performed. The first login attempt for a user will create
the entity bean if it does not exist, and the login permissions will be set to
true
.
The number of logins will be set to
1
during the creation call. Figure 14.8 shows
the command line and output from the first execution of the
UserLogin
program.
Figure 14.8
Console from the
UserLogin
attempt