|
Oracle Fusion Middleware Oracle WebLogic Server API Reference 11g Release 1 (10.3.4) Part Number E13941-04 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface WebLogicDeploymentManager
This interface provides WebLogic Server extensions to the DeploymentManager
interface.
A WebLogicDeploymentManager object is a stateless interface into the Weblogic Server deployment framework. It
provides basic deployment features as well as extended WebLogic Server deployment features such as production
redeployment and partial deployment of modules in an Enterprise Application.
Acquire a WebLogicDeploymentManager object using DeploymentFactory
.
DeploymentFactory
Method Summary | |
---|---|
DeploymentConfiguration |
createConfiguration(DeployableObject deployableObject)
Creates a DeploymentConfiguration object for the provided DeployableObject. |
WebLogicTargetModuleID |
createTargetModuleID(String app,
ModuleType type,
Target target)
Factory for creating a root TargetModuleID object. |
WebLogicTargetModuleID |
createTargetModuleID(TargetModuleID base,
String module,
ModuleType type)
Factory for creating child TargetModuleID objects. |
ProgressObject |
deploy(TargetModuleID[] tmids,
File application,
File plan,
DeploymentOptions options)
A convenience method for distributing and starting an application. |
ProgressObject |
distribute(Target[] targets,
File application,
File plan)
Copies the complete deployment bundle, module, configuration data and any additional generated code to the target. |
ProgressObject |
distribute(Target[] targets,
File application,
File plan,
DeploymentOptions options)
Distributes an application. |
ProgressObject |
distribute(Target[] targets,
InputStream application,
InputStream plan)
Moves the complete deployment bundle, module, configuration data and any additional generated code to the target. |
ProgressObject |
distribute(Target[] targets,
InputStream application,
InputStream plan,
DeploymentOptions options)
Distributes an application. |
ProgressObject |
distribute(Target[] targets,
ModuleType moduleType,
InputStream application,
InputStream plan)
Moves the complete deployment bundle, module, configuration data and any additional generated code to the target. |
ProgressObject |
distribute(TargetModuleID[] targets,
File application,
File plan,
DeploymentOptions options)
Distributes an application. |
void |
enableFileUploads()
Causes a file distribution operation to first perform an upload operation. |
TargetModuleID[] |
filter(TargetModuleID[] modules,
String appName,
String moduleName,
String versionId)
Returns a subset of the input module list based on the specified application name, module name, and version identifier. |
TargetModuleID[] |
getAvailableModules(ModuleType moduleType,
Target[] targets)
Retrieves a list of all configured modules of a specified type. |
Locale |
getCurrentLocale()
Returns the locale that the plugin is currently using. |
DConfigBeanVersionType |
getDConfigBeanVersion()
Indicates the J2EE platform version being used to generate server configuration information. |
Locale |
getDefaultLocale()
Returns the locale of the plugin that was established when the DeploymentManager was constructed |
String |
getDomain()
Returns the Weblogic Server domain name associated with this DeploymentManager. |
TargetModuleID[] |
getModules(weblogic.management.configuration.ConfigurationMBean mbean)
Returns TargetModuleID objects associated with application MBeans. |
TargetModuleID[] |
getNonRunningModules(ModuleType moduleType,
Target[] targets)
Retrieves a list of configured, inactive modules of the specified type. |
TargetModuleID[] |
getRunningModules(ModuleType moduleType,
Target[] targets)
Retrieves a list of active modules of the specified type. |
Locale[] |
getSupportedLocales()
Returns the locales supported by the JVM. |
Target[] |
getTargets()
Returns known targets in the currently-connected WebLogic Server domain. |
boolean |
isConnected()
Indicates whether this DeploymentManager is currently connected to an administrative domain. |
boolean |
isDConfigBeanVersionSupported(DConfigBeanVersionType version)
Indicates support for a specific J2EE platform version for generating server configuration information. |
boolean |
isLocal()
Indicates whether this DeploymentManager is running local to the Administration Server for the domain. |
boolean |
isLocaleSupported(Locale locale)
Indicates whether the specified locale is supported. |
boolean |
isRedeploySupported()
Indicates whether the WebLogicDeploymentManager.redeploy(TargetModuleID[], java.io.File, java.lang.String[], weblogic.deploy.api.spi.DeploymentOptions) methods support
transparent redeployment of an application. |
ProgressObject |
redeploy(TargetModuleID[] modules,
File application,
File plan)
Redeploys an application and deployment plan without affecting the session state. |
ProgressObject |
redeploy(TargetModuleID[] modules,
File application,
File plan,
DeploymentOptions options)
Redeploys an application and plan without affecting the session state. |
ProgressObject |
redeploy(TargetModuleID[] modules,
File app,
String[] delta,
DeploymentOptions options)
Redeploys named files in a staged application. |
ProgressObject |
redeploy(TargetModuleID[] modules,
InputStream application,
InputStream plan)
Redeploys an application, replacing the current application files and plan with an updated version. |
ProgressObject |
redeploy(TargetModuleID[] modules,
InputStream application,
InputStream plan,
DeploymentOptions options)
Redeploys an application and deployment plan without affecting the session state. |
void |
release()
Releases all server resources held by the DeploymentManager, and places it in a disconnected state. |
void |
setDConfigBeanVersion(DConfigBeanVersionType version)
Changes the J2EE platform version used for generating server configuration information. |
void |
setLocale(Locale locale)
Establishes the locale for the deployment SPI plugin. |
ProgressObject |
start(TargetModuleID[] modules)
Starts an application, making it available to users. |
ProgressObject |
start(TargetModuleID[] modules,
DeploymentOptions options)
Starts an application, making it available to users. |
ProgressObject |
stop(TargetModuleID[] modules)
Stops an application, making it unavailable to users. |
ProgressObject |
stop(TargetModuleID[] modules,
DeploymentOptions options)
Stops an application, making it unavailable to users. |
ProgressObject |
undeploy(TargetModuleID[] modules)
Undeploys an application, removing it from the domain configuration. |
ProgressObject |
undeploy(TargetModuleID[] modules,
DeploymentOptions options)
Undeploys an application, removing it from the domain configuration. |
ProgressObject |
undeploy(TargetModuleID[] modules,
File app,
String[] delta,
DeploymentOptions options)
Removes staged files from an existing deployment. |
ProgressObject |
update(TargetModuleID[] modules,
File plan,
DeploymentOptions options)
Allows for updating an application configuration using an changed deployment plan. |
Method Detail |
---|
WebLogicTargetModuleID createTargetModuleID(String app, ModuleType type, Target target)
app
- is name of the application root moduletype
- is the type of moduletarget
- is where the application will be targeted
WebLogicTargetModuleID createTargetModuleID(TargetModuleID base, String module, ModuleType type)
base
- is the parent of the module to be createdmodule
- is the name of the moduletype
- is the type of module
boolean isLocal()
String getDomain()
boolean isConnected()
ProgressObject deploy(TargetModuleID[] tmids, File application, File plan, DeploymentOptions options) throws TargetException, IllegalStateException
If any modules are currently running, this method immediately restarts those modules using the newer files. Restarting modules in this manner is not the same as redeployment, because session state is not preserved for the active modules.
tmids
- represent the targeted modules to receive a copy of the application files and deployment plan.application
- A supported J2EE application or module archive, or a root directory for the application or module.plan
- The deployment plan for this application. The deployment plan is a serialized version of a
WebLogicDeploymentConfiguration
object.options
- Allows for overriding the deployment options. May be null.
IllegalStateException
- If the DeploymentManager is not currently connected.
TargetException
ProgressObject update(TargetModuleID[] modules, File plan, DeploymentOptions options) throws IllegalStateException
A configuration update is equivalent to replacing the application's deployment plan. The deployment plan is redeployed in-place. A new version of the application is not started, even if the new deployment plan has a different version.
The update succeeds
only if changes to the deployment plan do not require the application to be
restarted. Configuration changes in the new deployment plan must be limited to
tuning the application. Changes to resource bindings causes
the update to fail. Use WebLogicDeploymentManager.redeploy(TargetModuleID[],File,File)
to apply resource binding changes to a production application.
This method targets only root modules. Module level targeting is not supported.
The target list is derived from the TargetModuleID list.
modules
- The modules to be redeployed. All modules must identify the same version of the application.
This parameter must not be null.plan
- The deployment plan containing the new deployment configuration information.options
- Allows for overriding the deployment options. May be null.
IllegalStateException
- If the DeploymentManager has been released.WebLogicDeploymentManager.redeploy(TargetModuleID[],File,File)
void enableFileUploads() throws IllegalStateException
IllegalStateException
- If not currently connected.ProgressObject redeploy(TargetModuleID[] modules, File app, String[] delta, DeploymentOptions options) throws IllegalStateException
All TargetModuleIDs must refer to the root module of the same application. A failed ProgressObject is returned if multiple applications are represented in the TargetModuleIDs. This method ignores duplicate TargetModuleIDs.
modules
- A list of modules to redeploy. This parameter must not be null.app
- Optional application source. Only required if the archive also requires uploading.delta
- A list of file paths or names relative to the root of the staged application
that are to be replaced or added. This parameter must not be null.options
- Allows for overriding the deployment options. May be null.
IllegalStateException
- If not currently connected.
All other errors are reported via the returned ProgressObject.ProgressObject undeploy(TargetModuleID[] modules, File app, String[] delta, DeploymentOptions options) throws IllegalStateException
All TargetModuleIDs must refer to the root module of the same application. A failed ProgressObject is returned when multiple applications are represented in the TargetModuleIDs. This method ignores any duplicate TargetModuleIDs.
The application referenced by the TargetModuleIDs should already exist in the WebLogic Server configuration. The application need not be stopped. If the application is not configured at all, the undeploy operation completes successfully.
modules
- A list of root modules to undeploy. This parameter must not be null.
All modules must identify the same version of the application.app
- The application source.delta
- The file path or names relative to the root of the staged application
that are to be removed
from the distribution. This parameter must not be null.options
- Allows for overriding the deployment options. May be null.
IllegalStateException
- If not currently connected.
All other errors are reported via the returned ProgressObject.TargetModuleID[] filter(TargetModuleID[] modules, String appName, String moduleName, String versionId)
modules
- The module list.appName
- The name of application to match. This parameter may not be null.moduleName
- The name of module in the application to match. A null value matches
only the root module.versionId
- The version to match. A null value matches all versions.
TargetModuleID[] getModules(weblogic.management.configuration.ConfigurationMBean mbean) throws IllegalStateException
If an AppDeploymentMBean is specified, then the returned module list consists of root modules wherever the application is configured. For SubDeploymentMBeans's, only the relevant non-root modules are returned. The selection of modules is based primarily on the name of the provided mbean.
mbean
- An MBean for a configured module.
IllegalStateException
- If not currently connected.
IllegalArgumentException
- (unchecked) If argument is null or invalid.ProgressObject start(TargetModuleID[] modules, DeploymentOptions options) throws IllegalStateException
WebLogicDeploymentManager.start(TargetModuleID[])
, but allows for deployment option overrides.
modules
- A list of root modules to start.
Each module must identify the same version of the application.options
- Allows for start option overrides. This parameter may be null.
IllegalStateException
- If not currently connected.
All other errors are reported via the returned ProgressObject.ProgressObject stop(TargetModuleID[] modules, DeploymentOptions options) throws IllegalStateException
All TargetModuleIDs must refer to the root module of the same application. A failed ProgressObject is returned if multiple applications are represented. This method ignores duplicate TargetModuleIDs.
The application referenced by the TargetModuleIDs must already be in the WebLogic Server configuration. Any TargetModuleID that represents an application not already running on its target is a no-op; the stop is considered successful and is not tracked in the ProgressObject. Otherwise, the application is stopped on the target.
modules
- A list of root modules to stop.
Each module must identify the same version of the application.options
- Allows for stop option overrides. This parameter may be null.
IllegalStateException
- If not currently connected.
All other errors are reported via the returned ProgressObject.ProgressObject undeploy(TargetModuleID[] modules, DeploymentOptions options) throws IllegalStateException
All TargetModuleIDs must refer to the root module of the same application. A failed ProgressObject is returned if multiple applications are represented. This method ignores duplicate TargetModuleIDs.
The application referenced by the TargetModuleIDs should already exist in the WebLogic Server configuration in a stopped state. Any modules that are not currently configured are ignored. If the application is not configured at all, the undeploy operation completes successfully.
modules
- A list of root modules to undeploy.
Each module must identify the same version of the application.
IllegalStateException
- If not currently connected.
All other errors are reported via the returned ProgressObject.ProgressObject distribute(Target[] targets, File application, File plan, DeploymentOptions options) throws IllegalStateException
WebLogicDeploymentManager.distribute(Target[],File,File)
, but allows for deployment option overrides.
targets
- WebLogic Server targets to receive a copy of the application and deployment plan.application
- A supported J2EE application or module archive, or a root directory.plan
- A deployment plan for this application. The plan is a serialized version of a
DeploymentConfiguration
object.options
- Allows for deployment option overrides. This parameter may be null.
IllegalStateException
- If not currently connected.ProgressObject distribute(TargetModuleID[] targets, File application, File plan, DeploymentOptions options) throws IllegalStateException, TargetException
targets
- WebLogic Server targets to receive a copy of the application and deployment plan.application
- A supported J2EE application or module archive, or a root directory.plan
- A deployment plan for this application. The plan is a serialized version of a
DeploymentConfiguration
object.options
- Allows for deployment option overrides. This parameter may be null.
IllegalStateException
- If not currently connected.
TargetException
ProgressObject distribute(Target[] targets, InputStream application, InputStream plan, DeploymentOptions options) throws IllegalStateException
WebLogicDeploymentManager.distribute(Target[],File,File)
, but allows for deployment option overrides.
targets
- WebLogic Server targets to receive a copy of the application and deployment plan.application
- A supported J2EE application or module archive, or root directory.plan
- An optional deployment plan for this application. The deployment plan is a serialized version of a
DeploymentConfiguration
object.options
- Allows for deploy option overrides. This parameter may be null.
IllegalStateException
- If not currently connected.
All other errors are reported via the returned ProgressObject.ProgressObject redeploy(TargetModuleID[] modules, File application, File plan, DeploymentOptions options) throws UnsupportedOperationException, IllegalStateException
WebLogicDeploymentManager.redeploy(TargetModuleID[],File,File)
, but
allows for overrides to the deployment options.
modules
- A list of root modules to redeploy.
Each module must identify the same version of the application.application
- The archive or root directory of the application.plan
- The deployment plan for this application. The deployment plan is a serialized version of a
DeploymentConfiguration
object.options
- Allows for overrides to the deployment options. This parameter may be null.
IllegalStateException
- if not currently connected.
All other errors are reported via the returned ProgressObject.
UnsupportedOperationException
ProgressObject redeploy(TargetModuleID[] modules, InputStream application, InputStream plan, DeploymentOptions options) throws UnsupportedOperationException, IllegalStateException
WebLogicDeploymentManager.redeploy(TargetModuleID[],InputStream,InputStream)
, but
allows for overrides to deployment options.
modules
- A list of root modules to redeploy.
Each module must identify the same version of the application.application
- The archive or root directory of the application.plan
- The deployment plan for this deployment. The deployment plan is a serialized version of a
DeploymentConfiguration
object.options
- Allows for overrides to deployment options. This parameter may be null.
IllegalStateException
- If not currently connected.
All other errors are reported via the returned ProgressObject.
UnsupportedOperationException
Target[] getTargets() throws IllegalStateException
WebLogicTarget
.
IllegalStateException
- If not connected.TargetModuleID[] getRunningModules(ModuleType moduleType, Target[] targets) throws TargetException, IllegalStateException
moduleType
- One of EAR, WAR, EJB or RAR.targets
- A list of configured targets.
TargetException
- If an invalid Target object is encountered.
IllegalStateException
- If not currently connected.WebLogicDeploymentManager.isConnected()
,
WebLogicTargetType
TargetModuleID[] getNonRunningModules(ModuleType moduleType, Target[] targets) throws TargetException, IllegalStateException
moduleType
- One of EAR, WAR, EJB or RAR.targets
- A list of configured targets.
TargetException
- If an invalid Target object is encountered.
IllegalStateException
- If not currently connected.WebLogicDeploymentManager.isConnected()
,
WebLogicTargetType
TargetModuleID[] getAvailableModules(ModuleType moduleType, Target[] targets) throws TargetException, IllegalStateException
moduleType
- One of EAR, WAR, EJB or RAR.targets
- A list of configured targets.
TargetException
- If an invalid Target object is encountered.
IllegalStateException
- If not currently connected.WebLogicDeploymentManager.isConnected()
,
WebLogicTargetType
DeploymentConfiguration createConfiguration(DeployableObject deployableObject) throws InvalidModuleException
deployableObject
- The deployable module.
InvalidModuleException
- If the module type is unsupported.ProgressObject distribute(Target[] targets, File application, File plan) throws IllegalStateException
The files are local (on the same host) to the deployer tool in all cases. If the File objects represent relative abstract paths, they are relative to the current directory of the tool.
By default all files are assumed to be local to the Administration Server for the target domain.
This can be overridden using WebLogicDeploymentManager.enableFileUploads()
.
Actual copying of files from the Administration Server to the targeted Managed Servers is based on the staging attribute of the target servers.
The name of the configured application is taken from the deployment plan, if present. Otherwise, the application file's name is used, without its extension. If an application of the same name is already configured, then it must have the same path as the path specified in the application's File object. If the path does not match, the distribution operation fails.
If a deployment plan is not provided (null) then a previously-deployed plan is removed as part of the distribution.
After the application files have been distributed they are validated on each target server. If the application is already running on a target the request will fail. Applications must be stopped before distributing
targets
- WebLogic Server targets to receive a copy of the application and deployment plan.application
- A supported J2EE application or module archive, or a root directory.plan
- A deployment plan for this deployment. The plan is a serialized version of a
DeploymentConfiguration
object.
IllegalStateException
- if not currently connected.
All other errors are reported via the returned ProgressObject.ProgressObject distribute(Target[] targets, InputStream application, InputStream plan) throws IllegalStateException
The application and deployment plan streams are written to temporary
files and distributed as defined for WebLogicDeploymentManager.distribute(Target[], File, File)
targets
- WebLogic Server targets to receive a copy of the application and deployment plan.application
- A supported J2EE application or module archive stream.plan
- An optional (may be null) deployment plan for this deployment.
The plan is a serialized version of a
DeploymentConfiguration
object.
IllegalStateException
- If not currently connected.
All other errors are reported via the returned ProgressObject.ProgressObject distribute(Target[] targets, ModuleType moduleType, InputStream application, InputStream plan) throws IllegalStateException
The application and deployment plan streams are written to temporary
files and distributed as defined for WebLogicDeploymentManager.distribute(Target[], File, File)
targets
- WebLogic Server targets to receive a copy of the application and deployment plan.moduleType
- One of EAR, WAR, EJB or RAR.application
- A supported J2EE application or module archive stream.plan
- An optional (may be null) deployment plan for this deployment.
The plan is a serialized version of a
DeploymentConfiguration
object.
IllegalStateException
- If not currently connected.
All other errors are reported via the returned ProgressObject.ProgressObject start(TargetModuleID[] modules) throws IllegalStateException
All TargetModuleIDs must refer to the root module of the same application. A failed ProgressObject is returned if multiple applications are represented. Any duplicate TargetModuleIDs are ignored.
The application referenced by the TargetModuleIDs must already exist in the WebLogic Server configuration. Any TargetModuleID that represents an application already running on its target is a no-op, unless that application is running in test mode. If an application is running in test mode, this method brings the application fully online.
modules
- A list of root modules to start.
Each module must identify the same version of the application.
IllegalStateException
- If not currently connected.
All other errors are reported via the returned ProgressObject.ProgressObject stop(TargetModuleID[] modules) throws IllegalStateException
All TargetModuleIDs must refer to the root module of the same application. A failed ProgressObject is returned if multiple applications are represented. This method ignores duplicate TargetModuleIDs.
The application referenced by the TargetModuleIDs must already be in the WebLogic Server configuration. Any TargetModuleID that represents an application not already running on its target is a no-op; the stop is considered successful and is not tracked in the ProgressObject. Otherwise, the application is stopped on the target.
modules
- A list of root modules to stop.
Each module must identify the same version of the application.
IllegalStateException
- If not currently connected.
All other errors are reported via the returned ProgressObject.ProgressObject undeploy(TargetModuleID[] modules) throws IllegalStateException
All TargetModuleIDs must refer to the root module of the same application. A failed ProgressObject is returned if multiple applications are represented. This method ignores duplicate TargetModuleIDs.
The application referenced by the TargetModuleIDs should already exist in the WebLogic Server configuration in a stopped state. Any modules that are not currently configured are ignored. If the application is not configured at all, the undeploy operation completes successfully.
modules
- A list of root modules to undeploy.
Each module must identify the same version of the application.
IllegalStateException
- If not currently connected.
All other errors are reported via the returned ProgressObject.boolean isRedeploySupported()
WebLogicDeploymentManager.redeploy(TargetModuleID[], java.io.File, java.lang.String[], weblogic.deploy.api.spi.DeploymentOptions)
methods support
transparent redeployment of an application. If supported, then transparent
redeployment is dependent on application's configuration. Specifically, the application must specify
a version in the archive manifest's Weblogic-Application-Version
entry,
and in the deployment plan.
ProgressObject redeploy(TargetModuleID[] modules, File application, File plan) throws UnsupportedOperationException, IllegalStateException
All TargetModuleIDs must refer to root module of the same application. A failed ProgressObject is returned if multiple applications are represented. This method ignores duplicate TargetModuleIDs.
The application archive and deployment plan are redistributed as described for the
WebLogicDeploymentManager.distribute(Target[],File,File)
operation.
The application referenced by the TargetModuleIDs must already exist in the WebLogic Server configuration.
If a TargetModuleID represents an application that is already running on its
target, this operation redeploys the application. If the applications or modules are not currently running,
this method starts them.
Redeployment involves starting a new version of the application, based on the version information embedded in the application archive and/or deployment plan. Other running versions of the application are unaffected by the redeployment. The older version of the application is automatically undeployed only after it has become idle.
modules
- A list of root modules to redeploy.
Each module must identify the same version of the application.application
- The archive or root directory of the application.plan
- The deployment plan for this application. The deployment plan is a serialized version of a
DeploymentConfiguration
object.
IllegalStateException
- If not currently connected.
All other errors are reported via the returned ProgressObject.
UnsupportedOperationException
ProgressObject redeploy(TargetModuleID[] modules, InputStream application, InputStream plan) throws UnsupportedOperationException, IllegalStateException
WebLogicDeploymentManager.redeploy(TargetModuleID[], File , File)
with the exception that the application and deployment plan are provided as
InputStreams. The streams are written to a temporary file and redeployed
from there.
modules
- A list of root modules to redeploy.
Each module must identify the same version of the application.application
- An optional (may be null) archive or root
directory of the application.plan
- An optional (may be null) deployment plan for this application.
The deployment plan is a serialized version of a
DeploymentConfiguration
object.
IllegalStateException
- If not currently connected.
All other errors are reported via the returned ProgressObject.
UnsupportedOperationException
void release()
Locale getDefaultLocale()
Locale getCurrentLocale()
void setLocale(Locale locale) throws UnsupportedOperationException
UnsupportedOperationException
- If the locale is not supported by the JVM.Locale.getAvailableLocales()
Locale[] getSupportedLocales()
Locale.getAvailableLocales()
boolean isLocaleSupported(Locale locale)
Locale.getAvailableLocales()
DConfigBeanVersionType getDConfigBeanVersion()
boolean isDConfigBeanVersionSupported(DConfigBeanVersionType version)
void setDConfigBeanVersion(DConfigBeanVersionType version) throws DConfigBeanVersionUnsupportedException
DConfigBeanVersionUnsupportedException
- If the platform is not supported.
|
Copyright 1996, 2010, Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners. Oracle Fusion Middleware Oracle WebLogic Server API Reference 11g Release 1 (10.3.4) Part Number E13941-04 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |