debop / hibernate-redis

hibernate 2nd level cache privder using redis
Apache License 2.0
357 stars 184 forks source link

Access to FSTConfiguration in FstRedisSerializer #23

Closed apotapov closed 10 years ago

apotapov commented 10 years ago

First off, thanks for a great library! I'm looking forward to integrating it into my project. But I hit a bit of roadblock at the moment.

TL:DR; Please provide access to FSTConfiguration file that's instantiated inside of FstRedisSerializer.

I'm using Java Play framework (http://www.playframework.com/) as an application container for my app. It uses its own ClassLoaders to provide on the fly recompilation.

This causes issues when FST tries to deserialize objects using Class.forName. FSTConfiguration provides a method for setting a different ClassLoader. Unfortunately, it's not easy to get to because it's instantiated as private static final in FSTRedisSerializer.

This is only an issue in dev environment. In production, Play uses standard ClassLoaders, so everything works great. But this makes testing and debugging much more difficult.

Thanks.

debop commented 10 years ago

release 1.6.1