Class JonasDeploymentTool
- java.lang.Object
- 
- org.apache.tools.ant.taskdefs.optional.ejb.GenericDeploymentTool
- 
- org.apache.tools.ant.taskdefs.optional.ejb.JonasDeploymentTool
 
 
- 
- All Implemented Interfaces:
- EJBDeploymentTool
 
 public class JonasDeploymentTool extends GenericDeploymentTool The deployment tool to add the jonas specific deployment descriptors to the ejb JAR file. JONAS only requires one additional file jonas-ejb-jar.xml.- Version:
- 1.0
- See Also:
- EjbJar.createJonas()
 
- 
- 
Field SummaryFields Modifier and Type Field Description protected static java.lang.StringDAVID_ORBDAVID ORB.protected static java.lang.StringEJB_JAR_1_1_DTDName of the standard deployment descriptor DTD (these files are stored in the ${JONAS_ROOT}/xml directory).protected static java.lang.StringEJB_JAR_1_1_PUBLIC_IDPublic Id of the standard deployment descriptor DTD.protected static java.lang.StringEJB_JAR_2_0_DTDprotected static java.lang.StringEJB_JAR_2_0_PUBLIC_IDprotected static java.lang.StringGENIC_CLASSGenIC class name (JOnAS 2.5)protected static java.lang.StringJEREMIE_ORBJEREMIE ORB.protected static java.lang.StringJONAS_DDDefault JOnAS deployment descriptor name.protected static java.lang.StringJONAS_EJB_JAR_2_4_DTDName of the JOnAS-specific deployment descriptor DTD (these files are stored in the ${JONAS_ROOT}/xml directory).protected static java.lang.StringJONAS_EJB_JAR_2_4_PUBLIC_IDPublic Id of the JOnAS-specific deployment descriptor DTD.protected static java.lang.StringJONAS_EJB_JAR_2_5_DTDprotected static java.lang.StringJONAS_EJB_JAR_2_5_PUBLIC_IDprotected static java.lang.StringOLD_GENIC_CLASS_1Old GenIC class name (JOnAS 2.4.x).protected static java.lang.StringOLD_GENIC_CLASS_2Old GenIC class name.protected static java.lang.StringRMI_ORBRMI ORB.- 
Fields inherited from class org.apache.tools.ant.taskdefs.optional.ejb.GenericDeploymentToolANALYZER_CLASS_FULL, ANALYZER_CLASS_SUPER, ANALYZER_FULL, ANALYZER_NONE, ANALYZER_SUPER, DEFAULT_ANALYZER, DEFAULT_BUFFER_SIZE, EJB_DD, JAR_COMPRESS_LEVEL, MANIFEST, META_DIR
 
- 
 - 
Constructor SummaryConstructors Constructor Description JonasDeploymentTool()
 - 
Method SummaryModifier and Type Method Description protected voidaddVendorFiles(java.util.Hashtable<java.lang.String,java.io.File> ejbFiles, java.lang.String ddPrefix)Add any vendor specific files which should be included in the EJB Jar.protected voidcheckConfiguration(java.lang.String descriptorFileName, javax.xml.parsers.SAXParser saxParser)Verify the configuration.protected java.lang.StringgetJarBaseName(java.lang.String descriptorFileName)Using the EJB descriptor file name passed from theejbjartask, this method returns the "basename" which will be used to name the completed JAR file.protected java.io.FilegetVendorOutputJarFile(java.lang.String baseName).voidprocessDescriptor(java.lang.String aDescriptorName, javax.xml.parsers.SAXParser saxParser)Process a deployment descriptor, generating the necessary vendor specific deployment files.protected voidregisterKnownDTDs(DescriptorHandler handler)Register the locations of all known DTDs.voidsetAdditionalargs(java.lang.String aString)Sets the additional arguments.voidsetJarsuffix(java.lang.String aString)Sets the jar suffix.voidsetJavac(java.lang.String aString)Sets the java compiler to use.voidsetJavacopts(java.lang.String aString)Set the options to pass to the java compiler.voidsetJonasroot(java.io.File aFile)Set the JOnAS root directory.voidsetKeepgenerated(boolean aBoolean)Sets thekeepgeneratedflag.voidsetKeepgeneric(boolean aBoolean)Sets thekeepgenericflag.voidsetNocompil(boolean aBoolean)Sets thenocompilflag.voidsetNogenic(boolean aBoolean)Sets thenogenicflag.voidsetNovalidation(boolean aBoolean)Sets thenovalidationflag.voidsetOrb(java.lang.String aString)Sets theorbto construct classpath.voidsetRmicopts(java.lang.String aString)Set the options to pass to the rmi compiler.voidsetSecpropag(boolean aBoolean)Sets thesecpropagflag.voidsetVerbose(boolean aBoolean)Sets theverboseflag.protected voidwriteJar(java.lang.String baseName, java.io.File jarfile, java.util.Hashtable<java.lang.String,java.io.File> ejbFiles, java.lang.String publicId)Method used to encapsulate the writing of the JAR file.- 
Methods inherited from class org.apache.tools.ant.taskdefs.optional.ejb.GenericDeploymentTooladdFileToJar, addSupportClasses, checkAndAddDependants, configure, createClasspath, getClassLoaderForBuild, getCombinedClasspath, getConfig, getDescriptorHandler, getDestDir, getLocation, getManifestFile, getPublicId, getTask, getVendorDDPrefix, log, needToRebuild, parseEjbFiles, setClasspath, setDestdir, setGenericJarSuffix, setTask, usingBaseJarName, validateConfigured
 
