Server settings configuration scripts
The scripting library provides multiple script procedures to automate your application server configurations. Use the application server scripts to configure class loaders, Java™ Virtual Machine (JVM) settings, Enterprise JavaBeans (EJB) containers, performance monitoring, dynamic cache, and so on. You can run each script individually, or combine procedures to create custom automation scripts for your environment.
All server management script procedures are located in the app_server_root/scriptLibraries/servers/V70 directory.
configureAdminService
This script configures settings for the AdminService interface. The AdminService interface is the server-side interface to the application server administration functions.
Argument | Description |
---|---|
nodeName | Specifies the name of the node of interest. |
serverName | Specifies the name of the server of interest. |
localAdminProtocol | Specifies the type of connector to use to connect the AdminService interface to the application server for local connection. |
remoteAdminProtocol | Specifies the type of connector to use to connect the AdminService interface to the application server for remote connection. |
otherAttributeList | Optionally specifies additional attributes in
the following format: [[enabled, true], [ pluginConfigService, (cells/timmieNode02Cell/nodes/timmieNode01/servers/server1|server.xml#PluginConfigService_1183122130078)]] |
Syntax
AdminServerManagement.configureAdminService(nodeName, serverName, localAdminProtocol, remoteAdminProtocol, otherAttributeList)
Example usage
AdminServerManagement.configureAdminService("myNode", "myServer", "IPC", "SOAP",
[["enabled", "true"], ["pluginConfigService",
"(cells/timmieNode02Cell/nodes/timmieNode01/servers/server1|server.xml#PluginConfigService_1183122130078)"]])
configureApplicationServerClassloader
This script configures a class loader for the application server. Class loaders enable applications that are deployed on the application server to access repositories of available classes and resources.
Argument | Description |
---|---|
nodeName | Specifies the name of the node of interest. |
serverName | Specifies the name of the server of interest. |
policy | Specifies the application class loader policy as SINGLE or MULTIPLE. Specify the SINGLE value to prevent the isolation applications, and to configure the application server to use a single application class loader to load all of the EJB modules, shared libraries, and dependency Java archive (JAR) 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 | Specifies the 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 | Specifies the name of the shared library of interest. |
Syntax
AdminServerManagement.configureApplicationServerClassloader(nodeName, serverName, policy, mode, libraryName)
Example usage
AdminServerManagement.configureApplicationServerClassloader("myNode", "myServer", "MULTIPLE", "PARENT_FIRST", "myLibraryReference")
configureDynamicCache
This script configures the dynamic cache service in your server configuration. The dynamic cache service works within an application server 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 | Specifies the name of the node of interest. |
serverName | Specifies the name of the server of interest. |
defaultPriority | Specifies the default priority for cache entries, determining how long an entry stays in a full cache. Specify an integer between 1 and 255. |
cacheSize | Specifies a 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 JavaServer Pages (JSP) file cachespec.xml file. When external caching is enabled, the cache matches pages with its Universal Resource Identifiers (URI) and pushes matching pages to the external cache. The entries can then be served from the external cache, instead of from the application server. |
externalCacheGroupType | Specifies the external cache group type. |
otherAttributeList | Optionally specifies additional configuration
options for the dynamic cache service in the following format: [[cacheProvider, myProvider], [ diskCacheCleanupFrequency, 2], [ flushToDiskOnStop, true]] |
Syntax
AdminServerManagement.configureDynamicCache(nodeName, serverName, defaultPriority,
cacheSize, externalCacheGroupName, externalCacheGroupType,
otherAttributeList)
Example usage
AdminServerManagement.configureDynamicCache("myNode", "myServer", 2, 5000, "EsiInvalidator",
"SHARED", [["cacheProvider", "myProvider"], ["diskCacheCleanupFrequency", 2], ["flushToDiskOnStop","true"]])
configureEJBContainer
This script configures an Enterprise JavaBeans (EJB) container in your server configuration. An EJB container provides a run-time environment for enterprise beans within the application server. The container handles all aspects of an enterprise bean's operation within the application server and acts as an intermediary between the user-written business logic within the bean and the rest of the application server environment.
Argument | Description |
---|---|
nodeName | Specifies the name of the node of interest. |
serverName | Specifies the name of the server of interest. |
passivationDirectory | Specifies the 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 | Specifies the JNDI name of a data source to use if no data source is specified during application deployment. This setting is not applicable for EJB 2.x-compliant container-managed persistence beans. |
Syntax
AdminServerManagement.configureEJBContainer(nodeName, serverName,
passivationDir, defaultDatasourceJNDIName)
Example usage
AdminServerManagement.configureEJBContainer(myNode, myServer, C:\temp\myDir, jndi1)
AdminServerManagement.configureEJBContainer(myNode, myServer, /temp/myDir, jndi1)
configureFileTransferService
This script configures the file transfer service for the application server. The file transfer service transfers files from the deployment manager to individual remote nodes.
Argument | Description |
---|---|
nodeName | Specifies the name of the node of interest. |
serverName | Specifies the name of the server of interest. |
retriesCount | Specifies the number of times you want the file transfer service to retry sending or receiving a file after a communication failure occurs. The default value is 3. |
retryWaitTime | Specifies the number of seconds that the file transfer service waits before it retries a failed file transfer. The default value is 10. |
otherAttributeList | Optionally specifies additional attributes in
the following format: [[enable, true]] |
Syntax
AdminServerManagement.configureFileTransferService(nodeName, serverName, retriesCount, retryWaitTime, otherAttributeList)
Example usage
AdminServerManagement.configureFileTransferService(myNode, myServer, 5, 600, [["enable", "true"]])
configureListenerPortForMessageListenerService
This script configures the listener port for the message listener service in your server configuration. The message listener service is an extension to the Java Messaging Service (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 | Specifies the name of the node of interest. |
serverName | Specifies the 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 | Specifies the 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 you 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(myNode
, myServer
, myListenerPort,
connJNDI, destJNDI
, 5, 2, 3)
configureMessageListenerService
This script configures the message listener service in your server configuration. The message listener service is an extension to the Java Messaging Service (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 | Specifies the name of the node of interest. |
serverName | Specifies the name of the server of interest. |
maxListenerRetry | Specifies the 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 | Specifies the time in seconds between retry attempts by a listener port to recover from a failure. |
poolingThreshold | Specifies the maximum number of unused connections in the pool. The default value is 10. |
poolingTimeout | Specifies the 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 | Optionally specifies additional message listener
attributes in the following format: [[description, test message listener], [ isGrowable, true], [ maximumSize, 100], [ minimumSize, 5]] |
Syntax
AdminServerManagement.configureMessageListenerService(nodeName, serverName,
maxListenerRetry, listenerRecoveryInterval,
poolingThreshold, poolingTimeout, otherAttributeList)
Example usage
AdminServerManagement.configureMessageListenerService(myNode, myServer, 5, 120,
20, 600000, myProp, myValue,
[["description", "test message listener"], ["isGrowable", "true"], ["maximumSize", 100], ["minimumSize", 5]])
configureStateManageable
This script configures the initial state of the application server. The initial state refers to the desired state of the component when the server process starts.
Argument | Description |
---|---|
nodeName | Specifies the name of the node of interest. |
serverName | Specifies the name of the server of interest. |
parentType | Specifies the type of component to modify. |
initialState | Specifies the 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(myNode, myServer, "Server", "START")
configureCustomProperty
This script configures custom properties in your application server configuration. You can use custom properties for configuring internal system properties which some components use, for example, to pass information to a web container.
Argument | Description |
---|---|
nodeName | Specifies the name of the node of interest. |
serverName | Specifies the name of the server of interest. |
parentType | Specifies the type of component to configure. |
propertyName | Specifies the custom property to configure. |
propertyValue | Specifies the value of the custom property to configure. |
otherAttributeList | Optionally specifies additional attributes in
the following format: [[commTraceEnabled, true], [ enable, true]] |
Syntax
AdminServerManagement.configureCustomProperty(nodeName, serverName, parentType, propertyName, propertyValue, otherAttributeList)
Example usage
AdminServerManagement.configureCustomProperty(myNode
, myServer
, ThreadPool
, myProp1
, myPropValue
,
[[description
, my property test
], [required
, false
]])
configureCustomService
This script configures a custom service in your application server 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 com.ibm.websphere.runtime.CustomService interface. After you create a custom service, use the administrative console to configure that custom service for your application servers.
Argument | Description |
---|---|
nodeName | Specifies the name of the node of interest. |
serverName | Specifies the name of the server of interest. |
classname | Specifies the class name of the service implementation. This class must implement the Custom Service interface. |
displayname | Specifies the name of the service. |
classpath | Specifies the class path used to locate the classes and JAR files for this service. |
otherAttributeList | Optionally specifies additional attributes in
the following format: [[description, test custom service], [ enable, true]] |
Syntax
AdminServerManagement.configureCustomService(nodeName, serverName, classname, displayname, classpath, otherAttributeList)
Example usage
AdminServerManagement.configureCustomService(myNode
, myServer
, myClass
, myName
, C:\temp\boo.jar
,
[[description
, test custom service
], [enable
, true
]])
AdminServerManagement.configureCustomService(myNode
, myServer
, myClass
, myName
, /temp/boo.jar
,
[[description
, test custom service
], [enable
, true
]])
configureEndPointsHost
Argument | Description |
---|---|
nodeName | Specifies the name of the node of interest. |
serverName | Specifies the name of the server of interest. |
hostName | Specifies the name of the host of interest. |
Syntax
AdminServerManagement.configureEndPointsHost(nodeName, serverName, hostName)
Example usage
AdminServerManagement.configureEndPointsHost(myNode, AppServer01, myHostname)
configureJavaVirtualMachine
This script configures a Java virtual machine (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 | Specifies the configuration ID of the Java virtual machine you want to make changes. |
debugMode | Specifies whether to run the JVM in debug mode. The default is not to enable debug mode support. If you set the debugMode argument to true, then you must specify debug arguments. |
debugArgs | Specifies debug arguments to pass to the JVM code that starts the application server process. If you enable debugging on multiple application servers on the same node, make sure that the servers are using different address arguments, which define the port for debugging. For example, if you 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 | Optionally specifies additional attributes using
the following name and value pair format: [[internalClassAccessMode, RESTRICT], [ disableJIT, false], [ verboseModeJNI, false]] |
Syntax
AdminServerManagement.configureJavaVirtualMachine(javaVirtualMachineConfigID,
debugMode, debugArgs, otherAttributeList)
Example usage
AdminServerManagement.configureJavaVirtualMachine
("(cells/WAS00Network/nodes/ndnode1/servers/server1|server.xml#JavaVirtualMachine_1208188803955)", "true",
mydebug, [["internalClassAccessMode", "RESTRICT"], ["disableJIT", "false"], ["verboseModeJNI", "false"]])
configureORBService
This script configures an Object Request Broker (ORB) service in your server configuration. An Object Request Broker (ORB) manages the interaction between clients and servers, using the Internet InterORB Protocol (IIOP). It enables clients to make requests and receive responses from servers in a network-distributed environment.
Argument | Description |
---|---|
nodeName | Specifies the name of the node of interest. |
serverName | Specifies the name of the server of interest. |
requestTimeout | Specifies the number of seconds to wait before timing out on a request message. |
requestRetriesCount |
Specifies the 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 |
Specifies the number of milliseconds between request retries. This field is ignored on the z/OS platform. |
connectionCacheMax |
Specifies the 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 |
Specifies the 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 less than this value. |
locateRequestTimeout | Specifies the number of seconds to wait before timing out on a LocateRequest message. This field is ignored on the z/OS platform. |
otherAttributeList | Optionally specifies additional attributes in
the following format: [[commTraceEnabled, true], [ enable, true]] |
Syntax
AdminServerManagement.configureORBService(nodeName, serverName, requestTimeout, requestRetriesCount, requestRetriesDelay,
connectionCacheMax, connectionCacheMin, locateRequestTimeout, otherAttributeList)
Example usage
AdminServerManagement.configureMessageListenerService(myNode, myServer, 5, 120, 20, 600000, 20, 300,
[["commTraceEnabled", "true"], ["enable", "true"]])
configureProcessDefinition
This script configures the server process definition. Enhance the operation of an application server by defining command-line information for starting or initializing the application server process. Process definition settings define runtime properties such as the program to run, arguments to run the program, and the working directory.
Argument | Description |
---|---|
nodeName | Specifies the name of the node of interest. |
serverName | Specifies the name of the server of interest. |
otherParamList | Specifies additional parameters for the process
definition configuration in the following format: [[executableName, value1], [ executableArguments, value2], [ workingDirectory, value3]] |
Syntax
AdminServerManagement.configureProcessDefintion(nodeName, serverName, otherParamList)
Example usage
AdminServerManagement.configureProcessDefinition(myNode, myServer,
[[executableName, "value1"],["executableArguments"."value2"],["workingDirectory","value3"]])
configureRuntimeTransactionService
This script configures the transaction service for your 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 | Specifies the name of the node of interest. |
serverName | Specifies the name of the server of interest. |
totalTranLifetimeTimeout | Specifies the 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 | Specifies the 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 application server. If you set this value to 0, there is no timeout limit. |
Syntax
AdminServerManagement.configureRuntimeTransactionService(nodeName, serverName,
totalTranLifetimeTimeout, clientInactivityTimeout)
Example usage
AdminServerManagement.configureRuntimeTransactionService(myNode, myServer, "600", "600")
configureThreadPool
This script configures thread pools in your 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 | Specifies the name of the node of interest. |
serverName | Specifies the name of the server of interest. |
parentType | Specifies the type of component to configure. |
threadPoolName | Specifies the name of the thread pool of interest. |
maximumSize | Specifies the maximum number of threads to maintain in the default thread pool. If your 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 | Specifies the minimum number of threads to allow in the pool. When an application server starts, no threads are initially assigned to the thread pool. Threads are added to the thread pool as the workload assigned to the application server 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 less than the number specified in the Minimum size field, even if some of the threads are idle. |
inactivityTimeout | Specifies the number of 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 | Specifies additional configuration attributes
in the following format: [[description, testing thread pool], [ isGrowable, true], [ name, myThreadPool]] |
Syntax
AdminServerManagement.configureThreadPool(nodeName, serverName,
parentType, threadPoolName, maximumSize,
minimumSize, inactivityTimeout, otherAttributeList)
Example usage
AdminServerManagement.configureThreadPool
("acmeNode2", "server1", "ThreadPoolManager", "WebContainer", 15, 25, 60)
configureTransactionService
This script configures the transaction service for your application server. You can use transactions with your 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 | Specifies the name of the node of interest. |
serverName | Specifies the server name of the of interest. |
totalTranLifetimeTimeout | Specifies the 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. Only the total transaction lifetime timeout and the maximum transaction timeout have grace periods. You can disable the grace periods using the DISABLE_TRANSACTION_TIMEOUT_GRACE_PERIOD custom property. |
clientInactivityTimeout | Specifies the 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 application server. If you set this value to 0, there is no timeout limit. |
maximumTransactionTimeout | Specifies the 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 | Specifies the number of times that the application server 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 | Specifies the number of seconds that the application server waits before retrying a completion signal, such as commit or rollback, after a transient exception from a resource manager or remote partner. |
propogatedOrBMTTranLifetimeTimeout | Specifies the number of seconds that a transaction remains inactive before it is rolled back. |
asyncResponseTimeout | Specifies the 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 | Optionally specifies additional attributes in
the following format: [[LPSHeuristicCompletion, ROLLBACK], [ WSTransactionSpecificationLevel, WSTX_10], [ enable, true]] |
Syntax
AdminServerManagement.configureTransactionService(nodeName, serverName,
totalTranLifetimeTimeout, clientInactivityTimeout,
maximumTransactionTimeout, heuristicRetryLimit, heuristicRetryWait,
propogatedOrBMTTranLifetimeTimeout, asyncResponseTimeout, otherAttributeList)
Example usage
AdminServerManagement.configureTransactionService(myNode, myServer,
120, 60, 5, 2, 5, 300, 30,
[["LPSHeuristicCompletion", "ROLLBACK"], ["WSTransactionSpecificationLevel", "WSTX_10"], ["enable", "true"]])
setJVMProperties
This script sets additional properties for your JVM configuration.
Argument | Description |
---|---|
nodeName | Specifies the name of the node of interest. |
serverName | Specifies the 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, you 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 you set the debugMode argument to true, then you must specify debug arguments. |
debugArgs | Optionally specifies debug arguments to pass to the JVM code that starts the application server process. If you enable debugging on multiple application servers on the same node, make sure that the servers are using different address arguments, which define the port for debugging. For example, if you 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)
Example usage
AdminServerManagement.setJVMProperties(myNode, myServer, "c:\a.jar", "", "”, "", "", "")
AdminServerManagement.setJVMProperties(myNode, myServer, "/a.jar", "", "”, "", "", "")
setTraceSpecification
This script sets the trace specification for your configuration.
Argument | Description |
---|---|
nodeName | Specifies the name of the node of interest. |
serverName | Specifies the name of the server of interest. |
traceSpecification | Specifies debug arguments to pass to the JVM code that starts the application server process. If you enable debugging on multiple application servers on the same node, make sure that the servers are using different address arguments, which define the port for debugging. For example, if you enable debugging on two servers and leave the default debug port for each server as address=7777, the servers could fail to start properly. |
persist | Optionally, specifies how long the trace specification is to last. The
default is -persist false and is only applied at JVM runtime. If the JVM is
restarted the trace specification is automatically removed. If you want the trace specification to
continue even when the JVM is restarted, then you specify -persist true . |
Syntax
AdminServerManagement.setTraceSpecification(nodeName, serverName, traceSpecification, persist)
Example usage
AdminServerManagement.setTraceSpecification(myNode, myServer, "com.ibm.ws.management.*=all")
Example usage with persist
AdminServerManagement.setTraceSpecification(myNode, myServer, "com.ibm.ws.management.*=all", "true")
configureCookieForServer
This script configures cookies in your application server configuration. Configure cookies to track sessions.
Argument | Description |
---|---|
nodeName | Specifies the name of the node of interest. |
serverName | Specifies the name of the server of interest. |
cookieName | Specifies a unique name for the session management cookie. The servlet specification requires the name JSESSIONID. However, for flexibility this value can be configured. |
domain | Specifies the domain field of a session tracking cookie. This value controls whether or not a browser sends a cookie to particular servers. For example, if you specify a particular domain, session cookies are sent to hosts in that domain. The default domain is the server. |
maximumAge | Specifies the 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 you 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 | Specifies that the session cookies include the secure field. Enabling the feature restricts the exchange of cookies to HTTPS sessions only. |
otherAttributeList | Optionally specifies additional attributes in
the following format: [[path, C:/temp/mycookie]] |
Syntax
AdminServerManagement.configureCookieForServer(nodeName, serverName, cookieName, domain, maximumAge, secure, otherAttributeList)
Example usage
AdminServerManagement.configureCookieForServer(myNode, myServer, myCookie, "uk.kingdom.com", -1, "true", [["path", "C:/temp/mycookie"]])
configureHTTPTransportForWebContainer
This script configures HTTP transports for a web container. Transports provide request queues between application server 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 | Specifies the name of the node of interest. |
serverName | Specifies the name of the server of interest. |
adjustPort | Specifies whether to automatically adjust the port for the web container of interest. |
external | Specifies whether to set the HTTP Transport for the web container to external. |
sslConfig | Specifies the Secure Sockets Layer (SSL) settings type for connections between the WebSphere Application Server 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 | Specifies whether to protect connections between the WebSphere Application Server plug-in and application server with Secure Sockets Layer (SSL). The default is not to use SSL. |
Syntax
AdminServerManagement.configureHTTPTransportForWebContainer(nodeName, serverName,
adjustPort, external, sslConfig, sslEnabled)
Example usage
AdminServerManagement.configureHTTPTransportForWebContainer(myNode, myServer, "true", "true", mySSLConfig
, "true")
configureSessionManagerForServer
This script configures the session manager for the application server. Sessions allow applications running in a web container to keep track of individual users.
Argument | Description |
---|---|
nodeName | Specifies the name of the node of interest. |
serverName | Specifies the name of the server of interest. |
sessionPersistenceMode | Specifies the session persistence mode. Valid values include DATABASE and NONE. |
otherAttributeList | Optionally specifies additional attributes in
the following format: [[accessSessionOnTimeout, true], [ enabled, true]] |
Syntax
AdminServerManagement.configureSessionManagerForServer(nodeName, serverName,
sessionPersistenceMode, otherAttributeList)
Example usage
AdminServerManagement.configureSessionManagerForServer(myNode, myServer, "DATABASE",
[["accessSessionOnTimeout", "true"], ["enabled", "true"]])
configureWebContainer
This script configures web containers in your application server configuration. A web container handles requests for servlets, JavaServer Pages (JSP) files, 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 | Specifies the name of the node of interest. |
serverName | Specifies the name of the server of interest. |
webContainerName | Specifies the name of the web container of interest. |
defaultVirtualHostName | Specifies a 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:
|
enableServletCaching | Specifies that 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 JavaServer Pages (JSP) files, as well as metadata about the entry, including timeout and entry priority information. Portlet fragment caching requires that servlet caching is enabled. Therefore, enabling portlet fragment caching automatically enables servlet caching. Disabling servlet caching automatically disables portlet fragment caching. |
otherAttributeList | Optionally specifies additional attributes in
the following format: [[allowAsyncRequestDispatching, true], [ disablePooling, true], [ sessionAffinityTimeout, 20]] |
Syntax
AdminServerManagement.configureWebContainer(nodeName, serverName,
defaultVirtualHostName, enableServletCaching, otherAttributeList)
Example usage
AdminServerManagement.configureWebContainer(myNode, myServer, myVH.uk.kingdom.com,
"true", [["allowAsyncRequestDispatching", "true"], ["disablePooling", "true"], ["sessionAffinityTimeout", 20]])
configureJavaProcessLogs
This script configures Java process logs for the application server. 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 | Specifies the configuration ID of the Java Process Definition of interest. |
processLogRoot | Specifies the root directory for the process logs. |
otherAttributeList | Optionally specifies additional attributes using
the following name and value pair format: [[stdinFilename, /temp/mystdin.log]] |
Syntax
AdminServerManagement.configureJavaProcessLogs(javaProcessDefConfigID, processLogRoot,
otherAttributeList)
Example usage
AdminServerManagement.configureJavaProcessLogs
("(cells/WAS00Network/nodes/ndnode1/servers/server1|server.xml#JavaProcessDef_1184194176408)",
C:\temp\myJavaLog, [[stdinFilename, c:\temp\mystdin.log]])
AdminServerManagement.configureJavaProcessLogs
("(cells/WAS00Network/nodes/ndnode1/servers/server1|server.xml#JavaProcessDef_1184194176408)",
/temp/myJavaLog, [[stdinFilename, /temp/mystdin.log]])
configurePerformanceMonitoringService
This script configures performance monitoring infrastructure (PMI) in your 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 | Specifies the name of the node of interest. |
serverName | Specifies the name of the server of interest. |
enable | Specifies whether the application server attempts to enable Performance Monitoring Infrastructure (PMI). If an application server is started when the PMI is disabled, you have to restart the server in order to enable it. |
initialSpecLevel | Specifies a pre-defined set of Performance Monitoring
Infrastructure (PMI) statistics for all components in the server.
|
otherAttributeList | Optionally specifies additional attributes using
the following name and value pair format: [[statisticSet, test statistic set], [ synchronizedUpdate, true]] |
Syntax
AdminServerManagement.configurePerformanceMonitoringService(nodeName, serverName,
enable, initialSpecLevel, otherAttributeList)
Example usage
AdminServerManagement.configurePerformanceMonitoringService(myNode, myServer, "true", "Basic",
[["statisticSet", "test statistic set"], ["synchronizedUpdate", "true"]])
configurePMIRequestMetrics
Argument | Description |
---|---|
enable | Specifies whether to turn on the request metrics feature. When disabled, the request metrics function is disabled. |
traceLevel | Specifies 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.
|
otherAttributeList | Optionally specifies additional attributes using
the following name and value pair format: [[armType, TIVOLI_ARM], [ enableARM, true]] |
Syntax
AdminServerManagement.configurePMIRequestMetrics(enable, traceLevel, otherAttributeList)
Example usage
AdminServerManagement.configurePMIRequestMetrics("true", "DEBUG",
[["armType", "TIVOLI_ARM"], ["enableARM", "true"]])
configureServerLogs
Argument | Description |
---|---|
nodeName | Specifies the name of the node of interest. |
serverName | Specifies the name of the server of interest. |
serverLogRoot | Specifies the root directory for the server logs. |
otherAttributeList | Optionally specifies additional attributes using
the following name and value pair format: [[formatWrites, true], [ messageFormatKind, BASIC], [ rolloverType, BOTH]] |
Syntax
AdminServerManagement.configureServerLogs(nodeName, serverName,
serverLogRoot, otherAttributeList)
Example usage
AdminServerManagement.configureServerLogs(myNode, myServer, C:\temp\mylog,
[["formatWrites", "true"], ["messageFormatKind", "BASIC"], ["rolloverType", "BOTH"]])
AdminServerManagement.configureServerLogs(myNode, myServer, /temp/mylog,
[["formatWrites", "true"], ["messageFormatKind", "BASIC"], ["rolloverType", "BOTH"]])
configureTraceService
Argument | Description |
---|---|
nodeName | Specifies the name of the node of interest. |
serverName | Specifies the name of the server of interest. |
startupTraceSpecification | Specifies the trace specification to enable for the component of interest. For example, the com.ibm.ws.webservices.trace.MessageTrace=all trace specification traces the contents of a SOAP message, including the binary attachment data. |
traceOutputType | Specifies where trace output should be written. The trace output can be written directly to an output file, or stored in memory. |
otherAttributeList | Optionally specifies additional attributes for
the trace service using the following name and value pair format:
[[enable, true], [ traceFormat, LOG_ANALYZER]] |
Syntax
AdminServerManagement.configureTraceService(nodeName, serverName,
traceString, outputType, otherAttributeList)
Example usage
AdminServerManagement.configureTraceService(myNode, myServer, "com.ibm.ws.management.*=all=enabled",
SPECIFIED_FILE, [["enable", "true"], ["traceFormat", "LOG_ANALYZER"]])