com.xenonsoft.bridgetown.app
Class WebApplicationAssemblerContextListener

java.lang.Object
  extended bycom.xenonsoft.bridgetown.app.WebApplicationAssemblerContextListener
All Implemented Interfaces:
java.util.EventListener, javax.servlet.ServletContextListener

public class WebApplicationAssemblerContextListener
extends java.lang.Object
implements javax.servlet.ServletContextListener

A servlet context listener that creates, and manages a web application assembler for a JSP application context. The listener creates a web application assembler, retrieves a configuration files for it as context relative URIs. The listener causes the assembler to load and configure itself. It then starts the assembler.

As the servlet context is destroyed, the web application assembler is retrieved, and the listener causes the assembler to dispose of it service beans in orderly fashion.

The context listener expects to read a list of assembly factory XML files from context parameter called "configuration". See the web application deployment notes in the JSP / Servlet standards. The value of the "configuration" parameter can be either comma (;) or bar (|) delimited. If the "configuration" parameter is empty or not specified, then the context listener will attempt to read from the DEFAULT_CONFIGURATON_FILE instead.

Version:
$Id: WebApplicationAssemblerContextListener.java,v 1.4 2005/02/23 01:29:20 peter_pilgrim Exp $
Author:
Peter Pilgrim, Aug 23, 2004 9:50:48 PM
See Also:
DEFAULT_CONFIGURATION_FILE, WebApplicationAssembler

Field Summary
static java.lang.String DEFAULT_CONFIGURATION_FILE
          Default configuration resource URI has the value of "/WEB-INF/service-assembly.xml"
 
Constructor Summary
WebApplicationAssemblerContextListener()
          Default constructor
 
Method Summary
 void contextDestroyed(javax.servlet.ServletContextEvent event)
          Implements / overrides contextDestroyed
 void contextInitialized(javax.servlet.ServletContextEvent event)
          Implements / overrides contextInitialized
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_CONFIGURATION_FILE

public static final java.lang.String DEFAULT_CONFIGURATION_FILE
Default configuration resource URI has the value of "/WEB-INF/service-assembly.xml"

See Also:
Constant Field Values
Constructor Detail

WebApplicationAssemblerContextListener

public WebApplicationAssemblerContextListener()
Default constructor

Method Detail

contextInitialized

public void contextInitialized(javax.servlet.ServletContextEvent event)
Implements / overrides contextInitialized

Specified by:
contextInitialized in interface javax.servlet.ServletContextListener
Parameters:
event - the servlet context event
See Also:
ServletContextListener.contextInitialized(javax.servlet.ServletContextEvent)

contextDestroyed

public void contextDestroyed(javax.servlet.ServletContextEvent event)
Implements / overrides contextDestroyed

Specified by:
contextDestroyed in interface javax.servlet.ServletContextListener
Parameters:
event - the servlet context event
See Also:
ServletContextListener.contextDestroyed(javax.servlet.ServletContextEvent)


Copyright © 2005 XeNoNSoFT.com. All Rights Reserved.