- 
 
- 
- 
- 
Field Detail- 
EJB_JAR_1_1_PUBLIC_IDprotected static final java.lang.String EJB_JAR_1_1_PUBLIC_ID Public Id of the standard deployment descriptor DTD.- See Also:
- Constant Field Values
 
 - 
EJB_JAR_2_0_PUBLIC_IDprotected static final java.lang.String EJB_JAR_2_0_PUBLIC_ID - See Also:
- Constant Field Values
 
 - 
JONAS_EJB_JAR_2_4_PUBLIC_IDprotected static final java.lang.String JONAS_EJB_JAR_2_4_PUBLIC_ID Public Id of the JOnAS-specific deployment descriptor DTD.- See Also:
- Constant Field Values
 
 - 
JONAS_EJB_JAR_2_5_PUBLIC_IDprotected static final java.lang.String JONAS_EJB_JAR_2_5_PUBLIC_ID - See Also:
- Constant Field Values
 
 - 
RMI_ORBprotected static final java.lang.String RMI_ORB RMI ORB.- See Also:
- Constant Field Values
 
 - 
JEREMIE_ORBprotected static final java.lang.String JEREMIE_ORB JEREMIE ORB.- See Also:
- Constant Field Values
 
 - 
DAVID_ORBprotected static final java.lang.String DAVID_ORB DAVID ORB.- See Also:
- Constant Field Values
 
 - 
EJB_JAR_1_1_DTDprotected static final java.lang.String EJB_JAR_1_1_DTD Name of the standard deployment descriptor DTD (these files are stored in the ${JONAS_ROOT}/xml directory).- See Also:
- Constant Field Values
 
 - 
EJB_JAR_2_0_DTDprotected static final java.lang.String EJB_JAR_2_0_DTD - See Also:
- Constant Field Values
 
 - 
JONAS_EJB_JAR_2_4_DTDprotected static final java.lang.String JONAS_EJB_JAR_2_4_DTD Name of the JOnAS-specific deployment descriptor DTD (these files are stored in the ${JONAS_ROOT}/xml directory).- See Also:
- Constant Field Values
 
 - 
JONAS_EJB_JAR_2_5_DTDprotected static final java.lang.String JONAS_EJB_JAR_2_5_DTD - See Also:
- Constant Field Values
 
 - 
JONAS_DDprotected static final java.lang.String JONAS_DD Default JOnAS deployment descriptor name.- See Also:
- Constant Field Values
 
 - 
GENIC_CLASSprotected static final java.lang.String GENIC_CLASS GenIC class name (JOnAS 2.5)- See Also:
- Constant Field Values
 
 - 
OLD_GENIC_CLASS_1protected static final java.lang.String OLD_GENIC_CLASS_1 Old GenIC class name (JOnAS 2.4.x).- See Also:
- Constant Field Values
 
 - 
OLD_GENIC_CLASS_2protected static final java.lang.String OLD_GENIC_CLASS_2 Old GenIC class name.- See Also:
- Constant Field Values
 
 
- 
 - 
Method Detail- 
setKeepgeneratedpublic void setKeepgenerated(boolean aBoolean) Sets thekeepgeneratedflag.- Parameters:
- aBoolean-- trueif the flag must be set.
 
 - 
setAdditionalargspublic void setAdditionalargs(java.lang.String aString) Sets the additional arguments.- Parameters:
- aString- additional args.
 
 - 
setNocompilpublic void setNocompil(boolean aBoolean) Sets thenocompilflag.- Parameters:
- aBoolean-- trueif the flag must be set.
 
 - 
setNovalidationpublic void setNovalidation(boolean aBoolean) Sets thenovalidationflag.- Parameters:
- aBoolean-- trueif the flag must be set.
 
 - 
