BEA Systems, Inc.

WebLogic Server 8.1 API Reference

weblogic.management.runtime
Interface DeployerRuntimeMBean

All Known Implementing Classes:
DeployerRuntime

public interface DeployerRuntimeMBean
extends weblogic.management.runtime.RuntimeMBean

This MBean is the user API for initiating deployment requests and exists only on an Admin Server. To access this MBean use DeployerRuntime.getDeployerRuntime().

The deployment methods in this MBean provide access to the 2 phase deployment protocol. This protocol is only supported on WLS 7.x servers and later. If no target servers in an activate request are known to be pre-release 7 servers, then the 2 phase protocol is used. Otherwise the deployment will use the WLS 6.x deployment protocol, even if some target servers are at release 7.

The deployment process involves a number of state changes: start<-->staged<-->prepared<-->active. The methods in this MBean provide the means for changing the state of an application, as follows:

activate: places application in active state from any other state

deactivate: places application in prepared state from active state

unprepare: places application in staged state from active and prepared state

remove: places application in start state from any other state

Activating An Application

The basic process of deploying an application is shown in the following example:

 
 DeployerRuntimeMBean deployer = getDeployerRuntime(userName, password, adminURL);
 try {
   DeploymentTaskRuntimeMBean task = deployer.activate(sourceFile,
                                                       appName,
                                                       staging,
                                                       info,
                                                       id);
 } catch (ManagementException me) {
   System.out.println("Deployment failed: "+me.getMessage());
 }
 
 

In this example, sourceFile is the path to the application. If the application is an EAR, then sourceFile would name the EAR archive or the root directory if it is not archived. Similarly, if the application is not an EAR, but a standalone module (web app or EJB), the sourceFile argument would be the path to the module archive or directory.

The sourceFile argument can be null, indicating that this is a redeployment and that the source is unchanged from a previous deployment.

The appName argument is the name to be given to the application. If this is a new deployment, an ApplicationMBean is created. For redeployments, an existing ApplicationMBean with appName is used as the application's configured state.

The info argument is a DeploymentData object which is used to qualify the deployment in terms of targets of the deployment and an optional list of files which are to be refreshed during a redeploy.

The staging argument is used to specify whether the application is to be staged to the target servers. This argument may be null (use ServerMBean.getStagingMode()), "stage", or "nostage". Staging is the process of uploading the application file to the target servers' staging area, defined in ServerMBean.getStagingDirectoryName().

The id argument allows the caller to name the deployment task. Care should be taken here as the tag must be unique. The recommendation is to generally use null for this argument, allowing the system to generate a unique tag.

The deployment process runs asynchronously to the invoker; it will initiate the task then return the DeploymentTaskRuntimeMBean object representing the task to the client. This object may be used to track status of the task. If the client wants to wait until the task completes then the following is a basic method for doing this.

 
 while (task.isRunning()) {
   try {
     Thread.sleep(oneSecond);
   } catch (InterruptedException ie) {}
 }
 
 

Cancelling A Deployment

Note that a task will not complete until all targets have either completed the deployment or failed. If one of the targets is inactive, the task will remain active until the server starts or the task is cancelled. Cancelling a deployment task is accomplished as follows:

 
 if (task.isRunning()) {
   try {
     task.cancel();
   } catch (Exception e) {}
 }
 
 

Targeting Specific Servers

The folowing examples show how to be more specific when targeting a deployment.

 
 DeploymentData info = new DeploymentData();
 info.addTarget(server1,null); // adds server1 as target for all modules in app
 String[] mods = { "web-module","ejb" };
 info.addTarget(server2,mods); //adds server2 as target for modules web-module and ejb
 deployer.activate(sourceFile, appName, info, null, null);


 // refreshes the hello.jsp file on all currently targeted servers. The "jsps" directory is
 // relative to the root of the application.
 String[] files = { "jsps/hello.jsp" };
 DeploymentData info = new DeploymentData(files);
 deployer.activate(null, appName, null, info, null);

 
 

Deactivating An Application

To deactivate an application is to suspend it. The application files remain staged on the target servers, and can be reactivated without restaging. It should be noted that deactivating an application does not unload any of its classes. To do so requires an unprepare operation (see below). The following example show appName being deactivated, then subsequently reactivated on all configured servers.

 
 deployer.deactivate(appName, null, null);
 . . .
 deployer.activate(null, appName, null, null, null);

 
 

Unpreparing An Application

To unprepare an application is to suspend and unload it. The application files remain staged on the target servers, and any relevant classes are unloaded. If the application is to be reactivated with new class files, unprepare is the correct approach, rather than deactivate. The following example show appName being unprepared, then subsequently reactivated on all configured servers.

 
 deployer.unprepare(appName, null, null);
 . . .
 deployer.activate(sourceFile, appName, null, null, null);

 
 

Removing An Application

Removing an application involves deactivation, unstaging and possible removal of the application. After removing an application from a managed server it is deconfigured from that server. If no servers remain targeted by the application, the entire configuration of the application is removed. Removal does not touch the application source, but will remove staged copies of the application.

 
 // this completely removes an application from the domain configuration
 deployer.remove(appName, null, null);
 
 

Tracking Deployment Status

Once initiated, a deployment task can be monitored via notifications or polling. Use of notifications relies on JMX Notifications on the relevant ApplicationMBean and is accomplished as follows:

 
 package examples.deploy;

 import java.io.Serializable;
 import javax.management.MBeanServer;
 import javax.management.Notification;
 import javax.management.NotificationFilter;
 import weblogic.management.DeploymentNotification;
 import weblogic.management.Helper;
 import weblogic.management.MBeanHome;
 import weblogic.management.RemoteNotificationListener;
 import weblogic.management.configuration.ApplicationMBean;
 import weblogic.management.deploy.DeploymentData;
 import weblogic.management.deploy.DeployerRuntime;
 import weblogic.management.runtime.DeployerRuntimeMBean;
 import weblogic.management.runtime.DeploymentTaskRuntimeMBean;

 //
 //
 // This example activates and application and prints the resulting notifications
 // generated during the processing of the deployment. The args passed to this
 // program are:
 // arg1: userid
 // arg2: password
 // arg3: admin URL
 // arg4: app name
 // arg5: app source
 // arg6: target server
 //
 //

 public class Activater implements Serializable {

   private static String userid;
   private static String password;
   private static String url;
   private static String name;
   private static String source;
   private static String server;

   void deploy() {
     try {
       // Get access to MBeanHome
       MBeanHome home = Helper.getAdminMBeanHome(userid, password, url);
       // Get the deployer
       DeployerRuntimeMBean deployer = DeployerRuntime.getDeployerRuntime(home);
       // Build the DeploymentData object
       DeploymentData info = new DeploymentData();
       info.addTarget(server, null);
       // Create the deployment task. Last arg indicates to just create the task, but not initiate it
       DeploymentTaskRuntimeMBean task = deployer.activate(source,name,null,info,null,false);
       // Register for notifications
       ApplicationMBean app = task.getDeploymentObject();
       MBeanServer mBeanServer = home.getMBeanServer();
       mBeanServer.addNotificationListener( app.getObjectName(),
                                            new DeployListener(),
                                            new DeployFilter(),
                                            null );
       // Start the task
       task.start();
       System.out.println(task.getDescription());
       // wait until finished
       while (task.isRunning()) {
         try {
           Thread.sleep(1000);
         } catch (InterruptedException ie) {
           System.out.println(task.getStatus());
         }
       }
     } catch (Exception e) {
       System.out.println(e.getMessage());
     }
   }


   public static void main(String[] argv) throws Exception {
     if (argv.length == 6) {
       userid = argv[0];
       password = argv[1];
       url = argv[2];
       name = argv[3];
       source = argv[4];
       server = argv[5];
       Activater activater = new Activater();
       activater.deploy();
       System.exit(0);
     }
   }

   // Inner classes for handling notifications
   class DeployListener implements RemoteNotificationListener {

     public void handleNotification(Notification notification, java.lang.Object handback)
     {
       System.out.println( notification.getMessage() );
     }
   };


   // inner class for filtering notifications
   class DeployFilter implements NotificationFilter, Serializable {

     public boolean isNotificationEnabled( Notification n )
     {
       return ( n instanceof DeploymentNotification );
     }

   }
 }

 
 

Author:
Copyright © 2002 BEA Systems, Inc. All Rights Reserved.

Field Summary
static java.lang.String DEPLOYER_NAME
          Name of this singleton mbean
 
