BEA Systems, Inc.

WebLogic Server 8.1 API Reference

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.

Author:
Copyright © 2004 BEA Systems, Inc. All Rights Reserved.
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 boolean TWOPHASE_DEFAULT
          Default value for for TwoPhase attribute
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, DEFAULT_EMPTY_BYTE_ARRAY
 
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.
 java.lang.String getAltDescriptorPath()
          Defines a path on the filesystem for the application descriptor for this application.
 java.lang.String getAltWLSDescriptorPath()
          Defines a path on the filesystem for the WLS-specific application descriptor for this application.
 weblogic.management.dde.ApplicationDDEditor getApplicationDDEditor()
           
 ComponentMBean[] getComponents()
          Returns the components that make up this application.
 java.lang.String getDDEditingDisabledReason()
           
 int getDeploymentTimeout()
          Milliseconds granted for a cluster deployment task on this application.
 java.lang.String getDeploymentType()
          Specifies the category of this application.
 java.lang.String getFullPath()
          Returns the fully qualified source path of an application on an admin server.
 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 on which this application is known to be staged.
 java.lang.String getStagingMode()
          Indicates whether this application is being staged.
 java.lang.String getStagingPath()
          Identifies the directory path on the managed server relative to the server's StagingDirectoryName.
 boolean isDDEditingEnabled()
           
 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 refreshDDsIfNeeded(java.lang.String[] changedFiles, java.lang.String[] modules)
           
 void setAltDescriptorPath(java.lang.String value)
          Sets the standardDescriptorPath attribute of the ApplicationMBean object.
 void setAltWLSDescriptorPath(java.lang.String value)
          Sets the webLogicDescriptorPath attribute of the ApplicationMBean object.
 void setDeploymentTimeout(int timeInMillis)
          Override the timeout value for a clustered deployment.
 void setDeploymentType(java.lang.String deploymentType)
          Sets the deploymentType attribute of the ApplicationMBean object.
 void setLastModified(long time)
          Sets the lastModified attribute of the ApplicationMBean object
 void setLoadOrder(int order)
          Sets the loadOrder attribute of the ApplicationMBean object.
 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.
 void setTwoPhase(boolean mode)
           
 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
freezeCurrentValue, getNotes, restoreDefaultValue, setComments, setDefaultedMBean, setNotes, setPersistenceEnabled
 
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

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

TWOPHASE_DEFAULT

public static final boolean TWOPHASE_DEFAULT
Default value for for TwoPhase attribute

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. The default timeout should far exceed our worst case expected deployment of a large application to a large number of destinations.
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 that you 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. For example, if the module is located at myapps/webapp/webapp.war, the Path="myapps/webapp" is correct, whereas Path="myapps/webapp/webapp.war" is incorrect.

Returns:
The path value

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
Parameters:
path - The new path value
Throws:
javax.management.InvalidAttributeValueException -  
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.
Returns:
The components value

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 must be called on the application MBean before the application is deployed/redeployed.

Throws:
ManagementException -  

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
Parameters:
autoDiscover -  
Throws:
ManagementException -  

getLoadError

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

A non-configurable MBean attribute.
Returns:
The loadError value

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.
Returns:
The lastModified value

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:
UndeploymentException -  
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.

Returns:
The deployed value

setLastModified

public void setLastModified(long time)
Sets the lastModified attribute of the ApplicationMBean object

Parameters:
time - The new lastModified value

getFullPath

public java.lang.String getFullPath()
Returns the fully qualified source path of an application on an admin server.

A dynamic MBean attribute
Returns:
The fullPath value

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 the source path (Path attribute).

A non-configurable MBean attribute.
Returns:
The stagingPath value

getStagedTargets

public java.lang.String[] getStagedTargets()
List of servers on which this application is known to be staged. 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.

Returns:
The stagedTargets value

getStagingMode

public java.lang.String getStagingMode()
Indicates whether this application is being staged. Staging involves distributing the application files from the admin server to the targeted managed servers staging directory. This attribute is used to override the managed server's StagingMode attribute.

Default Value: null
Legal Values: NO_STAGE, STAGE, EXTERNAL_STAGE
Returns:
The stagingMode value
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.

Parameters:
mode - The new stagingMode value
Throws:
ManagementException -  

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.
Parameters:
server -  
Returns:
 

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.
Parameters:
server -  
Returns:
 

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.
Parameters:
server -  
Returns:
 

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. If unspecified in the configuration, false is assumed.

A dynamic MBean attribute
Default Value: TWOPHASE_DEFAULT
Returns:
The twoPhase value

setTwoPhase

public void setTwoPhase(boolean mode)

Parameters:
mode - The new twoPhase value

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
Returns:
The loadOrder value

setLoadOrder

public void setLoadOrder(int order)
Sets the loadOrder attribute of the ApplicationMBean object.

Parameters:
order - The new loadOrder value

getDeploymentType

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

A dynamic MBean attribute
Default Value: TYPE_UNKNOWN
Legal Values: TYPE_EAR,TYPE_EXPLODED_EAR,TYPE_COMPONENT,TYPE_EXPLODED_COMPONENT
Returns:
The deploymentType value

setDeploymentType

public void setDeploymentType(java.lang.String deploymentType)
Sets the deploymentType attribute of the ApplicationMBean object.

Parameters:
deploymentType - The new deploymentType value

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: DEPLOYMENT_TIMEOUT
Returns:
The deploymentTimeout value

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.

Parameters:
timeInMillis - The new deploymentTimeout value

getAltDescriptorPath

public java.lang.String getAltDescriptorPath()
Defines a path on the filesystem for the application descriptor for this application. If null, the usual location within the ear is used (META-INF/application.xml);

A dynamic MBean attribute
Default Value: null
Returns:
The applicationDescriptorPath value

setAltDescriptorPath

public void setAltDescriptorPath(java.lang.String value)
Sets the standardDescriptorPath attribute of the ApplicationMBean object.

Parameters:
value - The new standardDescriptorPath value

getAltWLSDescriptorPath

public java.lang.String getAltWLSDescriptorPath()
Defines a path on the filesystem for the WLS-specific application descriptor for this application. If null, the usual location within the EAR file is used (META-INF/weblogic-application.xml);

A dynamic MBean attribute
Default Value: null
Returns:
The webLogicDescriptorPath value

setAltWLSDescriptorPath

public void setAltWLSDescriptorPath(java.lang.String value)
Sets the webLogicDescriptorPath attribute of the ApplicationMBean object.

Parameters:
value - The new webLogicDescriptorPath value

isDDEditingEnabled

public boolean isDDEditingEnabled()


getDDEditingDisabledReason

public java.lang.String getDDEditingDisabledReason()


getApplicationDDEditor

public weblogic.management.dde.ApplicationDDEditor getApplicationDDEditor()


refreshDDsIfNeeded

public void refreshDDsIfNeeded(java.lang.String[] changedFiles,
                               java.lang.String[] modules)


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