|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.ow2.jonas.deployment.common.lib.AbsDeploymentDescManager org.ow2.jonas.deployment.web.lib.WebDeploymentDescManager
public class WebDeploymentDescManager
This class provide a way for managing the WebContainerDeploymentDesc. Note that there is an intance of the WebDeploymentDescManager on each JOnAS server.
Field Summary | |
---|---|
static String |
JONAS_WEB_FILE_NAME
The path to the jonas-web.xml file. |
static String |
WEB_FILE_NAME
The path to the web.xml file. |
Fields inherited from class org.ow2.jonas.deployment.common.lib.AbsDeploymentDescManager |
---|
LINK_SEPARATOR |
Method Summary | |
---|---|
static org.ow2.util.ee.metadata.common.impl.enc.ENCBindingHolder |
completeWebApp(org.ow2.util.ee.metadata.war.api.IWarDeployableMetadata warDeployableMetadata,
WebApp webApp,
JonasWebApp jonasWebApp,
ClassLoader classLoader)
Complete the given webapp object and jonasWebApp by reading annotations. |
int |
getCacheSize()
Get the size of the cache (number of entries in the cache). |
static WebContainerDeploymentDesc |
getDeploymentDesc(String filename,
ClassLoader loader)
Get the specified web deployment descriptor. |
WebContainerDeploymentDesc |
getDeploymentDesc(URL originalWarURL,
ClassLoader loaderForCls,
ClassLoader earLoader)
Get the specified web deployment descriptor. |
WebContainerDeploymentDesc |
getDeploymentDesc(URL unpackedWarURL,
URL originalWarURL,
ClassLoader loaderForCls,
ClassLoader earLoader)
Get the specified web deployment descriptor. |
static WebDeploymentDescManager |
getInstance()
Get an instance of the WebDeploymentDescManager. |
static WebContainerDeploymentDesc |
getInstance(String warFileName,
ClassLoader classLoaderForCls)
Get an instance of a WEB deployment descriptor by parsing the web.xml and jonas-web.xml deployment descriptors. |
static WebContainerDeploymentDesc |
getInstance(String warFileName,
ClassLoader classLoaderForCls,
String altWebXmlFilename)
Get an instance of a WEB deployment descriptor by parsing the web.xml and jonas-web.xml deployment descriptors. |
static boolean |
getParsingWithValidation()
Controls whether the parser is reporting all validity errors. |
static org.ow2.util.ee.metadata.war.api.IWarDeployableMetadata |
getWarMetadata(File fWar)
Extract all the metadatas from the webapp. |
static JonasWebApp |
loadJonasWebApp(Reader reader,
String fileName)
Load the jonas-web.xml file. |
static WebApp |
loadWebApp(Reader reader,
String fileName)
Load the web.xml file. |
void |
removeCache(ClassLoader earClassLoader)
Make a cleanup of the cache of deployment descriptor. |
void |
setAltDD(ClassLoader earClassLoader,
URL[] urls,
URL[] altDDs)
Set the alt deployment desc which are used instead of the web.xml file which is in the war file. |
static void |
setParsingWithValidation(boolean validation)
Controls whether the parser is reporting all validity errors. |
Methods inherited from class org.ow2.jonas.deployment.common.lib.AbsDeploymentDescManager |
---|
containsResource, findJonasServiceRef, mergeWebServiceRef, xmlContent |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String WEB_FILE_NAME
public static final String JONAS_WEB_FILE_NAME
Method Detail |
---|
public static WebDeploymentDescManager getInstance()
public WebContainerDeploymentDesc getDeploymentDesc(URL originalWarURL, ClassLoader loaderForCls, ClassLoader earLoader) throws DeploymentDescException
originalWarURL
- URL of the WARloaderForCls
- classloader used to load web classes.earLoader
- the ear classloader.
DeploymentDescException
- when WebContainerDeploymentDesc cannot be
created with the given files.public WebContainerDeploymentDesc getDeploymentDesc(URL unpackedWarURL, URL originalWarURL, ClassLoader loaderForCls, ClassLoader earLoader) throws DeploymentDescException
unpackedWarURL
- URL where the WAR has been unpacked. Deployment
descriptors will be loaded from that URL.originalWarURL
- Original URL of WAR file, only used for EARs in
order to find the EJB-jars.loaderForCls
- classloader used to load web classes.earLoader
- the ear classloader.
DeploymentDescException
- when WebContainerDeploymentDesc cannot be
created with the given files.public void removeCache(ClassLoader earClassLoader)
earClassLoader
- the ClassLoader of the ear application to remove
from the cache.public void setAltDD(ClassLoader earClassLoader, URL[] urls, URL[] altDDs)
earClassLoader
- the ear classloader which is used for mapped the
URLs of the wars to the Alt dd.urls
- the urls of the warsaltDDs
- the alt-dd name for the specified war URLspublic int getCacheSize()
public static WebContainerDeploymentDesc getDeploymentDesc(String filename, ClassLoader loader) throws WebContainerDeploymentDescException
filename
- the filename where to load xml deployment descriptors.loader
- classloader used to load web classes.
WebContainerDeploymentDescException
- when
WebContainerDeploymentDesc cannot be created with the given
files.public static WebContainerDeploymentDesc getInstance(String warFileName, ClassLoader classLoaderForCls, String altWebXmlFilename) throws DeploymentDescException
warFileName
- the fileName of the war file for the deployment
descriptors.classLoaderForCls
- the classloader for the classes.altWebXmlFilename
- the fileName to the web.xml for the alt-dd tag
in the Ear Case. This is used for specify an alternate DDesc file.
DeploymentDescException
- if the deployment descriptors are
corrupted.public static org.ow2.util.ee.metadata.common.impl.enc.ENCBindingHolder completeWebApp(org.ow2.util.ee.metadata.war.api.IWarDeployableMetadata warDeployableMetadata, WebApp webApp, JonasWebApp jonasWebApp, ClassLoader classLoader) throws WebContainerDeploymentDescException
warDeployableMetadata
- source metadatawebApp
- the web app structjonasWebApp
- the jonas webapp structclassLoader
- the classloader used to get the classes
WebContainerDeploymentDescException
- if complete is not donepublic static org.ow2.util.ee.metadata.war.api.IWarDeployableMetadata getWarMetadata(File fWar) throws WebContainerDeploymentDescException
fWar
- the webapp
WebContainerDeploymentDescException
- if an error occured during annotation/XML parsingpublic static WebContainerDeploymentDesc getInstance(String warFileName, ClassLoader classLoaderForCls) throws DeploymentDescException
warFileName
- the fileName of the war file for the deployment
descriptors.classLoaderForCls
- the classloader for the classes.
DeploymentDescException
- if the deployment descriptors are
corrupted.public static WebApp loadWebApp(Reader reader, String fileName) throws DeploymentDescException
reader
- the reader of the XML file.fileName
- the name of the file (web.xml).
DeploymentDescException
- if the deployment descriptor is
corrupted.public static JonasWebApp loadJonasWebApp(Reader reader, String fileName) throws DeploymentDescException
reader
- the Reader of the XML file.fileName
- the name of the file (jonas-web.xml).
DeploymentDescException
- if the deployment descriptor is
corrupted.public static boolean getParsingWithValidation()
public static void setParsingWithValidation(boolean validation)
validation
- if true, all external entities will be read.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |