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

Class BorlandDeploymentTool

public class BorlandDeploymentTool extends GenericDeploymentTool implements ExecuteStreamHandler

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
protected static StringBAS_DD
protected static StringBES_DD
protected static StringDEFAULT_BAS45_EJB11_DTD_LOCATION
protected static StringDEFAULT_BAS_DTD_LOCATION
protected static StringJAVA2IIOP
Java2iiop executable *
static StringPUBLICID_BORLAND_EJB
Borland 1.1 ejb id
protected static StringVERIFY
Verify class
Method Summary
protected voidaddVendorFiles(Hashtable ejbFiles, String ddPrefix)
Add any vendor specific files which should be included in the EJB Jar.
protected DescriptorHandlergetBorlandDescriptorHandler(File srcDir)
Get the borland descriptor handler.
voidsetBASdtd(String inString)
Setter used to store the location of the borland DTD.
voidsetDebug(boolean debug)
set the debug mode for java2iiop (default false)
voidsetGenerateclient(boolean b)
setter used to store whether the task will include the generate client task. (see : BorlandGenerateClient task)
voidsetJava2iiopParams(String params)
If filled, the params are added to the java2iiop command. (ex: -no_warn_missing_define)
voidsetProcessErrorStream(InputStream is)
Set the error stream of the process.
voidsetProcessInputStream(OutputStream param1)
{@inheritDoc}.
voidsetProcessOutputStream(InputStream is)
Set the output stream of the process.
voidsetSuffix(String inString)
Setter used to store the suffix for the generated borland jar file.
voidsetVerify(boolean verify)
set the verify mode for the produced jar (default true)
voidsetVerifyArgs(String args)
sets some additional args to send to verify command
voidsetVersion(int version)
setter used to store the borland appserver version [4 or 5]
voidstart()
{@inheritDoc}.
voidstop()
{@inheritDoc}.
protected voidwriteJar(String baseName, File jarFile, Hashtable files, String publicId)
Method used to encapsulate the writing of the JAR file.

Field Detail

BAS_DD

protected static final String BAS_DD

BES_DD

protected static final String BES_DD

DEFAULT_BAS45_EJB11_DTD_LOCATION

protected static final String DEFAULT_BAS45_EJB11_DTD_LOCATION

DEFAULT_BAS_DTD_LOCATION

protected static final String DEFAULT_BAS_DTD_LOCATION

JAVA2IIOP

protected static final String JAVA2IIOP
Java2iiop executable *

PUBLICID_BORLAND_EJB

public static final String PUBLICID_BORLAND_EJB
Borland 1.1 ejb id

VERIFY

protected static final String VERIFY
Verify class

Method Detail

addVendorFiles

protected void addVendorFiles(Hashtable ejbFiles, String ddPrefix)
Add any vendor specific files which should be included in the EJB Jar.

Parameters: ejbFiles the map to add the files to. ddPrefix the prefix to use.

getBorlandDescriptorHandler

protected DescriptorHandler getBorlandDescriptorHandler(File srcDir)
Get the borland descriptor handler.

Parameters: srcDir the source directory.

Returns: the descriptor.

setBASdtd

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 the string to use as the DTD location.

setDebug

public void setDebug(boolean debug)
set the debug mode for java2iiop (default false)

Parameters: debug the setting to use.

setGenerateclient

public void setGenerateclient(boolean b)
setter used to store whether the task will include the generate client task. (see : BorlandGenerateClient task)

Parameters: b if true generate the client task.

setJava2iiopParams

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

Parameters: params additional params for java2iiop

setProcessErrorStream

public void setProcessErrorStream(InputStream is)
Set the error stream of the process.

Parameters: is the input stream.

Throws: IOException if there is an error.

setProcessInputStream

public void setProcessInputStream(OutputStream param1)
{@inheritDoc}.

setProcessOutputStream

public void setProcessOutputStream(InputStream is)
Set the output stream of the process.

Parameters: is the input stream.

Throws: IOException if there is an error.

setSuffix

public void setSuffix(String inString)
Setter used to store the suffix for the generated borland jar file.

Parameters: inString the string to use as the suffix.

setVerify

public void setVerify(boolean verify)
set the verify mode for the produced jar (default true)

Parameters: verify the setting to use.

setVerifyArgs

public void setVerifyArgs(String args)
sets some additional args to send to verify command

Parameters: args additional command line parameters

setVersion

public void setVersion(int version)
setter used to store the borland appserver version [4 or 5]

Parameters: version app server version 4 or 5

start

public void start()
{@inheritDoc}.

stop

public void stop()
{@inheritDoc}.

writeJar

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

Throws: BuildException if there is an error.