Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.jboss.web
Class AbstractWebContainer

    java.lang.Object
      org.jboss.mx.util.JBossNotificationBroadcasterSupport
          org.jboss.system.ServiceMBeanSupport
              org.jboss.deployment.SubDeployerSupport
                  org.jboss.web.AbstractWebContainer

All Implemented Interfaces:
  AbstractWebContainerMBean, javax.management.MBeanRegistration, javax.management.NotificationBroadcaster, javax.management.NotificationEmitter, org.jboss.system.Service, org.jboss.system.ServiceMBean, org.jboss.deployment.SubDeployer, org.jboss.deployment.SubDeployerMBean

public abstract class AbstractWebContainer
extends org.jboss.deployment.SubDeployerSupport
implements AbstractWebContainerMBean

A template pattern class for web container integration into JBoss. This class should be subclasses by web container providers wishing to integrate their container into a JBoss server.

Version:
  $Revision: 1.89.4.1 $
Author:
  Scott.Stark@jboss.org, Christoph.Jung@infor.de, Thomas.Diesler@arcor.de
See Also:
  `AbstractWebDeployer`

Nested Class Summary
`static interface` | `AbstractWebContainer.WebDescriptorParser`

Nested classes inherited from class org.jboss.deployment.SubDeployerSupport
`org.jboss.deployment.SubDeployerSupport.ClassConfiguration`

Field Summary
`protected String` | `defaultSecurityDomain` The default security-domain name to use
`static String` | `DEPLOYER`
`protected HashMap` | `deploymentMap` A mapping of deployed warUrl strings to the WebApplication object
`static String` | `ERROR`
`protected boolean` | `java2ClassLoadingCompliance` The parent class loader first model flag
`protected boolean` | `lenientEjbLink` If true, ejb-links that don't resolve don't cause an error (fallback to jndi-name)
`protected boolean` | `unpackWars` A flag indicating if war archives should be unpacked
`static String` | `WEB_APP`
`static String` | `WEB_MODULE`

Fields inherited from class org.jboss.deployment.SubDeployerSupport
`CONFIGURATION, mainDeployer, nativePrefix, nativeSuffix, relativeOrder, suffixes, tempDeployDir`

Fields inherited from class org.jboss.system.ServiceMBeanSupport
`log, server, SERVICE_CONTROLLER_SIG, serviceName`

Fields inherited from interface org.jboss.system.ServiceMBean
`CREATE_EVENT, CREATED, DESTROY_EVENT, DESTROYED, FAILED, REGISTERED, START_EVENT, STARTED, STARTING, states, STOP_EVENT, STOPPED, STOPPING, UNREGISTERED`

Fields inherited from interface org.jboss.deployment.SubDeployer
`CREATE_NOTIFICATION, DESTROY_NOTIFICATION, INIT_NOTIFICATION, RELATIVE_ORDER_100, RELATIVE_ORDER_200, RELATIVE_ORDER_300, RELATIVE_ORDER_400, RELATIVE_ORDER_500, RELATIVE_ORDER_600, RELATIVE_ORDER_700, RELATIVE_ORDER_800, RELATIVE_ORDER_900, START_NOTIFICATION, STOP_NOTIFICATION`

Constructor Summary
`AbstractWebContainer()`

Method Summary
`boolean` | `accepts(org.jboss.deployment.DeploymentInfo sdi)`
`void` | `addDeployedApp(URL warURL, WebApplication webApp)`
`void` | `create(org.jboss.deployment.DeploymentInfo di)` Create a WebModule service, register it under the name "jboss.web.deployment:war="+di.shortName and invoke the ServiceController.create(jmxname, depends) using the depends found in the WebMetaData.
`void` | `destroy(org.jboss.deployment.DeploymentInfo di)` Invokes the ServiceController.destroy(jmxName) to destroy the WebModule and its dependents.
`static URL[]` | `getClassLoaderURLs(ClassLoader cl)` Use reflection to access a URL[] getURLs method so that non-URLClassLoader class loaders that support this method can provide info.
`String[]` | `getCompileClasspath(ClassLoader loader)` A utility method that walks up the ClassLoader chain starting at the given loader and queries each ClassLoader for a 'URL[] getURLs()' method from which a complete classpath of URL strings is built.
`Element` | `getConfig()` An accessor for any configuration element set via setConfig.
`String` | `getDefaultSecurityDomain()` Get the default security domain implementation to use if a war does not declare a security-domain.
`WebApplication` | `getDeployedApp(String warUrl)` Get the WebApplication object for a deployed war.
`Iterator` | `getDeployedApplications()` Returns the applications deployed by the web container subclasses.
`abstract AbstractWebDeployer` | `getDeployer(org.jboss.deployment.DeploymentInfo di)`
`boolean` | `getJava2ClassLoadingCompliance()` Get the flag indicating if the normal Java2 parent first class loading model should be used over the servlet 2.3 web container first model.
`boolean` | `getLenientEjbLink()` Get the flag indicating if ejb-link errors should be ignored in favour of trying the jndi-name in jboss-web.xml
`String` | `getSubjectAttributeName()` Get the session attribute number under which the caller Subject is stored
`boolean` | `getUnpackWars()` Set the flag indicating if war archives should be unpacked.
`void` | `init(org.jboss.deployment.DeploymentInfo di)`
`boolean` | `isDeployed(String warUrl)` See if a war is deployed.
`protected void` | `parseMetaData(String ctxPath, URL warURL, String warName, WebMetaData metaData)` This method creates a context-root string from either the WEB-INF/jboss-web.xml context-root element is one exists, or the filename portion of the warURL.
`protected void` | `processNestedDeployments(org.jboss.deployment.DeploymentInfo di)` WARs do not have nested deployments
`WebApplication` | `removeDeployedApp(URL warURL)`
`void` | `setConfig(Element config)` This method is invoked to import an arbitrary XML configuration tree.
`void` | `setDefaultSecurityDomain(String defaultSecurityDomain)` Set the default security domain implementation to use if a war does not declare a security-domain.
`void` | `setJava2ClassLoadingCompliance(boolean flag)` Set the flag indicating if the normal Java2 parent first class loading model should be used over the servlet 2.3 web container first model.
`void` | `setLenientEjbLink(boolean flag)` Set the flag indicating if ejb-link errors should be ignored in favour of trying the jndi-name in jboss-web.xml
`void` | `setSubjectAttributeName(String subjectAttributeName)` Set the session attribute number under which the caller Subject is stored
`void` | `setUnpackWars(boolean flag)` Get the flag indicating if war archives should be unpacked.
`void` | `start(org.jboss.deployment.DeploymentInfo di)` Invokes the ServiceController.start(jmxName) to start the WebModule after its dependencies are satisfied.
`protected void` | `startService()`
`void` | `stop(org.jboss.deployment.DeploymentInfo di)` Invokes the ServiceController.start(jmxName) to stop the WebModule and its dependents.

Methods inherited from class org.jboss.deployment.SubDeployerSupport
`addDeployableFiles, addDeployableJar, createService, deployUrl, destroyService, getRelativeOrder, getSuffixes, isDeployable, setRelativeOrder, setSuffixes, stopService`

Methods inherited from class org.jboss.system.ServiceMBeanSupport
`create, destroy, getLog, getName, getNextNotificationSequenceNumber, getObjectName, getServer, getServiceName, getState, getStateString, jbossInternalCreate, jbossInternalDescription, jbossInternalDestroy, jbossInternalLifecycle, jbossInternalStart, jbossInternalStop, postDeregister, postRegister, preDeregister, preRegister, start, stop`

Methods inherited from class org.jboss.mx.util.JBossNotificationBroadcasterSupport
`addNotificationListener, getNotificationInfo, handleNotification, removeNotificationListener, removeNotificationListener, sendNotification`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Methods inherited from interface org.jboss.deployment.SubDeployerMBean
`getRelativeOrder, getSuffixes, setRelativeOrder, setSuffixes`

Methods inherited from interface org.jboss.system.ServiceMBean
`getName, getState, getStateString, jbossInternalLifecycle`

Methods inherited from interface org.jboss.system.Service
`create, destroy, start, stop`

Methods inherited from interface org.jboss.deployment.SubDeployer
`getServiceName`

Field Detail

### DEPLOYER

    public static final String DEPLOYER

See Also:
  Constant Field Values

### WEB_APP

    public static final String WEB_APP

See Also:
  Constant Field Values

### WEB_MODULE

    public static final String WEB_MODULE

See Also:
  Constant Field Values

### ERROR

    public static final String ERROR

See Also:
  Constant Field Values

### deploymentMap

    protected HashMap deploymentMap

  A mapping of deployed warUrl strings to the WebApplication object

### java2ClassLoadingCompliance

    protected boolean java2ClassLoadingCompliance

  The parent class loader first model flag

### unpackWars

    protected boolean unpackWars

  A flag indicating if war archives should be unpacked

### lenientEjbLink

    protected boolean lenientEjbLink

  If true, ejb-links that don't resolve don't cause an error (fallback to jndi-name)

### defaultSecurityDomain

    protected String defaultSecurityDomain

  The default security-domain name to use

Constructor Detail

### AbstractWebContainer

    public AbstractWebContainer()

Method Detail

### getJava2ClassLoadingCompliance

    public boolean getJava2ClassLoadingCompliance()

  Get the flag indicating if the normal Java2 parent first class loading model should be used over the servlet 2.3 web container first model.

  Specified by:
    `getJava2ClassLoadingCompliance` in interface `AbstractWebContainerMBean`
  Returns:
    true for parent first, false for the servlet 2.3 model

### setJava2ClassLoadingCompliance

    public void setJava2ClassLoadingCompliance(boolean flag)

  Set the flag indicating if the normal Java2 parent first class loading model should be used over the servlet 2.3 web container first model.

  Specified by:
    `setJava2ClassLoadingCompliance` in interface `AbstractWebContainerMBean`
  Parameters:
    `flag` - true for parent first, false for the servlet 2.3 model

### getUnpackWars

    public boolean getUnpackWars()

  Set the flag indicating if war archives should be unpacked. This may need to be set to false as long extraction paths under deploy can show up as deployment failures on some platforms.

  Specified by:
    `getUnpackWars` in interface `AbstractWebContainerMBean`
  Returns:
    true is war archives should be unpacked

### setUnpackWars

    public void setUnpackWars(boolean flag)

  Get the flag indicating if war archives should be unpacked. This may need to be set to false as long extraction paths under deploy can show up as deployment failures on some platforms.

  Specified by:
    `setUnpackWars` in interface `AbstractWebContainerMBean`
  Parameters:
    `flag` - , true is war archives should be unpacked

### getLenientEjbLink

    public boolean getLenientEjbLink()

  Get the flag indicating if ejb-link errors should be ignored in favour of trying the jndi-name in jboss-web.xml

  Specified by:
    `getLenientEjbLink` in interface `AbstractWebContainerMBean`
  Returns:
    the LenientEjbLink flag

### setLenientEjbLink

    public void setLenientEjbLink(boolean flag)

  Set the flag indicating if ejb-link errors should be ignored in favour of trying the jndi-name in jboss-web.xml

  Specified by:
    `setLenientEjbLink` in interface `AbstractWebContainerMBean`

### getDefaultSecurityDomain

    public String getDefaultSecurityDomain()

  Get the default security domain implementation to use if a war does not declare a security-domain.

  Specified by:
    `getDefaultSecurityDomain` in interface `AbstractWebContainerMBean`
  Returns:
    jndi name of the security domain binding to use.

### setDefaultSecurityDomain

    public void setDefaultSecurityDomain(String defaultSecurityDomain)

  Set the default security domain implementation to use if a war does not declare a security-domain.

  Specified by:
    `setDefaultSecurityDomain` in interface `AbstractWebContainerMBean`
  Parameters:
    `defaultSecurityDomain` - - jndi name of the security domain binding to use.

### getSubjectAttributeName

    public String getSubjectAttributeName()

  Get the session attribute number under which the caller Subject is stored

  Specified by:
    `getSubjectAttributeName` in interface `AbstractWebContainerMBean`

### setSubjectAttributeName

    public void setSubjectAttributeName(String subjectAttributeName)

  Set the session attribute number under which the caller Subject is stored

  Specified by:
    `setSubjectAttributeName` in interface `AbstractWebContainerMBean`

### getDeployer

    public abstract AbstractWebDeployer getDeployer(org.jboss.deployment.DeploymentInfo di)
                                             throws Exception

  Throws:
    `Exception`

### accepts

    public boolean accepts(org.jboss.deployment.DeploymentInfo sdi)

  Specified by:
    `accepts` in interface `org.jboss.deployment.SubDeployerMBean`

### init

    public void init(org.jboss.deployment.DeploymentInfo di)
              throws org.jboss.deployment.DeploymentException

  Specified by:
    `init` in interface `org.jboss.deployment.SubDeployerMBean`
  Throws:
    `org.jboss.deployment.DeploymentException`

