Closed GoogleCodeExporter closed 9 years ago
Not sure what's the best solution for this.
In msm-kryo-serializer I cannot simply provide both
HibernateCollectionsSerializerFactory (for hib3) and
Hibernate4CollectionsSerializerFactory (for hib4) because it's not possible to
add both dependencies in pom.xml - only the hib4 dependency would be used.
To provide both SerializerFactories out of the box I would have to add another
maven module for just the Hibernate4CollectionsSerializerFactory.
As alternative solution you (or any other user using hib4) could write it's own
Hibernate4CollectionsSerializerFactory by just copying the original
HibernateCollectionsSerializerFactory and changing the import.
We could also add an appropriate documentation to the msm documentation.
We could also switch to hibernate 4 in msm-kryo-serializer and provide this
documentation for hibernate 3 users.
What do you think?
Original comment by martin.grotzke
on 7 Jan 2014 at 9:41
Hello Martin,
I initially had the same idea as yours: we need 2 maven modules:
msm-kryo-serializer-hibernate3 and msm-kryo-serializer-hibernate4.
And during the night I had the idea of using Java reflection and try :
* Hibernate 3:
`Class.forname("org.hibernate.collection.AbstractPersistentCollection")`
* then Hibernate 4:
`Class.forname("org.hibernate.collection.AbstractPersistentCollection")`
I can propose a pull-request with this reflection thing.
Original comment by clecl...@cloudbees.com
on 7 Jan 2014 at 9:47
Sounds good, a PR would be great!
Original comment by martin.grotzke
on 7 Jan 2014 at 10:01
Here it is: https://github.com/magro/memcached-session-manager/pull/34
Original comment by clecl...@cloudbees.com
on 9 Jan 2014 at 1:52
Thanx, it's merged.
Original comment by martin.grotzke
on 9 Jan 2014 at 8:48
Original comment by martin.grotzke
on 2 Feb 2014 at 2:09
Original issue reported on code.google.com by
clecl...@cloudbees.com
on 6 Jan 2014 at 6:02