BEA Systems, Inc.


weblogic.management.configuration
Interface ApplicationMBean


public interface ApplicationMBean
extends ConfigurationMBean

An application represents a J2EE application contained in an EAR file or EAR directory. The EAR file contains a set of components such as WAR, EJB and RAR connector components, each of which can be deployed on one or more Targets. A target is a server or a cluster. If the application is provided as a standalone module, then this MBean is a synthetic wrapper application only.

See Also:
TargetMBean, EJBComponentMBean, WebAppComponentMBean, ConnectorComponentMBean

Field Summary
static long CACHING_STUB_SVUID
           
static int DEPLOYMENT_TIMEOUT
          Default deployment timeout value for 2 phase deployments.
static java.lang.String EXTERNAL_STAGE
          Indicates that the files will be located in the staging directory but that an external application will be responsible for delivering them there.
static java.lang.String NO_STAGE
          Indicates the application will not be staged.
static java.lang.String STAGE
          Indicates the WebLogic Server will stage the application to the staging directory.
static java.lang.String TYPE_COMPONENT
          Application is an archived component/module
static java.lang.String TYPE_EAR
          Application is an archived EAR
static java.lang.String TYPE_EXPLODED_COMPONENT
          Application is an unarchived component/module
static java.lang.String TYPE_EXPLODED_EAR
          Application is an unarchived EAR
static java.lang.String TYPE_UNKNOWN
          Application is of unknown type - default
 
Fields inherited from class weblogic.management.configuration.ConfigurationMBean
CACHING_STUB_SVUID
 
Method Summary
 void deploy()
          Deprecated. weblogic.management.runtime.DeployerRuntimeMBean is the appropriate class for deploying an application. Applications using this interface will not use the 2 phase deployment protocol.
 ComponentMBean[] getComponents()
          Returns the components that make up this application.
 int getDeploymentTimeout()
          Milliseconds granted for a cluster deployment task on this application.
 java.lang.String getDeploymentType()
          Specifies category of this application.
 long getLastModified()
          Deprecated. the 2 phase deployment protocol does not maintain application file modification times
 java.lang.Exception getLoadError()
          Deprecated.  
 int getLoadOrder()
          Specifies the order applications are loaded at server startup.
 java.lang.String getPath()
          The location of the original source application files on the Admin Server.
 java.lang.String[] getStagedTargets()
          List of servers this application is known to be staged on.
 java.lang.String getStagingMode()
          Returns the staging mode of this application, which overrides the managed server's StagingMode attribute.
 java.lang.String getStagingPath()
          Identifies the directory path on the managed server relative to the server's StagingDirectoryName.
 boolean isDeployed()
          Deprecated. This attribute is unused for applications deployed with the 2 phase deployment protocol. Application modules are deployed based on whether they have targets.
 boolean isTwoPhase()
          Indicates whether this application is deployed using the 2 phase deployment protocol DeployerRuntimeMBean.
 void load()
          Deprecated. weblogic.management.runtime.DeployerRuntimeMBean is the appropriate class for initializing application and component MBeans. Applications using this interface will not use the 2 phase deployment protocol.
 void load(boolean autoDiscover)
          Deprecated. weblogic.management.runtime.DeployerRuntimeMBean is the appropriate class for initializing application and component MBeans. Applications using this interface will not use the 2 phase deployment protocol.
 void setDeploymentTimeout(int timeInMillis)
          Override the timeout value for a clustered deployment.
 void setDeploymentType(java.lang.String deploymentType)
           
 void setLastModified(long time)
           
 void setLoadOrder(int order)
           
 void setPath(java.lang.String path)
          relative to the root directory of the Admin Server installation.
 void setStagingMode(java.lang.String mode)
          Overrides staging mode of server for this application.
 boolean staged(java.lang.String server)
          Convenience method for determining whether this application is currently staged on a particular server.
 boolean stagingEnabled(java.lang.String server)
          Convenience method for determining whether this application is to be staged on a particular server.
 void undeploy()
          Deprecated. weblogic.management.runtime.DeployerRuntimeMBean is the appropriate class for undeploying an application. Applications using this interface will not use the 2 phase deployment protocol.
 boolean useStagingDirectory(java.lang.String server)
          Convenience method for determining where the file will be loaded from on the managed servers.
 
Methods inherited from interface weblogic.management.configuration.ConfigurationMBean
addLinkMbeanAttribute, getNotes, isPersistenceEnabled, setNotes
 
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, preDeregister, preRegister
 
Methods inherited from interface javax.management.NotificationBroadcaster
addNotificationListener, getNotificationInfo, removeNotificationListener
 

Field Detail

CACHING_STUB_SVUID

public static final long CACHING_STUB_SVUID

TYPE_EAR

public static final java.lang.String TYPE_EAR
Application is an archived EAR

TYPE_EXPLODED_EAR

public static final java.lang.String TYPE_EXPLODED_EAR
Application is an unarchived EAR

TYPE_COMPONENT

public static final java.lang.String TYPE_COMPONENT
Application is an archived component/module

TYPE_EXPLODED_COMPONENT

public static final java.lang.String TYPE_EXPLODED_COMPONENT
Application is an unarchived component/module

TYPE_UNKNOWN

public static final java.lang.String TYPE_UNKNOWN
Application is of unknown type - default

NO_STAGE

public static final java.lang.String NO_STAGE
Indicates the application will not be staged.

STAGE

public static final java.lang.String STAGE
Indicates the WebLogic Server will stage the application to the staging directory.

EXTERNAL_STAGE

public static final java.lang.String EXTERNAL_STAGE
Indicates that the files will be located in the staging directory but that an external application will be responsible for delivering them there.

DEPLOYMENT_TIMEOUT

public static final int DEPLOYMENT_TIMEOUT
Default deployment timeout value for 2 phase deployments. Time is in milliseconds. 60 minutes times 60 seconds times 1000 millisecond = 1 Hour. The default time out should far exceed our worst case expected deployment of a large application to an large number of cluster nodes. The assumption that it is better to allow the user to specify a shorter time out if they want it than to timeout a nearly completed deployment.
Method Detail

getPath

public java.lang.String getPath()
The location of the original source application files on the Admin Server. Relative paths are based on the root of the Admin Server installation directory. It is highly recommended to use absolute paths to minimize possible issues when upgrading the server.

If the application is not being staged (StagingMode==nostage) then the path must be valid on the target server.

The path to an Enterprise application (EAR) is the location of the .ear file or the root of the EAR if it is unarchived. e.g. Path="myapps/app.ear" is valid. If the application is a standalone module then the path is the parent directory of the module. e.g. If the module is located at myapps/webapp/webapp.war, the Path="myapps/webapp" is correct, whereas Path="myapps/webapp/webapp.war" is incorrect.


setPath

public void setPath(java.lang.String path)
             throws ManagementException,
                    javax.management.InvalidAttributeValueException
relative to the root directory of the Admin Server installation.

Legal NULL: false
Throws:
ManagementException - if path is invalid

getComponents

public ComponentMBean[] getComponents()
Returns the components that make up this application. Components represent the J2EE modules associated with this application.

A non-configurable MBean attribute.

load

public void load()
          throws ManagementException
Deprecated. weblogic.management.runtime.DeployerRuntimeMBean is the appropriate class for initializing application and component MBeans. Applications using this interface will not use the 2 phase deployment protocol.
Intializes all the component MBeans for an application. For any changes in the application descriptor to take affect the load has to be called on the Application MBean before the application is deployed/redeployed.


load

public void load(boolean autoDiscover)
          throws ManagementException
Deprecated. weblogic.management.runtime.DeployerRuntimeMBean is the appropriate class for initializing application and component MBeans. Applications using this interface will not use the 2 phase deployment protocol.
Load or reload the application, automatically discovering components.

A dynamic MBean attribute

getLoadError

public java.lang.Exception getLoadError()
Deprecated.  
Return the error thrown the last attempt to call load or reload if any, null otherwise.

A non-configurable MBean attribute.

getLastModified

public long getLastModified()
Deprecated. the 2 phase deployment protocol does not maintain application file modification times
Returns the time when this application was last loaded.

A non-configurable MBean attribute.

deploy

public void deploy()
            throws DeploymentException,
                   DistributedManagementException
Deprecated. weblogic.management.runtime.DeployerRuntimeMBean is the appropriate class for deploying an application. Applications using this interface will not use the 2 phase deployment protocol.
Deploys the application. The application is staged to the targets as necessary and activated. Equivalent to invoking setDeployed(true).

Throws:
DeploymentException - if unable to prepare the application for deployment.
DistributedManagementException - if the deploymentt failed on one or more targets.

undeploy

public void undeploy()
              throws UndeploymentException,
                     DistributedManagementException
Deprecated. weblogic.management.runtime.DeployerRuntimeMBean is the appropriate class for undeploying an application. Applications using this interface will not use the 2 phase deployment protocol.
Undeploys the application. All modules on all target servers are deactivated and removed from the staging area. Equivalent to invoking setDeployed(false).

Throws:
DeploymentException -  
DistributedManagementException - if the undeployment failed on one or more targets.

isDeployed

public boolean isDeployed()
Deprecated. This attribute is unused for applications deployed with the 2 phase deployment protocol. Application modules are deployed based on whether they have targets.
Returns whether this application is deployed on any targets.


setLastModified

public void setLastModified(long time)


getStagingPath

public java.lang.String getStagingPath()
Identifies the directory path on the managed server relative to the server's StagingDirectoryName. This is the path used to prepare and activate an application on a managed server. This attribute is derived from the Path attribute, and depends on whether the application is being staged. If the Path attribute for application, myapp, is foo.ear, the staging path is set to myapp/foo.ear. If the path is C:\myapp.ear, the staging path is myapp/myapp.ear. If the application is not being staged (StagingMode==nostage), then the staging path is the same as the Path attribute. If this application is not being staged, the staging path is equivalent to source path (Path attribute)

A non-configurable MBean attribute.

getStagedTargets

public java.lang.String[] getStagedTargets()
List of servers this application is known to be staged on. This makes no distinction regarding the version or state of the staged files, just that they are staged. The array returned contains the names of the target servers. This set should not include cluster names.

A dynamic MBean attribute

getStagingMode

public java.lang.String getStagingMode()
Returns the staging mode of this application, which overrides the managed server's StagingMode attribute. Staging involves distributing the application files from the admin server to the targeted managed servers' staging directory. Staging values are:
  1. nostage: does not copy application files to another location
  2. stage: copies application files to server targeted in deployment
  3. external_stage: the user, and not WebLogic Server, copies application files to the server's staging directory

Default Value: null
Legal Values: weblogic.management.configuration.ApplicationMBean.NO_STAGE,weblogic.management.configuration.ApplicationMBean.STAGE,weblogic.management.configuration.ApplicationMBean.EXTERNAL_STAGE
See Also:
ServerMBean

setStagingMode

public void setStagingMode(java.lang.String mode)
                    throws ManagementException
Overrides staging mode of server for this application. The mode may not be changed once set.


stagingEnabled

public boolean stagingEnabled(java.lang.String server)
Convenience method for determining whether this application is to be staged on a particular server.

A non-configurable MBean attribute.

staged

public boolean staged(java.lang.String server)
Convenience method for determining whether this application is currently staged on a particular server.

A non-configurable MBean attribute.

useStagingDirectory

public boolean useStagingDirectory(java.lang.String server)
Convenience method for determining where the file will be loaded from on the managed servers.

A non-configurable MBean attribute.

isTwoPhase

public boolean isTwoPhase()
Indicates whether this application is deployed using the 2 phase deployment protocol DeployerRuntimeMBean. If true then the application's components may only be targeted to release 7.0 and later servers. If false then the application may be deployed to all releases supporting the release 6 deployment protocol, which is deprecated in release 7.

Default Value: false

getLoadOrder

public int getLoadOrder()
Specifies the order applications are loaded at server startup. Applications with the lowest values are loaded first.

Application ordering is only supported for applications deployed with the 2 phase protocol.

Default Value: 100

setLoadOrder

public void setLoadOrder(int order)


getDeploymentType

public java.lang.String getDeploymentType()
Specifies category of this application. This attribute will be derived if not specified in the configuration.

Default Value: TYPE_UNKNOWN
Legal Values: TYPE_EAR,TYPE_EXPLODED_EAR,TYPE_COMPONENT,TYPE_EXPLODED_COMPONENT

setDeploymentType

public void setDeploymentType(java.lang.String deploymentType)


getDeploymentTimeout

public int getDeploymentTimeout()
Milliseconds granted for a cluster deployment task on this application. If any deployment tasks remain active for longer, the task will be cancelled. The default is ~60 minutes. Note that the server only checks for timed out deployments about once a minute.

Only cluster deployments can be timed out.

A dynamic MBean attribute
Default Value: weblogic.management.configuration.ApplicationMBean.DEPLOYMENT_TIMEOUT

setDeploymentTimeout

public void setDeploymentTimeout(int timeInMillis)
Override the timeout value for a clustered deployment. The larger the application, the larger the value for timeout should be as the gating factor is associated with download time and processing time required to load the application files.

The value is specified in milliseconds. The server will, however, only check for timed out deployments about once a minute.


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

Copyright © 2004 BEA Systems, Inc. All Rights Reserved.
WebLogic Server 7.0 API Reference