In a topology with a web server which forwards requests
to an on demand router (ODR), the ODR can be set to dynamically generate
and update the web server plug-in configuration file plugin-cfg.xml.
By configuring an ODR to dynamically update plugin-cfg.xml,
you avoid manually updating the file during administrative actions,
which can affect the content.
Before you begin
Consider the environment topology before configuring the
plugin-cfg.xml generation;
each ODR can generate a
plugin-cfg.xml file which
includes all URIs that it can handle. The generated
plugin-cfg.xml file
can be configured to:
all,
cell,
node,
and
server. The configuration scope determines which
ODRs are included in
plugin-cfg.xml, and therefore,
what ODRs a web server forwards requests to. By default,
plugin-cfg.xml includes
only running ODRs.
The
plugin-cfg.xml configuration
scope can be:
- All: Includes all ODRs in the environment.
- Cell: Includes all ODRs within the same cell
as the ODR that generates plugin-cfg.xml.
- Node: Includes all ODRs on the same node as the
ODR that generates plugin-cfg.xml.
- Server: Includes only the ODR that generates plugin-cfg.xml.
About this task
An ODR configured to generate plugin-cfg.xml must
be running in order for dynamic updates to occur. If a single ODR
is configured to generate the plugin-cfg.xml file,
and that ODR is stopped, plugin-cfg.xml is not
regenerated until the ODR is restarted. Therefore, run the plugin-cfg.xml file
generator as a highly available service. For more information, read
about generating the plug-in configuration in a high availability
environment.
The plugin-cfg.xml file is
generated by an ODR process. Therefore the file is generated on the
file system that hosts the generating ODR. For all, cell,
and node, WAS_HOME/profiles/profile_name/etc/ is
the default directory where the ODR generates the plugin-cfg.xml file.
The default directory for server is WAS_HOME/profiles/profile_name/etc/odr_name/.
The default generation directory can be overridden by setting a Java virtual machine (JVM) system
property on the generating ODR. To set the JVM system property, go
to . Name the JVM system property ODCPluginXmlDir and
enter a value that contains the absolute path to the generation directory.
Procedure
- In the administrative console, go to the On
demand router settings page:
- For stand-alone ODR processes, click .
- For a static cluster of ODR processes, click .
- For a dynamic cluster of ODR processes, go to .
- In the Proxy plugin configuration policy section,
select the scope from the Generate plugin configuration drop-down
list.
- Optional: In the Proxy plugin configuration
policy section, define an absolute path to the script
that you enter in the Plugin config change script text
box. The defined script is invoked every time the plugin-cfg.xml is
dynamically updated. This approach promotes the newly generated plugin-cfg.xml to
a remote web server that does not reside on the same system as the
ODR.
- Click Apply, and save and synchronize
the changes.
- Restart the ODR for the changes to take effect. plugin-cfg.xml is
generated every time the ODR starts, when there are administrative
actions performed that impact what URIs the ODR handles, and when
changes in the environment affect the content of the plugin-cfg.xml file.
Results
The ODR automatically updates the
plugin-cfg.xml file
when configuration changes occur.
What to do next
You can override the
plugin-cfg.xml default
attribute values automatically generated by the ODR. For more information,
read about controlling the generation of the
plugin-cfg.xml file.