jcoleman / tomcat-redis-session-manager

Redis-backed non-sticky session store for Apache Tomcat
MIT License
1.8k stars 1.12k forks source link

Java 6 support #69

Closed asundaram closed 7 years ago

asundaram commented 9 years ago

I am trying to setup redis tomcat session provider in the following environment - Tomcat 1.7 and JDK 1.6. Based on the documentation I have built war file from tomcat-7 branch. Basic setup is functional, but some areas of the application do not work as expected because of the dirty tracking.

I tried to set Persistence Policies with both options "SAVE_ON_CHANGE" and "ALWAYS_SAVE_AFTER_REQUEST", but looks like the Persistence Policies are not implemented in the tomcat-7 branch. On Tomcat startup I am getting this "WARNING: [SetPropertiesRule]{Context/Manager} Setting property 'sessionPersistPolicies' to 'SAVE_ON_CHANGE,ALWAYS_SAVE_AFTER_REQUEST' did not find a matching property."

I tried to set the session change tracking using RedisSession.setManualDirtyTrackingSupportEnabled(true), but looks like there is no way to set this because the method is non-static in tomcat-7 branch and there is no way to cast the session object to a RedisSession. In the master branch I see the method is static.

Am I missing something here or is the support for Java 6 deprecated?

jcoleman commented 9 years ago

The tomcat-7 branch was merged into master before those features were added.

Java 6 support has been deprecated, yes.

niejian commented 7 years ago

but I try to use tomcat-redis-session-manager-1.2-tomcat-6 it came java.lang.VerifyError: class com.radiadesign.catalina.session.RedisSessionManager overrides final method start.()V

@jcoleman jdk6 incompatible with tomcat-redis-session-manager-1.2-tomcat-6, other versions also, every versions I tried, all of them didnt work, at last we change jdk to 1.7

jcoleman commented 7 years ago

@niejian See the README for what versions of Java and Tomcat are supported: https://github.com/jcoleman/tomcat-redis-session-manager#tomcat-versions