Method Summary
 DeploymentTaskRuntimeMBean activate(java.lang.String source, java.lang.String name, java.lang.String stagingMode, DeploymentData info, java.lang.String id)
          Activate a deployment.
 DeploymentTaskRuntimeMBean activate(java.lang.String source, java.lang.String name, java.lang.String stagingMode, DeploymentData info, java.lang.String id, boolean startTask)
          Same functionality as activate(String, String, String, DeploymentData, String) except that control is given back to caller without actually initiating the task, when startTask is false.
 DeploymentTaskRuntimeMBean deactivate(java.lang.String name, DeploymentData info, java.lang.String id)
          Deactivate a deployment.
 DeploymentTaskRuntimeMBean deactivate(java.lang.String name, DeploymentData info, java.lang.String id, boolean startTask)
          Same functionality as deactivate(String, DeploymentData, String) except that control is given back to caller without actually initiating the task, when startTask is false.
 DeploymentTaskRuntimeMBean deploy(java.lang.String source, java.lang.String name, java.lang.String stagingMode, DeploymentData info, java.lang.String id)
          deploys application on target(s).
 DeploymentTaskRuntimeMBean deploy(java.lang.String source, java.lang.String name, java.lang.String stagingMode, DeploymentData info, java.lang.String id, boolean startTask)
          Same functionality as #deploy(String, DeploymentData, String) except that control is given back to caller without actually initiating the task, when startTask is false.
 DeploymentTaskRuntimeMBean distribute(java.lang.String source, java.lang.String name, DeploymentData info, java.lang.String id)
          Distributes application files on targets.
 DeploymentTaskRuntimeMBean distribute(java.lang.String source, java.lang.String name, DeploymentData info, java.lang.String id, boolean startTask)
          Same functionality as distribute(String source, String, DeploymentData, String) except that control is given back to caller without actually initiating the task, when startTask is false.
 DeploymentTaskRuntimeMBean[] list()
          Return array of all known deployment tasks
 TargetMBean[] lookupActiveTargetsForComponent(ComponentMBean comp)
          Provides list of targets where a module/component is currently active.
 VirtualHostMBean[] lookupActiveVirtualHostsFor(WebDeploymentMBean comp)
          Provides list of virtual hosts where a WebDeployment is currently active.
 DeploymentTaskRuntimeMBean query(java.lang.String id)
          locates a deployment task based on the deployment id.
 DeploymentTaskRuntimeMBean redeploy(java.lang.String name, DeploymentData info, java.lang.String id)
          Redeploys application on target(s).
 DeploymentTaskRuntimeMBean redeploy(java.lang.String name, DeploymentData info, java.lang.String id, boolean startTask)
          Same functionality as redeploy(String, DeploymentData, String) except that control is given back to caller without actually initiating the task, when startTask is false.
 DeploymentTaskRuntimeMBean remove(java.lang.String name, DeploymentData info, java.lang.String id)
          Removes a deployment.
 DeploymentTaskRuntimeMBean remove(java.lang.String name, DeploymentData info, java.lang.String id, boolean startTask)
          Same functionality as remove(String, DeploymentData, String) except that control is given back to caller without actually initiating the task, when startTask is false.
 DeploymentTaskRuntimeMBean start(java.lang.String name, DeploymentData info, java.lang.String id)
          Starts an already distributed application on target(s).
 DeploymentTaskRuntimeMBean start(java.lang.String name, DeploymentData info, java.lang.String id, boolean startTask)
          Same functionality as start(String, DeploymentData, String) except that control is given back to caller without actually initiating the task, when startTask is false.
 DeploymentTaskRuntimeMBean stop(java.lang.String name, DeploymentData info, java.lang.String id)
          Stops application on target(s).
 DeploymentTaskRuntimeMBean stop(java.lang.String name, DeploymentData info, java.lang.String id, boolean startTask)
          Same functionality as stop(String, DeploymentData, String) except that control is given back to caller without actually initiating the task, when startTask is false.
 DeploymentTaskRuntimeMBean undeploy(java.lang.String name, DeploymentData info, java.lang.String id)
          undeploys application on target(s).
 DeploymentTaskRuntimeMBean undeploy(java.lang.String name, DeploymentData info, java.lang.String id, boolean startTask)
          Same functionality as undeploy(String, DeploymentData, String) except that control is given back to caller without actually initiating the task, when startTask is false.
 DeploymentTaskRuntimeMBean unprepare(java.lang.String name, DeploymentData info, java.lang.String id)
          Deactivate and unload a deployment.
 DeploymentTaskRuntimeMBean unprepare(java.lang.String name, DeploymentData info, java.lang.String id, boolean startTask)
          Same functionality as unprepare(String, DeploymentData, String) except that control is given back to caller without actually initiating the task, when startTask is false.
 
Methods inherited from interface weblogic.management.WebLogicMBean
getMBeanInfo, getName, getObjectName, getParent, getType, isCachingDisabled, isRegistered, setName, setParent
 
Methods inherited from interface javax.management.DynamicMBean
getAttribute, getAttributes, invoke, setAttribute, setAttributes
 
Methods inherited from interface javax.management.MBeanRegistration
postDeregister, postRegister, preRegister
 
Methods inherited from interface javax.management.NotificationBroadcaster
addNotificationListener, getNotificationInfo, removeNotificationListener
 

Field Detail

DEPLOYER_NAME

public static final java.lang.String DEPLOYER_NAME
Name of this singleton mbean
Method Detail

activate

public DeploymentTaskRuntimeMBean activate(java.lang.String source,
                                           java.lang.String name,
                                           java.lang.String stagingMode,
                                           DeploymentData info,
                                           java.lang.String id)
                                    throws ManagementException
Activate a deployment. The deployment is extended to the relevant J2EE containers and subsystems. An ApplicationMBean is created if necessary and initialized prior to initiating the deployment for new deployments. If the application is already configured it is expected to be correctly defined. Activate covers new deployments, redeployments and refreshes.

If the source argument is a valid path to an EAR or module, the application files will be distributed, as necessary, to the target servers. If the source argument is null, then the application must already be configured with a valid path.

The name argument must always be specified (not null). If there is already an application configured with this name, then the deployment will be based on that application. Otherwise, this is a new deployment and an ApplicationMBean will be created and fully configured based on the application descriptors found in the archive or directory named by the source argument. If this is a new deployment, the source argument cannot be null.

The stagingMode argument can be used to override the staging attribute of the targeted servers. If this argument is null, the application will be staged to each server if that server is configured to be staged. If stagingMode is "stage" or "nostage" then the application will be staged or not staged, respectively, to each server, regardless of the server's configuration. If the staging mode is "external_stage", the application files are not staged by the server, rather the user is expected to place them in the staging area.

The info argument is used to qualify the deployment. If null, the deployment will apply to the application's configured target servers. If info is not null, then it names a list of servers, each of which can be further qualified by module names. If a named target is not already configured for this application, it will be added as a target to the appropriate components.

The info argument can also specify a list of files and directories. This supports application refreshes. When a file list is defined in the info object, the deployment will cause those files to be redistributed to the target servers. The file paths must be relative to the application source. If the application is an archive, the entire archive is redistributed, otherwise only the named files are distributed. Note that if the application targets release 6.x servers, there is no guarantee that only the files listed are redeployed.

The id argument is used to specify the identifier for the resulting task. If null, the system will generate the id. If not null, then the value must be unique across all existing deployment tasks.

Parameters:
source - is the path to the application. If null, the configured path is used.
name - is the configured name of the application.
stagingMode - the value that will be set on the ApplicationMBean for this deployment "stage", "external_stage", "nostage", or null which implies use the servers stagingMode value.
info - describes the details of the deployment.
id - to use for tracking. Use null to allow system to generate.
Returns:
a DeploymentTaskRuntimeMBean that is used to track the request.
Throws:
ManagementException - if the request is rejected.

activate

public DeploymentTaskRuntimeMBean activate(java.lang.String source,
                                           java.lang.String name,
                                           java.lang.String stagingMode,
                                           DeploymentData info,
                                           java.lang.String id,
                                           boolean startTask)
                                    throws ManagementException
Same functionality as activate(String, String, String, DeploymentData, String) except that control is given back to caller without actually initiating the task, when startTask is false. The client must then invoke the DeploymentTaskRuntimeMBean.start() method to complete the activation process. This is most useful when the client is interested in receiving notifications of the task's progress.

Parameters:
source - Description of the Parameter
name - Description of the Parameter
stagingMode - Description of the Parameter
info - Description of the Parameter
id - Description of the Parameter
startTask - Description of the Parameter
Returns:
Description of the Return Value
Throws:
ManagementException - Description of the Exception

deactivate

public DeploymentTaskRuntimeMBean deactivate(java.lang.String name,
                                             DeploymentData info,
                                             java.lang.String id)
                                      throws ManagementException
Deactivate a deployment. This suspends the services offered by the deployment and removes it from the relevant J2EE containers. The deployment will remain in the staging area and prepared following deactivation.

The info parameter is used to define the specific targets the deactivation applies to. If any targets are specified in the info object, they will be removed from the application configuration. If info object does not specify any targets then the deactivation will apply to all targets configured for the application. In this scenario the configured targets are not removed from the configuration. Rather, the application is configured as undeployed.

Parameters:
name - is the configured name of the application.
info - describes the details of the deployment. Null interpreted to deactivate the application on all servers, retaining targets.
id - to use for tracking. If null, a system generated id is used.
Returns:
a DeploymentTaskRuntimeMBean that is used to track the request
Throws:
ManagementException - if the request is rejected.

deactivate

public DeploymentTaskRuntimeMBean deactivate(java.lang.String name,
                                             DeploymentData info,
                                             java.lang.String id,
                                             boolean startTask)
                                      throws ManagementException
Same functionality as deactivate(String, DeploymentData, String) except that control is given back to caller without actually initiating the task, when startTask is false. The client must invoke the DeploymentTaskRuntimeMBean.start() method to complete the deactivation process. This is most useful when the client is interested in receiving notifications of the task's progress.

Parameters:
name - Description of the Parameter
info - Description of the Parameter
id - Description of the Parameter
startTask - Description of the Parameter
Returns:
Description of the Return Value
Throws:
ManagementException - Description of the Exception

remove

public DeploymentTaskRuntimeMBean remove(java.lang.String name,
                                         DeploymentData info,
                                         java.lang.String id)
                                  throws ManagementException
Removes a deployment. This results in the application being deactivated and deconfigured from the target servers. Staged files are removed from the target server if they were staged when first deployed. If no targets are specified in the info object, or if the info object is null, the application is removed entirely from the domain.

Parameters:
name - is the configured name of the application to remove
info - describes the details of the deployment.
id - to use for tracking. If null, a system generated id is used.
Returns:
a DeploymentTaskRuntimeMBean that is used to track the request
Throws:
ManagementException - if the request is rejected.

remove

public DeploymentTaskRuntimeMBean remove(java.lang.String name,
                                         DeploymentData info,
                                         java.lang.String id,
                                         boolean startTask)
                                  throws ManagementException
Same functionality as remove(String, DeploymentData, String) except that control is given back to caller without actually initiating the task, when startTask is false. The client must invoke the DeploymentTaskRuntimeMBean.start() method to complete the remove process. This is most useful when the client is interested in receiving notifications of the task's progress.

Parameters:
name - Description of the Parameter
info - Description of the Parameter
id - Description of the Parameter
startTask - Description of the Parameter
Returns:
Description of the Return Value
Throws:
ManagementException - Description of the Exception

unprepare

public DeploymentTaskRuntimeMBean unprepare(java.lang.String name,
                                            DeploymentData info,
                                            java.lang.String id)
                                     throws ManagementException
Deactivate and unload a deployment. This results in the application being deactivated and classes are unloaded from the target servers. Staged files are not removed from the target server if they were staged when first deployed. If no targets are specified in the info object, or if the info object is null, the application is removed entirely from the domain.

Parameters:
name - is the configured name of the application to unprepare
info - describes the details of the deployment.
id - to use for tracking. If null, a system generated id is used.
Returns:
a DeploymentTaskRuntimeMBean that is used to track the request
Throws:
ManagementException - if the request is rejected.

unprepare

public DeploymentTaskRuntimeMBean unprepare(java.lang.String name,
                                            DeploymentData info,
                                            java.lang.String id,
                                            boolean startTask)
                                     throws ManagementException
Same functionality as unprepare(String, DeploymentData, String) except that control is given back to caller without actually initiating the task, when startTask is false. The client must invoke the DeploymentTaskRuntimeMBean.start() method to complete the process. This is most useful when the client is interested in receiving notifications of the task's progress.

Parameters:
name - Description of the Parameter
info - Description of the Parameter
id - Description of the Parameter
startTask - Description of the Parameter
Returns:
Description of the Return Value
Throws:
ManagementException - Description of the Exception

distribute

public DeploymentTaskRuntimeMBean distribute(java.lang.String source,
                                             java.lang.String name,
                                             DeploymentData info,
                                             java.lang.String id)
                                      throws ManagementException
Distributes application files on targets. This results in the application being copied to the staging area of a target

Parameters:
source - is the path to the application files
name - is the configured name of the application to distribute
info - describes the details of the deployment.
id - to use for tracking. If null, a system generated id is used.
Returns:
a DeploymentTaskRuntimeMBean that is used to track the request
Throws:
ManagementException - if the request is rejected.

distribute

public DeploymentTaskRuntimeMBean distribute(java.lang.String source,
                                             java.lang.String name,
                                             DeploymentData info,
                                             java.lang.String id,
                                             boolean startTask)
                                      throws ManagementException
Same functionality as distribute(String source, String, DeploymentData, String) except that control is given back to caller without actually initiating the task, when startTask is false. The client must invoke the DeploymentTaskRuntimeMBean.start() method to complete the process. This is most useful when the client is interested in receiving notifications of the task's progress.

Parameters:
source - Description of the Parameter
name - Description of the Parameter
info - Description of the Parameter
id - Description of the Parameter
startTask - Description of the Parameter
Returns:
Description of the Return Value
Throws:
ManagementException - Description of the Exception

start

public DeploymentTaskRuntimeMBean start(java.lang.String name,
                                        DeploymentData info,
                                        java.lang.String id)
                                 throws ManagementException
Starts an already distributed application on target(s). This results in the application being prepared and activated on target(s)

Parameters:
name - is the configured name of the application to start
info - describes the details of the deployment.
id - to use for tracking. If null, a system generated id is used.
Returns:
a DeploymentTaskRuntimeMBean that is used to track the request
Throws:
ManagementException - if the request is rejected.

start

public DeploymentTaskRuntimeMBean start(java.lang.String name,
                                        DeploymentData info,
                                        java.lang.String id,
                                        boolean startTask)
                                 throws ManagementException
Same functionality as start(String, DeploymentData, String) except that control is given back to caller without actually initiating the task, when startTask is false. The client must invoke the DeploymentTaskRuntimeMBean.start() method to complete the process. This is most useful when the client is interested in receiving notifications of the task's progress.

Parameters:
name - Description of the Parameter
info - Description of the Parameter
id - Description of the Parameter
startTask - Description of the Parameter
Returns:
Description of the Return Value
Throws:
ManagementException - Description of the Exception

stop

public DeploymentTaskRuntimeMBean stop(java.lang.String name,
                                       DeploymentData info,
                                       java.lang.String id)
                                throws ManagementException
Stops application on target(s). This results in an application getting unavailable for the clients

Parameters:
name - is the configured name of the application to start
info - describes the details of the deployment.
id - to use for tracking. If null, a system generated id is used.
Returns:
a DeploymentTaskRuntimeMBean that is used to track the request
Throws:
ManagementException - if the request is rejected.

stop

public DeploymentTaskRuntimeMBean stop(java.lang.String name,
                                       DeploymentData info,
                                       java.lang.String id,
                                       boolean startTask)
                                throws ManagementException
Same functionality as stop(String, DeploymentData, String) except that control is given back to caller without actually initiating the task, when startTask is false. The client must invoke the DeploymentTaskRuntimeMBean.start() method to complete the process. This is most useful when the client is interested in receiving notifications of the task's progress.

Parameters:
name - Description of the Parameter
info - Description of the Parameter
id - Description of the Parameter
startTask - Description of the Parameter
Returns:
Description of the Return Value
Throws:
ManagementException - Description of the Exception

deploy

public DeploymentTaskRuntimeMBean deploy(java.lang.String source,
                                         java.lang.String name,
                                         java.lang.String stagingMode,
                                         DeploymentData info,
                                         java.lang.String id)
                                  throws ManagementException
deploys application on target(s). This results in the application being staged, prepared and activated on target(s)

Parameters:
source - is the path to the application files
name - is the configured name of the application to distribute
info - describes the details of the deployment.
id - to use for tracking. If null, a system generated id is used.
stagingMode - Description of the Parameter
Returns:
a DeploymentTaskRuntimeMBean that is used to track the request
Throws:
ManagementException - if the request is rejected.

deploy

public DeploymentTaskRuntimeMBean deploy(java.lang.String source,
                                         java.lang.String name,
                                         java.lang.String stagingMode,
                                         DeploymentData info,
                                         java.lang.String id,
                                         boolean startTask)
                                  throws ManagementException
Same functionality as #deploy(String, DeploymentData, String) except that control is given back to caller without actually initiating the task, when startTask is false. The client must invoke the DeploymentTaskRuntimeMBean.start() method to complete the process. This is most useful when the client is interested in receiving notifications of the task's progress.

Parameters:
source - Description of the Parameter
name - Description of the Parameter
stagingMode - Description of the Parameter
info - Description of the Parameter
id - Description of the Parameter
startTask - Description of the Parameter
Returns:
Description of the Return Value
Throws:
ManagementException - Description of the Exception

redeploy

public DeploymentTaskRuntimeMBean redeploy(java.lang.String name,
                                           DeploymentData info,
                                           java.lang.String id)
                                    throws ManagementException
Redeploys application on target(s). This results in redeploy of entire application on target(s). Redeploy results in restaging the application if staging mode is "stage". Redeploy can also be used for partial redeployment by specifying a list of files.

Parameters:
name - is the configured name of the application to distribute
info - describes the details of the deployment.
id - to use for tracking. If null, a system generated id is used.
Returns:
a DeploymentTaskRuntimeMBean that is used to track the request
Throws:
ManagementException - if the request is rejected.

redeploy

public DeploymentTaskRuntimeMBean redeploy(java.lang.String name,
                                           DeploymentData info,
                                           java.lang.String id,
                                           boolean startTask)
                                    throws ManagementException
Same functionality as redeploy(String, DeploymentData, String) except that control is given back to caller without actually initiating the task, when startTask is false. The client must invoke the DeploymentTaskRuntimeMBean.start() method to complete the process. This is most useful when the client is interested in receiving notifications of the task's progress.

Parameters:
name - Description of the Parameter
info - Description of the Parameter
id - Description of the Parameter
startTask - Description of the Parameter
Returns:
Description of the Return Value
Throws:
ManagementException - Description of the Exception

undeploy

public DeploymentTaskRuntimeMBean undeploy(java.lang.String name,
                                           DeploymentData info,
                                           java.lang.String id)
                                    throws ManagementException
undeploys application on target(s). This results in deactivating and removing an application on target(s)

Parameters:
name - is the configured name of the application to distribute
info - describes the details of the deployment.
id - to use for tracking. If null, a system generated id is used.
Returns:
a DeploymentTaskRuntimeMBean that is used to track the request
Throws:
ManagementException - if the request is rejected.

undeploy

public DeploymentTaskRuntimeMBean undeploy(java.lang.String name,
                                           DeploymentData info,
                                           java.lang.String id,
                                           boolean startTask)
                                    throws ManagementException
Same functionality as undeploy(String, DeploymentData, String) except that control is given back to caller without actually initiating the task, when startTask is false. The client must invoke the DeploymentTaskRuntimeMBean.start() method to complete the process. This is most useful when the client is interested in receiving notifications of the task's progress.

Parameters:
name - is the configured name of the application to distribute
info - describes the details of the deployment.
id - to use for tracking. If null, a system generated id is used.
startTask - Description of the Parameter
Returns:
a DeploymentTaskRuntimeMBean that is used to track the request
Throws:
ManagementException - if the request is rejected.

query

public DeploymentTaskRuntimeMBean query(java.lang.String id)
locates a deployment task based on the deployment id.

Parameters:
id - is the id to query
Returns:
the DeploymentTaskRuntimeMBean for the task. Returns null if the task could not be found.

list

public DeploymentTaskRuntimeMBean[] list()
Return array of all known deployment tasks

Returns:
Description of the Return Value

lookupActiveTargetsForComponent

public TargetMBean[] lookupActiveTargetsForComponent(ComponentMBean comp)
Provides list of targets where a module/component is currently active. The type of target (Server, Cluster) is based on configuration of the component.

Parameters:
comp - Description of the Parameter
Returns:
Description of the Return Value

lookupActiveVirtualHostsFor

public VirtualHostMBean[] lookupActiveVirtualHostsFor(WebDeploymentMBean comp)
Provides list of virtual hosts where a WebDeployment is currently active.

Parameters:
comp - Description of the Parameter
Returns:
Description of the Return Value

Documentation is available at
http://download.oracle.com/docs/cd/E13222_01/wls/docs81b