| java.lang.Object org.objectweb.jonas_lib.deployment.lib.AbsDeploymentDescManager org.objectweb.jonas_ejb.deployment.lib.EjbDeploymentDescManager
EjbDeploymentDescManager | public class EjbDeploymentDescManager extends AbsDeploymentDescManager (Code) | | This class provide a way for managing the EjbDeploymentDesc.
Note that there is an intance of the EjbDeploymentDescManager on each JOnAS
server.
author: Ludovic Bert author: Florent Benoit author: Nicolas Van Caneghem author: Allow the deployment of an exploded ear author: Contributors:
author: JOnAS 4.0 Adriana Danes: keep deployement descriptors is a Stringified format author: for management support. |
Method Summary | |
public void | addClassLoaderUrlMapping(ClassLoader ejbClassloader, URL[] urls) | protected void | checkType(URL ejbJar, String ejbType, JndiEnvRefsGroup bd) Check if the type of the ejb-ref is correct. | protected void | checkTypeUsage(URL url, String mdType, String mdUsage, BeanDesc bd) Check if the type & usage of the message-destination-ref is correct. | public int | getCacheSize() Get the size of the cache (number of entries in the cache). | public static DeploymentDesc | getDeploymentDesc(String ejbjar, ClassLoader ejbLoader) Factory method using the ejb-jar file name.
Used by GenIC/GenIDL/WsGen.
Parameters: ejbjar - ejbjar file name Parameters: ejbLoader - classloader used to load bean classes. | public synchronized DeploymentDesc | getDeploymentDesc(URL url, ClassLoader ejbLoader, ClassLoader earLoader) Get the specified ejb deployment descriptor and put it in the cache
if it is not in.
Called by createContainer & WebDeploymentDescManager
Parameters: url - the url where to load xml deployment descriptors. Parameters: ejbLoader - classloader used to load bean classes. Parameters: earLoader - the parent classloader (the ear classloader). | public static DeploymentDesc | getDeploymentDesc(String ejbJarXmlFileName, String jonasEjbJarXmlFileName, String jarFileName) Factory method using deployment descriptor and Jonas deployment descriptor
file names. | public static EjbDeploymentDescManager | getInstance() Get an instance of the EjbDeploymentDescManager. | public static String | getJOnASXmlContent() | public String | getJndiName(URL currentFile, String ejbLink, ClassLoader earCl, String ejbType, DeploymentDesc deploymentDesc, boolean isEjbRef) Return the JNDI name from the ejbLink string.
ejbLink format : filename.jar#beanName in the same Ear File
beanName in the same ejb-jar file.
Parameters: currentFile - the url of the jar being parsed. | public static boolean | getParsingWithValidation() Controls whether the parser is reporting all validity errors. | public static String | getXmlContent() | public static EjbJar | loadEjbJar(Reader reader, String name) Load the ejb_jar.xml file.
Parameters: reader - the reader of the XML file. Parameters: name - the name of the file (ejb-jar.xml). | public static JonasEjbJar | loadJonasEjbJar(Reader reader, String name) | public void | removeCache(ClassLoader earClassLoader) Make a cleanup of the cache of deployment descriptor. | public void | setAvailableEjbJarsAndAltDDs(ClassLoader earClassLoader, URL[] urls, URL[] altDDs) Set for the given ear identified by its earClassLoader the list of the
ejb-jar that can be in the ejb-link and the optional Desployment Desc. | public static void | setParsingWithValidation(boolean validation) Controls whether the parser is reporting all validity errors. | public String | toString() Return a string representation of the cache. |
EJB_JAR_FILE_NAME | final public static String EJB_JAR_FILE_NAME(Code) | | ejb-jar.xml filename
|
JONAS_EJB_JAR_FILE_NAME | final public static String JONAS_EJB_JAR_FILE_NAME(Code) | | jonas-ejb-jar.xml filename
|
addClassLoaderUrlMapping | public void addClassLoaderUrlMapping(ClassLoader ejbClassloader, URL[] urls)(Code) | | Add a mapping between url and classloader
Parameters: ejbClassloader - EjbClassloader on which associate URLs Parameters: urls - array of urls associated to the classloader |
checkType | protected void checkType(URL ejbJar, String ejbType, JndiEnvRefsGroup bd) throws DeploymentDescException(Code) | | Check if the type of the ejb-ref is correct.
Parameters: ejbJar - the URL of the ejb-jar being parsed. Parameters: ejbType - the type of the ejb-ref (ejb-ref-type). Parameters: bd - the descriptor of the referenced bean. throws: DeploymentDescException - if the type is incorrect. |
checkTypeUsage | protected void checkTypeUsage(URL url, String mdType, String mdUsage, BeanDesc bd) throws DeploymentDescException(Code) | | Check if the type & usage of the message-destination-ref is correct.
Parameters: url - the URL of the file being parsed. Parameters: mdType - the type of the message-destination-ref(message-destination-type). Parameters: mdUsage - the usage of the message-destination-ref(message-destination-usage). Parameters: bd - the descriptor of the referenced bean. throws: DeploymentDescException - if the type is incorrect. |
getCacheSize | public int getCacheSize()(Code) | | Get the size of the cache (number of entries in the cache).
Used only for debugging.
the size of the cache (number of entries in the cache). |
getDeploymentDesc | public static DeploymentDesc getDeploymentDesc(String ejbjar, ClassLoader ejbLoader) throws DeploymentDescException(Code) | | Factory method using the ejb-jar file name.
Used by GenIC/GenIDL/WsGen.
Parameters: ejbjar - ejbjar file name Parameters: ejbLoader - classloader used to load bean classes. instance of the corresponding DeploymentDesc exception: DeploymentDescException - when DeploymentDesc cannot be created withgiven ejb-jar file. |
getDeploymentDesc | public synchronized DeploymentDesc getDeploymentDesc(URL url, ClassLoader ejbLoader, ClassLoader earLoader) throws DeploymentDescException(Code) | | Get the specified ejb deployment descriptor and put it in the cache
if it is not in.
Called by createContainer & WebDeploymentDescManager
Parameters: url - the url where to load xml deployment descriptors. Parameters: ejbLoader - classloader used to load bean classes. Parameters: earLoader - the parent classloader (the ear classloader). Null ifthere in the case of an ejb-jar application. DeploymentDesc the ejb deployment descriptor. (This method isused for the ear applications). throws: DeploymentDescException - when DeploymentDesc cannot be createdwith the given files. |
getDeploymentDesc | public static DeploymentDesc getDeploymentDesc(String ejbJarXmlFileName, String jonasEjbJarXmlFileName, String jarFileName) throws DeploymentDescException(Code) | | Factory method using deployment descriptor and Jonas deployment descriptor
file names.
used by GEnIC or GenIDL
Parameters: ejbJarXmlFileName - name of the standard DD Parameters: jonasEjbJarXmlFileName - name of the specific DD Parameters: jarFileName - name of the jar file instance of the corresponding DeploymentDesc exception: DeploymentDescException - when DeploymentDesc cannot be created withgiven files. |
getInstance | public static EjbDeploymentDescManager getInstance()(Code) | | Get an instance of the EjbDeploymentDescManager.
the instance of the EjbDeploymentDescManager. |
getJOnASXmlContent | public static String getJOnASXmlContent()(Code) | | Return the content of the jonas-web.xml file
the content of the jonas-web.xml file |
getJndiName | public String getJndiName(URL currentFile, String ejbLink, ClassLoader earCl, String ejbType, DeploymentDesc deploymentDesc, boolean isEjbRef) throws DeploymentDescException(Code) | | Return the JNDI name from the ejbLink string.
ejbLink format : filename.jar#beanName in the same Ear File
beanName in the same ejb-jar file.
Parameters: currentFile - the url of the jar being parsed. This is needed becauseejbLink is relative. With the url and the ejbLink, we can know wherethe file is locate. Parameters: ejbLink - the ejbLink tag of an ejb-ref Parameters: earCl - optionnal classloader Parameters: ejbType - the type of the referenced ejb in the ejb-ref tag. Parameters: deploymentDesc - the deployment descriptor of the parsed deploymentDesc. Parameters: isEjbRef - true if the jndi name to resolve is an ejb-ref the JNDI name if found, null otherwise throws: DeploymentDescException - when it failed |
getParsingWithValidation | public static boolean getParsingWithValidation()(Code) | | Controls whether the parser is reporting all validity errors.
if true, all external entities will be read. |
getXmlContent | public static String getXmlContent()(Code) | | Return the content of the web.xml file
the content of the web.xml file |
loadEjbJar | public static EjbJar loadEjbJar(Reader reader, String name) throws DeploymentDescException(Code) | | Load the ejb_jar.xml file.
Parameters: reader - the reader of the XML file. Parameters: name - the name of the file (ejb-jar.xml). a structure containing the result of the ejb-jar.xml parsing. throws: DeploymentDescException - if the deployment descriptoris corrupted. |
removeCache | public void removeCache(ClassLoader earClassLoader)(Code) | | Make a cleanup of the cache of deployment descriptor. This method must
be invoked after the ear deployment by the EAR service.
Parameters: earClassLoader - the URLClassLoader of the ear application toremove from the cache. |
setAvailableEjbJarsAndAltDDs | public void setAvailableEjbJarsAndAltDDs(ClassLoader earClassLoader, URL[] urls, URL[] altDDs)(Code) | | Set for the given ear identified by its earClassLoader the list of the
ejb-jar that can be in the ejb-link and the optional Desployment Desc.
Parameters: earClassLoader - the classloader of the ear application. Parameters: urls - the list of the URLs of the ear application that can be inthe ejb-link. Parameters: altDDs - the list of the URLs of the alternate DDs to use if specified. |
setParsingWithValidation | public static void setParsingWithValidation(boolean validation)(Code) | | Controls whether the parser is reporting all validity errors.
Parameters: validation - if true, all external entities will be read. |
toString | public String toString()(Code) | | Return a string representation of the cache. (Used only for debugging).
a string representation of the cache. |
Fields inherited from org.objectweb.jonas_lib.deployment.lib.AbsDeploymentDescManager | final public static String LINK_SEPARATOR(Code)(Java Doc)
|
|
|