SEARCH
0-9 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
Prev | Current Page 367 | Next

Larry Brown, Marty Hall, and Yaakov Chaikin

"Core Servlets and JavaServer Pages, Volume 2"

sun.com/xml/ns/j2ee
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
version="2.4">
6.15 Using Multiple Cooperating Listeners 325
6.15 Using Multiple Cooperating
Listeners
Now, the listeners discussed in this chapter are all well and good. There are plenty of
applications where one of them is useful. However, there are also plenty of applications
where no single listener can, in isolation, accomplish the necessary tasks. Multiple
listeners need to work together.
For example, suppose that your yacht-watching listener was so successful that you
are asked to expand it. Rather than tracking buying patterns of a fixed item such as a
yacht, you should track orders for the current daily special to let management discover
if their specials are effective. Accomplishing this task requires three listeners to



coreservlets.listeners.RequestCounter





coreservlets.listeners.StopRequestCounter




ProcessRequestStats

coreservlets.ProcessRequestStats




ProcessRequestStats
/processStats


Listing 6.


Pages:
355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379