Network Deployment (Distributed operating systems), v8.0 > Reference > Jython script library
Application deployment configuration scripts
Overview
The scripting library automates application configuration. This topic provides usage information for scripts that deploy applications.
Each application management script is located in...
PROFILE_ROOT/scriptLibraries/application/V70
If you do not want to specify an argument with the script, specify the value of the argument as an empty string: ""
Use the following script procedures to deploy applications:
- configureStartingWeightForAnApplication
- configureClassLoaderPolicyForAnApplication
- configureClassLoaderLoadingModeForAnApplication
- configureSessionManagementForAnApplication
- configureApplicationLoading
- configureLibraryReferenceForAnApplication
- configureEJBModulesOfAnApplication
- configureWebModulesOfAnApplication
- configureConnectorModulesOfAnApplication
configureStartingWeightForAnApplication
Configure the starting weight attribute for an application.
Argument Description appName 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.
Argument Description appName Application to configure. classloaderPolicy
SINGLE A single application class loader loads all EJB modules, dependency JAR files, and shared libraries in the system. MULTIPLE 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
Set whether a class loader delegates the loading of classes to the parent class loader.
Argument Description appName Application to configure. classloaderMode
PARENT_FIRST Delegate loading to parent class loader before attempting to load the class from local class path. Default. PARENT_LAST Load classes from local class path before delegating the class loading to its parent. Used by application class loader to 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.
Argument Description appName Application to configure. enableCookie Whether to enable cookies. enableProtocolSwitching 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 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 inWAS Version 7.0. We 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: "".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 Whether to allow concurrent session access in a given server. accessSessionOnTimeout 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 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 Whether to enable session persistence mode. allowOverflow 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 a timeout occurs that is not valid. sessionEnable 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
Configure the application loading attribute for an application.
Argument Description appName Application to configure. enableTargetMapping Whether to 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.
Argument Description appName Application to configure. libraryName Shared library to configure. Syntax
AdminApplication.configureLibraryReferenceForAnApplication(appName, libraryName)
Example usage
AdminApplication.configureLibraryReferenceForAnApplication("myApp", "sharedLibrary")
configureEJBModulesOfAnApplication
Configure the EJB modules of an application.
Argument Description appName Application to configure. startingWeight Target weight of the EJB modules in the application of interest. enableTargetMapping Whether to 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.
Argument Description appName Application of interest. webModuleName Web module to configure. startingWeight Starting weight for the web module of interest. classloaderMode
PARENT_FIRST Delegate loading to parent class loader before attempting to load the class from local class path. Default. PARENT_LAST Load classes from local class path before delegating the class loading to its parent. Used by application class loader to 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
Configure the connector modules of an application.
Argument Description appName Application of interest. j2cConnFactory J2C connection factory to configure. jndiName JNDI of interest. authDataAlias 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 using wsadmin.sh
Automate application configuration
Application administration scripts
Application installation and uninstallation scripts
Application query scripts
Application update scripts
Application export scripts