|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.objectweb.jonas_lib.deployment.lib.AbsDeploymentDescManager org.objectweb.jonas_ejb.deployment.lib.EjbDeploymentDescManager
This class provide a way for managing the EjbDeploymentDesc. Note that there is an intance of the EjbDeploymentDescManager on each JOnAS server.
Field Summary | |
static java.lang.String |
EJB_JAR_FILE_NAME
ejb-jar.xml filename |
static java.lang.String |
JONAS_EJB_JAR_FILE_NAME
jonas-ejb-jar.xml filename |
Fields inherited from class org.objectweb.jonas_lib.deployment.lib.AbsDeploymentDescManager |
LINK_SEPARATOR |
Method Summary | |
void |
addClassLoaderUrlMapping(java.lang.ClassLoader ejbClassloader,
java.net.URL[] urls)
Add a mapping between url and classloader |
protected void |
checkType(java.net.URL ejbJar,
java.lang.String ejbType,
JndiEnvRefsGroup bd)
Check if the type of the ejb-ref is correct. |
protected void |
checkTypeUsage(java.net.URL url,
java.lang.String mdType,
java.lang.String mdUsage,
BeanDesc bd)
Check if the type & usage of the message-destination-ref is correct. |
int |
getCacheSize()
Get the size of the cache (number of entries in the cache). |
static DeploymentDesc |
getDeploymentDesc(java.lang.String ejbjar,
java.lang.ClassLoader ejbLoader)
Factory method using the ejb-jar file name. |
static DeploymentDesc |
getDeploymentDesc(java.lang.String ejbJarXmlFileName,
java.lang.String jonasEjbJarXmlFileName,
java.lang.String jarFileName)
Factory method using deployment descriptor and Jonas deployment descriptor file names. |
DeploymentDesc |
getDeploymentDesc(java.net.URL url,
java.lang.ClassLoader ejbLoader,
java.lang.ClassLoader earLoader)
Get the specified ejb deployment descriptor and put it in the cache if it is not in. |
static EjbDeploymentDescManager |
getInstance()
Get an instance of the EjbDeploymentDescManager. |
java.lang.String |
getJndiName(java.net.URL currentFile,
java.lang.String ejbLink,
java.lang.ClassLoader earCl,
java.lang.String ejbType,
DeploymentDesc deploymentDesc,
boolean isEjbRef)
Return the JNDI name from the ejbLink string. |
static java.lang.String |
getJOnASXmlContent()
Return the content of the jonas-web.xml file |
static boolean |
getParsingWithValidation()
Controls whether the parser is reporting all validity errors. |
static java.lang.String |
getXmlContent()
Return the content of the web.xml file |
static EjbJar |
loadEjbJar(java.io.Reader reader,
java.lang.String name)
Load the ejb_jar.xml file. |
static JonasEjbJar |
loadJonasEjbJar(java.io.Reader reader,
java.lang.String name)
Load the EjbJar file |
void |
removeCache(java.lang.ClassLoader earClassLoader)
Make a cleanup of the cache of deployment descriptor. |
void |
setAvailableEjbJarsAndAltDDs(java.lang.ClassLoader earClassLoader,
java.net.URL[] urls,
java.net.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. |
static void |
setParsingWithValidation(boolean validation)
Controls whether the parser is reporting all validity errors. |
java.lang.String |
toString()
Return a string representation of the cache. |
Methods inherited from class org.objectweb.jonas_lib.deployment.lib.AbsDeploymentDescManager |
xmlContent |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final java.lang.String EJB_JAR_FILE_NAME
public static final java.lang.String JONAS_EJB_JAR_FILE_NAME
Method Detail |
public static EjbDeploymentDescManager getInstance()
public static DeploymentDesc getDeploymentDesc(java.lang.String ejbjar, java.lang.ClassLoader ejbLoader) throws DeploymentDescException
ejbjar
- ejbjar file nameejbLoader
- classloader used to load bean classes.
DeploymentDescException
- when DeploymentDesc cannot be created with
given ejb-jar file.public DeploymentDesc getDeploymentDesc(java.net.URL url, java.lang.ClassLoader ejbLoader, java.lang.ClassLoader earLoader) throws DeploymentDescException
url
- the url where to load xml deployment descriptors.ejbLoader
- classloader used to load bean classes.earLoader
- the parent classloader (the ear classloader). Null if
there in the case of an ejb-jar application.
DeploymentDescException
- when DeploymentDesc cannot be created
with the given files.public java.lang.String getJndiName(java.net.URL currentFile, java.lang.String ejbLink, java.lang.ClassLoader earCl, java.lang.String ejbType, DeploymentDesc deploymentDesc, boolean isEjbRef) throws DeploymentDescException
currentFile
- the url of the jar being parsed. This is needed because
ejbLink is relative. With the url and the ejbLink, we can know where
the file is locate.ejbLink
- the ejbLink tag of an ejb-refearCl
- optionnal classloaderejbType
- the type of the referenced ejb in the ejb-ref tag.deploymentDesc
- the deployment descriptor of the parsed deploymentDesc.isEjbRef
- true if the jndi name to resolve is an ejb-ref
DeploymentDescException
- when it failedpublic void setAvailableEjbJarsAndAltDDs(java.lang.ClassLoader earClassLoader, java.net.URL[] urls, java.net.URL[] altDDs)
earClassLoader
- the classloader of the ear application.urls
- the list of the URLs of the ear application that can be in
the ejb-link.altDDs
- the list of the URLs of the alternate DDs to use if specified.public void removeCache(java.lang.ClassLoader earClassLoader)
earClassLoader
- the URLClassLoader of the ear application to
remove from the cache.public int getCacheSize()
public java.lang.String toString()
public static DeploymentDesc getDeploymentDesc(java.lang.String ejbJarXmlFileName, java.lang.String jonasEjbJarXmlFileName, java.lang.String jarFileName) throws DeploymentDescException
ejbJarXmlFileName
- name of the standard DDjonasEjbJarXmlFileName
- name of the specific DDjarFileName
- name of the jar file
DeploymentDescException
- when DeploymentDesc cannot be created with
given files.public static EjbJar loadEjbJar(java.io.Reader reader, java.lang.String name) throws DeploymentDescException
reader
- the reader of the XML file.name
- the name of the file (ejb-jar.xml).
DeploymentDescException
- if the deployment descriptor
is corrupted.public static JonasEjbJar loadJonasEjbJar(java.io.Reader reader, java.lang.String name) throws DeploymentDescException
reader
- reader containing the streamname
- name of the file
DeploymentDescException
- if loading failspublic static boolean getParsingWithValidation()
public static void setParsingWithValidation(boolean validation)
validation
- if true, all external entities will be read.public static java.lang.String getXmlContent()
public static java.lang.String getJOnASXmlContent()
protected void checkType(java.net.URL ejbJar, java.lang.String ejbType, JndiEnvRefsGroup bd) throws DeploymentDescException
ejbJar
- the URL of the ejb-jar being parsed.ejbType
- the type of the ejb-ref (ejb-ref-type).bd
- the descriptor of the referenced bean.
DeploymentDescException
- if the type is incorrect.protected void checkTypeUsage(java.net.URL url, java.lang.String mdType, java.lang.String mdUsage, BeanDesc bd) throws DeploymentDescException
url
- the URL of the file being parsed.mdType
- the type of the message-destination-ref
(message-destination-type).mdUsage
- the usage of the message-destination-ref
(message-destination-usage).bd
- the descriptor of the referenced bean.
DeploymentDescException
- if the type is incorrect.public void addClassLoaderUrlMapping(java.lang.ClassLoader ejbClassloader, java.net.URL[] urls)
ejbClassloader
- EjbClassloader on which associate URLsurls
- array of urls associated to the classloader
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |