`readMode` - read attributes mode. Two modes are available:
`readMode` - read attributes mode. Two modes are available:
* `MEMORY` - stores attributes into local Tomcat Session and Redis. Further Session updates propagated to local Tomcat Session using Redis-based events. Default mode.
* `MEMORY` - stores attributes into local Tomcat Session and Redis. Further Session updates propagated to local Tomcat Session using Redis-based events.
* `REDIS` - stores attributes into Redis only.
* `REDIS` - stores attributes into Redis only. Default mode.
<br/>
<br/>
`updateMode` - attributes update mode. Two modes are available:
`updateMode` - attributes update mode. Two modes are available:
@ -31,31 +33,33 @@ Usage
* `AFTER_REQUEST` - all session attributes are stored into Redis after each request.
* `AFTER_REQUEST` - all session attributes are stored into Redis after each request.
<br/>
<br/>
`sharedSession` - share session across multiple deployed applications. Appropriate solution for migration of EAR based application with multiple WARs hosted previously on JBoss, WebLogic... Works only in `readMode=REDIS`.
`configPath` - path to Redisson JSON or YAML config. See [configuration wiki page](https://github.com/redisson/redisson/wiki/2.-Configuration) for more details.
<i>This option available only in [Redisson PRO](http://redisson.pro) edition.</i>
Each RedissonSessionManager created per Web Application and thus creates own Redisson instance. For multiple applications, using the same Redis setup, amount of Redisson instances could be reduced using JNDI registry:
* `false` - don't share single session. Default mode.
1. Add shared redisson instance produced by `JndiRedissonFactory` into `tomcat/conf/server.xml` in `GlobalNamingResources` tag area:
* `true` - share single session.
Requires to set `crossContext` setting in `tomcat/conf/context.xml`
Cookie path should be the same for all applications and defined in `web.xml`
2. Add `JndiRedissonSessionManager` with resource link to redisson instance into `tomcat/conf/context.xml`
```xml
```xml
<session-config>
<ResourceLinkname="bean/redisson"
<cookie-config>
global="bean/redisson"
<path>/</path>
type="org.redisson.api.RedissonClient" />
</cookie-config>
...
</session-config>
```
<br/>
`configPath` - path to Redisson JSON or YAML config. See [configuration wiki page](https://github.com/redisson/redisson/wiki/2.-Configuration) for more details.