org.apache.tools.ant.taskdefs.optional.ejb
Class IPlanetDeploymentTool
- EJBDeploymentTool
public class IPlanetDeploymentTool
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:
- destdir -- The base directory into which the generated JAR
files will be written. Each JAR file is written
in directories which correspond to their location
within the "descriptordir" namespace. This is a
required attribute.
- classpath -- The classpath used when generating EJB stubs and
skeletons. This is an optional attribute (if
omitted, the classpath specified in the "ejbjar"
parent task will be used). If specified, the
classpath elements will be prepended to the
classpath specified in the parent "ejbjar" task.
Note that nested "classpath" elements may also be
used.
- keepgenerated -- Indicates whether or not the Java source
files which are generated by ejbc will be
saved or automatically deleted. If "yes",
the source files will be retained. This is
an optional attribute (if omitted, it
defaults to "no").
- debug -- Indicates whether or not the ejbc utility should
log additional debugging statements to the standard
output. If "yes", the additional debugging statements
will be generated (if omitted, it defaults to "no").
- iashome -- May be used to specify the "home" directory for
this iPlanet Application server installation. This
is used to find the ejbc utility if it isn't
included in the user's system path. This is an
optional attribute (if specified, it should refer
to the
[install-location]/iplanet/ias6/ias
directory). If omitted, the ejbc utility
must be on the user's system path.
- suffix -- String value appended to the JAR filename when
creating each JAR. This attribute is not required
(if omitted, it defaults to ".jar").
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.
IPlanetEjbc
protected void | addVendorFiles(Hashtable ejbFiles, String ddPrefix) - Add the iAS-specific EJB descriptor to the list of files which will be
written to the JAR file.
|
protected void | checkConfiguration(String descriptorFileName, SAXParser saxParser) - Verifies that the user selections are valid.
|
protected String | 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
.
|
protected Hashtable | parseEjbFiles(String descriptorFileName, SAXParser saxParser) - This method returns a list of EJB files found when the specified EJB
descriptor is parsed and processed.
|
void | processDescriptor(String descriptorName, SAXParser saxParser)
|
void | setDebug(boolean debug) - Sets whether or not debugging output will be generated when ejbc is
executed.
|
void | setGenericJarSuffix(String inString) - 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.
|
void | setIashome(File iashome) - Setter method used to store the "home" directory of the user's iAS
installation.
|
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.
|
void | setSuffix(String jarSuffix) - Setter method used to specify the filename suffix (for example, ".jar")
for the JAR files to be created.
|
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 |
addVendorFiles
protected void addVendorFiles(Hashtable ejbFiles,
String ddPrefix)
Add the iAS-specific EJB descriptor to the list of files which will be
written to the JAR file.
- addVendorFiles in interface GenericDeploymentTool
ejbFiles
- Hashtable of EJB class (and other) files to be added to
the completed JAR file.ddPrefix
- not used
checkConfiguration
protected void checkConfiguration(String descriptorFileName,
SAXParser saxParser)
throws BuildException
Verifies that the user selections are valid.
- checkConfiguration in interface GenericDeploymentTool
descriptorFileName
- String representing the file name of an EJB
descriptor to be processedsaxParser
- SAXParser which may be used to parse the XML
descriptor
BuildException
- If the user selections are invalid.
getPublicId
protected String 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
.
- getPublicId in interface GenericDeploymentTool
null
.
parseEjbFiles
protected Hashtable parseEjbFiles(String descriptorFileName,
SAXParser saxParser)
throws IOException,
SAXException
This method returns a list of EJB files found when the specified EJB
descriptor is parsed and processed.
- parseEjbFiles in interface GenericDeploymentTool
descriptorFileName
- String representing the file name of an EJB
descriptor to be processedsaxParser
- SAXParser which may be used to parse the XML
descriptor
- Hashtable of EJB class (and other) files to be
added to the completed JAR file
setDebug
public void setDebug(boolean debug)
Sets whether or not debugging output will be generated when ejbc is
executed.
debug
- A boolean indicating if debugging output should be generated
setGenericJarSuffix
public void setGenericJarSuffix(String inString)
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.
- setGenericJarSuffix in interface GenericDeploymentTool
inString
- the string to use as the suffix. This parameter is
ignored.
setIashome
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
.
iashome
- The home directory for the user's iAS installation.
setKeepgenerated
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.
keepgenerated
- boolean which, if true
, indicates that
Java source files generated by ejbc for the stubs
and skeletons should be kept.
setSuffix
public void setSuffix(String jarSuffix)
Setter method used to specify the filename suffix (for example, ".jar")
for the JAR files to be created.
jarSuffix
- The string to use as the JAR filename suffix.
Copyright B) 2000-2005 Apache Software Foundation. All Rights Reserved.