Administration guide > Configure the deployment environment > Configuring cache integration > Configuring HTTP session managers


XML files for HTTP session manager configuration


Sample files location

Sample WXS stand-alone XML files can be found in...

$WXS_HOME/ObjectGrid/session/samples

For WXS installed in a WAS cell, sample XML files can be found in....

was_root/optionalLibraries/ObjectGrid/session/samples

If you are configuring an embedded scenario, which means that the container server starts in the web container tier, the XML files are provided by default....

 You can update these files to customize the behavior of the HTTP session manager.


objectGrid.xml file

<?xml version="1.0" encoding="UTF-8"?>

<objectGridConfig xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
             xsi:schemaLocation="http://ibm.com/ws/objectgrid/configobjectGrid.xsd"    
             xmlns="http://ibm.com/ws/objectgrid/config">

    <objectGrids>

        <objectGrid name="session">

            <bean id="ObjectGridEventListener" 
                  className="com.ibm.ws.xs.sessionmanager.SessionHandleManager"/>

            <backingMap name="objectgridSessionMetadata" 
                    pluginCollectionRef="objectgridSessionMetadata" 
                    readOnly="false" 
                    lockStrategy="PESSIMISTIC" 
                    ttlEvictorType="LAST_ACCESS_TIME" 
                    timeToLive="3600" 
                    copyMode="NO_COPY"/>

            <backingMap name="objectgridSessionAttribute.*" 
                    template="true" 
                    readOnly="false" 
                    lockStrategy="PESSIMISTIC" 
                    ttlEvictorType="NONE" 
                    copyMode="NO_COPY"/>
      
            <backingMap name="objectgridSessionTTL.*" 
                    template="true" 
                    readOnly="false" 
                    lockStrategy="PESSIMISTIC" 
                    ttlEvictorType="LAST_ACCESS_TIME" 
                    timeToLive="3600" 
                    copyMode="NO_COPY"/>

        </objectGrid>
    </objectGrids>
   
    <backingMapPluginCollections>
       
        <backingMapPluginCollection id="objectgridSessionMetadata">
           
            <bean id="MapEventListener" 
                  className="com.ibm.ws.xs.sessionmanager.MetadataMapListener"/>
       
        </backingMapPluginCollection>
   
    </backingMapPluginCollections>
</objectGridConfig>


Values you can change:


Values that you cannot change:


objectGridDeployment.xml file

<?xml version="1.0" encoding="UTF-8"?>

<deploymentPolicy xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                  xsi:schemaLocation="http://ibm.com/ws/objectgrid/deploymentPolicydeploymentPolicy.xsd"
                  xmlns="http://ibm.com/ws/objectgrid/deploymentPolicy">

    <objectgridDeployment objectgridName="session">

        <mapSet name="sessionMapSet" 
                numberOfPartitions="5" 
                minSyncReplicas="0" 
                maxSyncReplicas="0" 
                maxAsyncReplicas="1" 
                developmentMode="false" 
                placementStrategy="PER_CONTAINER">
            
<map ref="objectgridSessionMetadata"/>
            
<map ref="objectgridSessionAttribute.*"/>
            
<map ref="objectgridSessionTTL.*"/>
   
</mapSet>
  
</objectgridDeployment>
</deploymentPolicy>


Values you can change:


Values you cannot change:


Remote XML package

When you are using the remote mode, where the containers run as standalone processes, use the objectGridStandAlone.xml and objectGridDeploymentStandAlone.xml files to start the processes. You can update these files to modify the configuration.


objectGridStandAlone.xml file

<?xml version="1.0" encoding="UTF-8"?>

<objectGridConfig xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
    xsi:schemaLocation="http://ibm.com/ws/objectgrid/config/objectGrid.xsd"
    xmlns="http://ibm.com/ws/objectgrid/config">

    <objectGrids>

        <objectGrid name="session">

            <bean id="ObjectGridEventListener" 
                className="com.ibm.ws.xs.sessionmanager.SessionHandleManager"/>
           
<backingMap name="objectgridSessionMetadata" 
            pluginCollectionRef="objectgridSessionMetadata" 
            readOnly="false" 
            lockStrategy="PESSIMISTIC" 
            ttlEvictorType="LAST_ACCESS_TIME" 
            timeToLive="3600" 
            copyMode="COPY_TO_BYTES"/>
           
<backingMap name="#objectgridSessionAttribute">objectgridSessionAttribute.*" 
         template="true" 
         readOnly="false" 
         lockStrategy="PESSIMISTIC" 
         ttlEvictorType="NONE" 
         copyMode="COPY_TO_BYTES"/>
           
<backingMap name="objectgridSessionTTL.*" 
         template="true" 
         readOnly="false" 
         lockStrategy="PESSIMISTIC" 
         ttlEvictorType="LAST_ACCESS_TIME" 
         timeToLive="3600" 
         copyMode="COPY_TO_BYTES"/>

        </objectGrid>
    </objectGrids>
   
<backingMapPluginCollections>
       
<backingMapPluginCollection id="objectgridSessionMetadata">
           
<bean id="MapEventListener" 
       className="com.ibm.ws.xs.sessionmanager.MetadataMapListener"/>
       
</backingMapPluginCollection>
   
</backingMapPluginCollections>
</objectGridConfig>


Values you can change:


Values you cannot change:


objectGridDeploymentStandAlone.xml file

<?xml version="1.0" encoding="UTF-8"?>
<deploymentPolicy xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://ibm.com/ws/objectgrid/deploymentPolicy ../deploymentPolicy.xsd"
    xmlns="http://ibm.com/ws/objectgrid/deploymentPolicy">

    <objectgridDeployment objectgridName="session">

        <mapSet name="sessionMapSet" 
               numberOfPartitions="5" 
               minSyncReplicas="0" 
               maxSyncReplicas="0" 
               maxAsyncReplicas="1" 
               developmentMode="false" 
               placementStrategy="PER_CONTAINER">
           
<map ref="objectgridSessionMetadata"/>
           
<map ref="objectgridSessionAttribute.*"/>
           
<map ref="objectgridSessionTTL.*"/>
       
</mapSet>
   
</objectgridDeployment>
</deploymentPolicy>


Values you can change:


Values you cannot change:


Parent topic:

Configure HTTP session managers


Related tasks

Configure the HTTP session manager with WAS
[Fix 1 and later] Configure HTTP session manager with WebSphere Portal
Configure the HTTP session manager for various application servers

Related reference

Servlet context initialization parameters