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

public Class BorlandDeploymentTool

extends GenericDeploymentTool
implements ExecuteStreamHandler
Class Inheritance
All Implemented Interfaces
org.apache.tools.ant.taskdefs.ExecuteStreamHandler
Imports
java.io.BufferedReader, .File, .IOException, .InputStream, .InputStreamReader, .OutputStream, java.util.ArrayList, .Collection, .Hashtable, .List, .Map, org.apache.tools.ant.BuildException, .Project, org.apache.tools.ant.taskdefs.ExecTask, .Execute, .ExecuteStreamHandler, .Java, org.apache.tools.ant.taskdefs.optional.ejb.EjbJar.DTDLocation, org.apache.tools.ant.types.Commandline, .Path

BorlandDeploymentTool is dedicated to the Borland Application Server 4.5 and 4.5.1 This task generates and compiles the stubs and skeletons for all ejb described into the Deployment Descriptor, builds the jar file including the support files and verify whether the produced jar is valid or not. The supported options are:

      <ejbjar srcdir="${build.classes}"
               basejarname="vsmp"
               descriptordir="${rsc.dir}/hrmanager">
        <borland destdir="tstlib">
          <classpath refid="classpath" />
        </borland>
        <include name="**\ejb-jar.xml"/>
        <support dir="${build.classes}">
          <include name="demo\smp\*.class"/>
          <include name="demo\helper\*.class"/>
         </support>
     </ejbjar>

Field Summary

Modifier and TypeField and Description
pack-priv static final int
BAS

Borland Application Server or Inprise Application Server = version 4

protected static final String
pack-priv static final int
BES

Borland Enterprise Server = version 5

protected static final String
private String
borlandDTD

Instance variable that stores the location of the borland DTD file.

protected static final String
protected static final String
private boolean
generateclient

Instance variable that determines whether the client jar file is generated

private Map<String, File>
private String
jarSuffix

Instance variable that stores the suffix for the borland jarfile.

protected static final String
JAVA2IIOP

Java2iiop executable

private String
java2iioparams

store additional param for java2iiop command used to build EJB Stubs

private boolean
java2iiopdebug

Instance variable that determines whether the debug mode is on

public static final String
PUBLICID_BORLAND_EJB

Borland 1.1 ejb id

protected static final String
VERIFY

Verify class

private boolean
verify

Instance variable that determines whether it is necessary to verify the produced jar

private String
private int
version

borland appserver version 4 or 5

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>
the map to add the files to.
ejbFiles
,
String
the prefix to use.
ddPrefix
)

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

Add any vendor specific files which should be included in the EJB Jar.
private void
buildBorlandStubs(Collection<String>
: iterator on home class
ithomes
)

Generate stubs & skeleton for each home found into the DD Add all the generate class file into the ejb files

private void
generateClient(File
java.io.File representing the produced jar file
sourceJar
)

Generate the client jar corresponding to the jar file passed as parameter the method uses the BorlandGenerateClient task.

protected DescriptorHandler

Returns:

the descriptor.
getBorlandDescriptorHandler
(final File
the source directory.
srcDir
)

Deprecated as a consequence of DescriptorHandler being deprecated.
Get the borland descriptor handler.
pack-priv File
getVendorOutputJarFile(String
the basename to use.
baseName
)

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

Get the vendor specific name of the Jar that will be output.
public void
setBASdtd(String
the string to use as the DTD location.
inString
)

Setter used to store the location of the borland DTD.

public void
setDebug(boolean
the setting to use.
debug
)

set the debug mode for java2iiop (default false)

public void
setGenerateclient(boolean
if true generate the client task.
b
)

setter used to store whether the task will include the generate client task.

public void
setJava2iiopParams(String
additional params for java2iiop
params
)

If filled, the params are added to the java2iiop command.

public void
setProcessErrorStream(InputStream
the input stream.
is
)

Implements org.apache.tools.ant.taskdefs.ExecuteStreamHandler.setProcessErrorStream.

Set the error stream of the process.
public void
setProcessInputStream(OutputStream
output stream to write to the standard input stream of the subprocess
param1
)

Implements org.apache.tools.ant.taskdefs.ExecuteStreamHandler.setProcessInputStream.

Install a handler for the input stream of the subprocess..
public void
setProcessOutputStream(InputStream
the input stream.
is
)

Implements org.apache.tools.ant.taskdefs.ExecuteStreamHandler.setProcessOutputStream.

Set the output stream of the process.
public void
setSuffix(String
the string to use as the suffix.
inString
)

Setter used to store the suffix for the generated borland jar file.

public void
setVerify(boolean
the setting to use.
verify
)

set the verify mode for the produced jar (default true)

public void
setVerifyArgs(String
additional command line parameters
args
)

sets some additional args to send to verify command

public void
setVersion(int
app server version 4 or 5
version
)

setter used to store the borland appserver version [4 or 5]

public void
start()

Implements org.apache.tools.ant.taskdefs.ExecuteStreamHandler.start.

Start handling of the streams..
public void
stop()

Implements org.apache.tools.ant.taskdefs.ExecuteStreamHandler.stop.

Stop handling of the streams - will not be restarted..
private String
toClass(String filename)

convert a class file name : A/B/C/toto.class into a class name: A.B.C.toto

private String
toClassFile(String filename)

convert a file name : A/B/C/toto.java into a class name: A/B/C/toto.class

private void
verifyBorlandJar(File
java.io.File representing the produced jar file
sourceJar
)

Verify the produced jar file by invoking the Borland verify tool

private void
verifyBorlandJarV4(File
java.io.File representing the produced jar file
sourceJar
)

Verify the produced jar file by invoking the Borland verify tool

private void
verifyBorlandJarV5(File
java.io.File representing the produced jar file
sourceJar
)

Verify the produced jar file by invoking the Borland iastool tool

protected void
writeJar(String
the base name.
baseName
,
File
the jar file to write to.
jarFile
,
Hashtable<String, File>
the files to write to the jar.
files
,
String
the id to use.
publicId
)

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

Method used to encapsulate the writing of the JAR file.
Inherited from org.apache.tools.ant.taskdefs.optional.ejb.GenericDeploymentTool:
addFileToJaraddSupportClassescheckAndAddDependantscheckConfigurationconfigurecreateClasspathgetClassLoaderForBuildgetCombinedClasspathgetConfiggetDescriptorHandlergetDestDirgetJarBaseNamegetLocationgetManifestFilegetPublicIdgetTaskgetVendorDDPrefixlogneedToRebuildparseEjbFilesprocessDescriptorregisterKnownDTDssetClasspathsetDestdirsetGenericJarSuffixsetTaskusingBaseJarNamevalidateConfigured

Field Detail

BASback to summary
pack-priv static final int BAS

Borland Application Server or Inprise Application Server = version 4

BAS_DDback to summary
protected static final String BAS_DD
BESback to summary
pack-priv static final int BES

Borland Enterprise Server = version 5

BES_DDback to summary
protected static final String BES_DD
borlandDTDback to summary
private String borlandDTD

Instance variable that stores the location of the borland DTD file.

DEFAULT_BAS45_EJB11_DTD_LOCATIONback to summary
protected static final String DEFAULT_BAS45_EJB11_DTD_LOCATION
DEFAULT_BAS_DTD_LOCATIONback to summary
protected static final String DEFAULT_BAS_DTD_LOCATION
generateclientback to summary
private boolean generateclient

Instance variable that determines whether the client jar file is generated

genfilesback to summary
private Map<String, File> genfiles
jarSuffixback to summary
private String jarSuffix

Instance variable that stores the suffix for the borland jarfile.

JAVA2IIOPback to summary
protected static final String JAVA2IIOP

Java2iiop executable

java2iioparamsback to summary
private String java2iioparams

store additional param for java2iiop command used to build EJB Stubs

java2iiopdebugback to summary
private boolean java2iiopdebug

Instance variable that determines whether the debug mode is on

PUBLICID_BORLAND_EJBback to summary
public static final String PUBLICID_BORLAND_EJB

Borland 1.1 ejb id

VERIFYback to summary
protected static final String VERIFY

Verify class

verifyback to summary
private boolean verify

Instance variable that determines whether it is necessary to verify the produced jar

verifyArgsback to summary
private String verifyArgs
versionback to summary
private int version

borland appserver version 4 or 5

Constructor Detail

BorlandDeploymentToolback to summary
public BorlandDeploymentTool()

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 any vendor specific files which should be included in the EJB Jar.

Parameters
ejbFiles:Hashtable<String, File>

the map to add the files to.

ddPrefix:String

the prefix to use.

Annotations
@Override
buildBorlandStubsback to summary
private void buildBorlandStubs(Collection<String> ithomes)

Generate stubs & skeleton for each home found into the DD Add all the generate class file into the ejb files

Parameters
ithomes:Collection<String>

: iterator on home class

generateClientback to summary
private void generateClient(File sourceJar)

Generate the client jar corresponding to the jar file passed as parameter the method uses the BorlandGenerateClient task.

Parameters
sourceJar:File

java.io.File representing the produced jar file

getBorlandDescriptorHandlerback to summary
protected DescriptorHandler getBorlandDescriptorHandler(final File srcDir)

Deprecated

as a consequence of DescriptorHandler being deprecated. See corresponding docs for further information.

