Top Description Fields Constructors Methods
org.apache.tools.ant.taskdefs.optional.ejb

public Class IPlanetDeploymentTool

extends GenericDeploymentTool
Class Inheritance
Imports
java.io.File, .IOException, java.util.Hashtable, javax.xml.parsers.SAXParser, org.apache.tools.ant.BuildException, .Project, org.apache.tools.ant.taskdefs.optional.ejb.EjbJar.DTDLocation, org.xml.sax.SAXException

This class is used to generate iPlanet Application Server (iAS) 6.0 stubs and skeletons and build an EJB Jar file. It is designed to be used with the Ant ejbjar task. If only stubs and skeletons need to be generated (in other words, if no JAR file needs to be created), refer to the iplanet-ejbc task and the IPlanetEjbcTask class.

The following attributes may be specified by the user:

For each EJB descriptor found in the "ejbjar" parent task, this deployment tool will locate the three classes that comprise the EJB. If these class files cannot be located in the specified srcdir directory, the task will fail. The task will also attempt to locate the EJB stubs and skeletons in this directory. If found, the timestamps on the stubs and skeletons will be checked to ensure they are up to date. Only if these files cannot be found or if they are out of date will ejbc be called.

See Also
IPlanetEjbc

Field Summary

Modifier and TypeField and Description
private boolean
private String
private String
private static final String
private String
private File
private String
private boolean
Inherited from org.apache.tools.ant.taskdefs.optional.ejb.GenericDeploymentTool:
ANALYZER_CLASS_FULLANALYZER_CLASS_SUPERANALYZER_FULLANALYZER_NONEANALYZER_SUPERDEFAULT_ANALYZERDEFAULT_BUFFER_SIZEEJB_DDJAR_COMPRESS_LEVELMANIFESTMETA_DIR

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
protected void
addVendorFiles(Hashtable<String, File>
Hashtable of EJB class (and other) files to be added to the completed JAR file.
ejbFiles
,
String
not used
ddPrefix
)

Overrides org.apache.tools.ant.taskdefs.optional.ejb.GenericDeploymentTool.addVendorFiles.

Add the iAS-specific EJB descriptor to the list of files which will be written to the JAR file.
protected void
checkConfiguration(String
String representing the file name of an EJB descriptor to be processed
descriptorFileName
,
SAXParser
SAXParser which may be used to parse the XML descriptor
saxParser
)

Overrides org.apache.tools.ant.taskdefs.optional.ejb.GenericDeploymentTool.checkConfiguration.

Verifies that the user selections are valid.
private String

Returns:

The name of the iAS-specific EJB descriptor file.
getIasDescriptorName
()

Determines the name of the iAS-specific EJB descriptor using the specified standard EJB descriptor name.

protected String

Returns:

null.
getPublicId
()

Overrides org.apache.tools.ant.taskdefs.optional.ejb.GenericDeploymentTool.getPublicId.

The iAS ejbc utility doesn't require the Public ID of the descriptor's DTD for it to process correctly--this method always returns null .
pack-priv File

Returns:

File representing the JAR file which will be written.
getVendorOutputJarFile
(String
String name of the EJB JAR file to be written (without a filename extension).
baseName
)

Overrides org.apache.tools.ant.taskdefs.optional.ejb.GenericDeploymentTool.getVendorOutputJarFile.

Get the name of the Jar that will be written.
protected Hashtable<String, File>

Returns:

Hashtable of EJB class (and other) files to be added to the completed JAR file
parseEjbFiles
(String
String representing the file name of an EJB descriptor to be processed
descriptorFileName
,
SAXParser
SAXParser which may be used to parse the XML descriptor
saxParser
)

Overrides org.apache.tools.ant.taskdefs.optional.ejb.GenericDeploymentTool.parseEjbFiles.

This method returns a list of EJB files found when the specified EJB descriptor is parsed and processed.
public void
processDescriptor(String
the name of the deployment descriptor
descriptorName
,
SAXParser
a SAX parser which can be used to parse the deployment descriptor.
saxParser
)

