ehatcher 2002/06/23 19:25:03
Modified: src/main/org/apache/tools/ant/taskdefs/optional/ejb Tag:
ANT_15_BRANCH WLRun.java WLStop.java
Log:
minor conflict with Steve
Revision Changes Path
No revision
No revision
1.19.2.2 +54 -54
jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/ejb/WLRun.java
Index: WLRun.java
===================================================================
RCS file:
/home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/ejb/WLRun.java,v
retrieving revision 1.19.2.1
retrieving revision 1.19.2.2
diff -u -r1.19.2.1 -r1.19.2.2
--- WLRun.java 24 Jun 2002 01:39:57 -0000 1.19.2.1
+++ WLRun.java 24 Jun 2002 02:25:03 -0000 1.19.2.2
@@ -1,7 +1,7 @@
/*
* The Apache Software License, Version 1.1
*
- * Copyright (c) 2000-2002 The Apache Software Foundation. All rights
+ * Copyright (c) 2000-2002 The Apache Software Foundation. All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -63,7 +63,7 @@
import java.io.File;
/**
- * Execute a Weblogic server.
+ * Starts a WebLogic server.
* A number of parameters are used to control the operation of the weblogic
instance. Note that the task,
* and hence ant, will not complete until the weblogic instance is
stopped.</p>
*
@@ -86,17 +86,17 @@
private Path weblogicClasspath;
private String weblogicMainClass = "weblogic.Server";
-
+
/**
* Addional arguments to pass to the JVM used to run weblogic
*/
private String additionalArgs = "";
-
+
/**
* The security policy to use when running the weblogic server
*/
private String securityPolicy;
-
+
/**
* The weblogic system home directory
*/
@@ -106,13 +106,13 @@
* The weblogic domain
*/
private String weblogicDomainName;
-
+
/**
- * The name of the weblogic server - used to select the server's
directory in the
+ * The name of the weblogic server - used to select the server's
directory in the
* weblogic home directory.
*/
private String weblogicSystemName = "myserver";
-
+
/**
* The file containing the weblogic properties for this server.
*/
@@ -133,7 +133,7 @@
* The management username
*/
private String managementUsername = "system";
-
+
/**
* The management password
*/
@@ -167,10 +167,10 @@
/**
* Do the work.
*
- * The work is actually done by creating a separate JVM to run a helper
task.
- * This approach allows the classpath of the helper task to be set.
Since the
- * weblogic tools require the class files of the project's home and
remote
- * interfaces to be available in the classpath, this also avoids having
to
+ * The work is actually done by creating a separate JVM to run a helper
task.
+ * This approach allows the classpath of the helper task to be set.
Since the
+ * weblogic tools require the class files of the project's home and
remote
+ * interfaces to be available in the classpath, this also avoids having
to
* start ant with the class path of the project it is building.
*
* @exception BuildException if someting goes wrong with the build
@@ -180,7 +180,7 @@
throw new BuildException("weblogic home must be set");
}
if (!weblogicSystemHome.isDirectory()) {
- throw new BuildException("weblogic home directory " +
weblogicSystemHome.getPath() +
+ throw new BuildException("weblogic home directory " +
weblogicSystemHome.getPath() +
" is not valid");
}
@@ -190,7 +190,7 @@
executeWLS();
}
}
-
+
private File findSecurityPolicyFile(String defaultSecurityPolicy) {
String securityPolicy = this.securityPolicy;
if (securityPolicy == null) {
@@ -209,22 +209,22 @@
}
return securityPolicyFile;
}
-
+
private void executeWLS6() {
- File securityPolicyFile
+ File securityPolicyFile
= findSecurityPolicyFile(DEFAULT_WL60_POLICY_FILE);
if (!beaHome.isDirectory()) {
- throw new BuildException("BEA home " + beaHome.getPath() +
+ throw new BuildException("BEA home " + beaHome.getPath() +
" is not valid");
}
-
- File configFile = new File(weblogicSystemHome, "config/"
+
+ File configFile = new File(weblogicSystemHome, "config/"
+ weblogicDomainName + "/config.xml");
if (!configFile.exists()) {
- throw new BuildException("Server config file " + configFile
+ throw new BuildException("Server config file " + configFile
+ " not found.");
}
-
+
if (managementPassword == null) {
throw new BuildException("You must supply a management password
to start the server");
}
@@ -236,38 +236,38 @@
weblogicServer.setClassname(weblogicMainClass);
String jvmArgs = additionalJvmArgs;
-
+
jvmArgs += " -Dweblogic.Domain=" + weblogicDomainName;
jvmArgs += " -Dweblogic.Name=" + weblogicSystemName;
jvmArgs += " -Dweblogic.system.home=" + weblogicSystemHome;
jvmArgs += " -Dbea.home=" + beaHome;
jvmArgs += " -Djava.security.policy==" + securityPolicyFile;
-
+
jvmArgs += " -Dweblogic.management.username=" + managementUsername;
jvmArgs += " -Dweblogic.management.password=" + managementPassword;
if (pkPassword != null) {
jvmArgs += " -Dweblogic.pkpassword=" + pkPassword;
}
-
+
weblogicServer.createJvmarg().setLine(jvmArgs);
weblogicServer.createArg().setLine(additionalArgs);
-
+
if (classpath != null) {
- weblogicServer.setClasspath(classpath);
+ weblogicServer.setClasspath(classpath);
}
-
- if (weblogicServer.executeJava() != 0) {
+
+ if (weblogicServer.executeJava() != 0) {
throw new BuildException("Execution of weblogic server failed");
}
}
-
+
private void executeWLS() {
- File securityPolicyFile
+ File securityPolicyFile
= findSecurityPolicyFile(DEFAULT_WL51_POLICY_FILE);
File propertiesFile = null;
-
+
if (weblogicPropertiesFile == null) {
weblogicPropertiesFile = DEFAULT_PROPERTIES_FILE;
@@ -280,7 +280,7 @@
throw new BuildException("Properties file " +
weblogicPropertiesFile +
" not found in weblogic home " +
weblogicSystemHome +
" or as absolute file");
- }
+ }
}
Java weblogicServer = (Java) project.createTask("java");
@@ -289,11 +289,11 @@
weblogicServer.setClassname(weblogicMainClass);
String jvmArgs = additionalJvmArgs;
-
+
if (weblogicClasspath != null) {
jvmArgs += " -Dweblogic.class.path=" + weblogicClasspath;
}
-
+
jvmArgs += " -Djava.security.manager -Djava.security.policy==" +
securityPolicyFile;
jvmArgs += " -Dweblogic.system.home=" + weblogicSystemHome;
jvmArgs += " -Dweblogic.system.name=" + weblogicSystemName;
@@ -301,28 +301,28 @@
weblogicServer.createJvmarg().setLine(jvmArgs);
weblogicServer.createArg().setLine(additionalArgs);
-
+
if (classpath != null) {
- weblogicServer.setClasspath(classpath);
+ weblogicServer.setClasspath(classpath);
}
- if (weblogicServer.executeJava() != 0) {
+ if (weblogicServer.executeJava() != 0) {
throw new BuildException("Execution of weblogic server failed");
}
}
-
+
/**
* The classpath to be used with the Java Virtual Machine that runs the
Weblogic
* Server; required. Prior to Weblogic 6.0, this is typically set to the
Weblogic
* boot classpath. Under Weblogic 6.0 this should include all the
* weblogic jars
*
- * @param s the classpath to use when executing the weblogic server.
+ * @param classpath the classpath to use when executing the weblogic
server.
*/
public void setClasspath(Path classpath) {
this.classpath = classpath;
}
-
+
/**
* Set the weblogic classpath used by the Weblogic Server;
* optional, and only applicable to WL4.5.1
@@ -334,7 +334,7 @@
public void setWlclasspath(Path weblogicClasspath) {
this.weblogicClasspath = weblogicClasspath;
}
-
+
/**
* The name of the security policy file within the weblogic home
directory that
* is to be used. If not specified, the default policy file
<code>weblogic.policy</code>
@@ -345,7 +345,7 @@
public void setPolicy(String securityPolicy) {
this.securityPolicy = securityPolicy;
}
-
+
/**
* The location where weblogic lives.
* Required. This is the absolute location, not relative to
@@ -358,7 +358,7 @@
}
/**
- * The location of the BEA Home; implicitly
+ * The location of the BEA Home; implicitly
* selects Weblogic 6.0; optional.
*
* @param beaHome the BEA Home directory.
@@ -367,17 +367,17 @@
public void setBEAHome(File beaHome) {
this.beaHome = beaHome;
}
-
+
/**
* The name of the weblogic server within the weblogic home which is to
be run.
* Optiona, defaults to "myserver"
*
- * @param systemName the name of the server.
+ * @param serverName the name of the server.
*/
public void setName(String serverName) {
this.weblogicSystemName = serverName;
}
-
+
/**
* Set the Domain to run in; required for WL6.0
*
@@ -386,10 +386,10 @@
public void setDomain(String domain) {
this.weblogicDomainName = domain;
}
-
+
/**
* The name of the server's properties file within the weblogic home
directory
- * used to control the weblogic instance;
+ * used to control the weblogic instance;
* required for WL4.5.1
*
*
@@ -406,9 +406,9 @@
public void setJvmargs(String args) {
this.additionalJvmArgs = args;
}
-
+
/**
- * Set the management username to run the server;
+ * Set the management username to run the server;
* optional and only applicable to WL6.0.
*
* @param username the management username of the server.
@@ -416,7 +416,7 @@
public void setUsername(String username) {
this.managementUsername = username;
}
-
+
/**
* Set the management password of the server;
@@ -426,7 +426,7 @@
public void setPassword(String password) {
this.managementPassword = password;
}
-
+
/**
* Set the private key password so the server can decrypt the SSL
private key file;
* optional and only applicable to WL6.0.
@@ -435,7 +435,7 @@
public void setPKPassword(String pkpassword) {
this.pkPassword = pkpassword;
}
-
+
/**
* Additional argument string passed to the Weblogic instance;
* optional.
1.11.2.2 +6 -6
jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/ejb/WLStop.java
Index: WLStop.java
===================================================================
RCS file:
/home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/ejb/WLStop.java,v
retrieving revision 1.11.2.1
retrieving revision 1.11.2.2
diff -u -r1.11.2.1 -r1.11.2.2
--- WLStop.java 24 Jun 2002 01:39:57 -0000 1.11.2.1
+++ WLStop.java 24 Jun 2002 02:25:03 -0000 1.11.2.2
@@ -62,9 +62,9 @@
import org.apache.tools.ant.types.Path;
/**
- * Shutdown a Weblogic server.
+ * Shuts down a WebLogic server.
* To shut down an instance you must supply both a username and
- * a password.
+ * a password.
*
* @author Conor MacNeill, Cortex ebusiness Pty Limited
*/
@@ -138,9 +138,9 @@
/**
* The classpath to be used with the Java Virtual Machine that runs the
Weblogic
- * Shutdown command;
+ * Shutdown command;
*
- * @param s the classpath to use when executing the weblogic admin task.
+ * @param path the classpath to use when executing the weblogic admin
task.
*/
public void setClasspath(Path path) {
this.classpath = path;
@@ -148,7 +148,7 @@
/**
* The classpath to be used with the Java Virtual Machine that runs the
Weblogic
- * Shutdown command;
+ * Shutdown command;
*/
public Path createClasspath() {
if (classpath == null) {
@@ -199,7 +199,7 @@
}
/**
- * The location of the BEA Home; implicitly
+ * The location of the BEA Home; implicitly
* selects Weblogic 6.0 shutdown; optional.
*
* @param beaHome the BEA Home directory.
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>