### create

    public void create(org.jboss.deployment.DeploymentInfo di)
                throws org.jboss.deployment.DeploymentException

  Create a WebModule service, register it under the name "jboss.web.deployment:war="+di.shortName and invoke the ServiceController.create(jmxname, depends) using the depends found in the WebMetaData.

  Specified by:
    `create` in interface `org.jboss.deployment.SubDeployerMBean`
  Parameters:
    `di` - - The deployment info for the war
  Throws:
    `org.jboss.deployment.DeploymentException`

### start

    public void start(org.jboss.deployment.DeploymentInfo di)
               throws org.jboss.deployment.DeploymentException

  Invokes the ServiceController.start(jmxName) to start the WebModule after its dependencies are satisfied.

  Specified by:
    `start` in interface `org.jboss.deployment.SubDeployerMBean`
  Parameters:
    `di` - - The deployment info for the war
  Throws:
    `org.jboss.deployment.DeploymentException`

### stop

    public void stop(org.jboss.deployment.DeploymentInfo di)
              throws org.jboss.deployment.DeploymentException

  Invokes the ServiceController.start(jmxName) to stop the WebModule and its dependents.

  Specified by:
    `stop` in interface `org.jboss.deployment.SubDeployerMBean`
  Parameters:
    `di` - - The deployment info for the war
  Throws:
    `org.jboss.deployment.DeploymentException`

### destroy

    public void destroy(org.jboss.deployment.DeploymentInfo di)
                 throws org.jboss.deployment.DeploymentException

  Invokes the ServiceController.destroy(jmxName) to destroy the WebModule and its dependents.

  Specified by:
    `destroy` in interface `org.jboss.deployment.SubDeployerMBean`
  Parameters:
    `di` - - The deployment info for the war
  Throws:
    `org.jboss.deployment.DeploymentException`

### isDeployed

    public boolean isDeployed(String warUrl)

  See if a war is deployed.

  Specified by:
    `isDeployed` in interface `AbstractWebContainerMBean`

### addDeployedApp

    public void addDeployedApp(URL warURL,
                               WebApplication webApp)

### getDeployedApp

    public WebApplication getDeployedApp(String warUrl)

  Get the WebApplication object for a deployed war.

  Parameters:
    `warUrl` - the war url string as originally passed to deploy().
  Returns:
    The WebApplication created during the deploy step if the warUrl is valid, null if no such deployment exists.

### removeDeployedApp

    public WebApplication removeDeployedApp(URL warURL)

### getDeployedApplications

    public Iterator getDeployedApplications()

  Returns the applications deployed by the web container subclasses.

  Specified by:
    `getDeployedApplications` in interface `AbstractWebContainerMBean`
  Returns:
    An Iterator of WebApplication objects for the deployed wars.

### getConfig

    public Element getConfig()

  An accessor for any configuration element set via setConfig. This method always returns null and must be overriden by subclasses to return a valid value.

  Specified by:
    `getConfig` in interface `AbstractWebContainerMBean`

### setConfig

    public void setConfig(Element config)

  This method is invoked to import an arbitrary XML configuration tree. Subclasses should override this method if they support such a configuration capability. This implementation does nothing.

  Specified by:
    `setConfig` in interface `AbstractWebContainerMBean`

### getClassLoaderURLs

    public static URL[] getClassLoaderURLs(ClassLoader cl)

  Use reflection to access a URL[] getURLs method so that non-URLClassLoader class loaders that support this method can provide info.

### getCompileClasspath

    public String[] getCompileClasspath(ClassLoader loader)

  A utility method that walks up the ClassLoader chain starting at the given loader and queries each ClassLoader for a 'URL[] getURLs()' method from which a complete classpath of URL strings is built.

### processNestedDeployments

    protected void processNestedDeployments(org.jboss.deployment.DeploymentInfo di)
                                     throws org.jboss.deployment.DeploymentException

  WARs do not have nested deployments

  Parameters:
    `di` -
  Throws:
    `org.jboss.deployment.DeploymentException`

### startService

    protected void startService()
                         throws Exception

  Throws:
    `Exception`

### parseMetaData

    protected void parseMetaData(String ctxPath,
                                 URL warURL,
                                 String warName,
                                 WebMetaData metaData)
                          throws org.jboss.deployment.DeploymentException

  This method creates a context-root string from either the WEB-INF/jboss-web.xml context-root element is one exists, or the filename portion of the warURL. It is called if the DeploymentInfo webContext value is null which indicates a standalone war deployment. A war name of ROOT.war is handled as a special case of a war that should be installed as the default web context.

  Throws:
    `org.jboss.deployment.DeploymentException`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2002 JBoss Group, LLC. All Rights Reserved.