Hi,

While reviewing this PR:

https://github.com/hibernate/hibernate-orm/pull/1198/files

I realized that we have some static fields which might cause some problems
when we deploy two or more SessionFactories in the same container (e.g.
Spring).
The fix suggests that we should use synchronised, as indicated by Sonar,
but I think we should avoid the static fields altogether.

Every instance variable must be confined to an object that's confined to
the same SessionFactory root object.
Without static fields, we can make sure that nothing escapes a given
SessionFactory.

Let me know what you think.

Vlad
_______________________________________________
hibernate-dev mailing list
hibernate-dev@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/hibernate-dev

Reply via email to