Class WeblogicTOPLinkDeploymentTool
java.lang.Object
org.apache.tools.ant.taskdefs.optional.ejb.GenericDeploymentTool
org.apache.tools.ant.taskdefs.optional.ejb.WeblogicDeploymentTool
org.apache.tools.ant.taskdefs.optional.ejb.WeblogicTOPLinkDeploymentTool
- All Implemented Interfaces:
EJBDeploymentTool
Deployment tool for WebLogic TOPLink.
-
Field Summary
Fields inherited from class WeblogicDeploymentTool
COMPILER_EJB11, COMPILER_EJB20, DEFAULT_COMPILER, DEFAULT_WL51_DTD_LOCATION, DEFAULT_WL51_EJB11_DTD_LOCATION, DEFAULT_WL60_51_DTD_LOCATION, DEFAULT_WL60_DTD_LOCATION, DEFAULT_WL60_EJB11_DTD_LOCATION, DEFAULT_WL60_EJB20_DTD_LOCATION, DEFAULT_WL70_DTD_LOCATION, PUBLICID_EJB11, PUBLICID_EJB20, PUBLICID_WEBLOGIC_EJB510, PUBLICID_WEBLOGIC_EJB600, PUBLICID_WEBLOGIC_EJB700, WL_CMP_DD, WL_DDModifier and TypeFieldDescriptionprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected static final StringWebLogic 5.1 dtd locationprotected static final Stringprotected static final Stringprotected static final StringWebLogic 6.0 ejb 1.1 dtd locationprotected static final StringWebLogic 6.0 ejb 2.0 dtd locationprotected static final Stringstatic final StringEJB11 idstatic final StringEJB20 idstatic final StringWebLogic 5.1.0 idstatic final StringWebLogic 6.0.0 idstatic final StringWebLogic 7.0.0 idprotected static final Stringprotected static final StringFields inherited from class GenericDeploymentTool
ANALYZER_CLASS_FULL, ANALYZER_CLASS_SUPER, ANALYZER_FULL, ANALYZER_NONE, ANALYZER_SUPER, DEFAULT_ANALYZER, DEFAULT_BUFFER_SIZE, EJB_DD, JAR_COMPRESS_LEVEL, MANIFEST, META_DIRModifier and TypeFieldDescriptionstatic final StringThe analyzer class for the super analyzerstatic final StringThe analyzer class for the super analyzerstatic final StringA dependency analyzer name to find all related classesstatic final StringA dependency analyzer name for no analyzerstatic final StringA dependency analyzer name to find ancestor classesstatic final StringThe default analyzerstatic final intThe default buffer byte size to use for IOprotected static final StringName for EJB Deployment descriptor within EJB jarsstatic final intThe level to use for compressionprotected static final StringThe standard MANIFEST fileprotected static final StringThe standard META-INF directory in jar files -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidaddVendorFiles(Hashtable<String, File> ejbFiles, String ddPrefix) Add any vendor specific files which should be included in the EJB Jar.protected DescriptorHandlergetDescriptorHandler(File srcDir) Get the descriptor handler.voidsetToplinkdescriptor(String inString) Setter used to store the name of the toplink descriptor.voidsetToplinkdtd(String inString) Setter used to store the location of the toplink DTD file.voidCalled to validate that the tool parameters have been configured.Methods inherited from class WeblogicDeploymentTool
addSysproperty, createWLClasspath, getClassLoaderFromJar, getEjbcClass, getJvmDebugLevel, getWeblogicDescriptorHandler, isRebuildRequired, registerKnownDTDs, setArgs, setCompiler, setEjbcClass, setEJBdtd, setJvmargs, setJvmDebugLevel, setKeepgenerated, setKeepgeneric, setNewCMP, setNoEJBC, setOldCMP, setOutputDir, setRebuild, setSuffix, setWeblogicdtd, setWLClasspath, setWLdtd, writeJarModifier and TypeMethodDescriptionvoidAdd a nested sysproperty element.Get the classpath to the WebLogic classpaths.protected ClassLoadergetClassLoaderFromJar(File classjar) Helper method invoked by isRebuildRequired to get a ClassLoader for a Jar File passed to it.Get the ejbc compiler class.Get the debug level.protected DescriptorHandlergetWeblogicDescriptorHandler(File srcDir) Get the WebLogic descriptor handler.protected booleanisRebuildRequired(File genericJarFile, File weblogicJarFile) Helper method to check to see if a WebLogic EJB 1.1 jar needs to be rebuilt using ejbc.protected voidregisterKnownDTDs(DescriptorHandler handler) Register the DTDs.voidAny optional extra arguments pass to the weblogic.ejbc tool.voidsetCompiler(String compiler) The compiler (switch-compiler) to use; optional.voidsetEjbcClass(String ejbcClass) Set the classname of the ejbc compiler; optional Normally ejbjar determines the appropriate class based on the DTD used for the EJB.voidDeprecated.voidsetJvmargs(String args) Set any additional arguments to pass to the WebLogic JVM; optional.voidsetJvmDebugLevel(Integer jvmDebugLevel) Sets the weblogic.StdoutSeverityLevel to use when running the JVM that executes ejbc; optional.voidsetKeepgenerated(String inValue) Controls whether WebLogic will keep the generated Java files used to build the class files added to the jar.voidsetKeepgeneric(boolean inValue) controls whether the generic file used as input to ejbc is retained; defaults to falsevoidsetNewCMP(boolean newCMP) If this is set to true, the new method for locating CMP descriptors will be used; optional, default false.voidsetNoEJBC(boolean noEJBC) Do not EJBC the jar after it has been put together; optional, default falsevoidsetOldCMP(boolean oldCMP) Set the value of the oldCMP scheme.voidsetOutputDir(File outputDir) If set ejbc will use this directory as the output destination rather than a jar file.voidsetRebuild(boolean rebuild) Set the rebuild flag to false to only update changes in the jar rather than rerunning ejbc; optional, default true.voidSetter used to store the suffix for the generated WebLogic jar file.voidsetWeblogicdtd(String inString) Deprecated.voidsetWLClasspath(Path wlClasspath) Optional classpath to WL6.0.voidDeprecated.protected voidMethod used to encapsulate the writing of the JAR file.Methods inherited from class GenericDeploymentTool
addFileToJar, addSupportClasses, checkAndAddDependants, checkConfiguration, configure, createClasspath, getClassLoaderForBuild, getCombinedClasspath, getConfig, getDestDir, getJarBaseName, getLocation, getManifestFile, getPublicId, getTask, getVendorDDPrefix, log, needToRebuild, parseEjbFiles, processDescriptor, setClasspath, setDestdir, setGenericJarSuffix, setTask, usingBaseJarNameModifier and TypeMethodDescriptionprotected voidaddFileToJar(JarOutputStream jStream, File inputFile, String logicalFilename) Utility method that encapsulates the logic of adding a file entry to a .jar file.protected voidaddSupportClasses(Hashtable<String, File> ejbFiles) Adds any classes the user specifies using support nested elements to theejbFilesHashtable.protected voidcheckAndAddDependants(Hashtable<String, File> checkEntries) Add all available classes, that depend on Remote, Home, Bean, PKprotected voidcheckConfiguration(String descriptorFileName, SAXParser saxParser) This method is called as the first step in the processDescriptor method to allow vendor-specific subclasses to validate the task configuration prior to processing the descriptor.voidconfigure(org.apache.tools.ant.taskdefs.optional.ejb.EjbJar.Config config) Configure this tool for use in the ejbjar task.Add the classpath for the user classesprotected ClassLoaderReturns a Classloader object which parses the passed in generic EjbJar classpath.protected PathGet the classpath by combining the one from the surrounding task, if any and the one from this tool.protected org.apache.tools.ant.taskdefs.optional.ejb.EjbJar.ConfigGet the basename terminator.protected FileGet the destination directory.protected StringgetJarBaseName(String descriptorFileName) Using the EJB descriptor file name passed from theejbjartask, this method returns the "basename" which will be used to name the completed JAR file.protected LocationGet the build file location associated with this element's task.protected FilegetManifestFile(String prefix) Get the manifest file to use for building the generic jar.protected StringReturns the Public ID of the DTD specified in the EJB descriptor.protected TaskgetTask()Get the task for this tool.getVendorDDPrefix(String baseName, String descriptorFileName) Get the prefix for vendor deployment descriptors.protected voidLog a message to the Ant output.protected booleanneedToRebuild(Hashtable<String, File> ejbFiles, File jarFile) This method checks the timestamp on each file listed in theejbFilesand compares them to the timestamp on thejarFile.parseEjbFiles(String descriptorFileName, SAXParser saxParser) This method returns a list of EJB files found when the specified EJB descriptor is parsed and processed.voidprocessDescriptor(String descriptorFileName, SAXParser saxParser) Process a deployment descriptor, generating the necessary vendor specific deployment files.voidsetClasspath(Path classpath) Set the classpath to be used for this compilation.voidsetDestdir(File inDir) Set the destination directory; required.voidsetGenericJarSuffix(String inString) Set the suffix for the generated jar file.voidSet the task which owns this toolprotected booleanIndicate if this build is using the base jar name.
-
Constructor Details
-
WeblogicTOPLinkDeploymentTool
public WeblogicTOPLinkDeploymentTool()
-
-
Method Details
-
setToplinkdescriptor
Setter used to store the name of the toplink descriptor.- Parameters:
inString- the string to use as the descriptor name.
-
setToplinkdtd
Setter used to store the location of the toplink DTD file. This is expected to be an URL (file or otherwise). If running this on NT using a file URL, the safest thing would be to not use a drive spec in the URL and make sure the file resides on the drive that ANT is running from. This will keep the setting in the build XML platform independent.- Parameters:
inString- the string to use as the DTD location.
-
getDescriptorHandler
Get the descriptor handler.- Overrides:
getDescriptorHandlerin classGenericDeploymentTool- Parameters:
srcDir- the source file.- Returns:
- the descriptor handler.
-
addVendorFiles
Add any vendor specific files which should be included in the EJB Jar.- Overrides:
addVendorFilesin classWeblogicDeploymentTool- Parameters:
ejbFiles- the hashtable to add files to.ddPrefix- the prefix to use.
-
validateConfigured
Called to validate that the tool parameters have been configured.- Specified by:
validateConfiguredin interfaceEJBDeploymentTool- Overrides:
validateConfiguredin classWeblogicDeploymentTool- Throws:
BuildException- if there is an error.
-