public class IPlanetEjbc
extends java.lang.Object
Because this class (and it's assorted inner classes) may be bundled into the iPlanet Application Server distribution at some point (and removed from the Ant distribution), the class has been written to be independent of all Ant-specific classes. It is also for this reason (and to avoid cluttering the Apache Ant source files) that this utility has been packaged into a single source file.
For more information on Ant Tasks for iPlanet Application Server, see the
IPlanetDeploymentTool
and IPlanetEjbcTask
classes.
IPlanetDeploymentTool
,
IPlanetEjbcTask
Modifier and Type | Class and Description |
---|---|
class |
IPlanetEjbc.EjbcException
This inner class is used to signal any problems during the execution of
the ejbc compiler.
|
Constructor and Description |
---|
IPlanetEjbc(java.io.File stdDescriptor,
java.io.File iasDescriptor,
java.io.File destDirectory,
java.lang.String classpath,
javax.xml.parsers.SAXParser parser)
Constructs an instance which may be used to process EJB descriptors and
generate EJB stubs and skeletons, if needed.
|
Modifier and Type | Method and Description |
---|---|
protected void |
checkConfiguration()
Verifies that the user selections are valid.
|
void |
execute()
Compiles the stub and skeletons for the specified EJBs, if they need to
be updated.
|
java.lang.String[] |
getCmpDescriptors()
Returns the list of CMP descriptors referenced in the EJB descriptors.
|
java.lang.String |
getDisplayName()
Returns the display-name element read from the standard EJB descriptor.
|
java.util.Hashtable |
getEjbFiles()
Returns a Hashtable which contains a list of EJB class files processed by
the ejbc utility (both "source" class files as well as stubs and
skeletons).
|
static void |
main(java.lang.String[] args)
Main application method for the iPlanet Application Server ejbc utility.
|
void |
registerDTD(java.lang.String publicID,
java.lang.String location)
Registers the location of a local DTD file or resource.
|
void |
setDebugOutput(boolean debugOutput)
If true, enables debugging output when ejbc is executed.
|
void |
setIasHomeDir(java.io.File iasHomeDir)
May be used to specify the "home" directory for this iAS installation.
|
void |
setRetainSource(boolean retainSource)
If true, the Java source files which are generated by the
ejbc process are retained.
|
public IPlanetEjbc(java.io.File stdDescriptor, java.io.File iasDescriptor, java.io.File destDirectory, java.lang.String classpath, javax.xml.parsers.SAXParser parser)
stdDescriptor
- File referencing a standard EJB descriptor.iasDescriptor
- File referencing an iAS-specific EJB descriptor.destDirectory
- File referencing the base directory where both
EJB "source" files are found and where stubs and
skeletons will be written.classpath
- String representation of the classpath to be used
by the iAS ejbc utility.parser
- SAXParser to be used to process both of the EJB
descriptors.public void setRetainSource(boolean retainSource)
retainSource
- A boolean indicating if the Java source files for
the stubs and skeletons should be retained.public void setDebugOutput(boolean debugOutput)
debugOutput
- A boolean indicating if debugging output should be
generatedpublic void registerDTD(java.lang.String publicID, java.lang.String location)
publicID
- The public DTD identifier found in an XML document.location
- The file or resource name for the appropriate DTD stored
on the local machine.public void setIasHomeDir(java.io.File iasHomeDir)
[install-location]/iplanet/ias6/ias
.iasHomeDir
- The home directory for the user's iAS installation.public java.util.Hashtable getEjbFiles()
public java.lang.String getDisplayName()
public java.lang.String[] getCmpDescriptors()
public static void main(java.lang.String[] args)
args
- The commandline arguments passed to the application.public void execute() throws IPlanetEjbc.EjbcException, java.io.IOException, org.xml.sax.SAXException
IPlanetEjbc.EjbcException
- If the ejbc utility cannot be correctly configured
or if one or more of the EJB "source" classes
cannot be found in the destination directoryjava.io.IOException
- If the parser encounters a problem reading the XML
fileorg.xml.sax.SAXException
- If the parser encounters a problem processing the
XML descriptor (it may wrap another exception)protected void checkConfiguration() throws IPlanetEjbc.EjbcException
IPlanetEjbc.EjbcException
- If the user selections are invalid.