Get the borland descriptor handler.

Parameters
srcDir:File

the source directory.

Returns:DescriptorHandler

the descriptor.

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

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

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

Parameters
baseName:String

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

the basename to use.

Returns:File

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

File

Annotations
@Override
setBASdtdback to summary
public void setBASdtd(String inString)

Setter used to store the location of the borland DTD. This can be a file on the system or a resource on the classpath.

Parameters
inString:String

the string to use as the DTD location.

setDebugback to summary
public void setDebug(boolean debug)

set the debug mode for java2iiop (default false)

Parameters
debug:boolean

the setting to use.

setGenerateclientback to summary
public void setGenerateclient(boolean b)

setter used to store whether the task will include the generate client task. (see : BorlandGenerateClient task)

Parameters
b:boolean

if true generate the client task.

setJava2iiopParamsback to summary
public void setJava2iiopParams(String params)

If filled, the params are added to the java2iiop command. (ex: -no_warn_missing_define)

Parameters
params:String

additional params for java2iiop

setProcessErrorStreamback to summary
public void setProcessErrorStream(InputStream is) throws IOException

Implements org.apache.tools.ant.taskdefs.ExecuteStreamHandler.setProcessErrorStream.

Set the error stream of the process.

Parameters
is:InputStream

the input stream.

Annotations
@Override
Exceptions
IOException:
if there is an error.
setProcessInputStreamback to summary
public void setProcessInputStream(OutputStream param1) throws IOException

Implements org.apache.tools.ant.taskdefs.ExecuteStreamHandler.setProcessInputStream.

Doc from org.apache.tools.ant.taskdefs.ExecuteStreamHandler.setProcessInputStream.

Install a handler for the input stream of the subprocess..

Parameters
param1:OutputStream

output stream to write to the standard input stream of the subprocess

Annotations
@Override
Exceptions
IOException:
on error
setProcessOutputStreamback to summary
public void setProcessOutputStream(InputStream is) throws IOException

Implements org.apache.tools.ant.taskdefs.ExecuteStreamHandler.setProcessOutputStream.

Set the output stream of the process.

Parameters
is:InputStream

the input stream.

Annotations
@Override
Exceptions
IOException:
if there is an error.
setSuffixback to summary
public void setSuffix(String inString)

Setter used to store the suffix for the generated borland jar file.

Parameters
inString:String

the string to use as the suffix.

setVerifyback to summary
public void setVerify(boolean verify)

set the verify mode for the produced jar (default true)

Parameters
verify:boolean

the setting to use.

setVerifyArgsback to summary
public void setVerifyArgs(String args)

sets some additional args to send to verify command

Parameters
args:String

additional command line parameters

setVersionback to summary
public void setVersion(int version)

setter used to store the borland appserver version [4 or 5]

Parameters
version:int

app server version 4 or 5

startback to summary
public void start() throws IOException

Implements org.apache.tools.ant.taskdefs.ExecuteStreamHandler.start.

Doc from org.apache.tools.ant.taskdefs.ExecuteStreamHandler.start.

Start handling of the streams..

Annotations
@Override
Exceptions
IOException:
on error
stopback to summary
public void stop()

Implements org.apache.tools.ant.taskdefs.ExecuteStreamHandler.stop.

Doc from org.apache.tools.ant.taskdefs.ExecuteStreamHandler.stop.

Stop handling of the streams - will not be restarted..

Annotations
@Override
toClassback to summary
private String toClass(String filename)

convert a class file name : A/B/C/toto.class into a class name: A.B.C.toto

toClassFileback to summary
private String toClassFile(String filename)

convert a file name : A/B/C/toto.java into a class name: A/B/C/toto.class

verifyBorlandJarback to summary
private void verifyBorlandJar(File sourceJar)

Verify the produced jar file by invoking the Borland verify tool

Parameters
sourceJar:File

java.io.File representing the produced jar file

verifyBorlandJarV4back to summary
private void verifyBorlandJarV4(File sourceJar)

Verify the produced jar file by invoking the Borland verify tool

Parameters
sourceJar:File

java.io.File representing the produced jar file

verifyBorlandJarV5back to summary
private void verifyBorlandJarV5(File sourceJar)

Verify the produced jar file by invoking the Borland iastool tool

Parameters
sourceJar:File

java.io.File representing the produced jar file

writeJarback to summary
protected void writeJar(String baseName, File jarFile, Hashtable<String, File> files, String publicId) throws BuildException

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

Method 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.

Parameters
baseName:String

the base name.

jarFile:File

the jar file to write to.

files:Hashtable<String, File>

the files to write to the jar.

publicId:String

the id to use.

Annotations
@Override
Exceptions
BuildException:
if there is an error.