org.objectweb.jonas_ejb.deployment.lib.EjbDeploymentDescManager Class Reference

Collaboration diagram for org.objectweb.jonas_ejb.deployment.lib.EjbDeploymentDescManager:

Collaboration graph
[legend]
List of all members.

Public Member Functions

synchronized DeploymentDesc getDeploymentDesc (URL url, ClassLoader ejbLoader, ClassLoader earLoader) throws DeploymentDescException
String getJndiName (URL currentFile, String ejbLink, ClassLoader earCl, String ejbType, DeploymentDesc deploymentDesc, boolean isEjbRef) throws DeploymentDescException
void setAvailableEjbJarsAndAltDDs (ClassLoader earClassLoader, URL[] urls, URL[] altDDs)
void removeCache (ClassLoader earClassLoader)
int getCacheSize ()
String toString ()
void addClassLoaderUrlMapping (ClassLoader ejbClassloader, URL[] urls)

Static Public Member Functions

EjbDeploymentDescManager getInstance ()
DeploymentDesc getDeploymentDesc (String ejbjar, ClassLoader ejbLoader) throws DeploymentDescException
DeploymentDesc getDeploymentDesc (String ejbJarXmlFileName, String jonasEjbJarXmlFileName, String jarFileName) throws DeploymentDescException
EjbJar loadEjbJar (Reader reader, String name) throws DeploymentDescException
JonasEjbJar loadJonasEjbJar (Reader reader, String name) throws DeploymentDescException
boolean getParsingWithValidation ()
void setParsingWithValidation (boolean validation)
String getXmlContent ()
String getJOnASXmlContent ()

Static Public Attributes

final String EJB_JAR_FILE_NAME = "META-INF/ejb-jar.xml"
final String JONAS_EJB_JAR_FILE_NAME = "META-INF/jonas-ejb-jar.xml"

Protected Member Functions

void checkType (URL ejbJar, String ejbType, JndiEnvRefsGroup bd) throws DeploymentDescException
void checkTypeUsage (URL url, String mdType, String mdUsage, BeanDesc bd) throws DeploymentDescException

Detailed Description

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

Florent Benoit

Nicolas Van Caneghem <nicolas.vancaneghem@openpricer.com> Allow the deployment of an exploded ear Contributors:
JOnAS 4.0 Adriana Danes: keep deployement descriptors is a Stringified format for management support.

Definition at line 92 of file EjbDeploymentDescManager.java.


Member Function Documentation

void org.objectweb.jonas_ejb.deployment.lib.EjbDeploymentDescManager.addClassLoaderUrlMapping ClassLoader  ejbClassloader,
URL[]  urls
 

Add a mapping between url and classloader

Parameters:
ejbClassloader EjbClassloader on which associate URLs
urls array of urls associated to the classloader

Definition at line 1278 of file EjbDeploymentDescManager.java.

void org.objectweb.jonas_ejb.deployment.lib.EjbDeploymentDescManager.checkType URL  ejbJar,
String  ejbType,
JndiEnvRefsGroup  bd
throws DeploymentDescException [protected]
 

Check if the type of the ejb-ref is correct.

Parameters:
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.
Exceptions:
DeploymentDescException if the type is incorrect.

Definition at line 1218 of file EjbDeploymentDescManager.java.

Referenced by org.objectweb.jonas_ejb.deployment.lib.EjbDeploymentDescManager.getJndiName().

void org.objectweb.jonas_ejb.deployment.lib.EjbDeploymentDescManager.checkTypeUsage URL  url,
String  mdType,
String  mdUsage,
BeanDesc  bd
throws DeploymentDescException [protected]
 

Check if the type & usage of the message-destination-ref is correct.

Parameters:
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.
Exceptions:
DeploymentDescException if the type is incorrect.

Definition at line 1248 of file EjbDeploymentDescManager.java.

References org.objectweb.jonas_ejb.deployment.api.MessageDrivenDesc.getDestinationType().

Here is the call graph for this function:

int org.objectweb.jonas_ejb.deployment.lib.EjbDeploymentDescManager.getCacheSize  ) 
 

Get the size of the cache (number of entries in the cache). Used only for debugging.

Returns:
the size of the cache (number of entries in the cache).

Definition at line 893 of file EjbDeploymentDescManager.java.

DeploymentDesc org.objectweb.jonas_ejb.deployment.lib.EjbDeploymentDescManager.getDeploymentDesc String  ejbJarXmlFileName,
String  jonasEjbJarXmlFileName,
String  jarFileName
throws DeploymentDescException [static]
 

Factory method using deployment descriptor and Jonas deployment descriptor file names. used by GEnIC or GenIDL

Parameters:
ejbJarXmlFileName name of the standard DD
jonasEjbJarXmlFileName name of the specific DD
jarFileName name of the jar file
Returns:
instance of the corresponding DeploymentDesc
Exceptions:
DeploymentDescException when DeploymentDesc cannot be created with given files.

Definition at line 920 of file EjbDeploymentDescManager.java.

synchronized DeploymentDesc org.objectweb.jonas_ejb.deployment.lib.EjbDeploymentDescManager.getDeploymentDesc URL  url,
ClassLoader  ejbLoader,
ClassLoader  earLoader
throws DeploymentDescException
 

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.
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.
Returns:
DeploymentDesc the ejb deployment descriptor. (This method is used for the ear applications).
Exceptions:
DeploymentDescException when DeploymentDesc cannot be created with the given files.

Definition at line 242 of file EjbDeploymentDescManager.java.

References org.objectweb.jonas_ws.deployment.lib.WSDeploymentDescManager.getInstance().

Here is the call graph for this function:

DeploymentDesc org.objectweb.jonas_ejb.deployment.lib.EjbDeploymentDescManager.getDeploymentDesc String  ejbjar,
ClassLoader  ejbLoader
throws DeploymentDescException [static]
 

Factory method using the ejb-jar file name. Used by GenIC/GenIDL/WsGen.

Parameters:
ejbjar ejbjar file name
ejbLoader classloader used to load bean classes.
Returns:
instance of the corresponding DeploymentDesc
Exceptions:
DeploymentDescException when DeploymentDesc cannot be created with given ejb-jar file.

Definition at line 220 of file EjbDeploymentDescManager.java.

Referenced by org.objectweb.jonas_ejb.deployment.lib.EjbDeploymentDescManager.getJndiName().

EjbDeploymentDescManager org.objectweb.jonas_ejb.deployment.lib.EjbDeploymentDescManager.getInstance  )  [static]
 

Get an instance of the EjbDeploymentDescManager.

Returns:
the instance of the EjbDeploymentDescManager.

Definition at line 204 of file EjbDeploymentDescManager.java.

String org.objectweb.jonas_ejb.deployment.lib.EjbDeploymentDescManager.getJndiName URL  currentFile,
String  ejbLink,
ClassLoader  earCl,
String  ejbType,
DeploymentDesc  deploymentDesc,
boolean  isEjbRef
throws DeploymentDescException
 

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 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-ref
earCl optionnal classloader
ejbType 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
Returns:
the JNDI name if found, null otherwise
Exceptions:
DeploymentDescException when it failed

Definition at line 485 of file EjbDeploymentDescManager.java.

References org.objectweb.jonas_ejb.deployment.lib.EjbDeploymentDescManager.checkType(), org.objectweb.jonas_ejb.deployment.lib.EjbDeploymentDescManager.EJB_JAR_FILE_NAME, org.objectweb.jonas_ejb.deployment.api.DeploymentDesc.getBeanDesc(), org.objectweb.jonas_ejb.deployment.lib.EjbDeploymentDescManager.getDeploymentDesc(), org.objectweb.jonas_ejb.deployment.api.BeanDesc.getEjbName(), org.objectweb.jonas_ejb.deployment.api.BeanDesc.getJndiLocalName(), and org.objectweb.jonas_ejb.deployment.api.BeanDesc.getJndiName().

Here is the call graph for this function:

String org.objectweb.jonas_ejb.deployment.lib.EjbDeploymentDescManager.getJOnASXmlContent  )  [static]
 

Return the content of the jonas-web.xml file

Returns:
the content of the jonas-web.xml file

Definition at line 1206 of file EjbDeploymentDescManager.java.

boolean org.objectweb.jonas_ejb.deployment.lib.EjbDeploymentDescManager.getParsingWithValidation  )  [static]
 

Controls whether the parser is reporting all validity errors.

Returns:
if true, all external entities will be read.

Definition at line 1182 of file EjbDeploymentDescManager.java.

String org.objectweb.jonas_ejb.deployment.lib.EjbDeploymentDescManager.getXmlContent  )  [static]
 

Return the content of the web.xml file

Returns:
the content of the web.xml file

Definition at line 1198 of file EjbDeploymentDescManager.java.

EjbJar org.objectweb.jonas_ejb.deployment.lib.EjbDeploymentDescManager.loadEjbJar Reader  reader,
String  name
throws DeploymentDescException [static]
 

Load the ejb_jar.xml file.

Parameters:
reader the reader of the XML file.
name the name of the file (ejb-jar.xml).
Returns:
a structure containing the result of the ejb-jar.xml parsing.
Exceptions:
DeploymentDescException if the deployment descriptor is corrupted.

Definition at line 1125 of file EjbDeploymentDescManager.java.

References org.objectweb.jonas_lib.deployment.digester.JDigester.parse().

Here is the call graph for this function:

JonasEjbJar org.objectweb.jonas_ejb.deployment.lib.EjbDeploymentDescManager.loadJonasEjbJar Reader  reader,
String  name
throws DeploymentDescException [static]
 

Load the EjbJar file

Parameters:
reader reader containing the stream
name name of the file
Returns:
JOnAS DD object
Exceptions:
DeploymentDescException if loading fails

Definition at line 1155 of file EjbDeploymentDescManager.java.

References org.objectweb.jonas_lib.deployment.digester.JDigester.parse().

Here is the call graph for this function:

void org.objectweb.jonas_ejb.deployment.lib.EjbDeploymentDescManager.removeCache ClassLoader  earClassLoader  ) 
 

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 to remove from the cache.

Definition at line 860 of file EjbDeploymentDescManager.java.

Referenced by org.objectweb.jonas_web.deployment.lib.WebDeploymentDescManager.removeCache(), and org.objectweb.jonas_client.deployment.lib.ClientDeploymentDescManager.removeCache().

void org.objectweb.jonas_ejb.deployment.lib.EjbDeploymentDescManager.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.

Parameters:
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.

Definition at line 841 of file EjbDeploymentDescManager.java.

void org.objectweb.jonas_ejb.deployment.lib.EjbDeploymentDescManager.setParsingWithValidation boolean  validation  )  [static]
 

Controls whether the parser is reporting all validity errors.

Parameters:
validation if true, all external entities will be read.

Definition at line 1190 of file EjbDeploymentDescManager.java.

String org.objectweb.jonas_ejb.deployment.lib.EjbDeploymentDescManager.toString  ) 
 

Return a string representation of the cache. (Used only for debugging).

Returns:
a string representation of the cache.

Definition at line 903 of file EjbDeploymentDescManager.java.


Member Data Documentation

final String org.objectweb.jonas_ejb.deployment.lib.EjbDeploymentDescManager.EJB_JAR_FILE_NAME = "META-INF/ejb-jar.xml" [static]
 

ejb-jar.xml filename

Definition at line 97 of file EjbDeploymentDescManager.java.

Referenced by org.objectweb.jonas_ejb.deployment.lib.EjbDeploymentDescManager.getJndiName().

final String org.objectweb.jonas_ejb.deployment.lib.EjbDeploymentDescManager.JONAS_EJB_JAR_FILE_NAME = "META-INF/jonas-ejb-jar.xml" [static]
 

jonas-ejb-jar.xml filename

Definition at line 102 of file EjbDeploymentDescManager.java.


The documentation for this class was generated from the following file:
Generated on Tue Feb 15 15:11:30 2005 for JOnAS by  doxygen 1.3.9.1