@@ -45,11 +45,11 @@ import org.xml.sax.InputSource;
/**
The weblogic element is used to control the weblogic.ejbc compiler for
generating webl ogic EJB jars. Prior to Ant 1.3, the method of locating CMP
generating WebL ogic EJB jars. Prior to Ant 1.3, the method of locating CMP
descriptors was to use the ejbjar naming convention. So if your ejb-jar was
called, Customer-ejb-jar.xml, your webl ogic descriptor was called Customer-
called, Customer-ejb-jar.xml, your WebL ogic descriptor was called Customer-
weblogic-ejb-jar.xml and your CMP descriptor had to be Customer-weblogic-cmp-
rdbms-jar.xml. In addition, the <type-storage> element in the webl ogic
rdbms-jar.xml. In addition, the <type-storage> element in the WebL ogic
descriptor had to be set to the standard name META-INF/weblogic-cmp-rdbms-
jar.xml, as that is where the CMP descriptor was mapped to in the generated
jar.
@@ -61,23 +61,23 @@ public class WeblogicDeploymentTool extends GenericDeploymentTool {
/** EJB20 id */
public static final String PUBLICID_EJB20
= "-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN";
/** Webl ogic 5.1.0 id */
/** WebL ogic 5.1.0 id */
public static final String PUBLICID_WEBLOGIC_EJB510
= "-//BEA Systems, Inc.//DTD WebLogic 5.1.0 EJB//EN";
/** Webl ogic 6.0.0 id */
/** WebL ogic 6.0.0 id */
public static final String PUBLICID_WEBLOGIC_EJB600
= "-//BEA Systems, Inc.//DTD WebLogic 6.0.0 EJB//EN";
/** Webl ogic 7.0.0 id */
/** WebL ogic 7.0.0 id */
public static final String PUBLICID_WEBLOGIC_EJB700
= "-//BEA Systems, Inc.//DTD WebLogic 7.0.0 EJB//EN";
/** Webl ogic 5.1 dtd location */
/** WebL ogic 5.1 dtd location */
protected static final String DEFAULT_WL51_EJB11_DTD_LOCATION
= "/weblogic/ejb/deployment/xml/ejb-jar.dtd";
/** Webl ogic 6.0 ejb 1.1 dtd location */
/** WebL ogic 6.0 ejb 1.1 dtd location */
protected static final String DEFAULT_WL60_EJB11_DTD_LOCATION
= "/weblogic/ejb20/dd/xml/ejb11-jar.dtd";
/** Webl ogic 6.0 ejb 2.0 dtd location */
/** WebL ogic 6.0 ejb 2.0 dtd location */
protected static final String DEFAULT_WL60_EJB20_DTD_LOCATION
= "/weblogic/ejb20/dd/xml/ejb20-jar.dtd";
@@ -101,13 +101,13 @@ public class WeblogicDeploymentTool extends GenericDeploymentTool {
/** File utilities instance for copying jars */
private static final FileUtils FILE_UTILS = FileUtils.getFileUtils();
/** Instance variable that stores the suffix for the webl ogic jarfile. */
/** Instance variable that stores the suffix for the WebL ogic jarfile. */
private String jarSuffix = ".jar";
/** Instance variable that stores the location of the webl ogic DTD file. */
/** Instance variable that stores the location of the WebL ogic DTD file. */
private String weblogicDTD;
/** Instance variable that stores the location of the ejb 1.1 DTD file. */
/** Instance variable that stores the location of the EJB 1.1 DTD file. */
private String ejb11DTD;
/** Instance variable that determines whether generic ejb jars are kept. */
@@ -115,7 +115,7 @@ public class WeblogicDeploymentTool extends GenericDeploymentTool {
/**
* Instance variable that stores the fully qualified classname of the
* webl ogic EJBC compiler
* WebL ogic EJBC compiler
*/
private String ejbcClass = null;
@@ -138,7 +138,7 @@ public class WeblogicDeploymentTool extends GenericDeploymentTool {
/** Indicates if the old CMP location convention is to be used. */
private boolean newCMP = false;
/** The classpath to the webl ogic classes. */
/** The classpath to the WebL ogic classes. */
private Path wlClasspath = null;
/** System properties for the JVM. */
@@ -162,7 +162,7 @@ public class WeblogicDeploymentTool extends GenericDeploymentTool {
}
/**
* Get the classpath to the webl ogic classpaths.
* Get the classpath to the WebL ogic classpaths.
* @return the classpath to configure.
*/
public Path createWLClasspath() {
@@ -184,9 +184,9 @@ public class WeblogicDeploymentTool extends GenericDeploymentTool {
/**
* Optional classpath to WL6.0.
* Webl ogic 6.0 will give a warning if the home and remote interfaces
* WebL ogic 6.0 will give a warning if the home and remote interfaces
* of a bean are on the system classpath used to run weblogic.ejbc.
* In that case, the standard webl ogic classes should be set with
* In that case, the standard WebL ogic classes should be set with
* this attribute (or equivalent nested element) and the
* home and remote interfaces located with the standard classpath
* attribute.
@@ -246,7 +246,7 @@ public class WeblogicDeploymentTool extends GenericDeploymentTool {
}
/**
* Setter used to store the suffix for the generated webl ogic jar file.
* Setter used to store the suffix for the generated WebL ogic jar file.
*
* @param inString the string to use as the suffix.
*/
@@ -265,7 +265,7 @@ public class WeblogicDeploymentTool extends GenericDeploymentTool {
}
/**
* Controls whether webl ogic will keep the generated Java
* Controls whether WebL ogic will keep the generated Java
* files used to build the class files added to the
* jar. This can be useful when debugging; default is false.
*
@@ -285,7 +285,7 @@ public class WeblogicDeploymentTool extends GenericDeploymentTool {
}
/**
* Set any additional arguments to pass to the webl ogic JVM; optional.
* Set any additional arguments to pass to the WebL ogic JVM; optional.
* @param args the arguments to be passed to the JVM
*/
public void setJvmargs(String args) {
@@ -296,7 +296,7 @@ public class WeblogicDeploymentTool extends GenericDeploymentTool {
* Set the classname of the ejbc compiler; optional
* Normally ejbjar determines
* the appropriate class based on the DTD used for the EJB. The EJB 2.0 compiler
* featured in webl ogic 6 has, however, been deprecated in version 7. When
* featured in WebL ogic 6 has, however, been deprecated in version 7. When
* using with version 7 this attribute should be set to
* "weblogic.ejbc" to avoid the deprecation warning.
* @param ejbcClass the name of the class to use.
@@ -315,7 +315,7 @@ public class WeblogicDeploymentTool extends GenericDeploymentTool {
/**
* <b>Deprecated</b>. Defines the location of the ejb-jar DTD in
* the webl ogic class hierarchy. Should not be needed, and the
* the WebL ogic class hierarchy. Should not be needed, and the
* nested <dtd> element is recommended when it is.
*
* @param inString the string to use as the DTD location.
@@ -325,8 +325,8 @@ public class WeblogicDeploymentTool extends GenericDeploymentTool {
}
/**
* <b>Deprecated</b>. Defines the location of webl ogic DTD in
* the webl ogic class hierarchy. Should not be needed, and the
* <b>Deprecated</b>. Defines the location of WebL ogic DTD in
* the WebL ogic class hierarchy. Should not be needed, and the
* nested <dtd> element is recommended when it is.
*
* @param inString the string to use as the DTD location.
@@ -337,7 +337,7 @@ public class WeblogicDeploymentTool extends GenericDeploymentTool {
/**
* <b>Deprecated</b>. Defines the location of Sun's EJB DTD in
* the webl ogic class hierarchy. Should not be needed, and the
* the WebL ogic class hierarchy. Should not be needed, and the
* nested <dtd> element is recommended when it is.
*
* @param inString the string to use as the DTD location.
@@ -360,10 +360,10 @@ public class WeblogicDeploymentTool extends GenericDeploymentTool {
* CMP descriptors will be used; optional, default false.
* <P>
* The old CMP scheme locates the
* webl ogic CMP descriptor based on the naming convention where the
* webl ogic CMP file is expected to be named with the bean name as the
* WebL ogic CMP descriptor based on the naming convention where the
* WebL ogic CMP file is expected to be named with the bean name as the
* prefix. Under this scheme the name of the CMP descriptor does not match
* the name actually used in the main webl ogic EJB descriptor. Also,
* the name actually used in the main WebL ogic EJB descriptor. Also,
* descriptors which contain multiple CMP references could not be used.
* @param newCMP a <code>boolean</code> value.
*/
@@ -394,7 +394,7 @@ public class WeblogicDeploymentTool extends GenericDeploymentTool {
}
/**
* Get the webl ogic descriptor handler.
* Get the WebL ogic descriptor handler.
* @param srcDir the source directory.
* @return the descriptor.
*/
@@ -452,14 +452,14 @@ public class WeblogicDeploymentTool extends GenericDeploymentTool {
log("The old method for locating CMP files has been DEPRECATED.", Project.MSG_VERBOSE);
log("Please adjust your weblogic descriptor and set newCMP=\"true\" to use the new CMP descriptor inclusion mechanism. ",
Project.MSG_VERBOSE);
// The the weblogic cmp deployment descriptor
// The the WebLogic CMP deployment descriptor
File weblogicCMPDD = new File(getConfig().descriptorDir, ddPrefix + WL_CMP_DD);
if (weblogicCMPDD.exists()) {
ejbFiles.put(META_DIR + WL_CMP_DD, weblogicCMPDD);
}
} else {
// now that we have the webl ogic descriptor, we parse the file
// now that we have the WebL ogic descriptor, we parse the file
// to find other descriptors needed to deploy the bean.
// this could be the weblogic-cmp-rdbms.xml or any other O/R
// mapping tool descriptors.
@@ -641,27 +641,27 @@ public class WeblogicDeploymentTool extends GenericDeploymentTool {
}
/**
* Helper method to check to see if a weblogic EBJ 1.1 jar needs to be
* Helper method to check to see if a WebLogic EJB 1.1 jar needs to be
* rebuilt using ejbc. Called from writeJar it sees if the "Bean" classes
* are the only thing that needs to be updated and either updates the Jar
* with the Bean classfile or returns true, saying that the whole webl ogic
* jar needs to be regened with ejbc. This allows faster build times for
* with the Bean classfile or returns true, saying that the whole WebL ogic
* jar needs to be regenerate d with ejbc. This allows faster build times for
* working developers. <p>
*
* The way webl ogic ejbc works is it creates wrappers for the publicly
* The way WebL ogic ejbc works is it creates wrappers for the publicly
* defined methods as they are exposed in the remote interface. If the
* actual bean changes without changing the the method signatures then
* only the bean classfile needs to be updated and the rest of the
* webl ogic jar file can remain the same. If the Interfaces, ie. the
* WebL ogic jar file can remain the same. If the Interfaces, ie. the
* method signatures change or if the xml deployment descriptors changed,
* the whole jar needs to be rebuilt with ejbc. This is not strictly true
* for the xml files. If the JNDI name changes then the jar doesn't have to
* be rebuild, but if the resources references change then it does. At
* this point the webl ogic jar gets rebuilt if the xml files change at
* this point the WebL ogic jar gets rebuilt if the xml files change at
* all.
*
* @param genericJarFile java.io.File The generic jar file.
* @param weblogicJarFile java.io.File The webl ogic jar file to check to
* @param weblogicJarFile java.io.File The WebL ogic jar file to check to
* see if it needs to be rebuilt.
* @return true if the jar needs to be rebuilt.
*/
@@ -678,7 +678,7 @@ public class WeblogicDeploymentTool extends GenericDeploymentTool {
try {
log("Checking if weblogic Jar needs to be rebuilt for jar " + weblogicJarFile.getName(),
Project.MSG_VERBOSE);
// Only go forward if the generic and the webl ogic file both exist
// Only go forward if the generic and the WebL ogic file both exist
if (genericJarFile.exists() && genericJarFile.isFile()
&& weblogicJarFile.exists() && weblogicJarFile.isFile()) {
//open jar files
@@ -694,13 +694,13 @@ public class WeblogicDeploymentTool extends GenericDeploymentTool {
JarEntry je = e.nextElement();
genericEntries.put(je.getName().replace('\\', '/'), je);
}
//get the list of webl ogic jar entries
// get the list of WebL ogic jar entries
for (Enumeration<JarEntry> e = wlJar.entries(); e.hasMoreElements();) {
JarEntry je = e.nextElement();
wlEntries.put(je.getName(), je);
}
//Cycle Through generic and make sure its in webl ogic
// Cycle through generic and make sure its in WebL ogic
genericLoader = getClassLoaderFromJar(genericJarFile);
for (Enumeration<String> e = genericEntries.keys(); e.hasMoreElements();) {
@@ -765,7 +765,7 @@ public class WeblogicDeploymentTool extends GenericDeploymentTool {
newJarStream = new JarOutputStream(Files.newOutputStream(newWLJarFile.toPath()));
newJarStream.setLevel(0);
//Copy files from old webl ogic jar
// Copy files from old WebL ogic jar
for (Enumeration<JarEntry> e = wlEntries.elements(); e.hasMoreElements();) {
JarEntry je = e.nextElement();
@@ -785,7 +785,7 @@ public class WeblogicDeploymentTool extends GenericDeploymentTool {
je = replaceEntries.get(je.getName());
is = genericJar.getInputStream(je);
} else {
//use fle from original webl ogic jar
//use file from original WebL ogic jar
is = wlJar.getInputStream(je);
}