The plug-in configuration file

Figure 5-7 showed the process flow; now let us look at where all the configuration information used in that process is stored.

Example 5-2 shows how the configuration is stored. It is placed in the plugin-cfg.xml file, which is placed by default in the following directory:

<WAS_HOME>/config/cells

An example is shown in Example 5-2.

Example 5-2 Plugin-cfg.xml example

<?xml version="1.0" encoding="ISO-8859-1"?>


<Config ASDisableNagle="false" 
        AcceptAllContent="false" 
        IISDisableNagle="false" 
        IgnoreDNSFailures="false" 
        RefreshInterval="60" 
        ResponseChunkSize="64">

   <Log LogLevel="Error" 
        Name="C:\WebSphere\AppServer\logs\http_plugin.log"/>

   <Property Name="ESIEnable" Value="true"/>
   <Property Name="ESIMaxCacheSize" Value="1024"/>
   <Property Name="ESIInvalidationMonitor" Value="false"/>

   <VirtualHostGroup Name="PluginVirtualHost">
      <VirtualHost Name="*:9088"/>
      <VirtualHost Name="web2:80"/>
   </VirtualHostGroup>

   <ServerCluster CloneSeparatorChange="false" 
                  LoadBalance="Round Robin" 
                  Name="PluginCluster" 
                  PostSizeLimit="-1" 
                  RemoveSpecialHeaders="true" 
                  RetryInterval="60">

      <Server CloneID="v544d031" 
              ConnectTimeout="0" 
              ExtendedHandshake="false" 
              LoadBalanceWeight="8" 
              MaxConnections="-1" 
              Name="was1node_PluginMember1" 
              WaitForContinue="false">

         <Transport Hostname="app1.itso.ibm.com" 
                    Port="9088" 
                    Protocol="http"/>

         <Transport Hostname="app1.itso.ibm.com" 
                    Port="9447" 
                    Protocol="https">

            <Property Name="keyring" 
                      Value="C:\WebSphere\AppServer\etc\plugin-key.kdb"/>
            <Property Name="stashfile" 
                      Value="C:\WebSphere\AppServer\etc\plugin-key.sth"/>
         </Transport>

      </Server>

      <Server CloneID="v544d0o0" 
              ConnectTimeout="0" 
              ExtendedHandshake="false" 
              LoadBalanceWeight="2" 
              MaxConnections="-1" 
              Name="was2Node_PluginMember2" 
              WaitForContinue="false">

         <Transport Hostname="app2.itso.ibm.com" 
                    Port="9086" 
                    Protocol="http"/>

         <Transport Hostname="app2.itso.ibm.com" 
                    Port="9447" 
                    Protocol="https">

            <Property Name="keyring" 
                      Value="C:\WebSphere\AppServer\etc\plugin-key.kdb"/>
            <Property Name="stashfile" 
                      Value="C:\WebSphere\AppServer\etc\plugin-key.sth"/>
         </Transport>

      </Server>

      <PrimaryServers>
         <Server Name="was1node_PluginMember1"/>
         <Server Name="was2Node_PluginMember2"/>
      </PrimaryServers>

   </ServerCluster>

   <ServerCluster CloneSeparatorChange="false" 
                  LoadBalance="Round Robin" 
                  Name="dmgr_dmManager_Cluster" 
                  PostSizeLimit="-1" 
                  RemoveSpecialHeaders="true" 
                  RetryInterval="60">

      <Server ConnectTimeout="0" 
             ExtendedHandshake="false" 
             MaxConnections="-1" 
             Name="dmManager_dmgr" 
             WaitForContinue="false"/>

      <PrimaryServers>
         <Server Name="dmManager_dmgr"/>
      </PrimaryServers>

   </ServerCluster>

   <UriGroup Name="PluginVirtualHost_PluginCluster_URIs">

      <Uri AffinityCookie="JSESSIONID" 
           AffinityURLIdentifier="jsessionid" 
           Name="/snoop/*"/>

      <Uri AffinityCookie="JSESSIONID" 
           AffinityURLIdentifier="jsessionid" 
           Name="/hello"/>

      <Uri AffinityCookie="JSESSIONID" 
           AffinityURLIdentifier="jsessionid" 
           Name="/hitcount"/>

      <Uri AffinityCookie="JSESSIONID" 
           AffinityURLIdentifier="jsessionid" 
           Name="*.jsp"/>

      <Uri AffinityCookie="JSESSIONID" 
           AffinityURLIdentifier="jsessionid" 
           Name="*.jsv"/>

      <Uri AffinityCookie="JSESSIONID" 
           AffinityURLIdentifier="jsessionid" 
           Name="*.jsw"/>

      <Uri AffinityCookie="JSESSIONID" 
           AffinityURLIdentifier="jsessionid" 
           Name="/j_security_check"/>

      <Uri AffinityCookie="JSESSIONID" 
           AffinityURLIdentifier="jsessionid" 
           Name="/ibm_security_logout"/>

      <Uri AffinityCookie="JSESSIONID" 
           AffinityURLIdentifier="jsessionid" 
           Name="/servlet/*"/>

   </UriGroup>

   <Route ServerCluster="PluginCluster" 
          UriGroup="PluginVirtualHost_PluginCluster_URIs" 
          VirtualHostGroup="PluginVirtualHost"/>

   <RequestMetrics armEnabled="false" 
                   newBehavior="false" 
                   rmEnabled="true" 
                   traceLevel="HOPS">

      <filters enable="true" type="URI">
         <filterValues enable="false" value="/servlet/snoop"/>
         <filterValues enable="false" value="/webapp/examples/HitCount"/>
         <filterValues enable="true" value="/scenario"/>
      </filters>

      <filters enable="false" type="SOURCE_IP">
         <filterValues enable="false" value="255.255.255.255"/>
         <filterValues enable="false" value="254.254.254.254"/>
      </filters>

   </RequestMetrics>

