Chapter 9: Distributed Logging Using JMS

Overview

It is a challenging problem to provide an integrated logging mechanism for Java enterprise applications. These applications may consist of a variety of components such as EJBs, servlets, and JSPs, which run on various possible configurations of hardware. We looked at the clustering issues in JMS development in the previous chapter.

A real-world example where distributed application logging would come in handy would be the problem of logging client sessions in a dynamically load-balanced system. Having a centralized location where this information is logged is very important in tracking session failures.

This chapter will explore the use of JMS messaging to implement a distributed logging service. The logging service will exist within a basic application "framework" of services. The idea of the framework is that it implements basic functionality that is inherent in any enterprise application software development, such as JNDI lookups, configuration information retrieval, and application logging, among others. This framework can then be deployed to the application server and initialized for enterprise application software to use.

In this chapter we will:

  • Discuss the challenges associated with logging within a distributed application

  • Discuss why JMS is a good choice for implementing a distributed logging system

  • Investigate JLog, a specific logging package providing support for a JMS based logging implementation

  • Provide an example of how JLog can be used in conjunction with JMS

  • Discuss the inclusion of a "LogService" within the application framework to wrap the logging service

  • Provide an example servlet and EJB demonstrating the use of the LogService



Professional JMS
Professional JMS
ISBN: 1861004931
EAN: 2147483647
Year: 2000
Pages: 154

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net