git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@475080 13f79535-47bb-0310-9956-ffa450edef68master
@@ -200,6 +200,11 @@ public class BorlandDeploymentTool extends GenericDeploymentTool | |||
} | |||
/** | |||
* Get the borland descriptor handler. | |||
* @param srcDir the source directory. | |||
* @return the descriptor. | |||
*/ | |||
protected DescriptorHandler getBorlandDescriptorHandler(final File srcDir) { | |||
DescriptorHandler handler = | |||
new DescriptorHandler(getTask(), srcDir) { | |||
@@ -444,6 +449,11 @@ public class BorlandDeploymentTool extends GenericDeploymentTool | |||
* 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. | |||
* @param baseName the base name. | |||
* @param jarFile the jar file to write to. | |||
* @param files the files to write to the jar. | |||
* @param publicId the id to use. | |||
* @throws BuildException if there is an error. | |||
*/ | |||
protected void writeJar(String baseName, File jarFile, Hashtable files, String publicId) | |||
throws BuildException { | |||
@@ -500,8 +510,11 @@ public class BorlandDeploymentTool extends GenericDeploymentTool | |||
// implementation of org.apache.tools.ant.taskdefs.ExecuteStreamHandler interface | |||
/** {@inheritDoc}. */ | |||
public void start() throws IOException { } | |||
/** {@inheritDoc}. */ | |||
public void stop() { } | |||
/** {@inheritDoc}. */ | |||
public void setProcessInputStream(OutputStream param1) throws IOException { } | |||
/** | |||
@@ -40,6 +40,7 @@ import org.xml.sax.SAXException; | |||
* list can then be accessed through the getFiles() method. | |||
*/ | |||
public class DescriptorHandler extends org.xml.sax.HandlerBase { | |||
private static final int DEFAULT_HASH_TABLE_SIZE = 10; | |||
private static final int STATE_LOOKING_EJBJAR = 1; | |||
private static final int STATE_IN_EJBJAR = 2; | |||
private static final int STATE_IN_BEANS = 3; | |||
@@ -171,7 +172,16 @@ public class DescriptorHandler extends org.xml.sax.HandlerBase { | |||
} | |||
/** @see org.xml.sax.EntityResolver#resolveEntity(String, String) */ | |||
/** | |||
* Resolve the entity. | |||
* @see org.xml.sax.EntityResolver#resolveEntity(String, String). | |||
* @param publicId The public identifier, or <code>null</code> | |||
* if none is available. | |||
* @param systemId The system identifier provided in the XML | |||
* document. Will not be <code>null</code>. | |||
* @return an inputsource for this identifier | |||
* @throws SAXException if there is a problem. | |||
*/ | |||
public InputSource resolveEntity(String publicId, String systemId) | |||
throws SAXException { | |||
this.publicId = publicId; | |||
@@ -245,7 +255,7 @@ public class DescriptorHandler extends org.xml.sax.HandlerBase { | |||
* @throws SAXException on error | |||
*/ | |||
public void startDocument() throws SAXException { | |||
this.ejbFiles = new Hashtable(10, 1); | |||
this.ejbFiles = new Hashtable(DEFAULT_HASH_TABLE_SIZE, 1); | |||
this.currentElement = null; | |||
inEJBRef = false; | |||
} | |||
@@ -25,6 +25,9 @@ import org.apache.tools.ant.BuildException; | |||
import org.apache.tools.ant.Task; | |||
/** | |||
* The interface to implement for deployment tools. | |||
*/ | |||
public interface EJBDeploymentTool { | |||
/** | |||
* Process a deployment descriptor, generating the necessary vendor specific | |||
@@ -62,7 +62,10 @@ public class Ejbc extends MatchingTask { | |||
*/ | |||
private File sourceDirectory; | |||
// CheckStyle:VisibilityModifier OFF - bc | |||
/** Whether to keep the generated files */ | |||
public boolean keepgenerated; | |||
// CheckStyle:VisibilityModifier ON | |||
/** | |||
* Do the work. | |||
@@ -124,6 +127,10 @@ public class Ejbc extends MatchingTask { | |||
} | |||
} | |||
/** | |||
* get the keep generated attribute. | |||
* @return the attribute. | |||
*/ | |||
public boolean getKeepgenerated() { | |||
return keepgenerated; | |||
} | |||
@@ -35,7 +35,7 @@ import javax.ejb.deployment.EntityDescriptor; | |||
* interface class files referenced in the deployment descriptors being processed. | |||
* | |||
*/ | |||
public class EjbcHelper { | |||
public final class EjbcHelper { | |||
/** | |||
* The root directory of the tree containing the serialised deployment desciptors. | |||
*/ | |||
@@ -55,6 +55,11 @@ import org.xml.sax.SAXException; | |||
* | |||
*/ | |||
public class GenericDeploymentTool implements EJBDeploymentTool { | |||
/** The default buffer byte size to use for IO */ | |||
public static final int DEFAULT_BUFFER_SIZE = 1024; | |||
/** The level to use for compression */ | |||
public static final int JAR_COMPRESS_LEVEL = 9; | |||
/** The standard META-INF directory in jar files */ | |||
protected static final String META_DIR = "META-INF/"; | |||
@@ -331,7 +336,7 @@ public class GenericDeploymentTool implements EJBDeploymentTool { | |||
// Create the file input stream, and buffer everything over | |||
// to the jar output stream | |||
byte[] byteBuffer = new byte[2 * 1024]; | |||
byte[] byteBuffer = new byte[2 * DEFAULT_BUFFER_SIZE]; | |||
int count = 0; | |||
do { | |||
jStream.write(byteBuffer, 0, count); | |||
@@ -387,6 +392,7 @@ public class GenericDeploymentTool implements EJBDeploymentTool { | |||
// none to register for generic | |||
} | |||
/** {@inheritDoc}. */ | |||
public void processDescriptor(String descriptorFileName, SAXParser saxParser) { | |||
checkConfiguration(descriptorFileName, saxParser); | |||
@@ -484,7 +490,7 @@ public class GenericDeploymentTool implements EJBDeploymentTool { | |||
* descriptor to be processed | |||
* @param saxParser SAXParser which may be used to parse the XML | |||
* descriptor | |||
* @exception BuildException Thrown if the configuration is invalid | |||
* @throws BuildException if there is a problem. | |||
*/ | |||
protected void checkConfiguration(String descriptorFileName, | |||
SAXParser saxParser) throws BuildException { | |||
@@ -628,6 +634,9 @@ public class GenericDeploymentTool implements EJBDeploymentTool { | |||
* | |||
* This will contain the path and the start of the descriptor name, | |||
* depending on the naming scheme | |||
* @param baseName the base name to use. | |||
* @param descriptorFileName the file name to use. | |||
* @return the prefix. | |||
*/ | |||
public String getVendorDDPrefix(String baseName, String descriptorFileName) { | |||
String ddPrefix = null; | |||
@@ -662,6 +671,7 @@ public class GenericDeploymentTool implements EJBDeploymentTool { | |||
/** | |||
* 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. | |||
* @param baseName the basename to use. | |||
*/ | |||
File getVendorOutputJarFile(String baseName) { | |||
return new File(destDir, baseName + genericJarSuffix); | |||
@@ -743,6 +753,11 @@ public class GenericDeploymentTool implements EJBDeploymentTool { | |||
* 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. | |||
* @param baseName the base name to use. | |||
* @param jarfile the jar file to write to. | |||
* @param files the files to write to the jar. | |||
* @param publicId the id to use. | |||
* @throws BuildException if there is a problem. | |||
*/ | |||
protected void writeJar(String baseName, File jarfile, Hashtable files, | |||
String publicId) throws BuildException { | |||
@@ -857,6 +872,7 @@ public class GenericDeploymentTool implements EJBDeploymentTool { | |||
/** | |||
* Add all available classes, that depend on Remote, Home, Bean, PK | |||
* @param checkEntries files, that are extracted from the deployment descriptor | |||
* @throws BuildException if there is a problem. | |||
*/ | |||
protected void checkAndAddDependants(Hashtable checkEntries) | |||
throws BuildException { | |||
@@ -170,6 +170,7 @@ public class IPlanetDeploymentTool extends GenericDeploymentTool { | |||
Project.MSG_WARN); | |||
} | |||
/** {@inheritDoc}. */ | |||
public void processDescriptor(String descriptorName, SAXParser saxParser) { | |||
this.descriptorName = descriptorName; | |||
this.iasDescriptorName = null; | |||
@@ -66,6 +66,11 @@ import org.xml.sax.SAXException; | |||
*/ | |||
public class IPlanetEjbc { | |||
private static final int MIN_NUM_ARGS = 2; | |||
private static final int MAX_NUM_ARGS = 8; | |||
private static final int NUM_CLASSES_WITH_IIOP = 15; | |||
private static final int NUM_CLASSES_WITHOUT_IIOP = 9; | |||
/* Constants used for the "beantype" attribute */ | |||
private static final String ENTITY_BEAN = "entity"; | |||
private static final String STATELESS_SESSION = "stateless"; | |||
@@ -254,7 +259,7 @@ public class IPlanetEjbc { | |||
boolean retainSource = false; | |||
IPlanetEjbc ejbc; | |||
if ((args.length < 2) || (args.length > 8)) { | |||
if ((args.length < MIN_NUM_ARGS) || (args.length > MAX_NUM_ARGS)) { | |||
usage(); | |||
return; | |||
} | |||
@@ -602,6 +607,18 @@ public class IPlanetEjbc { | |||
* @see IPlanetEjbc.EjbInfo | |||
*/ | |||
private class EjbcHandler extends HandlerBase { | |||
/** EJB 1.1 ID */ | |||
private static final String PUBLICID_EJB11 = | |||
"-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 1.1//EN"; | |||
/** IPlanet ID */ | |||
private static final String PUBLICID_IPLANET_EJB_60 = | |||
"-//Sun Microsystems, Inc.//DTD iAS Enterprise JavaBeans 1.0//EN"; | |||
/** EJB 1.1 location */ | |||
private static final String DEFAULT_IAS60_EJB11_DTD_LOCATION = | |||
"ejb-jar_1_1.dtd"; | |||
/** IAS60 location */ | |||
private static final String DEFAULT_IAS60_DTD_LOCATION = | |||
"IASEjb_jar_1_0.dtd"; | |||
/* | |||
* Two Maps are used to track local DTDs that will be used in case the | |||
@@ -625,21 +642,6 @@ public class IPlanetEjbc { | |||
* descriptor DTD. | |||
*/ | |||
public EjbcHandler() { | |||
/** EJB 1.1 ID */ | |||
final String PUBLICID_EJB11 = | |||
"-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 1.1//EN"; | |||
/** IPlanet ID */ | |||
final String PUBLICID_IPLANET_EJB_60 = | |||
"-//Sun Microsystems, Inc.//DTD iAS Enterprise JavaBeans 1.0//EN"; | |||
/** EJB 1.1 location */ | |||
final String DEFAULT_IAS60_EJB11_DTD_LOCATION = | |||
"ejb-jar_1_1.dtd"; | |||
/** IAS60 location */ | |||
final String DEFAULT_IAS60_DTD_LOCATION = | |||
"IASEjb_jar_1_0.dtd"; | |||
registerDTD(PUBLICID_EJB11, DEFAULT_IAS60_EJB11_DTD_LOCATION); | |||
registerDTD(PUBLICID_IPLANET_EJB_60, DEFAULT_IAS60_DTD_LOCATION); | |||
} | |||
@@ -1271,7 +1273,9 @@ public class IPlanetEjbc { | |||
* names for the stubs and skeletons to be generated. | |||
*/ | |||
private String[] classesToGenerate() { | |||
String[] classnames = (iiop) ? new String[15] : new String[9]; | |||
String[] classnames = (iiop) | |||
? new String[NUM_CLASSES_WITH_IIOP] | |||
: new String[NUM_CLASSES_WITHOUT_IIOP]; | |||
final String remotePkg = remote.getPackageName() + "."; | |||
final String remoteClass = remote.getClassName(); | |||
@@ -1448,7 +1452,8 @@ public class IPlanetEjbc { | |||
* | |||
*/ | |||
private static class RedirectOutput extends Thread { | |||
InputStream stream; // Stream to read and redirect to standard output | |||
private InputStream stream; // Stream to read and redirect to standard output | |||
/** | |||
* Constructs a new instance that will redirect output from the | |||
@@ -20,9 +20,16 @@ package org.apache.tools.ant.taskdefs.optional.ejb; | |||
import java.io.File; | |||
import java.io.FilenameFilter; | |||
/** | |||
* A filename filter for inner class files of a particular class. | |||
*/ | |||
public class InnerClassFilenameFilter implements FilenameFilter { | |||
private String baseClassName; | |||
/** | |||
* Constructor of filter. | |||
* @param baseclass the class to filter inner classes on. | |||
*/ | |||
InnerClassFilenameFilter(String baseclass) { | |||
int extidx = baseclass.lastIndexOf(".class"); | |||
if (extidx == -1) { | |||
@@ -31,7 +38,13 @@ public class InnerClassFilenameFilter implements FilenameFilter { | |||
baseClassName = baseclass.substring(0, extidx); | |||
} | |||
public boolean accept(File Dir, String filename) { | |||
/** | |||
* Check if the file name passes the filter. | |||
* @param dir not used. | |||
* @param filename the filename to filter on. | |||
* @return true if the filename is an inner class of the base class. | |||
*/ | |||
public boolean accept(File dir, String filename) { | |||
if ((filename.lastIndexOf(".") != filename.lastIndexOf(".class")) | |||
|| (filename.indexOf(baseClassName + "$") != 0)) { | |||
return false; | |||
@@ -49,6 +49,8 @@ public class JbossDeploymentTool extends GenericDeploymentTool { | |||
/** | |||
* Add any vendor specific files which should be included in the | |||
* EJB Jar. | |||
* @param ejbFiles the hashtable of files to populate. | |||
* @param ddPrefix the prefix to use. | |||
*/ | |||
protected void addVendorFiles(Hashtable ejbFiles, String ddPrefix) { | |||
File jbossDD = new File(getConfig().descriptorDir, ddPrefix + JBOSS_DD); | |||
@@ -326,6 +326,7 @@ public class JonasDeploymentTool extends GenericDeploymentTool { | |||
/* other methods */ | |||
/* ------------- */ | |||
/** {@inheritDoc}. */ | |||
public void processDescriptor(String aDescriptorName, SAXParser saxParser) { | |||
descriptorName = aDescriptorName; | |||
@@ -342,6 +343,7 @@ public class JonasDeploymentTool extends GenericDeploymentTool { | |||
} | |||
} | |||
/** {@inheritDoc}. */ | |||
protected void writeJar(String baseName, File jarfile, Hashtable ejbFiles, String publicId) | |||
throws BuildException { | |||
@@ -361,6 +363,7 @@ public class JonasDeploymentTool extends GenericDeploymentTool { | |||
} | |||
} | |||
/** {@inheritDoc}. */ | |||
protected void addVendorFiles(Hashtable ejbFiles, String ddPrefix) { | |||
// JOnAS-specific descriptor deployment | |||
@@ -375,6 +378,7 @@ public class JonasDeploymentTool extends GenericDeploymentTool { | |||
} | |||
} | |||
/** {@inheritDoc}. */ | |||
protected File getVendorOutputJarFile(String baseName) { | |||
return new File(getDestDir(), baseName + suffix); | |||
} | |||
@@ -451,6 +455,7 @@ public class JonasDeploymentTool extends GenericDeploymentTool { | |||
return jonasDN; | |||
} | |||
/** {@inheritDoc}. */ | |||
protected String getJarBaseName(String descriptorFileName) { | |||
String baseName = null; | |||
@@ -491,6 +496,7 @@ public class JonasDeploymentTool extends GenericDeploymentTool { | |||
return baseName; | |||
} | |||
/** {@inheritDoc}. */ | |||
protected void registerKnownDTDs(DescriptorHandler handler) { | |||
handler.registerDTD(EJB_JAR_1_1_PUBLIC_ID, | |||
jonasroot + File.separator + "xml" + File.separator + EJB_JAR_1_1_DTD); | |||
@@ -509,14 +515,11 @@ public class JonasDeploymentTool extends GenericDeploymentTool { | |||
* @param genericJarFile jar file. | |||
* @param ejbFiles the hashtable. | |||
*/ | |||
private void addGenICGeneratedFiles(File genericJarFile, Hashtable ejbFiles) { | |||
// GenIC task | |||
Java genicTask = null; | |||
// GenIC class (3 GenIC classes for various versions of JOnAS | |||
// are supported) | |||
String genicClass = null; | |||
private void addGenICGeneratedFiles( | |||
File genericJarFile, Hashtable ejbFiles) { | |||
Java genicTask = null; // GenIC task | |||
String genicClass = null; // GenIC class (3 are supported for various | |||
// versions | |||
if (nogenic) { | |||
return; | |||
} | |||
@@ -573,7 +576,6 @@ public class JonasDeploymentTool extends GenericDeploymentTool { | |||
+ File.separator + orb + "_jonas.jar"; | |||
classpath.append(new Path(classpath.getProject(), orbJar)); | |||
} | |||
log("Using classpath: " + classpath.toString(), Project.MSG_VERBOSE); | |||
genicTask.setClasspath(classpath); | |||
@@ -628,7 +630,7 @@ public class JonasDeploymentTool extends GenericDeploymentTool { | |||
// verbose | |||
if (verbose) { | |||
genicTask.createArg().setValue("-verbose"); | |||
} | |||
} | |||
// additionalargs | |||
if (additionalargs != null) { | |||
@@ -653,8 +655,9 @@ public class JonasDeploymentTool extends GenericDeploymentTool { | |||
deleteAllFiles(outputdir); | |||
if (!keepgeneric) { | |||
log("Deleting generic JAR " + genericJarFile.toString(), Project.MSG_VERBOSE); | |||
genericJarFile.delete(); | |||
log("Deleting generic JAR " + genericJarFile.toString(), | |||
Project.MSG_VERBOSE); | |||
genericJarFile.delete(); | |||
} | |||
throw new BuildException("GenIC reported an error."); | |||
@@ -716,6 +719,12 @@ public class JonasDeploymentTool extends GenericDeploymentTool { | |||
return null; | |||
} | |||
/** | |||
* Verify the configuration. | |||
* @param descriptorFileName the name of the descriptor file. | |||
* @param saxParser not used. | |||
* @throws BuildException if there is an error. | |||
*/ | |||
protected void checkConfiguration(String descriptorFileName, | |||
SAXParser saxParser) throws BuildException { | |||
@@ -397,6 +397,10 @@ public class WeblogicDeploymentTool extends GenericDeploymentTool { | |||
} | |||
/** | |||
* Register the DTDs. | |||
* @param handler the handler to use. | |||
*/ | |||
protected void registerKnownDTDs(DescriptorHandler handler) { | |||
// register all the known DTDs | |||
handler.registerDTD(PUBLICID_EJB11, DEFAULT_WL51_EJB11_DTD_LOCATION); | |||
@@ -406,6 +410,11 @@ public class WeblogicDeploymentTool extends GenericDeploymentTool { | |||
} | |||
/** | |||
* Get the weblogic descriptor handler. | |||
* @param srcDir the source directory. | |||
* @return the descriptor. | |||
*/ | |||
protected DescriptorHandler getWeblogicDescriptorHandler(final File srcDir) { | |||
DescriptorHandler handler = | |||
new DescriptorHandler(getTask(), srcDir) { | |||
@@ -442,6 +451,8 @@ public class WeblogicDeploymentTool extends GenericDeploymentTool { | |||
/** | |||
* Add any vendor specific files which should be included in the EJB Jar. | |||
* @param ejbFiles the hash table to be populated. | |||
* @param ddPrefix the prefix to use. | |||
*/ | |||
protected void addVendorFiles(Hashtable ejbFiles, String ddPrefix) { | |||
File weblogicDD = new File(getConfig().descriptorDir, ddPrefix + WL_DD); | |||
@@ -637,6 +648,11 @@ public class WeblogicDeploymentTool extends GenericDeploymentTool { | |||
* 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. | |||
* @param baseName the base name. | |||
* @param jarFile the jar file to populate. | |||
* @param files the hash table of files to write. | |||
* @param publicId the id to use. | |||
* @throws BuildException if there is a problem. | |||
*/ | |||
protected void writeJar(String baseName, File jarFile, Hashtable files, | |||
String publicId) throws BuildException { | |||
@@ -688,6 +704,7 @@ public class WeblogicDeploymentTool extends GenericDeploymentTool { | |||
* @param genericJarFile java.io.File The generic jar file. | |||
* @param weblogicJarFile java.io.File The weblogic jar file to check to | |||
* see if it needs to be rebuilt. | |||
* @return true if the jar needs to be rebuilt. | |||
*/ | |||
protected boolean isRebuildRequired(File genericJarFile, File weblogicJarFile) { | |||
boolean rebuild = false; | |||
@@ -793,7 +810,7 @@ public class WeblogicDeploymentTool extends GenericDeploymentTool { | |||
//Copy files from old weblogic jar | |||
for (Enumeration e = wlEntries.elements(); e.hasMoreElements();) { | |||
byte[] buffer = new byte[1024]; | |||
byte[] buffer = new byte[DEFAULT_BUFFER_SIZE]; | |||
int bytesRead; | |||
InputStream is; | |||
JarEntry je = (JarEntry) e.nextElement(); | |||
@@ -802,7 +819,7 @@ public class WeblogicDeploymentTool extends GenericDeploymentTool { | |||
|| je.getCompressedSize() == je.getSize()) { | |||
newJarStream.setLevel(0); | |||
} else { | |||
newJarStream.setLevel(9); | |||
newJarStream.setLevel(JAR_COMPRESS_LEVEL); | |||
} | |||
// Update with changed Bean class | |||
@@ -23,6 +23,9 @@ import java.util.Hashtable; | |||
import org.apache.tools.ant.BuildException; | |||
import org.apache.tools.ant.Project; | |||
/** | |||
* Deployment tool for Weblogic TOPLink. | |||
*/ | |||
public class WeblogicTOPLinkDeploymentTool extends WeblogicDeploymentTool { | |||
private static final String TL_DTD_LOC | |||
@@ -53,6 +56,11 @@ public class WeblogicTOPLinkDeploymentTool extends WeblogicDeploymentTool { | |||
this.toplinkDTD = inString; | |||
} | |||
/** | |||
* Get the descriptor handler. | |||
* @param srcDir the source file. | |||
* @return the descriptor handler. | |||
*/ | |||
protected DescriptorHandler getDescriptorHandler(File srcDir) { | |||
DescriptorHandler handler = super.getDescriptorHandler(srcDir); | |||
if (toplinkDTD != null) { | |||
@@ -68,6 +76,8 @@ public class WeblogicTOPLinkDeploymentTool extends WeblogicDeploymentTool { | |||
/** | |||
* Add any vendor specific files which should be included in the | |||
* EJB Jar. | |||
* @param ejbFiles the hashtable to add files to. | |||
* @param ddPrefix the prefix to use. | |||
*/ | |||
protected void addVendorFiles(Hashtable ejbFiles, String ddPrefix) { | |||
super.addVendorFiles(ejbFiles, ddPrefix); | |||
@@ -59,6 +59,7 @@ import org.apache.tools.ant.util.FileUtils; | |||
* | |||
*/ | |||
public class WebsphereDeploymentTool extends GenericDeploymentTool { | |||
/** ID for ejb 1.1 */ | |||
public static final String PUBLICID_EJB11 | |||
= "-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 1.1//EN"; | |||
@@ -608,12 +609,7 @@ public class WebsphereDeploymentTool extends GenericDeploymentTool { | |||
} | |||
} | |||
/** | |||
* 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. | |||
*/ | |||
/** {@inheritDoc}. */ | |||
protected void writeJar(String baseName, File jarFile, Hashtable files, String publicId) | |||
throws BuildException { | |||
if (ejbdeploy) { | |||
@@ -782,7 +778,7 @@ public class WebsphereDeploymentTool extends GenericDeploymentTool { | |||
//Copy files from old websphere jar | |||
for (Enumeration e = wasEntries.elements(); e.hasMoreElements();) { | |||
byte[] buffer = new byte[1024]; | |||
byte[] buffer = new byte[DEFAULT_BUFFER_SIZE]; | |||
int bytesRead; | |||
InputStream is; | |||
JarEntry je = (JarEntry) e.nextElement(); | |||
@@ -791,7 +787,7 @@ public class WebsphereDeploymentTool extends GenericDeploymentTool { | |||
|| je.getCompressedSize() == je.getSize()) { | |||
newJarStream.setLevel(0); | |||
} else { | |||
newJarStream.setLevel(9); | |||
newJarStream.setLevel(JAR_COMPRESS_LEVEL); | |||
} | |||
// Update with changed Bean class | |||