</Config>

The tags within this file, listed in Table 5-1, can be associated to the flow chart to help show what each is defining.

Table 5-1
No. XML Tag Description
2,3 VirtualHostGroup VirtualHost A group of virtual host names and ports that will be specified in the HTTP Host header when the user tries to retrieve a page. Enables you to group virtual host definitions together that are configured to handle similar types of requests. The requested host and port number will be matched to a VirtualHost tag in a VirtualHostGroup.
2,4 UriGroup Uri A group of URIs that will be specified on the HTTP request line. The incoming client URI will be compared with all the Uri tags in the UriGroup to see if there is match to determine if the appserver will handle the request for the Route in conjunction with a virtual host match.
2,3,5,6 Route The Route definition is the central element of the plug-in configuration. It specifies how the plug-in will handle requests based on certain characteristics of the request. The Route definition contains the other main elements: a required ServerCluster, and either a VirtualHostGroup, UriGroup, or both. Using the information that is defined in the VirtualHostGroup and the UriGroup for the Route, the plug-in determines if the incoming request to the Web server should be sent on to the ServerCluster defined in this Route. The plug-in sets scores for Routes if there is a VirtualHost and Uri match for an incoming request. Once the plug-in processes all Routes, the Route chosen is the one with the highest score.

6

ServerCluster Server The located ServerCluster from the Route tag contains a list of Server tags that in turn contain the requested object. At 7, the Server tag is used to check session affinity. At 8 or9, the correct server is selected.
8,9 ServerCluster Server The ServerCluster located by finding the correct Route can optionally specify the WLM algorithm. This will then be used to select one Server from within the ServerGroup.
10 Transport Once a Server has been located, its Transport tags describe how to connect to it.

Plug-in configuration XML tag descriptions

Tip: A detailed description of each XML tag and its relationships can be found in the WebSphere V5.1 InfoCenter at

http://publib.boulder.ibm.com/infocenter/ws51help/index.jsp

To find the appropriate section, select the WAS Network Deployment package in the upper left corner. Then select Administering -> Task overviews -> Configuring Web server plug-ins -> plugin-cfg.xml file.

There are some settings in the plug-in file that can affect how the plug-in works in a workload management environment: It is possible to change the policy for workload distribution in the configuration file. See 5.4.4, Plug-in workload management and failover policies. In the ServerCluster tag, it is possible to change the retry interval for connecting to a cluster member marked as down. When cluster members are set up, it is possible to affect whether session management processing will occur for a request. If you are not using sessions, remove the CloneID from all the server tags within a ServerCluster. The plug-in will then bypass session management processing, increasing performance. It is possible to change a refresh interval for the XML file, This is done in the Config tag. This defines how often the plug-in will check to see if the configuration file has changed. It is possible to change the maximum number of connections that will be allowed to a server from a given plug-in. This is done in the Server tag. By default, MaxConnections is set to -1. If this attribute is set to either zero or -1, there is no limit to the number of pending connections to the Application Servers.

  Prev | Home | Next

 

WebSphere is a trademark of the IBM Corporation in the United States, other countries, or both.

 

IBM is a trademark of the IBM Corporation in the United States, other countries, or both.