|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jboss.deployers.spi.deployer.helpers.AbstractDeployer
org.jboss.deployers.spi.deployer.helpers.AbstractRealDeployer
org.jboss.deployers.spi.deployer.helpers.AbstractSimpleRealDeployer<org.jboss.metadata.web.jboss.JBossWebMetaData>
org.jboss.web.deployers.AbstractWarDeployer
public abstract class AbstractWarDeployer
A template pattern class for web container integration into JBoss. This class
should be subclassed by web container providers wishing to integrate their
container into a JBoss server. The sole method to implement is:
#getDeployment(DeploymentUnit, WebMetaData)
. This is called from
within #deploy(DeploymentUnit, WebMetaData) to translate the
WebMetaData into a AbstractWarDeployment bean that will be passed to the
ServiceDeployer
by creating ServiceMetaData
for the AbstractWarDeployment in
#deployWebModule(DeploymentUnit, WebMetaData, AbstractWarDeployment)
The output of this deployer is a ServiceMetaData attachment. When this is
translated into a service instance by the ServiceDeployer, the
AbstractWarDeployment start/stop trigger the actual deployment/undeployment of
the web application.
AbstractWarDeployment
Nested Class Summary | |
---|---|
static class |
AbstractWarDeployer.ContextMO
|
Nested classes/interfaces inherited from interface org.jboss.deployers.spi.Ordered |
---|
org.jboss.deployers.spi.Ordered.OrderedComparator |
Field Summary | |
---|---|
protected boolean |
acceptNonWarDirs
A flag indicating if local dirs with WEB-INF/web.xml should be treated as wars |
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.deployers.spi.deployer.helpers.AbstractDeployer |
---|
log |
Fields inherited from interface org.jboss.deployers.spi.Ordered |
---|
COMPARATOR |
Constructor Summary | |
---|---|
AbstractWarDeployer()
Create a new AbstractWarDeployer. |
Method Summary | |
---|---|
void |
addDeployedApp(String warURL,
WebApplication webApp)
|
void |
build(org.jboss.deployers.structure.spi.DeploymentUnit unit,
Set<String> outputs,
Map<String,org.jboss.managed.api.ManagedObject> managedObjects)
|
protected String |
buildWebContext(String ctxPath,
String warName,
org.jboss.metadata.web.jboss.JBossWebMetaData metaData,
org.jboss.deployers.structure.spi.DeploymentUnit unit)
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. |
void |
deploy(org.jboss.deployers.structure.spi.DeploymentUnit unit,
org.jboss.metadata.web.jboss.JBossWebMetaData metaData)
Deploy a web app based on the WebMetaData. |
protected void |
deployWebModule(org.jboss.deployers.structure.spi.DeploymentUnit unit,
org.jboss.metadata.web.jboss.JBossWebMetaData metaData,
AbstractWarDeployment deployment)
Called by deploy first to create a ServiceMetaData instance that wraps the AbstractWarDeployment bean and then attach it to the deployment unit. |
boolean |
getAcceptNonWarDirs()
Get the flag indicating if local dirs with WEB-INF/web.xml should be treated as wars |
static URL[] |
getClassLoaderURLs(ClassLoader cl)
A utility method that uses reflection to access a URL[] getURLs method so that non-URLClassLoader class loaders that support this method can provide info. |
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 AbstractWarDeployment |
getDeployment(org.jboss.deployers.structure.spi.DeploymentUnit unit,
org.jboss.metadata.web.jboss.JBossWebMetaData metaData)
Get the AbstractWarDeployment bean for the deployment metadata. |
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 |
org.jboss.deployers.structure.spi.main.MainDeployerStructure |
getMainDeployer()
|
protected String |
getObjectName(org.jboss.metadata.web.jboss.JBossWebMetaData metaData)
Get the object name of the ServiceMetaData instance associated with the WebMetaData. |
protected MBeanServer |
getServer()
Deprecated. |
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. |
WebApplication |
removeDeployedApp(String warURL)
|
void |
setAcceptNonWarDirs(boolean flag)
Set the flag indicating if local dirs with WEB-INF/web.xml should be treated as wars |
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 |
setMainDeployer(org.jboss.deployers.structure.spi.main.MainDeployerStructure mainDeployer)
|
void |
setPersistenceUnitDependencyResolver(org.jboss.jpa.resolvers.PersistenceUnitDependencyResolver resolver)
|
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()
|
void |
stop()
|
void |
undeploy(org.jboss.deployers.structure.spi.DeploymentUnit unit,
org.jboss.metadata.web.jboss.JBossWebMetaData metaData)
Cleanup war deployer specifics. |
Methods inherited from class org.jboss.deployers.spi.deployer.helpers.AbstractSimpleRealDeployer |
---|
getInput, internalDeploy, internalUndeploy |
Methods inherited from class org.jboss.deployers.spi.deployer.helpers.AbstractRealDeployer |
---|
addControllerContextName, deploy, isControllerContextNameCandidate, isUseUnitName, removeControllerContextName, setUseUnitName, undeploy |
Methods inherited from class org.jboss.deployers.spi.deployer.helpers.AbstractDeployer |
---|
addInput, addInput, addOutput, addOutput, getInputs, getOutput, getOutputs, getRelativeOrder, getStage, isAllInputs, isComponentsOnly, isParentFirst, isTopLevelOnly, isWantComponents, setAllInputs, setComponentsOnly, setInput, setInputs, setInputs, setInputs, setOutput, setOutputs, setOutputs, setOutputs, setParentFirst, setRelativeOrder, setStage, setTopLevelOnly, setWantComponents |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String DEPLOYER
public static final String WEB_APP
public static final String WEB_MODULE
public static final String ERROR
protected HashMap deploymentMap
protected boolean java2ClassLoadingCompliance
protected boolean unpackWars
protected boolean acceptNonWarDirs
protected boolean lenientEjbLink
protected String defaultSecurityDomain
Constructor Detail |
---|
public AbstractWarDeployer()
Method Detail |
---|
public boolean getJava2ClassLoadingCompliance()
public void setJava2ClassLoadingCompliance(boolean flag)
flag
- true for parent first, false for the servlet 2.3 modelpublic boolean getUnpackWars()
public void setUnpackWars(boolean flag)
flag
- , true is war archives should be unpackedpublic boolean getAcceptNonWarDirs()
public void setAcceptNonWarDirs(boolean flag)
flag
- - true if local dirs with WEB-INF/web.xml should be treated as warspublic boolean getLenientEjbLink()
public void setLenientEjbLink(boolean flag)
public String getDefaultSecurityDomain()
public void setDefaultSecurityDomain(String defaultSecurityDomain)
defaultSecurityDomain
- - jndi name of the security domain binding
to use.public void setPersistenceUnitDependencyResolver(org.jboss.jpa.resolvers.PersistenceUnitDependencyResolver resolver)
public String getSubjectAttributeName()
public void setSubjectAttributeName(String subjectAttributeName)
public void start() throws Exception
Exception
public void stop() throws Exception
Exception
public abstract AbstractWarDeployment getDeployment(org.jboss.deployers.structure.spi.DeploymentUnit unit, org.jboss.metadata.web.jboss.JBossWebMetaData metaData) throws Exception
unit
- - the deployment unitmetaData
- - the input web application metadata
Exception
- - thrown on any failurepublic void deploy(org.jboss.deployers.structure.spi.DeploymentUnit unit, org.jboss.metadata.web.jboss.JBossWebMetaData metaData) throws org.jboss.deployers.spi.DeploymentException
#getDeployment(DeploymentUnit, WebMetaData)
to obtain an
AbstractWarDeployment bean that is wrapped in a ServiceMetaData by
deployWebModule.
This will set the WebMetaData.contextRoot if it has not been set based
on the war deployment name.
deploy
in class org.jboss.deployers.spi.deployer.helpers.AbstractSimpleRealDeployer<org.jboss.metadata.web.jboss.JBossWebMetaData>
unit
- - the war for the deploymentmetaData
- - the metadata for the deployment
org.jboss.deployers.spi.DeploymentException
#deployWebModule(DeploymentUnit, WebMetaData, AbstractWarDeployment)
,
#buildWebContext(DeploymentUnit, String, String, WebMetaData)
public void undeploy(org.jboss.deployers.structure.spi.DeploymentUnit unit, org.jboss.metadata.web.jboss.JBossWebMetaData metaData)
undeploy
in class org.jboss.deployers.spi.deployer.helpers.AbstractSimpleRealDeployer<org.jboss.metadata.web.jboss.JBossWebMetaData>
public void addDeployedApp(String warURL, WebApplication webApp)
public WebApplication getDeployedApp(String warUrl)
warUrl
- the war url string as originally passed to deploy().
public WebApplication removeDeployedApp(String warURL)
public Iterator getDeployedApplications()
public static URL[] getClassLoaderURLs(ClassLoader cl)
protected String buildWebContext(String ctxPath, String warName, org.jboss.metadata.web.jboss.JBossWebMetaData metaData, org.jboss.deployers.structure.spi.DeploymentUnit unit)
ctxPath
- - war level context-rootwarName
- -@Deprecated protected MBeanServer getServer()
public org.jboss.deployers.structure.spi.main.MainDeployerStructure getMainDeployer()
public void setMainDeployer(org.jboss.deployers.structure.spi.main.MainDeployerStructure mainDeployer)
protected String getObjectName(org.jboss.metadata.web.jboss.JBossWebMetaData metaData)
metaData
- - the web app metaData
protected void deployWebModule(org.jboss.deployers.structure.spi.DeploymentUnit unit, org.jboss.metadata.web.jboss.JBossWebMetaData metaData, AbstractWarDeployment deployment) throws Exception
unit
- - the deployment unitmetaData
- - the web app metadata passed to deploydeployment
- - the web app deployment bean created by getDeployment
Exception
public void build(org.jboss.deployers.structure.spi.DeploymentUnit unit, Set<String> outputs, Map<String,org.jboss.managed.api.ManagedObject> managedObjects) throws org.jboss.deployers.spi.DeploymentException
build
in interface org.jboss.deployers.spi.deployer.managed.ManagedObjectCreator
org.jboss.deployers.spi.DeploymentException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |