Joget DX 8 Stable Released
The stable release for Joget DX 8 is now available, with a focus on UX and Governance.
English |
---|
This article will explain on how to configure the Tomcat Persistent Manager, in the event the load balancer does not support sticky sessions, we can implement Persistent Manager for clustering,which has the capability to swap active (but idle) sessions out to a persistent storage mechanism, as well as to save all sessions across a normal restart of Tomcat. |
Info | ||
---|---|---|
| ||
Due to the recent changes in Tomcat, the PersistentValve configuration no longer works, so it is suggested to use load balancer with sticky sessions with the Tomcat session replication. |
Info |
---|
Note : This KB is only for the Tomcat configuration, for other clustering configurations eg. setting up shared directory etc please refer to Server Clustering Guide page here. |
In server.xml file, we need to add the jvmRoute.
...
Using MySQL/MariaDB;
Code Block | ||
---|---|---|
| ||
<Resources cachingAllowed="true" cacheMaxSize="100000" /> <Valve className="org.apache.catalina.valves.PersistentValve"/> <Manager className="org.apache.catalina.session.PersistentManager" maxIdleBackup="1" maxIdleSwap="1" minIdleSwap="0" processExpiresFrequency="1" saveOnRestart='true'> <Store className="org.apache.catalina.session.JDBCStore" connectionURL="jdbc:mysql://joget-db-server-ip/tomcat?user=tomcat&password=tomcat" driverName="com.mysql.jdbc.Driver" sessionAppCol="app_name" sessionDataCol="session_data" sessionIdCol="session_id" sessionLastAccessedCol="last_access" sessionMaxInactiveCol="max_inactive" sessionTable="tomcat_sessions" sessionValidCol="valid_session"/> </Manager> |
Using MSSQL;
Code Block | ||
---|---|---|
| ||
<Resources <Resources cachingAllowed="true" cacheMaxSize="100000" /> <Valve className="org.apache.catalina.valves.PersistentValve"/> <Manager className="org.apache.catalina.session.PersistentManager" maxIdleBackup="1" maxIdleSwap="1" minIdleSwap="0" processExpiresFrequency="1" saveOnRestart='true'> <Store className="org.apache.catalina.session.JDBCStore" connectionURL="jdbc:sqlserver://joget-db-server-ip:1433;databaseName=tomcat;user=tomcat;password=tomcat;encrypt=false;trustServerCertificate=false" driverName="com.microsoft.sqlserver.jdbc.SQLServerDriver" sessionAppCol="app_name" sessionDataCol="session_data" sessionIdCol="session_id" sessionLastAccessedCol="last_access" sessionMaxInactiveCol="max_inactive" sessionTable="tomcat_sessions" sessionValidCol="valid_session"/> </Manager> |
...
Code Block | ||
---|---|---|
| ||
<Resources cachingAllowed="true" cacheMaxSize="100000" /> <Valve className="org.apache.catalina.valves.PersistentValve"/> <Manager className="org.apache.catalina.session.PersistentManager" maxIdleBackup="1" maxIdleSwap="1" minIdleSwap="0" processExpiresFrequency="1" saveOnRestart='true'> <Store className="org.apache.catalina.session.JDBCStore" connectionURL="jdbc:postgresql://[YourDBIPHere]:[YourDBPortHere]/tomcat?user=tomcat&password=tomcat" driverName="org.postgresql.Driver" sessionAppCol="app_name" sessionDataCol="session_data" sessionIdCol="session_id" sessionLastAccessedCol="last_access" sessionMaxInactiveCol="max_inactive" sessionTable="public.tomcat_sessions" sessionValidCol="valid_session"/> </Manager> |
...