Overrides org.apache.tools.ant.taskdefs.optional.ejb.GenericDeploymentTool.processDescriptor.

Implements org.apache.tools.ant.taskdefs.optional.ejb.EJBDeploymentTool.processDescriptor.

Process a deployment descriptor, generating the necessary vendor specific deployment files...
public void
setDebug(boolean
A boolean indicating if debugging output should be generated
debug
)

Sets whether or not debugging output will be generated when ejbc is executed.

public void
setGenericJarSuffix(String
the string to use as the suffix. This parameter is ignored.
inString
)

Overrides org.apache.tools.ant.taskdefs.optional.ejb.GenericDeploymentTool.setGenericJarSuffix.

Since iAS doesn't generate a "generic" JAR as part of its processing, this attribute is ignored and a warning message is displayed to the user.
public void
setIashome(File
The home directory for the user's iAS installation.
iashome
)

Setter method used to store the "home" directory of the user's iAS installation.

public void
setKeepgenerated(boolean
boolean which, if true, indicates that Java source files generated by ejbc for the stubs and skeletons should be kept.
keepgenerated
)

Setter method used to specify whether the Java source files generated by the ejbc utility should be saved or automatically deleted.

public void
setSuffix(String
The string to use as the JAR filename suffix.
jarSuffix
)

Setter method used to specify the filename suffix (for example, ".jar") for the JAR files to be created.

Inherited from org.apache.tools.ant.taskdefs.optional.ejb.GenericDeploymentTool:
addFileToJaraddSupportClassescheckAndAddDependantsconfigurecreateClasspathgetClassLoaderForBuildgetCombinedClasspathgetConfiggetDescriptorHandlergetDestDirgetJarBaseNamegetLocationgetManifestFilegetTaskgetVendorDDPrefixlogneedToRebuildregisterKnownDTDssetClasspathsetDestdirsetTaskusingBaseJarNamevalidateConfiguredwriteJar

Field Detail

debugback to summary
private boolean debug
descriptorNameback to summary
private String descriptorName
displayNameback to summary
private String displayName
Annotations
@SuppressWarnings:unused
IAS_DDback to summary
private static final String IAS_DD
iasDescriptorNameback to summary
private String iasDescriptorName
iashomeback to summary
private File iashome
jarSuffixback to summary
private String jarSuffix
keepgeneratedback to summary
private boolean keepgenerated

Constructor Detail

IPlanetDeploymentToolback to summary
public IPlanetDeploymentTool()

Method Detail

addVendorFilesback to summary
protected void addVendorFiles(Hashtable<String, File> ejbFiles, String ddPrefix)

Overrides org.apache.tools.ant.taskdefs.optional.ejb.GenericDeploymentTool.addVendorFiles.

Add the iAS-specific EJB descriptor to the list of files which will be written to the JAR file.

Parameters
ejbFiles:Hashtable<String, File>

Hashtable of EJB class (and other) files to be added to the completed JAR file.

ddPrefix:String

not used

Annotations
@Override
checkConfigurationback to summary
protected void checkConfiguration(String descriptorFileName, SAXParser saxParser) throws BuildException

Overrides org.apache.tools.ant.taskdefs.optional.ejb.GenericDeploymentTool.checkConfiguration.

Verifies that the user selections are valid.

Parameters
descriptorFileName:String

String representing the file name of an EJB descriptor to be processed

saxParser:SAXParser

SAXParser which may be used to parse the XML descriptor

Annotations
@Override
Exceptions
BuildException:
If the user selections are invalid.
getIasDescriptorNameback to summary
private String getIasDescriptorName()

Determines the name of the iAS-specific EJB descriptor using the specified standard EJB descriptor name. In general, the standard descriptor will be named "[basename]-ejb-jar.xml", and this method will return "[basename]-ias-ejb-jar.xml".

Returns:String

The name of the iAS-specific EJB descriptor file.

getPublicIdback to summary
protected String getPublicId()

Overrides org.apache.tools.ant.taskdefs.optional.ejb.GenericDeploymentTool.getPublicId.

The iAS ejbc utility doesn't require the Public ID of the descriptor's DTD for it to process correctly--this method always returns null .

Returns:String

null.

Annotations
@Override
getVendorOutputJarFileback to summary
pack-priv File getVendorOutputJarFile(String baseName)

Overrides org.apache.tools.ant.taskdefs.optional.ejb.GenericDeploymentTool.getVendorOutputJarFile.

Get the name of the Jar that will be written. The modification date of this jar will be checked against the dependent bean classes.

Parameters
baseName:String

String name of the EJB JAR file to be written (without a filename extension).

Returns:File

File representing the JAR file which will be written.

Annotations
@Override
parseEjbFilesback to summary
protected Hashtable<String, File> parseEjbFiles(String descriptorFileName, SAXParser saxParser) throws IOException, SAXException

Overrides org.apache.tools.ant.taskdefs.optional.ejb.GenericDeploymentTool.parseEjbFiles.

This method returns a list of EJB files found when the specified EJB descriptor is parsed and processed.

Parameters
descriptorFileName:String

String representing the file name of an EJB descriptor to be processed

saxParser:SAXParser

SAXParser which may be used to parse the XML descriptor

Returns:Hashtable<String, File>

Hashtable of EJB class (and other) files to be added to the completed JAR file

Annotations
@Override
Exceptions
IOException:
An IOException from the parser, possibly from the byte stream or character stream
SAXException:
Any SAX exception, possibly wrapping another exception
processDescriptorback to summary
public void processDescriptor(String descriptorName, SAXParser saxParser)

Overrides org.apache.tools.ant.taskdefs.optional.ejb.GenericDeploymentTool.processDescriptor.

Implements org.apache.tools.ant.taskdefs.optional.ejb.EJBDeploymentTool.processDescriptor.

Doc from org.apache.tools.ant.taskdefs.optional.ejb.GenericDeploymentTool.processDescriptor.

Process a deployment descriptor, generating the necessary vendor specific deployment files...

Parameters
descriptorName:String

Doc from org.apache.tools.ant.taskdefs.optional.ejb.EJBDeploymentTool.processDescriptor.

the name of the deployment descriptor

saxParser:SAXParser

Doc from org.apache.tools.ant.taskdefs.optional.ejb.EJBDeploymentTool.processDescriptor.

a SAX parser which can be used to parse the deployment descriptor.

Annotations
@Override
setDebugback to summary
public void setDebug(boolean debug)

Sets whether or not debugging output will be generated when ejbc is executed.

Parameters
debug:boolean

A boolean indicating if debugging output should be generated

setGenericJarSuffixback to summary
public void setGenericJarSuffix(String inString)

Overrides org.apache.tools.ant.taskdefs.optional.ejb.GenericDeploymentTool.setGenericJarSuffix.

Since iAS doesn't generate a "generic" JAR as part of its processing, this attribute is ignored and a warning message is displayed to the user.

Parameters
inString:String

the string to use as the suffix. This parameter is ignored.

Annotations
@Override
setIashomeback to summary
public void setIashome(File iashome)

Setter method used to store the "home" directory of the user's iAS installation. The directory specified should typically be [install-location]/iplanet/ias6/ias.

Parameters
iashome:File

The home directory for the user's iAS installation.

setKeepgeneratedback to summary
public void setKeepgenerated(boolean keepgenerated)

Setter method used to specify whether the Java source files generated by the ejbc utility should be saved or automatically deleted.

Parameters
keepgenerated:boolean

boolean which, if true, indicates that Java source files generated by ejbc for the stubs and skeletons should be kept.

setSuffixback to summary
public void setSuffix(String jarSuffix)

Setter method used to specify the filename suffix (for example, ".jar") for the JAR files to be created.

Parameters
jarSuffix:String

The string to use as the JAR filename suffix.