PortManagement
Use the Jython or Jacl scripting languages to configure servers with the wsadmin tool. The commands in the PortManagement group can be used to list and modify application and server ports.
The PortManagementcommands include:
listApplicationPorts
List the ports in order to access a particular application.
Target object:
The application name for which the list of ports is generated. (String)
Required parameters: None.
Return values
The ports used by the application specified.
Batch mode example usage
- Use Jacl:
$AdminTask listApplicationPorts {}
- Use Jython string:
AdminTask.listApplicationPorts ()
Interactive mode example usage
- Use Jacl:
$AdminTask listApplicationPorts {-interactive}
- Use Jython string:
AdminTask.listApplicationPorts ('[-interactive]')
listServerPorts
List the ports used by the server specified.
Target object:
The server name. (String)
Optional parameters:
- -nodeName
- The name of the node. Only required when the server name is not unique in the cell. (String, optional)
Batch mode example usage
- Use Jacl:
$AdminTask listServerPorts server1 {-nodeName myNode}
- Use Jython string:
AdminTask.listServerPorts ('server1', '[-nodeName myNode]')
Interactive mode example usage
- Use Jacl:
$AdminTask listServerPorts {-interactive}
- Use Jython string:
AdminTask.listServerPorts ('[-interactive]')
modifyServerPort
Modify the port used by the server.
Target object:
The name of the server for which the port is modified.
Required parameters:
- -nodeName
- The name of the server node. Required only if the server name is not unique in the cell. (String, required)
- -endPointName
- The name of the port to modify. (String, required)
Optional parameters:
- -host
- The new value for the host name of the endpoint. (String, optional)
- -port
- The new value for the port number of the endpoint. (Integer, optional)
- -modifyShared
- Set this parameter to true to modify the port of interest if the port is shared between multiple transport channel chains. If not specified, the command will not modify the port if it is used in more than one transport channel chain. (Boolean, optional)
Batch mode example usage
- Use Jacl:
$AdminTask modifyServerPort server1 {-nodeName myNode -endPointName port1 -port 5566 -modifyShared true}
- Use Jython string:
AdminTask.modifyServerPort ('server1', '[-nodeName myNode -endPointName port1 -port 5566 -modifyShared true]')
- Use Jython list:
AdminTask.modifyServerPort ('server1', ['-nodeName', 'myNode', '-endPointName', 'port1', '-port', '5566 -modifyShared true'])
Interactive mode example usage
- Use Jacl:
$AdminTask modifyServerPort {-interactive}
- Use Jython string:
AdminTask.modifyServerPort ('[-interactive]')
- Use Jython list:
AdminTask.modifyServerPort (['-interactive'])
wsadmin AdminTask Commands for the AdminTask object