org.apache.tools.ant.taskdefs.optional.ejb

Class JonasDeploymentTool

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 Summary

protected static String
DAVID_ORB
DAVID ORB.
protected static String
EJB_JAR_1_1_DTD
Name of the standard deployment descriptor DTD (these files are stored in the ${JONAS_ROOT}/xml directory).
protected static String
EJB_JAR_1_1_PUBLIC_ID
Public Id of the standard deployment descriptor DTD.
protected static String
EJB_JAR_2_0_DTD
protected static String
EJB_JAR_2_0_PUBLIC_ID
protected static String
GENIC_CLASS
GenIC class name (JOnAS 2.5)
protected static String
JEREMIE_ORB
JEREMIE ORB.
protected static String
JONAS_DD
Default JOnAS deployment descriptor name.
protected static 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).
protected static String
JONAS_EJB_JAR_2_4_PUBLIC_ID
Public Id of the JOnAS-specific deployment descriptor DTD.
protected static String
JONAS_EJB_JAR_2_5_DTD
protected static String
JONAS_EJB_JAR_2_5_PUBLIC_ID
protected static String
OLD_GENIC_CLASS_1
Old GenIC class name (JOnAS 2.4.x).
protected static String
OLD_GENIC_CLASS_2
Old GenIC class name.
protected static String
RMI_ORB
RMI ORB.

Fields inherited from class org.apache.tools.ant.taskdefs.optional.ejb.GenericDeploymentTool

ANALYZER_CLASS_FULL, ANALYZER_CLASS_SUPER, ANALYZER_FULL, ANALYZER_NONE, ANALYZER_SUPER, DEFAULT_ANALYZER, DEFAULT_BUFFER_SIZE, EJB_DD, JAR_COMPRESS_LEVEL, MANIFEST, META_DIR

Method Summary

protected void
addVendorFiles(Hashtable ejbFiles, String ddPrefix)
.
protected void
checkConfiguration(String descriptorFileName, SAXParser saxParser)
Verify the configuration.
protected String
getJarBaseName(String descriptorFileName)
.
protected File
getVendorOutputJarFile(String baseName)
.
void
processDescriptor(String aDescriptorName, SAXParser saxParser)
.
protected void
registerKnownDTDs(DescriptorHandler handler)
.
void
setAdditionalargs(String aString)
Sets the additional arguments.
void
setJarsuffix(String aString)
Sets the jar suffix.
void
setJavac(String aString)
Sets the java compiler to use.
void
setJavacopts(String aString)
Set the options to pass to the java compiler.
void
setJonasroot(File aFile)
Set the JOnAS root directory.
void
setKeepgenerated(boolean aBoolean)
Sets the keepgenerated flag.
void
setKeepgeneric(boolean aBoolean)
Sets the keepgeneric flag.
void
setNocompil(boolean aBoolean)
Sets the nocompil flag.
void
setNogenic(boolean aBoolean)
Sets the nogenic flag.
void
setNovalidation(boolean aBoolean)
Sets the novalidation flag.
void
setOrb(String aString)
Sets the orb to construct classpath.
void
setRmicopts(String aString)
Set the options to pass to the rmi compiler.
void
setSecpropag(boolean aBoolean)
Sets the secpropag flag.
void
setVerbose(boolean aBoolean)
Sets the verbose flag.
protected void
writeJar(String baseName, File jarfile, Hashtable ejbFiles, String publicId)
.

Methods inherited from class org.apache.tools.ant.taskdefs.optional.ejb.GenericDeploymentTool

addFileToJar, addSupportClasses, addVendorFiles, checkAndAddDependants, checkConfiguration, configure, createClasspath, getClassLoaderForBuild, getCombinedClasspath, getConfig, getDescriptorHandler, getDestDir, getJarBaseName, getLocation, getManifestFile, getPublicId, getTask, getVendorDDPrefix, log, needToRebuild, parseEjbFiles, processDescriptor, registerKnownDTDs, setClasspath, setDestdir, setGenericJarSuffix, setTask, usingBaseJarName, validateConfigured, writeJar

Field Details

DAVID_ORB

protected static final String DAVID_ORB
DAVID ORB.

EJB_JAR_1_1_DTD

protected static final String EJB_JAR_1_1_DTD
Name of the standard deployment descriptor DTD (these files are stored in the ${JONAS_ROOT}/xml directory).

EJB_JAR_1_1_PUBLIC_ID

protected static final String EJB_JAR_1_1_PUBLIC_ID
Public Id of the standard deployment descriptor DTD.

EJB_JAR_2_0_DTD

protected static final String EJB_JAR_2_0_DTD

EJB_JAR_2_0_PUBLIC_ID

protected static final String EJB_JAR_2_0_PUBLIC_ID

GENIC_CLASS

protected static final String GENIC_CLASS
GenIC class name (JOnAS 2.5)

JEREMIE_ORB

protected static final String JEREMIE_ORB
JEREMIE ORB.

JONAS_DD

protected static final String JONAS_DD
Default JOnAS deployment descriptor name.

JONAS_EJB_JAR_2_4_DTD

protected static final 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).

JONAS_EJB_JAR_2_4_PUBLIC_ID

protected static final String JONAS_EJB_JAR_2_4_PUBLIC_ID
Public Id of the JOnAS-specific deployment descriptor DTD.

JONAS_EJB_JAR_2_5_DTD

protected static final String JONAS_EJB_JAR_2_5_DTD

JONAS_EJB_JAR_2_5_PUBLIC_ID

protected static final String JONAS_EJB_JAR_2_5_PUBLIC_ID

OLD_GENIC_CLASS_1

protected static final String OLD_GENIC_CLASS_1
Old GenIC class name (JOnAS 2.4.x).

OLD_GENIC_CLASS_2

protected static final String OLD_GENIC_CLASS_2
Old GenIC class name.

RMI_ORB

protected static final String RMI_ORB
RMI ORB.

Method Details

addVendorFiles

protected void addVendorFiles(Hashtable ejbFiles,
                              String ddPrefix)
.
Overrides:
addVendorFiles in interface GenericDeploymentTool

checkConfiguration

protected void checkConfiguration(String descriptorFileName,
                                  SAXParser saxParser)
            throws BuildException
Verify the configuration.
Overrides:
checkConfiguration in interface GenericDeploymentTool
Parameters:
descriptorFileName - the name of the descriptor file.
saxParser - not used.
Throws:
BuildException - if there is an error.

getJarBaseName

protected String getJarBaseName(String descriptorFileName)
.
Overrides:
getJarBaseName in interface GenericDeploymentTool

getVendorOutputJarFile

protected File getVendorOutputJarFile(String baseName)
.

processDescriptor

public void processDescriptor(String aDescriptorName,
                              SAXParser saxParser)
.
Specified by:
processDescriptor in interface EJBDeploymentTool
Overrides:
processDescriptor in interface GenericDeploymentTool

registerKnownDTDs

protected void registerKnownDTDs(DescriptorHandler handler)
.
Overrides:
registerKnownDTDs in interface GenericDeploymentTool

setAdditionalargs

public void setAdditionalargs(String aString)
Sets the additional arguments.
Parameters:
aString - additional args.

setJarsuffix

public void setJarsuffix(String aString)
Sets the jar suffix.
Parameters:
aString - the string to use as the suffix.

setJavac

public void setJavac(String aString)
Sets the java compiler to use.
Parameters:
aString - the java compiler.

setJavacopts

public void setJavacopts(String aString)
Set the options to pass to the java compiler.
Parameters:
aString - the options.

setJonasroot

public void setJonasroot(File aFile)
Set the JOnAS root directory.
Parameters:
aFile - the JOnAS root directory.

setKeepgenerated

public void setKeepgenerated(boolean aBoolean)
Sets the keepgenerated flag.
Parameters:
aBoolean - true if the flag must be set.

setKeepgeneric

public void setKeepgeneric(boolean aBoolean)
Sets the keepgeneric flag.
Parameters:
aBoolean - true if the flag must be set.

setNocompil

public void setNocompil(boolean aBoolean)
Sets the nocompil flag.
Parameters:
aBoolean - true if the flag must be set.

setNogenic

public void setNogenic(boolean aBoolean)
Sets the nogenic flag.
Parameters:
aBoolean - true if the flag must be set.

setNovalidation

public void setNovalidation(boolean aBoolean)
Sets the novalidation flag.
Parameters:
aBoolean - true if the flag must be set.

setOrb

public void setOrb(String aString)
Sets the orb to construct classpath.
Parameters:
aString - 'RMI', 'JEREMIE', or 'DAVID'.

setRmicopts

public void setRmicopts(String aString)
Set the options to pass to the rmi compiler.
Parameters:
aString - the options.

setSecpropag

public void setSecpropag(boolean aBoolean)
Sets the secpropag flag.
Parameters:
aBoolean - true if the flag must be set.

setVerbose

public void setVerbose(boolean aBoolean)
Sets the verbose flag.
Parameters:
aBoolean - true if the flag must be set.

writeJar

protected void writeJar(String baseName,
                        File jarfile,
                        Hashtable ejbFiles,
                        String publicId)
            throws BuildException
.
Overrides:
writeJar in interface GenericDeploymentTool