Administration guide > Configure the deployment environment > Configuring cache integration > Configuring HTTP session managers > Configuring the HTTP session manager with WAS
Automatically splicing applications for HTTP session management in WebSphere Application Server
You can configure the WebSphere Application Server application to persist sessions to a data grid. This data grid can be in an embedded container server that runs within WebSphere Application Server, or it can be in a remote data grid.
Before you begin
Before you change the configuration in WebSphere Application Server, have:
- The name of the session data grid that to use. See Configure the HTTP session manager with WAS for information about creating a session data grid.
- If the catalog service that to use to manage the sessions is outside of the cell in which you are installing the session application, create a catalog service domain. See Create catalog service domains in WAS for more information.
- Global security enabled in the WebSphere Application Server administrative console, to support one of the following scenarios:
- The catalog servers within the catalog service domain have Secure Sockets Layer (SSL) enabled.
- You want to use SSL for a catalog service domain with SSL supported.
. You require SSL for a catalog server by setting the transportType attribute to SSL-Required in the Server properties file. For more information about configuring global security, see Global security settings.
Procedure
- To configure session management when you are installing the application...
You can also install the application with a wsadmin script. In the following example, the -SessionManagement parameter creates the same configuration that you can in the administrative console:
- In the WebSphere Application Server administrative console, click Applications > New application > New Enterprise Application. Choose the Detailed path for creating the application and complete the initial wizard steps.
- In the eXtreme Scale session management settings step of the wizard, configure the data grid that to use. Choose either the Remote eXtreme Scale data grid or the Embedded eXtreme Scale data grid.
- For the Remote eXtreme Scale data grid option, choose the catalog service domain that manages the session data grid, and choose a data grid from the list of active session data grids.
- For the Embedded eXtreme Scale data grid option, choose either the default ObjectGrid configuration or specify the specific location of the ObjectGrid configuration files.
- Complete the wizard steps to finish installing your application.
For the remote eXtreme Scale data grid configuration:
AdminApp.install('C:/A.ear', '[ -nopreCompileJSPs -distributeApp -nouseMetaDataFromBinary -nodeployejb -appname A -edition 8.0 -createMBeansForResources -noreloadEnabled -nodeployws -validateinstall off -noprocessEmbeddedConfig -filepermission .*\.dll=755#.*\.so=755#.*\.a=755#.*\.sl=755 -buildVersion Unknown -noallowDispatchRemoteInclude -noallowServiceRemoteInclude -asyncRequestDispatchType DISABLED -nouseAutoLink -SessionManagement [[true XSRemoteSessionManagement cs0:!:grid0]] -MapWebModToVH [[MicroWebApp microwebapp.war,WEB-INF/web.xml default_host] [MicroSipApp microsipapp.war,WEB-INF/web.xml default_host] [MicroDG1App microdg1app.war,WEB-INF/web.xml default_host] [MicroDG2App microdg2app.war,WEB-INF/web.xml default_host] [MicroSip2App microsip2app.war,WEB-INF/web.xml default_host]]]')For the eXtreme Scale embedded scenario with default configuration:
AdminApp.install('C:/A.ear', '[ -nopreCompileJSPs -distributeApp -nouseMetaDataFromBinary -nodeployejb -appname A -edition 8.0 -createMBeansForResources -noreloadEnabled -nodeployws -validateinstall off -noprocessEmbeddedConfig -filepermission .*\.dll=755#.*\.so=755#.*\.a=755#.*\.sl=755 -buildVersion Unknown -noallowDispatchRemoteInclude -noallowServiceRemoteInclude -asyncRequestDispatchType DISABLED -nouseAutoLink -SessionManagement [[true XSRemoteSessionManagement :!: :!:default]] -MapWebModToVH [[MicroWebApp microwebapp.war, WEB-INF/web.xml default_host] [MicroSipApp microsipapp.war,WEB-INF/web.xml default_host] [MicroDG1App microdg1app.war,WEB-INF/web.xml default_host] [MicroDG2App microdg2app.war,WEB-INF/web.xml default_host] [MicroSip2App microsip2app.war,WEB-INF/web.xml default_host]]]')For the eXtreme Scale embedded scenario with a custom configuration:
AdminApp.install('C:/A.ear', '[ -nopreCompileJSPs -distributeApp -nouseMetaDataFromBinary -nodeployejb -appname A -edition 8.0 -createMBeansForResources -noreloadEnabled -nodeployws -validateinstall off -noprocessEmbeddedConfig -filepermission .*\.dll=755#.*\.so=755#.*\.a=755#.*\.sl=755 -buildVersion Unknown -noallowDispatchRemoteInclude -noallowServiceRemoteInclude -asyncRequestDispatchType DISABLED -nouseAutoLink -SessionManagement [[true XSRemoteSessionManagement :!: :!:custom:!:c:\XS\objectgrid.xml:!:c:\XS\objectgriddeployment.xml]] -MapWebModToVH [[MicroWebApp microwebapp.war,WEB-INF/web.xml default_host] [MicroSipApp microsipapp.war,WEB-INF/web.xml default_host] [MicroDG1App microdg1app.war,WEB-INF/web.xml default_host] [MicroDG2App microdg2app.war,WEB-INF/web.xml default_host] [MicroSip2App microsip2app.war,WEB-INF/web.xml default_host]]]')
- To configure session management on an existing application in the WebSphere Application Server administrative console:
You can also update the application with a wsadmin script. In the following example, the -SessionManagement parameter creates the same configuration that you can in the administrative console:
- In the WebSphere Application Server administrative console, click Applications > Application Types > WebSphere enterprise applications > application_name > Web Module properties > Session management > eXtreme Scale session management settings.
- Update the fields to enable session persistence to a data grid.
For the remote eXtreme Scale data grid configuration:
AdminApp.edit('DefaultApplication','[-SessionManagement[[[true XSRemoteSessionManagement cs0:!:grid0]]]')For the eXtreme Scale embedded scenario with default configuration:
AdminApp.edit('DefaultApplication','[-SessionManagement[[[true XSEmbeddedSessionManagement :!: :!:default]]]')For the eXtreme Scale embedded scenario with a custom configuration:
AdminApp.edit('DefaultApplication','[-SessionManagement[[[true XSEmbeddedSessionManagement :!: :!: custom:!:c:\XS\objectgrid.xml:!:c:\XS\objectgriddeployment.xml]]]')When you save the changes, the application uses the configured data grid for session persistence on the appliance.
- To configure session management on an existing server:
You can also configure session management on an existing server with the following wsadmin tool commands:
- In the WebSphere Application Server administrative console, click Servers > Server Types > WebSphere application servers > server_name > Session management > eXtreme Scale session management settings.
- Update the fields to enable session persistence.
For the remote eXtreme Scale data grid configuration:
AdminTask.configureServerSessionManagement('[-nodeName IBM-C77EE220EB6Node01 -serverName server1 -enableSessionManagement true -sessionManagementType XSRemoteSessionManagement -XSRemoteSessionManagement [-catalogService cs0 -csGridName grid0]]')
For the eXtreme Scale embedded configuration:
- The default configuration, if you are using the default XML files:
AdminTask.configureServerSessionManagement('[-nodeName IBM-C77EE220EB6Node01 -serverName server1 -enableSessionManagement true -sessionManagementType XSEmbeddedSessionManagement -XSEmbeddedSessionManagement [-embeddedGridType default -objectGridXML -objectGridDeploymentXML ]]')
- The custom configuration, if you are using customized XML files:
AdminTask.configureServerSessionManagement('[-nodeName IBM-C77EE220EB6Node01 -serverName server1 -enableSessionManagement true -sessionManagementType XSEmbeddedSessionManagement -XSEmbeddedSessionManagement [-embeddedGridType custom -objectGridXML c:\XS\objectgrid.xml -objectGridDeploymentXML c:\XS\objectgriddeployment.xml]]')
When you save the changes, the server now uses the configured data grid for session persistence with any applications that are running on the server.
- To edit other aspects of the HTTP session configuration, you can edit the splicer.properties file. You can get the path location of the splicer.properties file by locating the com.ibm.websphere.xs.sessionFilterProps custom property in one of the following locations:
- In a WebSphere Application Server Network Deployment environment: A custom property on the cell
- In a stand-alone WebSphere Application Server environment: A custom property on the application server
You can open the indicated file, make changes, and synchronize the nodes so the updated properties file gets propagated to the other nodes in the configuration. All application server nodes require the splicer.properties file to be in the specified path to properly persist sessions.
For more information about the properties in the splicer.properties file, see splicer.properties file.
Results
You configured HTTP session manager to persist the sessions to a data grid. Entries are removed from the data grid when the sessions time out. See Session management settings for more information about updating the session timeout value in the WebSphere Application Server administrative console.
Parent topic:
Configure the HTTP session manager with WAS