Methods Summary |
---|
public org.apache.tools.ant.types.Path | createClasspath()The classpath to be used with the Java Virtual Machine that runs the Weblogic
Shutdown command;
if (classpath == null) {
classpath = new Path(getProject());
}
return classpath.createPath();
|
public void | execute()Do the work.
The work is actually done by creating a separate JVM to run the weblogic admin task
This approach allows the classpath of the helper task to be set.
if (username == null || password == null) {
throw new BuildException("weblogic username and password must both be set");
}
if (serverURL == null) {
throw new BuildException("The url of the weblogic server must be provided.");
}
Java weblogicAdmin = new Java(this);
weblogicAdmin.setFork(true);
weblogicAdmin.setClassname("weblogic.Admin");
String args;
if (beaHome == null) {
args = serverURL + " SHUTDOWN " + username + " " + password + " " + delay;
} else {
args = " -url " + serverURL
+ " -username " + username
+ " -password " + password
+ " SHUTDOWN " + " " + delay;
}
weblogicAdmin.createArg().setLine(args);
weblogicAdmin.setClasspath(classpath);
weblogicAdmin.execute();
|
public void | setBEAHome(java.io.File beaHome)The location of the BEA Home; implicitly
selects Weblogic 6.0 shutdown; optional.
this.beaHome = beaHome;
|
public void | setClasspath(org.apache.tools.ant.types.Path path)The classpath to be used with the Java Virtual Machine that runs the Weblogic
Shutdown command;
this.classpath = path;
|
public void | setDelay(java.lang.String s)Set the delay (in seconds) before shutting down the server;
optional.
delay = Integer.parseInt(s);
|
public void | setPassword(java.lang.String s)The password for the account specified in the
user parameter; required
this.password = s;
|
public void | setUrl(java.lang.String s)Set the URL to which the weblogic server is listening
for T3 connections; required.
this.serverURL = s;
|
public void | setUser(java.lang.String s)The username of the account which will be used to shutdown the server;
required.
this.username = s;
|