Set servers with scripting
Use wsadmin to configure appservers in your environment. An appserver configuration provides settings that control how an appserver provides services for running applications and their components.
After installing WAS ND, we might need to configure additional options for the appserver. With wsadmin, we can use the commands for the AdminTask and AdminConfig objects to retrieve configuration IDs and invoke operations on the objects to configure the appserver. Alternatively, we can use the script library to perform specific operations to configure the appservers. The scripting library provides a set of procedures to automate the most common appserver administration functions. We can run each script procedure individually, or combine several procedures to quickly develop new scripts.
We might need to complete one or more of the following tasks to configure the appserver:
- Create servers.
Use the commands in the ServerManagement command group for the AdminTask object or the AdminServerManagement script library to create a new application server, Web server, proxy server, or generic server.
- Set the Java virtual machine to run in debug mode. Use the commands in the ServerManagement command group for the AdminTask object or the configureJava VirtualMachine script in the AdminServerManagement script library to modify the JVM configuration.
- Set EJB containers.
Use the AdminConfig object or the configureEJBContainer script in the AdminServerManagement script library to configure Enterprise Java Beans™ (EJB) containers in the configuration.
- Set the Performance Monitoring Infrastructure. Use wsadmin to configure the Performance Monitoring Infrastructure (PMI) in the environment. 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.
- Limit the growth of Java virtual machine log files. Use the AdminConfig object or the configureJava ProcessLogs script in the AdminServerManagement script library to configure the size of JVM log files. JVM logs record events or information from a running JVM.
- Set (ORB) services. Use the AdminConfig object or the configureORBService script in the AdminServerManagement script library to configure an ORB service in the environment. 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.
- Set processes.
Use the AdminConfig object or the configureProcessDefintion script in the AdminServerManagement script library to configure processes in the appserver configuration. Enhance the operation of an application server 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.
- Set the runtime transaction service. Use the AdminControl object or the configureTransactionService script in the AdminServerManagement script library to configure transaction properties for servers. 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.
- Set port numbers to the serverindex.xml file. Use the AdminConfig object, AdminTask object, or the scripts in the AdminServerManagement script library to modify the port numbers specified in the serverindex.xml file. The end points of the serverindex.xml file are part of different objects in the configuration.
- Disable components.
Use the AdminConfig object or the configureStateManageable script in the AdminServerManagement script library to disable components by invoking operations. This page describes how to disable the nameServer component of WAS ND. We can modify the examples in this topic to disable other components.
- Disable the trace service.
- Configure servlet caching. Configure servlet caching with scripting and wsadmin. The dynamic cache service works within an appserver JVM, intercepting calls to cacheable objects. For example, it 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.
- Modify variables.
- Increase the Java virtual machine heap size.
Create a server using scripting
Set the Java virtual machine using scripting
Set EJB containers using scripting
Set the Performance Monitoring Infrastructure using scripting
Limiting the growth of JVM log files using scripting
ProxyManagement command group for the AdminTask object
Set an ORB service using scripting
Set processes using scripting
Set the runtime transaction service using scripting
Set port numbers to the serverindex.xml file using scripting
Disable components using scripting
Disable the trace service using scripting
Set servlet caching with scripting
Modify variables using scripting
Increasing the Java virtual machine heap size using scripting
PortManagement command group for the AdminTask object
DRS command group for the AdminTask object
DynamicCache command group for the AdminTask object
VariableConfiguration command group for the AdminTask object
Related tasks
Use scripting (wsadmin)
Getting started with scripting