+

Search Tips   |   Advanced Search

Application deployment configuration scripts

The scripting library provides script procedures to automate your application configurations. See the usage information for scripts that deploy applications. We can run each script individually or combine procedures to create custom automation scripts for our 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 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

Configure 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 application server 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

Configure 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

Configure 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 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. 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

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 sessionPersistMode 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 invalidTimeout Amount of time, in minutes, before a timeout occurs that is not valid.
sessionEnable 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

Configure 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 Enable target mapping during application loading.

Syntax

AdminApplication.configureApplicationLoading(appName, enableTargetMapping)

Example usage

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


configureLibraryReferenceForAnApplication

Configure 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", "sharedLibrary")


configureEJBModulesOfAnApplication

Configure 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 Enable target mapping for EJB modules.

Syntax

AdminApplication.configureEJBModulesOfAnApplication(appName, 
 startingWeight, enableTargetMapping)

Example usage

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


configureWebModulesOfAnApplication

Configure 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.

createSessionManager Specifies whether a session manager is created for each web module that does not have one. If we specify true, which is the default value, a session manager is created for each web module that does not have a session manager. If we 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.bprac

Syntax

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

Example usage

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


configureConnectorModulesOfAnApplication

Configure 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 Java 2 Connector (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")

  • Use the script library to automate the application serving environment
  • Automating application configurations
  • Application administration scripts
  • Application installation and uninstallation scripts
  • Application query scripts
  • Application update scripts
  • Application export scripts