setJavacpublic void setJavac(java.lang.String aString) Sets the java compiler to use.- Parameters:
- aString- the java compiler.
 
 - 
setJavacoptspublic void setJavacopts(java.lang.String aString) Set the options to pass to the java compiler.- Parameters:
- aString- the options.
 
 - 
setRmicoptspublic void setRmicopts(java.lang.String aString) Set the options to pass to the rmi compiler.- Parameters:
- aString- the options.
 
 - 
setSecpropagpublic void setSecpropag(boolean aBoolean) Sets thesecpropagflag.- Parameters:
- aBoolean-- trueif the flag must be set.
 
 - 
setVerbosepublic void setVerbose(boolean aBoolean) Sets theverboseflag.- Parameters:
- aBoolean-- trueif the flag must be set.
 
 - 
setJonasrootpublic void setJonasroot(java.io.File aFile) Set the JOnAS root directory.- Parameters:
- aFile- the JOnAS root directory.
 
 - 
setKeepgenericpublic void setKeepgeneric(boolean aBoolean) Sets thekeepgenericflag.- Parameters:
- aBoolean-- trueif the flag must be set.
 
 - 
setJarsuffixpublic void setJarsuffix(java.lang.String aString) Sets the jar suffix.- Parameters:
- aString- the string to use as the suffix.
 
 - 
setOrbpublic void setOrb(java.lang.String aString) Sets theorbto construct classpath.- Parameters:
- aString- 'RMI', 'JEREMIE', or 'DAVID'.
 
 - 
setNogenicpublic void setNogenic(boolean aBoolean) Sets thenogenicflag.- Parameters:
- aBoolean-- trueif the flag must be set.
 
 - 
processDescriptorpublic void processDescriptor(java.lang.String aDescriptorName, javax.xml.parsers.SAXParser saxParser)Process a deployment descriptor, generating the necessary vendor specific deployment files...- Specified by:
- processDescriptorin interface- EJBDeploymentTool
- Overrides:
- processDescriptorin class- GenericDeploymentTool
- Parameters:
- aDescriptorName- the name of the deployment descriptor
- saxParser- a SAX parser which can be used to parse the deployment descriptor.
 
 - 
writeJarprotected void writeJar(java.lang.String baseName, java.io.File jarfile, java.util.Hashtable<java.lang.String,java.io.File> ejbFiles, java.lang.String publicId) throws BuildExceptionMethod used to encapsulate the writing of the JAR file. Iterates over the filenames/java.io.Files in the Hashtable stored on the instance variable ejbFiles..- Overrides:
- writeJarin class- GenericDeploymentTool
- Parameters:
- baseName- the base name to use.
- jarfile- the jar file to write to.
- ejbFiles- the files to write to the jar.
- publicId- the id to use.
- Throws:
- BuildException- if there is a problem.
 
 - 
addVendorFilesprotected void addVendorFiles(java.util.Hashtable<java.lang.String,java.io.File> ejbFiles, java.lang.String ddPrefix)Add any vendor specific files which should be included in the EJB Jar..- Overrides:
- addVendorFilesin class- GenericDeploymentTool
- Parameters:
- ejbFiles- a hashtable entryname -> file.
- ddPrefix- a prefix to use.
 
 - 
getVendorOutputJarFileprotected java.io.File getVendorOutputJarFile(java.lang.String baseName) .
 - 
getJarBaseNameprotected java.lang.String getJarBaseName(java.lang.String descriptorFileName) Using the EJB descriptor file name passed from theejbjartask, this method returns the "basename" which will be used to name the completed JAR file..- Overrides:
- getJarBaseNamein class- GenericDeploymentTool
- Parameters:
- descriptorFileName- String representing the file name of an EJB descriptor to be processed
- Returns:
- The "basename" which will be used to name the completed JAR file
 
 - 
registerKnownDTDsprotected void registerKnownDTDs(DescriptorHandler handler) Register the locations of all known DTDs. vendor-specific subclasses should override this method to define the vendor-specific locations of the EJB DTDs.- Overrides:
- registerKnownDTDsin class- GenericDeploymentTool
- Parameters:
- handler- no used in this class.
 
 - 
checkConfigurationprotected void checkConfiguration(java.lang.String descriptorFileName, javax.xml.parsers.SAXParser saxParser) throws BuildExceptionVerify the configuration.- Overrides:
- checkConfigurationin class- GenericDeploymentTool
- Parameters:
- descriptorFileName- the name of the descriptor file.
- saxParser- not used.
- Throws:
- BuildException- if there is an error.
 
 
- 
 
-