`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,35 @@ 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.
* `false` - don't share single session. Default mode.
* `true` - share single session.
#### Shared Redisson instance
Requires to set `crossContext` setting in `tomcat/conf/context.xml`
```xml
<ContextcrossContext="true">
...
</Context>
```
Cookie path should be the same for all applications and defined in `web.xml`
```xml
<session-config>
<cookie-config>
<path>/</path>
</cookie-config>
...
</session-config>
```
<br/>
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:
`configPath` - path to Redisson JSON or YAML config. See [configuration wiki page](https://github.com/redisson/redisson/wiki/2.-Configuration) for more details.
1. Add shared redisson instance produced by `JndiRedissonFactory` into `tomcat/conf/server.xml` in `GlobalNamingResources` tag area: