git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@474071 13f79535-47bb-0310-9956-ffa450edef68master
| @@ -505,9 +505,9 @@ public class BorlandDeploymentTool extends GenericDeploymentTool | |||||
| public void setProcessInputStream(OutputStream param1) throws IOException { } | public void setProcessInputStream(OutputStream param1) throws IOException { } | ||||
| /** | /** | ||||
| * | |||||
| * @param is | |||||
| * @exception java.io.IOException | |||||
| * Set the output stream of the process. | |||||
| * @param is the input stream. | |||||
| * @throws IOException if there is an error. | |||||
| */ | */ | ||||
| public void setProcessOutputStream(InputStream is) throws IOException { | public void setProcessOutputStream(InputStream is) throws IOException { | ||||
| try { | try { | ||||
| @@ -516,7 +516,8 @@ public class BorlandDeploymentTool extends GenericDeploymentTool | |||||
| while ((javafile = reader.readLine()) != null) { | while ((javafile = reader.readLine()) != null) { | ||||
| if (javafile.endsWith(".java")) { | if (javafile.endsWith(".java")) { | ||||
| String classfile = toClassFile(javafile); | String classfile = toClassFile(javafile); | ||||
| String key = classfile.substring(getConfig().srcDir.getAbsolutePath().length() + 1); | |||||
| String key = classfile.substring( | |||||
| getConfig().srcDir.getAbsolutePath().length() + 1); | |||||
| genfiles.put(key, new File(classfile)); | genfiles.put(key, new File(classfile)); | ||||
| } | } | ||||
| } | } | ||||
| @@ -527,6 +528,11 @@ public class BorlandDeploymentTool extends GenericDeploymentTool | |||||
| } | } | ||||
| } | } | ||||
| /** | |||||
| * Set the error stream of the process. | |||||
| * @param is the input stream. | |||||
| * @throws IOException if there is an error. | |||||
| */ | |||||
| public void setProcessErrorStream(InputStream is) throws IOException { | public void setProcessErrorStream(InputStream is) throws IOException { | ||||
| BufferedReader reader = new BufferedReader(new InputStreamReader(is)); | BufferedReader reader = new BufferedReader(new InputStreamReader(is)); | ||||
| String s = reader.readLine(); | String s = reader.readLine(); | ||||
| @@ -41,6 +41,7 @@ public class BorlandGenerateClient extends Task { | |||||
| static final String JAVA_MODE = "java"; | static final String JAVA_MODE = "java"; | ||||
| static final String FORK_MODE = "fork"; | static final String FORK_MODE = "fork"; | ||||
| // CheckStyle:VisibilityModifier OFF - bc | |||||
| /** debug the generateclient task */ | /** debug the generateclient task */ | ||||
| boolean debug = false; | boolean debug = false; | ||||
| @@ -58,13 +59,19 @@ public class BorlandGenerateClient extends Task { | |||||
| /** hold the version */ | /** hold the version */ | ||||
| int version = BorlandDeploymentTool.BAS; | int version = BorlandDeploymentTool.BAS; | ||||
| // CheckStyle:VisibilityModifier ON | |||||
| /** | |||||
| * Set the version attribute. | |||||
| * @param version the value to use. | |||||
| */ | |||||
| public void setVersion(int version) { | public void setVersion(int version) { | ||||
| this.version = version; | this.version = version; | ||||
| } | } | ||||
| /** | /** | ||||
| * Command launching mode: java or fork. | * Command launching mode: java or fork. | ||||
| * @param s the mode to use. | |||||
| */ | */ | ||||
| public void setMode(String s) { | public void setMode(String s) { | ||||
| mode = s; | mode = s; | ||||
| @@ -72,6 +79,7 @@ public class BorlandGenerateClient extends Task { | |||||
| /** | /** | ||||
| * If true, turn on the debug mode for each of the Borland tools launched. | * If true, turn on the debug mode for each of the Borland tools launched. | ||||
| * @param debug a <code>boolean</code> value. | |||||
| */ | */ | ||||
| public void setDebug(boolean debug) { | public void setDebug(boolean debug) { | ||||
| this.debug = debug; | this.debug = debug; | ||||
| @@ -79,6 +87,7 @@ public class BorlandGenerateClient extends Task { | |||||
| /** | /** | ||||
| * EJB JAR file. | * EJB JAR file. | ||||
| * @param ejbfile the file to use. | |||||
| */ | */ | ||||
| public void setEjbjar(File ejbfile) { | public void setEjbjar(File ejbfile) { | ||||
| ejbjarfile = ejbfile; | ejbjarfile = ejbfile; | ||||
| @@ -86,6 +95,7 @@ public class BorlandGenerateClient extends Task { | |||||
| /** | /** | ||||
| * Client JAR file name. | * Client JAR file name. | ||||
| * @param clientjar the file to use. | |||||
| */ | */ | ||||
| public void setClientjar(File clientjar) { | public void setClientjar(File clientjar) { | ||||
| clientjarfile = clientjar; | clientjarfile = clientjar; | ||||
| @@ -93,6 +103,7 @@ public class BorlandGenerateClient extends Task { | |||||
| /** | /** | ||||
| * Path to use for classpath. | * Path to use for classpath. | ||||
| * @param classpath the path to use. | |||||
| */ | */ | ||||
| public void setClasspath(Path classpath) { | public void setClasspath(Path classpath) { | ||||
| if (this.classpath == null) { | if (this.classpath == null) { | ||||
| @@ -104,6 +115,7 @@ public class BorlandGenerateClient extends Task { | |||||
| /** | /** | ||||
| * Adds path to the classpath. | * Adds path to the classpath. | ||||
| * @return a path to be configured as a nested element. | |||||
| */ | */ | ||||
| public Path createClasspath() { | public Path createClasspath() { | ||||
| if (this.classpath == null) { | if (this.classpath == null) { | ||||
| @@ -114,6 +126,7 @@ public class BorlandGenerateClient extends Task { | |||||
| /** | /** | ||||
| * Reference to existing path, to use as a classpath. | * Reference to existing path, to use as a classpath. | ||||
| * @param r the reference to use. | |||||
| */ | */ | ||||
| public void setClasspathRef(Reference r) { | public void setClasspathRef(Reference r) { | ||||
| createClasspath().setRefid(r); | createClasspath().setRefid(r); | ||||
| @@ -161,7 +174,10 @@ public class BorlandGenerateClient extends Task { | |||||
| } // end of else | } // end of else | ||||
| } | } | ||||
| /** launch the generate client using java api */ | |||||
| /** | |||||
| * launch the generate client using java api. | |||||
| * @throws BuildException if there is an error. | |||||
| */ | |||||
| protected void executeJava() throws BuildException { | protected void executeJava() throws BuildException { | ||||
| try { | try { | ||||
| if (version == BorlandDeploymentTool.BES) { | if (version == BorlandDeploymentTool.BES) { | ||||
| @@ -206,7 +222,10 @@ public class BorlandGenerateClient extends Task { | |||||
| } | } | ||||
| } | } | ||||
| /** launch the generate client using system api */ | |||||
| /** | |||||
| * launch the generate client using system api. | |||||
| * @throws BuildException if there is an error. | |||||
| */ | |||||
| protected void executeFork() throws BuildException { | protected void executeFork() throws BuildException { | ||||
| if (version == BorlandDeploymentTool.BAS) { | if (version == BorlandDeploymentTool.BAS) { | ||||
| executeForkV4(); | executeForkV4(); | ||||
| @@ -216,7 +235,10 @@ public class BorlandGenerateClient extends Task { | |||||
| } | } | ||||
| } | } | ||||
| /** launch the generate client using system api */ | |||||
| /** | |||||
| * launch the generate client using system api. | |||||
| * @throws BuildException if there is an error. | |||||
| */ | |||||
| protected void executeForkV4() throws BuildException { | protected void executeForkV4() throws BuildException { | ||||
| try { | try { | ||||
| @@ -250,7 +272,11 @@ public class BorlandGenerateClient extends Task { | |||||
| } | } | ||||
| } | } | ||||
| /** launch the generate client using system api */ | |||||
| /** | |||||
| * launch the generate client using system api. | |||||
| * @throws BuildException if there is an error. | |||||
| */ | |||||
| protected void executeForkV5() throws BuildException { | protected void executeForkV5() throws BuildException { | ||||
| try { | try { | ||||
| log("mode : fork " + BorlandDeploymentTool.BES, Project.MSG_DEBUG); | log("mode : fork " + BorlandDeploymentTool.BES, Project.MSG_DEBUG); | ||||
| @@ -20,7 +20,6 @@ package org.apache.tools.ant.taskdefs.optional.ejb; | |||||
| import java.io.File; | import java.io.File; | ||||
| import org.apache.tools.ant.BuildException; | import org.apache.tools.ant.BuildException; | ||||
| import org.apache.tools.ant.DirectoryScanner; | import org.apache.tools.ant.DirectoryScanner; | ||||
| import org.apache.tools.ant.Project; | |||||
| import org.apache.tools.ant.taskdefs.Java; | import org.apache.tools.ant.taskdefs.Java; | ||||
| import org.apache.tools.ant.taskdefs.MatchingTask; | import org.apache.tools.ant.taskdefs.MatchingTask; | ||||
| import org.apache.tools.ant.types.Commandline; | import org.apache.tools.ant.types.Commandline; | ||||
| @@ -40,10 +40,12 @@ public final class DDCreatorHelper { | |||||
| */ | */ | ||||
| private File generatedFilesDirectory; | private File generatedFilesDirectory; | ||||
| // CheckStyle:VisibilityModifier OFF - bc | |||||
| /** | /** | ||||
| * The descriptor text files for which a serialised descriptor is to be created. | * The descriptor text files for which a serialised descriptor is to be created. | ||||
| */ | */ | ||||
| String[] descriptors; | String[] descriptors; | ||||
| // CheckStyle:VisibilityModifier ON | |||||
| /** | /** | ||||
| * The main method. | * The main method. | ||||
| @@ -75,6 +75,7 @@ public class DescriptorHandler extends org.xml.sax.HandlerBase { | |||||
| */ | */ | ||||
| private int parseState = STATE_LOOKING_EJBJAR; | private int parseState = STATE_LOOKING_EJBJAR; | ||||
| // CheckStyle:VisibilityModifier OFF - bc | |||||
| /** | /** | ||||
| * Instance variable used to store the name of the current element being | * Instance variable used to store the name of the current element being | ||||
| * processed by the SAX parser. Accessed by the SAX parser call-back methods | * processed by the SAX parser. Accessed by the SAX parser call-back methods | ||||
| @@ -106,6 +107,7 @@ public class DescriptorHandler extends org.xml.sax.HandlerBase { | |||||
| private boolean inEJBRef = false; | private boolean inEJBRef = false; | ||||
| private Hashtable urlDTDs = new Hashtable(); | private Hashtable urlDTDs = new Hashtable(); | ||||
| // CheckStyle:VisibilityModifier OFF - bc | |||||
| /** | /** | ||||
| * The directory containing the bean classes and interfaces. This is | * The directory containing the bean classes and interfaces. This is | ||||
| @@ -32,23 +32,26 @@ public interface EJBDeploymentTool { | |||||
| * | * | ||||
| * @param descriptorFilename the name of the deployment descriptor | * @param descriptorFilename the name of the deployment descriptor | ||||
| * @param saxParser a SAX parser which can be used to parse the deployment descriptor. | * @param saxParser a SAX parser which can be used to parse the deployment descriptor. | ||||
| * @throws BuildException if there is an error. | |||||
| */ | */ | ||||
| void processDescriptor(String descriptorFilename, SAXParser saxParser) | void processDescriptor(String descriptorFilename, SAXParser saxParser) | ||||
| throws BuildException; | throws BuildException; | ||||
| /** | /** | ||||
| * Called to validate that the tool parameters have been configured. | * Called to validate that the tool parameters have been configured. | ||||
| * | |||||
| * @throws BuildException if there is an error. | |||||
| */ | */ | ||||
| void validateConfigured() throws BuildException; | void validateConfigured() throws BuildException; | ||||
| /** | /** | ||||
| * Set the task which owns this tool | * Set the task which owns this tool | ||||
| * @param task the task. | |||||
| */ | */ | ||||
| void setTask(Task task); | void setTask(Task task); | ||||
| /** | /** | ||||
| * Configure this tool for use in the ejbjar task. | * Configure this tool for use in the ejbjar task. | ||||
| * @param config contains configuration state. | |||||
| */ | */ | ||||
| void configure(EjbJar.Config config); | void configure(EjbJar.Config config); | ||||
| } | } | ||||
| @@ -68,6 +68,7 @@ public class EjbJar extends MatchingTask { | |||||
| * This state is passed to the deployment tools for configuration | * This state is passed to the deployment tools for configuration | ||||
| */ | */ | ||||
| static class Config { | static class Config { | ||||
| // CheckStyle:VisibilityModifier OFF - bc | |||||
| /** | /** | ||||
| * Stores a handle to the directory under which to search for class | * Stores a handle to the directory under which to search for class | ||||
| * files | * files | ||||
| @@ -122,6 +123,7 @@ public class EjbJar extends MatchingTask { | |||||
| * The dependency analyzer to use to add additional classes to the jar | * The dependency analyzer to use to add additional classes to the jar | ||||
| */ | */ | ||||
| public String analyzer; | public String analyzer; | ||||
| // CheckStyle:VisibilityModifier ON | |||||
| } | } | ||||
| /** | /** | ||||
| @@ -169,8 +171,11 @@ public class EjbJar extends MatchingTask { | |||||
| * @since ant 1.6 | * @since ant 1.6 | ||||
| */ | */ | ||||
| public static class CMPVersion extends EnumeratedAttribute { | public static class CMPVersion extends EnumeratedAttribute { | ||||
| /** 1.0 value */ | |||||
| public static final String CMP1_0 = "1.0"; | public static final String CMP1_0 = "1.0"; | ||||
| /** 2.0 value */ | |||||
| public static final String CMP2_0 = "2.0"; | public static final String CMP2_0 = "2.0"; | ||||
| /** {@inheritDoc}. */ | |||||
| public String[] getValues() { | public String[] getValues() { | ||||
| return new String[]{ | return new String[]{ | ||||
| CMP1_0, | CMP1_0, | ||||
| @@ -20,7 +20,6 @@ package org.apache.tools.ant.taskdefs.optional.ejb; | |||||
| import java.io.File; | import java.io.File; | ||||
| import org.apache.tools.ant.BuildException; | import org.apache.tools.ant.BuildException; | ||||
| import org.apache.tools.ant.DirectoryScanner; | import org.apache.tools.ant.DirectoryScanner; | ||||
| import org.apache.tools.ant.Project; | |||||
| import org.apache.tools.ant.taskdefs.Java; | import org.apache.tools.ant.taskdefs.Java; | ||||
| import org.apache.tools.ant.taskdefs.MatchingTask; | import org.apache.tools.ant.taskdefs.MatchingTask; | ||||
| import org.apache.tools.ant.types.Commandline; | import org.apache.tools.ant.types.Commandline; | ||||
| @@ -152,6 +151,7 @@ public class Ejbc extends MatchingTask { | |||||
| * If true, ejbc will keep the | * If true, ejbc will keep the | ||||
| * intermediate Java files used to build the class files. | * intermediate Java files used to build the class files. | ||||
| * This can be useful when debugging. | * This can be useful when debugging. | ||||
| * @param newKeepgenerated a boolean as a string. | |||||
| */ | */ | ||||
| public void setKeepgenerated(String newKeepgenerated) { | public void setKeepgenerated(String newKeepgenerated) { | ||||
| keepgenerated = Boolean.valueOf(newKeepgenerated.trim()).booleanValue(); | keepgenerated = Boolean.valueOf(newKeepgenerated.trim()).booleanValue(); | ||||
| @@ -172,6 +172,7 @@ public class Ejbc extends MatchingTask { | |||||
| /** | /** | ||||
| * Set the classpath to be used for this compilation. | * Set the classpath to be used for this compilation. | ||||
| * @param s the classpath (as a string) to use. | |||||
| */ | */ | ||||
| public void setClasspath(String s) { | public void setClasspath(String s) { | ||||
| this.classpath = FileUtils.translatePath(s); | this.classpath = FileUtils.translatePath(s); | ||||
| @@ -57,15 +57,19 @@ public class EjbcHelper { | |||||
| */ | */ | ||||
| private File sourceDirectory; | private File sourceDirectory; | ||||
| // CheckStyle:VisibilityModifier OFF - bc | |||||
| /** | /** | ||||
| * The names of the serialised deployment descriptors | * The names of the serialised deployment descriptors | ||||
| */ | */ | ||||
| String[] descriptors; | String[] descriptors; | ||||
| // CheckStyle:VisibilityModifier ON | |||||
| private boolean keepGenerated; | private boolean keepGenerated; | ||||
| /** | /** | ||||
| * Command line interface for the ejbc helper task. | * Command line interface for the ejbc helper task. | ||||
| * @param args command line arguments. | |||||
| * @throws Exception if there is a problem. | |||||
| */ | */ | ||||
| public static void main(String[] args) throws Exception { | public static void main(String[] args) throws Exception { | ||||
| EjbcHelper helper = new EjbcHelper(args); | EjbcHelper helper = new EjbcHelper(args); | ||||
| @@ -143,7 +147,7 @@ public class EjbcHelper { | |||||
| primaryKeyClassPath | primaryKeyClassPath | ||||
| = ((EntityDescriptor) dd).getPrimaryKeyClassName(); | = ((EntityDescriptor) dd).getPrimaryKeyClassName(); | ||||
| primaryKeyClassPath | primaryKeyClassPath | ||||
| = primaryKeyClassPath.replace('.', '/') + ".java";; | |||||
| = primaryKeyClassPath.replace('.', '/') + ".java"; | |||||
| } | } | ||||
| File homeInterfaceSource = new File(sourceDirectory, homeInterfacePath); | File homeInterfaceSource = new File(sourceDirectory, homeInterfacePath); | ||||
| @@ -125,6 +125,7 @@ public class GenericDeploymentTool implements EJBDeploymentTool { | |||||
| */ | */ | ||||
| private DependencyAnalyzer dependencyAnalyzer; | private DependencyAnalyzer dependencyAnalyzer; | ||||
| /** No arg constructor */ | |||||
| public GenericDeploymentTool() { | public GenericDeploymentTool() { | ||||
| } | } | ||||
| @@ -314,6 +315,7 @@ public class GenericDeploymentTool implements EJBDeploymentTool { | |||||
| * @param logicalFilename A String representing the name, including | * @param logicalFilename A String representing the name, including | ||||
| * all relevant path information, that should be stored for the entry | * all relevant path information, that should be stored for the entry | ||||
| * being added. | * being added. | ||||
| * @throws BuildException if there is a problem. | |||||
| */ | */ | ||||
| protected void addFileToJar(JarOutputStream jStream, | protected void addFileToJar(JarOutputStream jStream, | ||||
| File inputFile, | File inputFile, | ||||
| @@ -359,6 +361,7 @@ public class GenericDeploymentTool implements EJBDeploymentTool { | |||||
| /** | /** | ||||
| * Get a descriptionHandler. | * Get a descriptionHandler. | ||||
| * @param srcDir the source directory. | * @param srcDir the source directory. | ||||
| * @return a handler. | |||||
| */ | */ | ||||
| protected DescriptorHandler getDescriptorHandler(File srcDir) { | protected DescriptorHandler getDescriptorHandler(File srcDir) { | ||||
| DescriptorHandler h = new DescriptorHandler(getTask(), srcDir); | DescriptorHandler h = new DescriptorHandler(getTask(), srcDir); | ||||
| @@ -378,6 +381,7 @@ public class GenericDeploymentTool implements EJBDeploymentTool { | |||||
| * | * | ||||
| * vendor-specific subclasses should override this method to define | * vendor-specific subclasses should override this method to define | ||||
| * the vendor-specific locations of the EJB DTDs | * the vendor-specific locations of the EJB DTDs | ||||
| * @param handler no used in this class. | |||||
| */ | */ | ||||
| protected void registerKnownDTDs(DescriptorHandler handler) { | protected void registerKnownDTDs(DescriptorHandler handler) { | ||||
| // none to register for generic | // none to register for generic | ||||
| @@ -896,7 +900,7 @@ public class GenericDeploymentTool implements EJBDeploymentTool { | |||||
| * Returns a Classloader object which parses the passed in generic EjbJar classpath. | * Returns a Classloader object which parses the passed in generic EjbJar classpath. | ||||
| * The loader is used to dynamically load classes from javax.ejb.* and the classes | * The loader is used to dynamically load classes from javax.ejb.* and the classes | ||||
| * being added to the jar. | * being added to the jar. | ||||
| * | |||||
| * @return a classloader. | |||||
| */ | */ | ||||
| protected ClassLoader getClassLoaderForBuild() { | protected ClassLoader getClassLoaderForBuild() { | ||||
| if (classpathLoader != null) { | if (classpathLoader != null) { | ||||
| @@ -625,14 +625,18 @@ public class IPlanetEjbc { | |||||
| * descriptor DTD. | * descriptor DTD. | ||||
| */ | */ | ||||
| public EjbcHandler() { | public EjbcHandler() { | ||||
| /** EJB 1.1 ID */ | |||||
| final String PUBLICID_EJB11 = | final String PUBLICID_EJB11 = | ||||
| "-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 1.1//EN"; | "-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 1.1//EN"; | ||||
| /** IPlanet ID */ | |||||
| final String PUBLICID_IPLANET_EJB_60 = | final String PUBLICID_IPLANET_EJB_60 = | ||||
| "-//Sun Microsystems, Inc.//DTD iAS Enterprise JavaBeans 1.0//EN"; | "-//Sun Microsystems, Inc.//DTD iAS Enterprise JavaBeans 1.0//EN"; | ||||
| /** EJB 1.1 location */ | |||||
| final String DEFAULT_IAS60_EJB11_DTD_LOCATION = | final String DEFAULT_IAS60_EJB11_DTD_LOCATION = | ||||
| "ejb-jar_1_1.dtd"; | "ejb-jar_1_1.dtd"; | ||||
| /** IAS60 location */ | |||||
| final String DEFAULT_IAS60_DTD_LOCATION = | final String DEFAULT_IAS60_DTD_LOCATION = | ||||
| "IASEjb_jar_1_0.dtd"; | "IASEjb_jar_1_0.dtd"; | ||||
| @@ -142,6 +142,7 @@ public class IPlanetEjbcTask extends Task { | |||||
| /** | /** | ||||
| * Adds to the classpath used when compiling the EJB stubs and skeletons. | * Adds to the classpath used when compiling the EJB stubs and skeletons. | ||||
| * @return the class path. | |||||
| */ | */ | ||||
| public Path createClasspath() { | public Path createClasspath() { | ||||
| if (classpath == null) { | if (classpath == null) { | ||||
| @@ -183,6 +184,7 @@ public class IPlanetEjbcTask extends Task { | |||||
| /** | /** | ||||
| * Does the work. | * Does the work. | ||||
| * @throws BuildException if there is a problem. | |||||
| */ | */ | ||||
| public void execute() throws BuildException { | public void execute() throws BuildException { | ||||
| checkConfiguration(); | checkConfiguration(); | ||||
| @@ -31,7 +31,7 @@ public class InnerClassFilenameFilter implements FilenameFilter { | |||||
| baseClassName = baseclass.substring(0, extidx); | baseClassName = baseclass.substring(0, extidx); | ||||
| } | } | ||||
| public boolean accept (File Dir, String filename) { | |||||
| public boolean accept(File Dir, String filename) { | |||||
| if ((filename.lastIndexOf(".") != filename.lastIndexOf(".class")) | if ((filename.lastIndexOf(".") != filename.lastIndexOf(".class")) | ||||
| || (filename.indexOf(baseClassName + "$") != 0)) { | || (filename.indexOf(baseClassName + "$") != 0)) { | ||||
| return false; | return false; | ||||
| @@ -233,12 +233,17 @@ public class WeblogicDeploymentTool extends GenericDeploymentTool { | |||||
| * Sets the weblogic.StdoutSeverityLevel to use when running the JVM that | * Sets the weblogic.StdoutSeverityLevel to use when running the JVM that | ||||
| * executes ejbc; optional. Set to 16 to avoid the warnings about EJB Home and | * executes ejbc; optional. Set to 16 to avoid the warnings about EJB Home and | ||||
| * Remotes being in the classpath | * Remotes being in the classpath | ||||
| * @param jvmDebugLevel the value to use. | |||||
| */ | */ | ||||
| public void setJvmDebugLevel(Integer jvmDebugLevel) { | public void setJvmDebugLevel(Integer jvmDebugLevel) { | ||||
| this.jvmDebugLevel = jvmDebugLevel; | this.jvmDebugLevel = jvmDebugLevel; | ||||
| } | } | ||||
| /** | |||||
| * Get the debug level. | |||||
| * @return the jvm debug level (may be null). | |||||
| */ | |||||
| public Integer getJvmDebugLevel() { | public Integer getJvmDebugLevel() { | ||||
| return jvmDebugLevel; | return jvmDebugLevel; | ||||
| } | } | ||||
| @@ -303,13 +308,17 @@ public class WeblogicDeploymentTool extends GenericDeploymentTool { | |||||
| * featured in weblogic 6 has, however, been deprecated in version 7. When | * featured in weblogic 6 has, however, been deprecated in version 7. When | ||||
| * using with version 7 this attribute should be set to | * using with version 7 this attribute should be set to | ||||
| * "weblogic.ejbc" to avoid the deprecation warning. | * "weblogic.ejbc" to avoid the deprecation warning. | ||||
| * @param ejbcClass the name of the class to use. | |||||
| */ | */ | ||||
| public void setEjbcClass(String ejbcClass) { | public void setEjbcClass(String ejbcClass) { | ||||
| this.ejbcClass = ejbcClass; | this.ejbcClass = ejbcClass; | ||||
| } | } | ||||
| /** Get the ejbc compiler class */ | |||||
| /** | |||||
| * Get the ejbc compiler class. | |||||
| * @return the name of the ejbc compiler class. | |||||
| */ | |||||
| public String getEjbcClass() { | public String getEjbcClass() { | ||||
| return ejbcClass; | return ejbcClass; | ||||
| } | } | ||||
| @@ -354,6 +363,7 @@ public class WeblogicDeploymentTool extends GenericDeploymentTool { | |||||
| /** | /** | ||||
| * Set the value of the oldCMP scheme. This is an antonym for newCMP | * Set the value of the oldCMP scheme. This is an antonym for newCMP | ||||
| * @ant.attribute ignore="true' | * @ant.attribute ignore="true' | ||||
| * @param oldCMP a <code>boolean</code> value. | |||||
| */ | */ | ||||
| public void setOldCMP(boolean oldCMP) { | public void setOldCMP(boolean oldCMP) { | ||||
| this.newCMP = !oldCMP; | this.newCMP = !oldCMP; | ||||
| @@ -370,6 +380,7 @@ public class WeblogicDeploymentTool extends GenericDeploymentTool { | |||||
| * prefix. Under this scheme the name of the CMP descriptor does not match | * prefix. Under this scheme the name of the CMP descriptor does not match | ||||
| * the name actually used in the main weblogic EJB descriptor. Also, | * the name actually used in the main weblogic EJB descriptor. Also, | ||||
| * descriptors which contain multiple CMP references could not be used. | * descriptors which contain multiple CMP references could not be used. | ||||
| * @param newCMP a <code>boolean</code> value. | |||||
| */ | */ | ||||
| public void setNewCMP(boolean newCMP) { | public void setNewCMP(boolean newCMP) { | ||||
| this.newCMP = newCMP; | this.newCMP = newCMP; | ||||
| @@ -379,6 +390,7 @@ public class WeblogicDeploymentTool extends GenericDeploymentTool { | |||||
| /** | /** | ||||
| * Do not EJBC the jar after it has been put together; | * Do not EJBC the jar after it has been put together; | ||||
| * optional, default false | * optional, default false | ||||
| * @param noEJBC a <code>boolean</code> value. | |||||
| */ | */ | ||||
| public void setNoEJBC(boolean noEJBC) { | public void setNoEJBC(boolean noEJBC) { | ||||
| this.noEJBC = noEJBC; | this.noEJBC = noEJBC; | ||||
| @@ -646,6 +658,7 @@ public class WeblogicDeploymentTool extends GenericDeploymentTool { | |||||
| /** | /** | ||||
| * Called to validate that the tool parameters have been configured. | * Called to validate that the tool parameters have been configured. | ||||
| * @throws BuildException if there is an error. | |||||
| */ | */ | ||||
| public void validateConfigured() throws BuildException { | public void validateConfigured() throws BuildException { | ||||
| super.validateConfigured(); | super.validateConfigured(); | ||||
| @@ -836,6 +849,7 @@ public class WeblogicDeploymentTool extends GenericDeploymentTool { | |||||
| try { | try { | ||||
| genericJar.close(); | genericJar.close(); | ||||
| } catch (IOException closeException) { | } catch (IOException closeException) { | ||||
| // empty | |||||
| } | } | ||||
| } | } | ||||
| @@ -843,6 +857,7 @@ public class WeblogicDeploymentTool extends GenericDeploymentTool { | |||||
| try { | try { | ||||
| wlJar.close(); | wlJar.close(); | ||||
| } catch (IOException closeException) { | } catch (IOException closeException) { | ||||
| // empty | |||||
| } | } | ||||
| } | } | ||||
| @@ -850,6 +865,7 @@ public class WeblogicDeploymentTool extends GenericDeploymentTool { | |||||
| try { | try { | ||||
| newJarStream.close(); | newJarStream.close(); | ||||
| } catch (IOException closeException) { | } catch (IOException closeException) { | ||||
| // empty | |||||
| } | } | ||||
| try { | try { | ||||
| @@ -875,6 +891,8 @@ public class WeblogicDeploymentTool extends GenericDeploymentTool { | |||||
| * Jar File passed to it. | * Jar File passed to it. | ||||
| * | * | ||||
| * @param classjar java.io.File representing jar file to get classes from. | * @param classjar java.io.File representing jar file to get classes from. | ||||
| * @return the classloader for the jarfile. | |||||
| * @throws IOException if there is a problem. | |||||
| */ | */ | ||||
| protected ClassLoader getClassLoaderFromJar(File classjar) throws IOException { | protected ClassLoader getClassLoaderFromJar(File classjar) throws IOException { | ||||
| Path lookupPath = new Path(getTask().getProject()); | Path lookupPath = new Path(getTask().getProject()); | ||||
| @@ -890,4 +908,3 @@ public class WeblogicDeploymentTool extends GenericDeploymentTool { | |||||
| return getTask().getProject().createClassLoader(lookupPath); | return getTask().getProject().createClassLoader(lookupPath); | ||||
| } | } | ||||
| } | } | ||||
| @@ -90,7 +90,7 @@ public class WeblogicTOPLinkDeploymentTool extends WeblogicDeploymentTool { | |||||
| /** | /** | ||||
| * Called to validate that the tool parameters have been configured. | * Called to validate that the tool parameters have been configured. | ||||
| * | |||||
| * @throws BuildException if there is an error. | |||||
| */ | */ | ||||
| public void validateConfigured() throws BuildException { | public void validateConfigured() throws BuildException { | ||||
| super.validateConfigured(); | super.validateConfigured(); | ||||
| @@ -309,7 +309,7 @@ public class WebsphereDeploymentTool extends GenericDeploymentTool { | |||||
| * Decide, wether ejbdeploy should be called or not; | * Decide, wether ejbdeploy should be called or not; | ||||
| * optional, default true. | * optional, default true. | ||||
| * | * | ||||
| * @param ejbdeploy | |||||
| * @param ejbdeploy a <code>boolean</code> value. | |||||
| */ | */ | ||||
| public void setEjbdeploy(boolean ejbdeploy) { | public void setEjbdeploy(boolean ejbdeploy) { | ||||
| this.ejbdeploy = ejbdeploy; | this.ejbdeploy = ejbdeploy; | ||||
| @@ -361,7 +361,7 @@ public class WebsphereDeploymentTool extends GenericDeploymentTool { | |||||
| } | } | ||||
| /* {@inheritDoc}. */ | |||||
| /** {@inheritDoc}. */ | |||||
| protected DescriptorHandler getDescriptorHandler(File srcDir) { | protected DescriptorHandler getDescriptorHandler(File srcDir) { | ||||
| DescriptorHandler handler = new DescriptorHandler(getTask(), srcDir); | DescriptorHandler handler = new DescriptorHandler(getTask(), srcDir); | ||||
| // register all the DTDs, both the ones that are known and | // register all the DTDs, both the ones that are known and | ||||
| @@ -381,6 +381,7 @@ public class WebsphereDeploymentTool extends GenericDeploymentTool { | |||||
| /** | /** | ||||
| * Get a description handler. | * Get a description handler. | ||||
| * @param srcDir the source directory. | * @param srcDir the source directory. | ||||
| * @return the handler. | |||||
| */ | */ | ||||
| protected DescriptorHandler getWebsphereDescriptorHandler(final File srcDir) { | protected DescriptorHandler getWebsphereDescriptorHandler(final File srcDir) { | ||||
| DescriptorHandler handler = | DescriptorHandler handler = | ||||
| @@ -639,6 +640,7 @@ public class WebsphereDeploymentTool extends GenericDeploymentTool { | |||||
| /** | /** | ||||
| * Called to validate that the tool parameters have been configured. | * Called to validate that the tool parameters have been configured. | ||||
| * @throws BuildException if there is an error. | |||||
| */ | */ | ||||
| public void validateConfigured() throws BuildException { | public void validateConfigured() throws BuildException { | ||||
| super.validateConfigured(); | super.validateConfigured(); | ||||
| @@ -676,6 +678,7 @@ public class WebsphereDeploymentTool extends GenericDeploymentTool { | |||||
| * @param genericJarFile java.io.File The generic jar file. | * @param genericJarFile java.io.File The generic jar file. | ||||
| * @param websphereJarFile java.io.File The websphere jar file to check to | * @param websphereJarFile java.io.File The websphere jar file to check to | ||||
| * see if it needs to be rebuilt. | * see if it needs to be rebuilt. | ||||
| * @return true if a rebuild is required. | |||||
| */ | */ | ||||
| protected boolean isRebuildRequired(File genericJarFile, File websphereJarFile) { | protected boolean isRebuildRequired(File genericJarFile, File websphereJarFile) { | ||||
| boolean rebuild = false; | boolean rebuild = false; | ||||
| @@ -835,6 +838,7 @@ public class WebsphereDeploymentTool extends GenericDeploymentTool { | |||||
| try { | try { | ||||
| genericJar.close(); | genericJar.close(); | ||||
| } catch (IOException closeException) { | } catch (IOException closeException) { | ||||
| // Ignore | |||||
| } | } | ||||
| } | } | ||||
| @@ -842,6 +846,7 @@ public class WebsphereDeploymentTool extends GenericDeploymentTool { | |||||
| try { | try { | ||||
| wasJar.close(); | wasJar.close(); | ||||
| } catch (IOException closeException) { | } catch (IOException closeException) { | ||||
| // Ignore | |||||
| } | } | ||||
| } | } | ||||
| @@ -849,6 +854,7 @@ public class WebsphereDeploymentTool extends GenericDeploymentTool { | |||||
| try { | try { | ||||
| newJarStream.close(); | newJarStream.close(); | ||||
| } catch (IOException closeException) { | } catch (IOException closeException) { | ||||
| // Ignore | |||||
| } | } | ||||
| try { | try { | ||||
| @@ -869,6 +875,8 @@ public class WebsphereDeploymentTool extends GenericDeploymentTool { | |||||
| * Jar File passed to it. | * Jar File passed to it. | ||||
| * | * | ||||
| * @param classjar java.io.File representing jar file to get classes from. | * @param classjar java.io.File representing jar file to get classes from. | ||||
| * @return a classloader for the jar file. | |||||
| * @throws IOException if there is an error. | |||||
| */ | */ | ||||
| protected ClassLoader getClassLoaderFromJar(File classjar) throws IOException { | protected ClassLoader getClassLoaderFromJar(File classjar) throws IOException { | ||||
| Path lookupPath = new Path(getTask().getProject()); | Path lookupPath = new Path(getTask().getProject()); | ||||