`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.
* `REDIS` - stores attributes into Redis only.
* `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. Default mode.
<br/>
`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.
<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`.
<i>This option available only in [Redisson PRO](http://redisson.pro) edition.</i>
`configPath` - path to Redisson JSON or YAML config. See [configuration wiki page](https://github.com/redisson/redisson/wiki/2.-Configuration) for more details.
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.
* `true` - share single session.
1. Add shared redisson instance produced by `JndiRedissonFactory` into `tomcat/conf/server.xml` in `GlobalNamingResources` tag area:
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
<session-config>
<cookie-config>
<path>/</path>
</cookie-config>
...
</session-config>
```
<br/>
<ResourceLinkname="bean/redisson"
global="bean/redisson"
type="org.redisson.api.RedissonClient" />
`configPath` - path to Redisson JSON or YAML config. See [configuration wiki page](https://github.com/redisson/redisson/wiki/2.-Configuration) for more details.