Application deployment configuration scripts

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

Each application management script procedure is located in the profile_root/scriptLibraries/application/V70 directory. The application deployment script procedures contain multiple arguments. If you 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: "".

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:
Table 1. configureStartingWeightForAnApplication argument descriptions . Run the script to set an application starting weight.
Argument Description
appName Specifies the name of the application to configure.
startingWeight Specifies the 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:
Table 2. configureClassLoaderPolicyForAnApplication argument descriptions . Run the script to set an application class loader policy.
Argument Description
appName Specifies the name of the application to configure.
classloaderPolicy Specifies the class loader policy for the application of interest. For each application server in the system, you 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 that is 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:
Table 3. configureClassLoaderLoadingModeForAnApplication argument descriptions . Run the script to set an application class loader mode.
Argument Description
appName Specifies the name of the application to configure.
classloaderMode Specifies the class loader mode to set for the application of interest. You 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:
Table 4. configureSessionManagementForAnApplication argument descriptions . Run the script to configure application session management.
Argument Description
appName Specifies the 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 inWebSphere® Application Server Version 7.0. You can reconfigure session tracking to use cookies or modify the application to use URL rewriting. If you do not want to specify this argument, specify the value as an empty string, as the following syntax demonstrates: "".

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 you specify true, the servlet is started normally. If you specify false, the servlet execution aborts and error logs are generated.
maxWaitTime Specifies the 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 Specifies the maximum number of sessions to maintain in memory.
invalidTimeout Specifies the amount of time, in minutes, before a timeout occurs that is not valid.
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:
Table 5. configureApplicationLoading argument descriptions . Run the script to configure application loading.
Argument Description
appName Specifies the 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:
Table 6. configureLibraryReferenceForAnApplication argument descriptions . Run the script to configure application library reference.
Argument Description
appName Specifies the name of the application to configure.
libraryName Specifies the name of the shared library to configure.

Syntax

AdminApplication.configureLibraryReferenceForAnApplication(appName, libraryName)

Example usage

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

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:
Table 7. configureEJBModulesOfAnApplication argument descriptions . Run the script to configure EJB modules of an application.
Argument Description
appName Specifies the name of the application to configure.
startingWeight Specifies the 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:
Table 8. configureWebModulesOfAnApplication argument descriptions . Run the script to configure Web modules of an application.
Argument Description
appName Specifies the name of the application of interest.
webModuleName Specifies the name of the web module to configure.
startingWeight Specifies the starting weight for the web module of interest.
classloaderMode Specifies the class loader mode to set for the application of interest. You 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.

createSessionManager Specifies whether a session manager is created for each web module that does not have one. If you specify true, which is the default value, a session manager is created for each web module that does not have a session manager. If you specify false, a session manager is not created for each web module that does not have a session manager.

The recommended usage is to specify false.

Syntax

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

Example usage

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

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:
Table 9. configureConnectorModulesOfAnApplication argument descriptions . Run the script to configure connector modules of an application.
Argument Description
appName Specifies the name of the application of interest.
j2cConnFactory Specifies the name of the Java 2 Connector (J2C) connection factory to configure.
jndiName Specifies the name of the Java Naming and Directory Interface (JNDI) of interest.
authDataAlias Specifies the name of the authentication data alias of interest.
connectionTimeout Specifies the 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")