Server settings configuration scripts
The scripting library automates appserver configuration for class loaders, JVM settings, EJB containers, performance monitoring, dynamic cache, and so on.
We can run each script individually, or combine procedures to create custom automation scripts for the environment.
All server management script procedures are located in...
WAS_HOME/scriptLibraries/servers/V70
To administer appservers...
- configureAdminService
- configureApplicationServerClassloader
- configureDynamicCache
- configureEJBContainer
- configureFileTransferService
- configureListenerPortForMessageListenerService
- configureMessageListenerService
- configureStateManageable
To configure runtime environment...
- configureCustomProperty
- configureCustomService
- configureEndPointsHost
- configureJava VirtualMachine
- configureORBService
- configureProcessDefinition
- configureRuntimeTransactionService
- configureThreadPool
- configureTransactionService
- setJVMProperties
- setTraceSpecification
To configure Web containers...
- configureCookieForServer
- configureHTTPTransportForWebContainer
- configureSessionManagerForServer
- configureWebContainer
To configure logs and monitor performance...
- configureJava ProcessLogs
- configurePerformanceMonitoringService
- configurePMIRequestMetrics
- configureServerLogs
- configureTraceService
configureAdminService
Set settings for the AdminService interface. The AdminService interface is the server-side interface to the appserver administration functions.
Argument Description nodeName Name of the node of interest. serverName Name of the server of interest. localAdminProtocol Type of connector to use to connect the AdminService interface to the appserver for local connection. remoteAdminProtocol Type of connector to use to connect the AdminService interface to the appserver for remote connection. otherAttributeList Optional arguments... [["enabled", "true"]
["pluginConfigService", "(cells/Michael-DellCell01/nodes/Michael-DellNode01/servers/server1|server.xml#PluginConfigService_1183)"]]
Syntax
AdminServerManagement.configureAdminService(nodeName, serverName, localAdminProtocol, remoteAdminProtocol, otherAttributeList)Example usage
AdminServerManagement.configureAdminService("Michael-DellNode01", "server1", "IPC", "SOAP", [["enabled", "true"], ["pluginConfigService", "(cells/Michael-DellCell01/nodes/Michael-DellNode01/servers/server1|server.xml#PluginConfigService_1183)"]])
configureApplicationServerClassloader
Set a class loader for the appserver. Class loaders enable applications that are deployed on the appserver to access repositories of available classes and resources.
Argument Description nodeName Name of the node of interest. serverName Name of the server of interest. policy Application class loader policy as SINGLE or MULTIPLE. Specify the SINGLE value to prevent the isolation applications, and to configure the appserver to use a single application class loader to load all of the EJB modules, shared libraries, and dependency files in the system.
Specify the MULTIPLE value to isolate applications and provide each application with its own class loader to load EJB modules, shared libraries, and dependency JAR files.
mode Class loader mode as PARENT_FIRST or APPLICATION_FIRST. The PARENT_FIRST option 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. The APPLICATION_FIRST option 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.
libraryName Name of the shared library of interest.
Syntax
AdminServerManagement.configureApplicationServerClassloader(nodeName, serverName, policy, mode, libraryName)Example usage
AdminServerManagement.configureApplicationServerClassloader("Michael-DellNode01", "MULTIPLE", "PARENT_FIRST", "myLibraryReference")
configureDynamicCache
Set the dynamic cache service in the server configuration.
The dynamic cache service works within an appserver JVM, intercepting calls to cacheable objects. For example, the dynamic cache service intercepts calls through a servlet service method or a command execute method, and either stores the output of the object to the cache or serves the content of the object from the dynamic cache.
Argument Description nodeName Name of the node of interest. serverName Name of the server of interest. defaultPriority Default priority for cache entries, determining how long an entry stays in a full cache. Specify an integer between 1 and 255. cacheSize Positive integer as the value for the maximum number of entries that the cache holds. Enter a cache size value in this field that is between the range of 100 through 200000. externalCacheGroupName The external cache group name needs to match the ExternalCache property as defined in the servlet or JSP file cachespec.xml file. When external caching is enabled, the cache matches pages with its URI and pushes matching pages to the external cache.
The entries can then be served from the external cache, instead of from the appserver.
externalCacheGroupType External cache group type. otherAttributeList Optional arguments... [["cacheProvider", "myProvider"]
["diskCacheCleanupFrequency", 2]
["flushToDiskOnStop", "true"]]
Syntax
AdminServerManagement.configureDynamicCache(nodeName, serverName, defaultPriority, cacheSize, externalCacheGroupName, externalCacheGroupType, otherAttributeList)Example usage
AdminServerManagement.configureDynamicCache("Michael-DellNode01", "server1", 2, 5000, "EsiInvalidator", "SHARED", [["cacheProvider", "myProvider"], ["diskCacheCleanupFrequency", 2], ["flushToDiskOnStop","true"]])
configureEJBContainer
Set an EJB container in the server configuration. An EJB container provides a run-time environment for enterprise beans within the appserver. The container handles all aspects of an enterprise bean's operation within the appserver and acts as an intermediary between the user-written business logic within the bean and the rest of the appserver environment.
Argument Description nodeName Name of the node of interest. serverName Name of the server of interest. passivationDirectory Directory into which the container saves the persistent state of passivated stateful session beans. This directory must already exist. It is not automatically created. defaultDatasourceJNDIName JNDI name of a data source to use if no data source is specified during application deployment. Not applicable for EJB 2.x-compliant container-managed persistence beans.
Syntax
AdminServerManagement.configureEJBContainer(nodeName, serverName, passivationDir, defaultDatasourceJNDIName)AdminServerManagement.configureEJBContainer("Michael-DellNode01", "server1", "C:\temp\myDir", "jndi1")AdminServerManagement.configureEJBContainer("Michael-DellNode01", "server1", "/temp/myDir", "jndi1")
configureFileTransferService
Set the file transfer service for the appserver. The file transfer service transfers files from the dmgr to individual remote nodes.
Argument Description nodeName Name of the node of interest. serverName Name of the server of interest. retriesCount Number of times the file transfer service to retries sending or receiving a file after a communication failure occurs. The default value is 3. retryWaitTime Number of seconds the file transfer service waits before retrying a failed file transfer. The default value is 10. otherAttributeList Optional arguments... [["enable", "true"]]
Syntax
AdminServerManagement.configureFileTransferService(nodeName, serverName, retriesCount, retryWaitTime, otherAttributeList)Example usage
AdminServerManagement.configureFileTransferService("Michael-DellNode01", "server1", 5, 600, [["enable", "true"]])
configureListenerPortForMessageListenerService
Set the listener port for the message listener service in the server configuration. The message listener service is an extension to the JMS functions of the JMS provider. It provides a listener manager that controls and monitors one or more JMS listeners, which each monitor a JMS destination on behalf of a deployed message-driven bean.
Argument Description nodeName Name of the node of interest. serverName Name of the server of interest. listenerPortName The name by which the listener port is known for administrative purposes. connectionFactoryJNDIName The JNDI name for the JMS connection factory to be used by the listener port; for example, jms/connFactory1. destinationJNDIName The JNDI name for the destination to be used by the listener port; for example, jms/destn1 maxMessages The maximum number of messages that the listener can process in one transaction. If the queue is empty, the listener processes each message when it arrives. Each message is processed within a separate transaction. maxRetries The maximum number of times that the listener tries to deliver a message before the listener is stopped, in the range 0 through 2147483647. The maximum number of times that the listener tries to deliver a message to a message-driven bean instance before the listener is stopped. maxSession Maximum number of concurrent sessions that a listener can have with the JMS server to process messages. Each session corresponds to a separate listener thread and therefore controls the number of concurrently processed messages. Adjust this parameter when the server does not fully use the available capacity of the machine and if we do not need to process messages in a specific message order.
Syntax
AdminServerManagement.configureListenerPortForMessageListener(nodeName, serverName, listenerPortName, connectionFactoryJNDIName, destinationJNDIName, maxMessages, maxRetries, maxSession)Example usage
AdminServerManagement.configureListenerPortForMessageListener("Michael-DellNode01", "server1", "myListenerPort", "connJNDI", "destJNDI", 5, 2, 3)
configureMessageListenerService
Set the message listener service in the server configuration.
The message listener service is an extension to the JMS functions of the JMS provider. It provides a listener manager that controls and monitors one or more JMS listeners, which each monitor a JMS destination on behalf of a deployed message-driven bean.
Argument Description nodeName Name of the node of interest. serverName Name of the server of interest. maxListenerRetry Maximum number of times that a listener port managed by this service tries to recover from a failure before giving up and stopping. When stopped the associated listener port is changed to the stop state. listenerRecoveryInterval Time in seconds between retry attempts by a listener port to recover from a failure. poolingThreshold Maximum number of unused connections in the pool. The default value is 10. poolingTimeout Number of milliseconds after which a connection in the pool is destroyed if it has not been used. An MQSimpleConnectionManager allocates connections on a most-recently-used basis, and destroys connections on a least-recently-used basis. By default, a connection is destroyed if it has not been used for five minutes. otherAttributeList Optional arguments... [["description", "test message listener"]
["isGrowable", "true"]
["maximumSize", 100]
["minimumSize", 5]]
Syntax
AdminServerManagement.configureMessageListenerService(nodeName, serverName, maxListenerRetry, listenerRecoveryInterval, poolingThreshold, poolingTimeout, otherAttributeList)Example usage
AdminServerManagement.configureMessageListenerService("Michael-DellNode01", "server1", 5, 120, 20, 600000, "myProp", "myValue", [["description", "test message listener"], ["isGrowable", "true"], ["maximumSize", 100], ["minimumSize", 5]])
configureStateManageable
Set the initial state of the appserver. The initial state refers to the desired state of the component when the server process starts.
Argument Description nodeName Name of the node of interest. serverName Name of the server of interest. parentType Type of component to modify. initialState Desired state of the component when the server process starts. Valid values are START and STOP.
Syntax
AdminServerManagement.configureStateManageable(nodeName, serverName, parentType, initialState)Example usage
AdminServerManagement.configureStateManageable("Michael-DellNode01", "server1", "Server", "START")
configureCustomProperty
Set custom properties in the appserver configuration. Use custom properties for configuring internal system properties which some components use, for example, to pass information to a Web container.
Argument Description nodeName Name of the node of interest. serverName Name of the server of interest. parentType Type of component to configure. propertyName Custom property to configure. propertyValue Value of the custom property to configure. otherAttributeList Optional arguments... [["commTraceEnabled", "true"]
["enable", "true"]]
Syntax
AdminServerManagement.configureCustomProperty(nodeName, serverName, parentType, propertyName, propertyValue, otherAttributeList)Example usage
AdminServerManagement.configureCustomProperty("Michael-DellNode01", "server1", "ThreadPool", "myProp1", "myPropValue", [["description", "my property test"], ["required", "false"]])
configureCustomService
Set a custom service in the appserver configuration. Each custom services defines a class that is loaded and initialized whenever the server starts and shuts down. Each of these classes must implement the interface...
com.ibm.websphere.runtime.CustomServiceAfter you create a custom service, use the admin console to configure that custom service for the appservers.
Argument Description nodeName Name of the node of interest. serverName Name of the server of interest. classname Class name of the service implementation. This class must implement the Custom Service interface. displayname Name of the service. classpath Class path used to locate the classes and JAR files for this service. otherAttributeList Optional arguments... [["description", "test custom service"]
["enable", "true"]]
Syntax
AdminServerManagement.configureCustomService(nodeName, serverName, classname, displayname, classpath, otherAttributeList)AdminServerManagement.configureCustomService("Michael-DellNode01", "server1", "myClass", "myName", "C:\temp\boo.jar", [["description", "test custom service"], ["enable", "true"]])
AdminServerManagement.configureCustomService("Michael-DellNode01", "server1", "myClass", "myName", "/temp/boo.jar", [["description", "test custom service"], ["enable", "true"]])
configureEndPointsHost
Argument Description nodeName Name of the node of interest. serverName Name of the server of interest. hostName Name of the host of interest.
Syntax
AdminServerManagement.configureEndPointsHost(nodeName, serverName, hostName)Example usage
AdminServerManagement.configureEndPointsHost("Michael-DellNode01", "AppServer01", "myHostname")
configureJava VirtualMachine
Set a JVM. The application server, being a Java process, requires a JVM in order to run, and to support the Java applications running on it.
Argument Description javaVirtualMachineConfigID Configuration ID of the Java virtual machine you want to make changes. debugMode Whether to run the JVM in debug mode. The default is not to enable debug mode support. If we set the debugMode argument to true, then specify debug arguments.
debugArgs Debug arguments to pass to the JVM code that starts the appserver process. If we enable debugging on multiple appservers on the same node, make sure that the servers are using different address arguments, which define the port for debugging. For example, if we enable debugging on two servers and leave the default debug port for each server as address=7777, the servers could fail to start properly.
otherAttributeList Optional arguments... [["internalClassAccessMode", "RESTRICT""]
["disableJIT", "false"]
["verboseModeJNI", "false"]]
Syntax
AdminServerManagement.configureJava VirtualMachine(javaVirtualMachineConfigID, debugMode, debugArgs, otherAttributeList)Example usage
AdminServerManagement.configureJava VirtualMachine ("(cells/WAS00Network/nodes/ndnode1/servers/server1|server.xml#Java VirtualMachine_1208)", "true", "mydebug", [["internalClassAccessMode", "RESTRICT"], ["disableJIT", "false"], ["verboseModeJNI", "false"]])
configureORBService
Set an (ORB) service in the server configuration. An (ORB) manages the interaction between clients and servers, using the IIOP. It enables clients to make requests and receive responses from servers in a network-distributed environment.
Argument Description nodeName Name of the node of interest. serverName Name of the server of interest. requestTimeout Number of seconds to wait before timing out on a request message. requestRetriesCount
Number of times that the ORB attempts to send a request if a server fails. Retrying sometimes enables recovery from transient network failures. This field is ignored on the z/OS platform.
requestRetriesDelay
Number of milliseconds between request retries. This field is ignored on the z/OS platform.
connectionCacheMax
Maximum number of entries that can occupy the ORB connection cache before the ORB starts to remove inactive connections from the cache. This field is ignored on the z/OS platform.
It is possible that the number of active connections in the cache will temporarily exceed this threshold value. If necessary, the ORB will continue to add connections as long as resources are available.
connectionCacheMin
Minimum number of entries in the ORB connection cache. This field is ignored on the z/OS platform.
The ORB will not remove inactive connections when the number of entries is below this value.
locateRequestTimeout Number of seconds to wait before timing out on a LocateRequest message. This field is ignored on the z/OS platform. otherAttributeList Optional arguments... [["commTraceEnabled", "true"]
["enable", "true"]]
Syntax
AdminServerManagement.configureORBService(nodeName, serverName, requestTimeout, requestRetriesCount, requestRetriesDelay, connectionCacheMax, connectionCacheMin, locateRequestTimeout, otherAttributeList)Example usage
AdminServerManagement.configureMessageListenerService("Michael-DellNode01", "server1", 5, 120, 20, 600000, 20, 300, [["commTraceEnabled", "true"], ["enable", "true"]])
configureProcessDefinition
Set the server process definition. Enhance the operation of an appserver by defining command-line information for starting or initializing the appserver process. Process definition settings define runtime properties such as the program to run, arguments to run the program, and the working directory.
To run the script, specify the node name and server name arguments, as defined in the following table:
Argument Description nodeName Name of the node of interest. serverName Name of the server of interest. otherParamList Optional arguments [["executableName", "value1"]
["executableArguments", "value2"]
["workingDirectory", "value3"]]
Syntax
AdminServerManagement.configureProcessDefintion(nodeName, serverName, otherParamList)Example usage
AdminServerManagement.configureProcessDefinition("Michael-DellNode01", "server1", [["executableName", "value1"],["executableArguments"."value2"],["workingDirectory","value3"]])
configureRuntimeTransactionService
Set the transaction service for the server configuration. The transaction service is a server runtime component that coordinates updates to multiple resource managers to ensure atomic updates of data. Transactions are started and ended by applications or the container in which the applications are deployed.
Argument Description nodeName Name of the node of interest. serverName Name of the server of interest. totalTranLifetimeTimeout Default maximum time, in seconds, allowed for a transaction that is started on this server before the transaction service initiates timeout completion. Any transaction that does not begin completion processing before this timeout occurs is rolled back. clientInactivityTimeout Maximum duration, in seconds, between transactional requests from a remote client. Any period of client inactivity that exceeds this timeout results in the transaction being rolled back in this appserver. If we set this value to 0, there is no timeout limit.
Syntax
AdminServerManagement.configureRuntimeTransactionService(nodeName, serverName, totalTranLifetimeTimeout, clientInactivityTimeout)Example usage
AdminServerManagement.configureRuntimeTransactionService("Michael-DellNode01", "server1", 600, 600)
configureThreadPool
Set thread pools in the server configuration. A thread pool enables components of the server to reuse threads, which eliminates the need to create new threads at run time. Creating new threads expends time and resources.
Argument Description nodeName Name of the node of interest. serverName Name of the server of interest. parentType Maximum number of times that a listener port managed by this service tries to recover from a failure before stopping. When stopped the associated listener port is changed to the stop state. threadPoolName Name of the thread pool of interest. maximumSize Maximum number of threads to maintain in the default thread pool. If the Tivoli Performance Viewer shows the Percent Maxed metric to remain consistently in the double digits, consider increasing the Maximum size. The Percent Maxed metric indicates the amount of time that the configured threads are used. minimumSize Minimum number of threads to allow in the pool. When an appserver starts, no threads are initially assigned to the thread pool. Threads are added to the thread pool as the workload assigned to the appserver requires them, until the number of threads in the pool equals the number specified in the Minimum size field. After this point in time, additional threads are added and removed as the workload changes. However the number of threads in the pool never decreases below the number specified in the Minimum size field, even if some of the threads are idle. inactivityTimeout Milliseconds of inactivity that should elapse before a thread is reclaimed. A value of 0 indicates not to wait and a negative value (less than 0) means to wait forever. otherAttributeList Optional arguments: [["description", "testing thread pool"]
["isGrowable", "true"]
["name", "myThreadPool"]]
Syntax
AdminServerManagement.configureThreadPool(nodeName, serverName, parentType, threadPoolName, maximumSize, minimumSize, inactivityTimeout, otherAttributeList)Example usage
AdminServerManagement.configureThreadPool ("Michael-DellNode01", "server1", "myThreadPool", "ObjectRequestBroker", 20, 5, 6000, [["description", "testing thread pool"]
["isGrowable", "true"], ["name","myThreadPool"]])
configureTransactionService
Set the transaction service for the appserver. You can use transactions with the applications to coordinate multiple updates to resources as atomic units (as indivisible units of work) such that all or none of the updates are made permanent.
Argument Description nodeName Name of the node of interest. serverName Server name of the of interest. totalTranLifetimeTimeout Default maximum time, in seconds, allowed for a transaction that is started on this server before the transaction service initiates timeout completion. Any transaction that does not begin completion processing before this timeout occurs is rolled back. This timeout is used only if the application component does not set its own transaction timeout.
New feature: Only the total transaction lifetime timeout and the maximum transaction timeout have grace periods. We can disable the grace periods using the DISABLE_TRANSACTION_TIMEOUT_GRACE_PERIOD custom property
clientInactivityTimeout Maximum duration, in seconds, between transactional requests from a remote client. Any period of client inactivity that exceeds this timeout results in the transaction being rolled back in this appserver. If we set this value to 0, there is no timeout limit. maximumTransactionTimeout Upper limit of the transaction timeout, in seconds, for transactions that run in this server. This value should be greater than or equal to the total transaction timeout. This timeout constrains the upper limit of all other transaction timeouts. heuristicRetryLimit Number of times that the appserver retries a completion signal, such as commit or rollback. Retries occur after a transient exception from a resource manager or remote partner, or if the configured asynchronous response timeout expires before all Web Services Atomic Transaction (WS-AT) partners have responded. heuristicRetryWait Seconds that the appserver waits before retrying a completion signal, such as commit or rollback, after a transient exception from a resource manager or remote partner. propogateOrBMTTranLifetimeTimeout Seconds that a transaction remains inactive before it is rolled back. asyncResponseTimeout Amount of time, in seconds, that the server waits for an inbound Web Services Atomic Transaction (WS-AT) protocol response before resending the previous WS-AT protocol message. otherAttributeList Optional arguments... [["LPSHeuristicCompletion", "ROLLBACK"]
["WSTransactionSpecificationLevel", "WSTX_10"]
["enable", "true"]]
Syntax
AdminServerManagement.configureTransactionService(nodeName, serverName, totalTranLifetimeTimeout, clientInactivityTimeout, maximumTransactionTimeout, heuristicRetryLimit, heuristicRetryWait, propogateOrBMTTranLifetimeTimeout, asyncResponseTimeout, otherAttributeList)Example usage
AdminServerManagement.configureTransactionService("Michael-DellNode01", "server1", 120, 60, 5, 2, 5, 300, 30, [["LPSHeuristicCompletion", "ROLLBACK"], ["WSTransactionSpecificationLevel", "WSTX_10"], ["enable", "true"]])
setJVMProperties
Set additional properties for the JVM configuration.
Argument Description nodeName Name of the node of interest. serverName Name of the server of interest. classPath Optionally specifies the standard class path in which the Java virtual machine code looks for classes. bootClasspath Optionally specifies bootstrap classes and resources for JVM code. This option is only available for JVM instructions that support bootstrap classes and resources. initialHeapSize Optionally specifies the initial heap size available to the JVM code, in megabytes. Increasing the minimum heap size can improve startup. The number of garbage collection occurrences are reduced and a 10% gain in performance is realized. Increasing the size of the Java heap improves throughput until the heap no longer resides in physical memory, in general. After the heap begins swapping to disk, Java performance suffers drastically. maxHeapSize Optionally specifies the maximum heap size available to the JVM code, in megabytes. Increasing the heap size can improve startup. By increasing heap size, we can reduce the number of garbage collection occurrences with a 10% gain in performance. debugMode Optionally specifies whether to run the JVM in debug mode. The default is not to enable debug mode support. If we set the debugMode argument to true, then specify debug arguments. debugArgs Optionally specifies debug arguments to pass to the JVM code that starts the appserver process. If we enable debugging on multiple appservers on the same node, make sure that the servers are using different address arguments, which define the port for debugging. For example, if we enable debugging on two servers and leave the default debug port for each server as address=7777, the servers could fail to start properly.
Syntax
AdminServerManagement.setJVMProperties(nodeName, serverName, classPath, bootClasspath, initialHeapSize, maxHeapSize, debugMode, debugArgs)AdminServerManagement.setJVMProperties("Michael-DellNode01", "server1", "c:\a.jar", "", ", "", "", "")
AdminServerManagement.setJVMProperties("Michael-DellNode01", "server1", "/a.jar", "", ", "", "", "")
setTraceSpecification
Set the trace spec for the configuration.
Argument Description nodeName Name of the node of interest. serverName Name of the server of interest. traceSpecification Optionally specifies debug arguments to pass to the JVM code that starts the appserver process. If we enable debugging on multiple appservers on the same node, make sure that the servers are using different address arguments, which define the port for debugging. For example, if we enable debugging on two servers and leave the default debug port for each server as address=7777, the servers could fail to start properly.
Syntax
AdminServerManagement.setJVMProperties(nodeName, serverName, traceSpecification)Example usage
AdminServerManagement.setTraceSpecification("Michael-DellNode01", "server1", "com.ibm.ws.management.*=all")
configureCookieForServer
Set cookies in the appserver configuration. Configure cookies to track sessions.
Argument Description nodeName Name of the node of interest. serverName Name of the server of interest. cookieName Unique name for the session management cookie. The servlet spec requires the name JSESSIONID. However, for flexibility this value can be configured. domain Domain field of a session tracking cookie. This value controls whether or not a browser sends a cookie to particular servers. For example, if we specify a particular domain, session cookies are sent to hosts in that domain. The default domain is the server. maximumAge Amount of time that the cookie lives on the client browser. Specify that the cookie lives only as long as the current browser session, or to a maximum age. If we choose the maximum age option, specify the age in seconds. This value corresponds to the Time to Live (TTL) value described in the Cookie specification. Default is the current browser session which is equivalent to setting the value to -1. secure Session cookies include the secure field. Enabling the feature restricts the exchange of cookies to HTTPS sessions only. otherAttributeList Optional arguments... [["path", "C:/temp/mycookie"]]
Syntax
AdminServerManagement.configureCookieForServer(nodeName, serverName, cookieName, domain, maximumAge, secure, otherAttributeList)Example usage
AdminServerManagement.configureCookieForServer("Michael-DellNode01", "server1", "myCookie", "uk.kingdom.com", -1, "true", [["path", "C:/temp/mycookie"]])
configureHTTPTransportForWebContainer
Set HTTP transports for a Web container. Transports provide request queues between appserver plug-ins for Web servers and Web containers in which the Web modules of applications reside. When you request an application in a Web browser, the request is passed to the Web server, then along the transport to the Web container.
Argument Description nodeName Name of the node of interest. serverName Name of the server of interest. adjustPort Whether to automatically adjust the port for the Web container of interest. external Whether to set the HTTP Transport for the Web container to external. sslConfig The SSL settings type for connections between the WAS plug-in and application server. The options include one or more SSL settings defined in the Security Center; for example, DefaultSSLSettings, ORBSSLSettings, or LDAPSSLSettings. sslEnabled Whether to protect connections between the WAS plug-in and appserver with SSL. The default is not to use SSL.
Syntax
AdminServerManagement.configureHTTPTransportForWebContainer(nodeName, serverName, adjustPort, external, sslConfig, sslEnabled)Example usage
AdminServerManagement.configureHTTPTransportForWebContainer("Michael-DellNode01", "server1", "true", "true", "mySSLConfig", "true")
configureSessionManagerForServer
Set the session manager for the appserver. Sessions allow applications running in a Web container to keep track of individual users.
Argument Description nodeName Name of the node of interest. serverName Name of the server of interest. sessionPersistenceMode Session persistence mode. Valid values include DATABASE, DATA_REPLICATION, and NONE. otherAttributeList Optional arguments... [["accessSessionOnTimeout", "true"]
["enabled", "true"]]
Syntax
AdminServerManagement.configureSessionManagerForServer(nodeName, serverName, sessionPersistenceMode, otherAttributeList)Example usage
AdminServerManagement.configureSessionManagerForServer("Michael-DellNode01", "server1", "DATABASE", [["accessSessionOnTimeout", "true"], ["enabled", "true"]])
configureWebContainer
Set Web containers in the appserver configuration. A Web container handles requests for servlets, JSPs, and other types of files that include server-side code. The Web container creates servlet instances, loads and unloads servlets, creates and manages request and response objects, and performs other servlet management tasks.
Argument Description nodeName Name of the node of interest. serverName Name of the server of interest. webContainerName Name of the Web container of interest. defaultVirtualHostName Virtual host that enables a single host machine to resemble multiple host machines. Resources associated with one virtual host cannot share data with resources associated with another virtual host, even if the virtual hosts share the same physical machine. Valid values include:
- default_host
- WAS ND v7.0 provides a default virtual host with some common aliases such as the machine IP address, short host name, and fully qualified host name. The alias comprises the first part of the path for accessing a resource such as a servlet. For example, it is localhost:9082 in the request http://localhost:9082/myServlet.
- admin_host
- This is another name for the appserver; also known as server1 in the base installation. This process supports the use of the admin console.
- proxy_host
- The virtual host called proxy_host, includes default port definitions, port 80 and 443, which are typically initialized as part of the proxy server initialization. Use this proxy host as appropriate with routing rules associated with the proxy server.
enableServletCaching If a servlet is invoked once and it generates output to be cached, a cache entry is created containing not only the output, but also side effects of the invocation. These side effects can include calls to other servlets or JSPs, as well as metadata about the entry, including timeout and entry priority information.
Portlet fragment caching requires that servlet caching is enabled.
Enable portlet fragment caching automatically enables servlet caching.
Disable servlet caching automatically disables portlet fragment caching.
otherAttributeList Optional arguments... [["allowAsyncRequestDispatching", "true"]
["disablePooling", "true"]
["sessionAffinityTimeout", 20]]
Syntax
AdminServerManagement.configureWebContainer(nodeName, serverName, defaultVirtualHostName, enableServletCaching, otherAttributeList)Example usage
AdminServerManagement.configureWebContainer("Michael-DellNode01", "server1", "myVH.uk.kingdom.com", true, [["allowAsyncRequestDispatching", "true"], ["disablePooling", "true"], ["sessionAffinityTimeout", 20]])
configureJava ProcessLogs
Set Java process logs for the appserver. The system creates the JVM logs by redirecting the System.out and System.err streams of the JVM to independent log files.
Argument Description javaProcessDefConfigID Configuration ID of the Java Process Definition of interest. processLogRoot Root directory for the process logs. otherAttributeList Optional arguments... [["stdinFilename", "/temp/mystdin.log"]]
Syntax
AdminServerManagement.configureJava ProcessLogs(javaProcessDefConfigID, processLogRoot, otherAttributeList)AdminServerManagement.configureJava ProcessLogs ("(cells/WAS00Network/nodes/ndnode1/servers/server1|server.xml#Java ProcessDef_1184)", "C:\temp\myJava Log", [["stdinFilename", "c:\temp\mystdin.log"]])
AdminServerManagement.configureJava ProcessLogs ("(cells/WAS00Network/nodes/ndnode1/servers/server1|server.xml#Java ProcessDef_1184)", "/temp/myJava Log", [["stdinFilename", "/temp/mystdin.log"]])
configurePerformanceMonitoringService
Set PMI in the configuration. PMI enables the server to collect performance data from various product components.
PMI provides information about average system resource usage statistics, with no correlation between the data across different components.
Argument Description nodeName Name of the node of interest. serverName Name of the server of interest. enable Whether the appserver attempts to enable PMI. If an appserver is started when the PMI is disabled, we have to restart the server in order to enable it. initialSpecLevel Pre-defined set of PMI statistics for all components in the server.
- None
- All statistics are disabled.
- Basic
- Provides basic monitoring for appserver resources and applications. This includes Java EE components, HTTP session information, CPU usage information, and the top 38 statistics. This is the default setting.
- Extended
- Provides extended monitoring, including the basic level of monitoring plus workload monitor, performance advisor, and Tivoli resource models. Extended provides key statistics from frequently used WAS components.
- All
- Enables all statistics.
- Custom
- Provides fine-grained control with the ability to enable and disable individual statistics.
otherAttributeList Optional arguments... [["statisticSet", "test statistic set"]
["synchronizedUpdate", "true"]]
Syntax
AdminServerManagement.configurePerformanceMonitoringService(nodeName, serverName, enable, initialSpecLevel, otherAttributeList)Example usage
AdminServerManagement.configurePerformanceMonitoringService("Michael-DellNode01", "server1", "true", "Basic", [["statisticSet", "test statistic set"], ["synchronizedUpdate", "true"]])
configurePMIRequestMetrics
This script configures PMI request metrics in the configuration. Request metrics provide data about each transaction, correlating this information across the various product components to provide an end-to-end picture of the transaction.
Argument Description enable Whether to turn on the request metrics feature. When disabled, the request metrics function is disabled. traceLevel How much trace data to accumulate for a given transaction. Note that trace level and components to be instrumented work together to control whether or not a request will be instrumented.
- NONE
- No instrumentation.
- HOPS
- Generates instrumentation information on process boundaries only (for example, a servlet request coming from a browser or a Web server and a JDBC request going to a database).
- PERFORMANCE_DEBUG
- Generates the data at Hops level and the first level of the intra-process servlet and EJBs call (for example, when an inbound servlet forwards to a servlet and an inbound EJB calls another EJB). Other intra-process calls like naming and service integration bus (SIB) are not enabled at this level.
- DEBUG
- Provides detailed instrumentation data, including response times for all intra-process calls. Requests to servlet filters will only be instrumented at this level.
otherAttributeList Optional arguments... [["armType", "TIVOLI_ARM"]
["enableARM", "true"]]
Syntax
AdminServerManagement.configurePMIRequestMetrics(enable, traceLevel, otherAttributeList)Example usage
AdminServerManagement.configurePMIRequestMetrics("true", "DEBUG", [["armType", "TIVOLI_ARM"], ["enableARM", "true"]])
configureServerLogs
This script configures server logs for the appserver of interest.
Argument Description nodeName Name of the node of interest. serverName Name of the server of interest. serverLogRoot Root directory for the server logs. otherAttributeList Optional arguments... [["formatWrites", "true"]
["messageFormatKind", "BASIC"]
["rolloverType", "BOTH"]]
Syntax
AdminServerManagement.configureServerLogs(nodeName, serverName, serverLogRoot, otherAttributeList)Example usage
AdminServerManagement.configureServerLogs("Michael-DellNode01", "server1", "C:\temp\mylog", [["formatWrites", "true"], ["messageFormatKind", "BASIC"], ["rolloverType", "BOTH"]])
AdminServerManagement.configureServerLogs("Michael-DellNode01", "server1", "/temp/mylog", [["formatWrites", "true"], ["messageFormatKind", "BASIC"], ["rolloverType", "BOTH"]])
configureTraceService
This script configures trace settings for the appserver. Set trace to obtain detailed information about running the appserver.
Argument Description nodeName Name of the node of interest. serverName Name of the server of interest. startupTraceSpecification Trace spec to enable for the component of interest. For example... com.ibm.ws.webservices.trace.MessageTrace=all...traces the contents of a SOAP message, including the binary attachment data.
traceOutputType Where trace output should be written. The trace output can be written directly to an output file, or stored in memory. otherAttributeList Optional arguments... [["enable", "true"]
["traceFormat", "LOG_ANALYZER"]]
Syntax
AdminServerManagement.configureTraceService(nodeName, serverName, traceString, outputType, otherAttributeList)Example usage
AdminServerManagement.configureTraceService("Michael-DellNode01", "server1", "com.ibm.ws.management.*=all=enabled", "SPECIFIED_FILE", [["enable", "true"], ["traceFormat", "LOG_ANALYZER"]])
Related tasks
Use the script library to automate the application serving environment
Automating application configurations using the scripting library
Related
Server query scripts
Server configuration scripts