The SessionFactory being Serialized outside the VM?  Because otherwise it
is already "serializable" via VM serialization hooks
and org.hibernate.internal.SessionFactoryRegistry.  And I'm not so
convinced we should support serializing it for "out of" VM use aside from
what we already do which assumes the new target VM has a similarly named
SessionFactory in its org.hibernate.internal.SessionFactoryRegistry.

On Wed, Jan 10, 2018 at 11:20 AM Vlad Mihalcea <mihalcea.v...@gmail.com>
wrote:

> Hi,
>
> While reviewing old PRs we have in the ORM project, I stumbled on this one
> about serializing the SessionFactory.
>
> I created a new PR, rebased on top of the current master branch and all
> tests are passing fine.
>
> If anyone wants to take a look, this is the PR:
>
> https://github.com/hibernate/hibernate-orm/pull/2107
>
> I'm thinking we should integrate it in 5.3.Alpha and stabilize it if there
> are some unforeseen changes.
>
> The only drawback is that, if we allow the SF to be Serializable, upgrading
> will be much more difficult in case we change object structure.
> We could make it clear that this might not be supported or use the
> serialVersionUID to point to Hibernate version: major.minor.patch.
>
> The main benefit is that, for a microservices architecture, Hibernate could
> start much faster this way.
>
> Vlad
> _______________________________________________
> hibernate-dev mailing list
> hibernate-dev@lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/hibernate-dev
>
_______________________________________________
hibernate-dev mailing list
hibernate-dev@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/hibernate-dev

Reply via email to