[hibernate-dev] Session factory name & clustering
Steve Ebersole
steve at hibernate.org
Mon Nov 10 07:40:08 EST 2014
It would depend on what is inside the CacheKey, which is the key object
Hibernate passes to the second-level cache. Usually this situation comes
up with the identifier Type(s), especially in the case of composite
identifiers. Some of the Type implementations hold reference to the
SessionFactory. Serializing those properly depends on being able to
resolve the proper SessionFactory reference on deser, which can happen
based on UUID (same JVM) or name (across JVMs).
On Mon, Nov 10, 2014 at 4:17 AM, Galder Zamarreño <galder at redhat.com> wrote:
> Hi all,
>
> Re:
> http://stackoverflow.com/questions/26110918/infinispan-marshalling-error-for-hibernate-entity-with-composite-primary-key
> Re: https://github.com/hibernate/hibernate-orm/pull/820
>
> Seems like the issue is resolved by making sure Session Factories have the
> same name.
>
> Is this something new? I’ve never had the need to set it in order to get
> Hibernate 2LC clustered tests working. None of my unit tests set the
> session factory name. One of my most recent demos uses JPA, and never had
> to set hibernate.session_factory_name property.
>
> Or is this due to the peculiarity of the Entity the user has? I’ve run
> some tests locally and SessionFactoryImpl.readResolve() does not seem to
> get called.
>
> @Paul/@Scott, have you seen anything similar before?
>
> Cheers,
> --
> Galder Zamarreño
> galder at redhat.com
> twitter.com/galderz
>
>
> _______________________________________________
> hibernate-dev mailing list
> hibernate-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/hibernate-dev
>
More information about the hibernate-dev
mailing list