The Multi-Channel Server (MCS)
manager function enables you to dynamically change the MCS logging
and tracing level and to flush cached policies.
Before you begin
Make sure the application server on which the enterprise application
is started. For example, when you update the
WebSphere® Portal EAR,
the
WebSphere_Portal application server must be running.
About this task
The parameters for enabling the
MCS manager
function are configured in the
web.xml file of
the
WebSphere Portal EAR.
Note: - Updates to the configuration of a cluster must occur on the deployment
manager and be resynchronized with the other nodes in the cluster.
If updates are made to individual nodes in the cluster, the updates
will be lost when the master configuration on the deployment manager
resynchronizes with the nodes again.
- The MCS manager
command (mcsServerManager) cannot be used for a
vertical cluster. It is supported only for a horizontal cluster. When
it is used for a horizontal cluster, you enable the function once
using the following procedure and then you must invoke the mcsServerManager command
once for each node in the cluster.
To update web.xml, perform the
following steps.
Procedure
- Export the EAR file according to your network configuration.
If you have a cluster environment, it must be exported from the WebSphere Application Server Network Deployment machine.
- Change directories to the WebSphere Application Server or WebSphere Application Server Network Deployment bin directory
(for example, was_root/bin or nd_root/bin).
- Run the following command to export the EAR file to
a temporary directory:


./wsadmin.sh -user admin_user_id -password instance -c '$AdminApp export application-name /tmp/application-name.ear'
wsadmin -user admin_user_id -password instance -c "$AdminApp export application-name c:\\tmp\\application-name.ear"
where
- admin_user_id is the WebSphere Application Server administrator's
user ID
- instance is the WebSphere Application Server administrator's
password
- application-name is the name of the enterprise
application. Because you are updating the MCS web
application, use mcs as the application name.
- Create the /tmp/application-name_expanded directory
and use the EARExpander tool to expand the contents
of the exported EAR file:


./EARExpander.sh -ear /tmp/application-name.ear -operationDir /tmp/application-name_expanded -operation expand
EARExpander -ear \tmp\application-name.ear -operationDir \tmp\application-name_expanded -operation expand
- Edit web.xml in the /tmp/application-name_expanded/web-module-name.war/WEB-INF directory,
where
- application-name is the name of the enterprise
application. Because you are updating the MCS web
application, use mcs as the application name.
- web-module-name is the name of the web module.
Because you are updating the MCS web
application, use mcs.
- Make the following changes to web.xml:
- Search for AgentServlet. You should
see the following set of elements:
<servlet>
<servlet-name>AgentServlet</servlet-name>
<servlet-class>com.volantis.mcs.management.agent.servlet.AgentServlet</servlet-class>
<init-param>
<param-name>enabled</param-name>
<param-value>false</param-value>
</init-param>
<init-param>
<param-name>port</param-name>
<param-value>8888</param-value>
</init-param>
<init-param>
<param-name>password</param-name>
<param-value>password</param-value>
</init-param>
<load-on-startup>1</load-on-startup>
</servlet>
- Set the enabled parameter value to true.
- Specify an available port number for the port parameter
value.
Tip: You can use netstat -na to
determine whether or not an application is already listening on a
port.
- Specify a password for the password parameter value.
- Collapse the EAR directory back into an EAR file by using
the following EARExpander command:


./EARExpander.sh -ear /tmp/application-name.ear -operationDir /tmp/application-name_expanded -operation collapse
EARExpander -ear \tmp\application-name.ear -operationDir \tmp\application-name_expanded -operation collapse
- Update the EAR using the following wsadmin command:


./wsadmin.sh -user admin_user_id -password instance -c '$AdminApp install /tmp/application-name.ear {-update -appname application-name}'
wsadmin -user admin_user_id -password instance -c "$AdminApp install c:\\tmp\\application-name.ear {-update -appname application-name}"
where
- admin_user_id is the WebSphere Application Server administrator's
user ID
- instance is the WebSphere Application Server administrator's
password
- application-name is the name of the enterprise
application. Because you are updating the MCS web
application, use mcs as the application name.
- Restart the application server on which the enterprise
application is running. For example, because you updated the WebSphere Portal EAR,
restart the WebSphere_Portal application server.
In a clustered configuration, restart the application server on each
node.