wang-haha / memcached-session-manager

Automatically exported from code.google.com/p/memcached-session-manager
0 stars 0 forks source link

JDK 7 Locale Serialization/Deserialization Error #176

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. JDK 7 install and Locale Field in Session Object 

What is the expected output? What do you see instead?
valid Locale Object, but null returned

What version of the product are you using? On what operating system?
manager 1.6.5, Win 7 64bit/CentOS 5.8, 6.4, Tomcat 7.0.42, Tomcat 7.0.39

Please provide any additional information below.
The Locale of JDK7, there were many changes.
I am currently seems to be in your library, and there is no serialization / 
deserialization correctly locale object of the session object.

Original issue reported on code.google.com by cj84...@gmail.com on 21 Aug 2013 at 2:43

GoogleCodeExporter commented 8 years ago
Do/can you use kryo for serialization? Then it would be easy to plugin a custom 
LocaleSerializer.

Original comment by martin.grotzke on 21 Aug 2013 at 7:31

GoogleCodeExporter commented 8 years ago
how to apply to custom plugin ? I tried googling but, could not find out how to 
apply to custom plugin

Original comment by cj84...@gmail.com on 3 Sep 2013 at 1:04

GoogleCodeExporter commented 8 years ago
You register custom serializers via the "customConverter" attribute, see the 
appropriate section in 
https://code.google.com/p/memcached-session-manager/wiki/SetupAndConfiguration#O
verview_over_memcached-session-manager_configuration_attributes.

To see some examples check out e.g. this gist 
https://gist.github.com/magro/6370466 or existing serializers in 
msm-kryo-serializer/kryo-serializers:
https://github.com/magro/memcached-session-manager/tree/master/kryo-serializer/s
rc/main/java/de/javakaffee/web/msm/serializer/kryo
https://github.com/magro/kryo-serializers/tree/kryo1

Original comment by martin.grotzke on 3 Sep 2013 at 7:47

GoogleCodeExporter commented 8 years ago
thanks. i used to pac4j-core LocaleSerializer + custom converter.
The situation was resolved.

Original comment by cj84...@gmail.com on 4 Sep 2013 at 2:34

GoogleCodeExporter commented 8 years ago
Ok, great!

Original comment by martin.grotzke on 4 Sep 2013 at 8:16

GoogleCodeExporter commented 8 years ago
See also issue #185 that just got fixed: msm now (since 1.7.0) also supports 
proper Locale serialization with jdk 7 out of the box.

Original comment by martin.grotzke on 20 Dec 2013 at 9:51