Application deployment configuration scripts


 

+

Search Tips   |   Advanced Search

 

The scripting library provides multiple script procedures to automate the application configurations. This page provides usage information for scripts that deploy applications. We can run each script individually or combine procedures to create custom automation scripts for the environment.

Each application management script procedure is located in...

$WAS_HOME/scriptLibraries/application/V70

The application deployment script procedures contain multiple arguments. If we do not want to specify an argument with the script, specify the value of the argument as an empty string, as the following syntax demonstrates: "".

Use the following script procedures to deploy applications:

 

configureStartingWeightForAnApplication

This script configures the starting weight attribute for an application. To run the script, specify the application name and starting weight arguments, as defined in the following table:

Argument Description
appName Name of the application to configure.
startingWeight Starting weight to set for the application of interest.

Syntax

AdminApplication.configureStartingWeightForAnApplication(appName, startingWeight)

Example usage

AdminApplication.configureStartingWeightForAnApplication("myApp", "10")

 

configureClassLoaderPolicyForAnApplication

This script configures the class loader policy attribute for an application. To run the script, specify the application name argument, as defined in the following table:

Argument Description
appName Name of the application to configure.
classloaderPolicy Class loader policy for the application of interest. For each appserver in the system, we can set the application class-loader policy to SINGLE or MULTIPLE. When the application class-loader policy is set to SINGLE, then a single application class loader loads all EJB modules, dependency JAR files, and shared libraries in the system. When the application class-loader policy is set to MULTIPLE, then each application receives its own class loader used for loading the EJB modules, dependency JAR files, and shared libraries for that application.

Syntax

AdminApplication.configureClassLoaderPolicyForAnApplication(appName, classloaderPolicy)

Example usage

AdminApplication.configureClassLoaderPolicyForAnApplication("myApp", "SINGLE")

 

configureClassLoaderLoadingModeForAnApplication

This script configures the class loader loading mode for an application. The class-loader delegation mode, also known as the class loader order, determines whether a class loader delegates the loading of classes to the parent class loader. To run the script, specify the application name argument, as defined in the following table:

Argument Description
appName Name of the application to configure.
classloaderMode Class loader mode to set for the application of interest. We can set the class loader mode to PARENT_FIRST or PARENT_LAST.

The PARENT_FIRST class-loader mode causes the class loader to delegate the loading of classes to its parent class loader before attempting to load the class from its local class path.

This value is the default for the class-loader policy and for standard JVM class loaders.

The PARENT_LAST class-loader mode causes the class loader to attempt to load classes from its local class path before delegating the class loading to its parent. Using this policy, an application class loader can override and provide its own version of a class that exists in the parent class loader.

Syntax

AdminApplication.configureClassLoaderLoadingModeForAnApplication(appName, classloaderMode)

Example usage

AdminApplication.configureClassLoaderLoadingModeForAnApplication("myApp", "PARENT_LAST")

 

configureSessionManagementForAnApplication

This script configures session management for an application. To run the script, specify the application name argument, as defined in the following table:

Argument Description
appName Name of the application to configure.
enableCookie Specifies whether to enable cookies.
enableProtocolSwitching Specifies whether session tracking uses cookies to carry session IDs. If cookies are enabled, session tracking recognizes session IDs that arrive as cookies and tries to use cookies for sending session IDs. If cookies are not enabled, session tracking uses Uniform Resource Identifier (URL) rewriting instead of cookies (if URL rewriting is enabled).
enableURLRewriting Specifies whether the session management facility uses rewritten URLs to carry the session IDs. If URL rewriting is enabled, the session management facility recognizes session IDs that arrive in the URL if the encodeURL method is called in the servlet.
enableSSLTracking

Deprecated feature: This feature is deprecated in WebSphere Application Server V7.0. We can reconfigure session tracking to use cookies or modify the application to use URL rewriting. If we do not want to specify this argument, specify the value as an empty string, as the following syntax demonstrates: "".depfeat

Specifies that session tracking uses Secure Sockets Layer (SSL) information as a session ID. Enabling SSL tracking takes precedence over cookie-based session tracking and URL rewriting.

enableSerializedSession Specifies whether to allow concurrent session access in a given server.
accessSessionOnTimeout Specifies whether the servlet is started normally or aborted in the event of a timeout. If we specify true, the servlet is started normally. If we specify false, the servlet execution aborts and error logs are generated.
maxWaitTime Maximum amount of time a servlet request waits on an HTTP session before continuing execution. This parameter is optional and expressed in seconds. The default is 5 seconds. Under normal conditions, a servlet request waiting for access to an HTTP session gets notified by the request that currently owns the given HTTP session when the request finishes.
sessionPersistMode Specifies whether to enable session persistence mode.
allowOverflow Specifies whether the number of sessions in memory can exceed the value specified by the Max in-memory session count property. This option is valid only in non-distributed sessions mode.
maxInMemorySessionCount Maximum number of sessions to maintain in memory.
invalidTimeout Amount of time, in minutes, before an invalid timeout occurs.
sessionEnable Specifies whether to enable session.

Syntax

AdminApplication.configureSessionManagementForAnApplication(appName, enableCookie, enableProtocolSwitching, enableURLRewriting, enableSSLTracking, enableSerializedSession, accessSessionOnTimeout, maxWaitTime, sessionPersistMode, allowOverflow, maxInMemorySessionCount, invalidTimeout, sessionEnable)

Example usage

AdminApplication.configureSessionManagementForAnApplication("myApplication", "false", "false", "true", "", "true", "90", "NONE", "true", "1500", "40", "true")

 

configureApplicationLoading

This script configures the application loading attribute for an application. To run the script, specify the application name argument, as defined in the following table:

Argument Description
appName Name of the application to configure.
enableTargetMapping Specifies whether to enable target mapping during application loading.

Syntax

AdminApplication.configureApplicationLoading(appName, enableTargetMapping)

Example usage

AdminApplication.configureApplicationLoading("myApp", "true")

 

configureLibraryReferenceForAnApplication

This script configures the library reference for an application. To run the script, specify the application name and shared library name arguments, as defined in the following table:

Argument Description
appName Name of the application to configure.
libraryName Name of the shared library to configure.

Syntax

AdminApplication.configureLibraryReferenceForAnApplication(appName, libraryName)

Example usage

AdminApplication.configureLibraryReferenceForAnApplication("myApp", "sharedLibaray")

 

configureEJBModulesOfAnApplication

This script configures the EJB modules of an application. To run the script, specify the application name argument, as defined in the following table:

Argument Description
appName Name of the application to configure.
startingWeight Target weight of the EJB modules in the application of interest.
enableTargetMapping Specifies whether to enable target mapping for EJB modules.

Syntax

AdminApplication.configureEJBModulesOfAnApplication(appName, startingWeight, enableTargetMapping)

Example usage

AdminApplication.configureEJBModulesOfAnApplication("myApp", "1500", "true")

 

configureWebModulesOfAnApplication

This script configures the Web modules of an application. To run the script, specify the application name argument, as defined in the following table:

Argument Description
appName Name of the application of interest.
webModuleName Name of the Web module to configure.
startingWeight Starting weight for the Web module of interest.
classloaderMode Class loader mode to set for the application of interest. We can set the class loader mode to PARENT_FIRST or PARENT_LAST.

The PARENT_FIRST class-loader mode causes the class loader to delegate the loading of classes to its parent class loader before attempting to load the class from its local class path.

This value is the default for the class-loader policy and for standard JVM class loaders.

The PARENT_LAST class-loader mode causes the class loader to attempt to load classes from its local class path before delegating the class loading to its parent. Using this policy, an application class loader can override and provide its own version of a class that exists in the parent class loader.

Syntax

AdminApplication.configureWebModulesOfAnApplication(appName, webModuleName, startingWeight, classloaderMode)

Example usage

AdminApplication.configureWebModulesOfAnApplication("myApp", "myWebModule", "250", "PARENT_FIRST")

 

configureConnectorModulesOfAnApplication

This script configures the connector modules of an application. To run the script, specify the application name, J2C connection factory, and node name arguments.

To run the script, specify the application name argument, as defined in the following table:

Argument Description
appName Name of the application of interest.
j2cConnFactory Name of the J2C connection factory to configure.
jndiName Name of the JNDI of interest.
authDataAlias Name of the authentication data alias of interest.
connectionTimeout Number of seconds that a connection request waits when there are no connections available in the free pool and no new connections can be created. This usually occurs because the maximum value of connections in the particular connection pool has been reached.

Syntax

AdminApplication.configureConnectorModulesOfAnApplication(appName, j2cConnFactory, jndiName, authDataAlias, connectionTimeout)

Example usage

AdminApplication.configureConnectorModulesOfAnApplication("myApp", "myConnFactory", "myDefaultSSLSettings", "150")




 

Related tasks

Use the script library to automate the application serving environment
Automating application configurations using the scripting library
Application administration scripts

 

Related

Application installation and uninstallation scripts
Application query scripts
Application update scripts
Application export scripts