4-6 Configuration Guide for IBM WebSphere Application Server
Create the listener address listenerAddress = newServer.
create ListenerAddress,None
List the attributes and types supported for the listener address type. listenerAddress.show
Output: [trw] AdminListenerAddress
[trw] AdminSSLListenerAddress [trw] HttpListenerAddress
[trw] HttpsListenerAddress [trw] SoapListenerAddress
[trw] SibListenerAddress [trw] SibSSLListenerAddress
[trw] BootstrapListenerAddress Create and set ports and hosts for the end points.
atts = [] atts.append[Host,localhost]
atts.append[Port,9000] endpoint = listenerAddress.
create HttpListenerAddress,atts
atts = [] atts.append[Host,localhost]
atts.append[Port,9001] endpoint = listenerAddress.
create AdminListenerAddress,atts
Validate the ports check for port conflicts. OracleMWConfig.
validateConfig InternalPortConflict
OracleMWConfig. validateConfig
ExternalPortConflict
4.5 Configuring Host and Port Settings for End Points
The examples in this section show two methods that you can use to configure the end points on a server.
Example 4–3 demonstrates how to use basic configuration commands to:
■
List all available servers
■
Display the available listener ports for a server
■
Display the current setting for a specific end point
■
Change both the host and port for that end point
Example 4–3 Configuring Host and Port Settings for End Points
List all available servers. servers = OracleMWConfig.
getChildren Server
Print all servers. print servers
output: [Serverdmgr, ServerOracleAdminServer, Servernodeagent, Serversoa_server1,
Servertest, ServerMyserver] Find a server by using name and scope.
adminServer = OracleMWConfig.
getChildByName Server,OracleAdminServer
Find the listener addresses. listenerAddress = adminServer.
getChildren ListenerAddress
Using wsadmin to Configure Oracle Fusion Middleware 4-7
Print the listener addresses. print listenerAddress[0].show
output: [trw] AdminListenerAddress
[trw] AdminSSLListenerAddress [trw] HttpListenerAddress
[trw] HttpsListenerAddress [trw] SoapListenerAddress
[trw] SibListenerAddress [trw] SibSSLListenerAddress
[trw] BootstrapListenerAddress Find a specific end point.
adminListenerAddress = listenerAddress[0].
getChildren AdminListenerAddress
Print existing end point details. print adminListenerAddress[0].show
output: [arw] Host []
[arw] Port [9001] [arw] Enable [true]
Update the host and port for the above end point, and do the same procedure for other end points.
adminListenerAddress[0].
setValue Host,localhost
adminListenerAddress[0]. setValue
Port,8000 Print the updated end point details.
print adminListenerAddress[0].show output:
[arw] Host [localhost] [arw] Port [8000]
[arw] Enable [true]
Example 4–4 demonstrates how to use basic configuration commands and
configuration utility commands to:
■
List all available servers
■
Find the node name for a specific server
■
List the attributes and end points for a specific server and node name
■
Get the current host name and port for a specific listener address for a specific server and node name
■
Set the host name and port for a specific listener address for a specific server and node name
Example 4–4 Configuring End Points by Using Utility Commands
List all available servers. servers = OracleMWConfig.
getChildren Server
Print all servers. print servers
output: [Serverdmgr, ServerOracleAdminServer, Servernodeagent, Serversoa_server1
, Servertest, ServerMyserver] Find a server by using name and scope.
4-8 Configuration Guide for IBM WebSphere Application Server
adminServer = OracleMWConfig. getChildByName
Server,OracleAdminServer Find the node for a server.
print adminServer. getValue
NodeName output:
TEST01Node01 List the attributes for a server name and node name.
print OracleMWConfigUtilities.
showServer OracleAdminServer,TEST01Node01
output: [ar-] Name [OracleAdminServer]
[ar-] NodeName [myeole-lapNode04] [arw] DevelopmentMode [false]
[trw] ListenerAddress List the end points for a server name and node name.
print OracleMWConfigUtilities.
showEndPointsUsingObject OracleAdminServer,TEST01Node01
output: [trw] AdminListenerAddress
[trw] AdminSSLListenerAddress [trw] HttpListenerAddress
[trw] HttpsListenerAddress [trw] SoapListenerAddress
[trw] SibListenerAddress [trw] SibSSLListenerAddress
[trw] BootstrapListenerAddress List the host and port of an end point for a specified server name and node
name. host =
OracleMWConfigUtilities.
getEndPointHostUsingName OracleAdminServer,TEST01Node01
,AdminListenerAddress port =
OracleMWConfigUtilities. getEndPointPortUsingName
OracleAdminServer,TEST01Node01 ,AdminListenerAddress
print host print port
Set the host and port of an end point for a specified server name and node name.
host = OracleMWConfigUtilities.
setEndPointHostUsingName OracleAdminServer,TEST01Node01
,HttpListenerAddress,localhost port =
OracleMWConfigUtilities. setEndPointPortUsingName
OracleAdminServer,TEST01Node01 ,HttpListenerAddress,9001
4.6 Creating Servers, Clusters, and Cluster Members