[hibernate-dev] API/SPI in 5.0

Gunnar Morling gunnar at hibernate.org
Tue Feb 4 10:12:16 EST 2014


Hi Steve,

Regarding Configuration, is there an example somewhere which shows how a
session factory is to be bootstrapped using the new approach?

Thanks,

--Gunnar




2014/1/31 Steve Ebersole <steve at hibernate.org>

> As we transition to 5.0 we have to make a lot of decisions wrt API/SPI
> methods that are no longer relevant.  I think it is better to look at
> these individually.
>
> == Configuration
>
> I went ahead and made a preliminary decision here as I discussed in
> HHH-7164.  The thinking is that we had some leeway here because
> Configuration had been deprecated (and pretty widely known to be
> deprecated based on StackOverflow and other sources).   Basically I made
> Configuration a simple delegate to the new Metadata building code.  I
> removed all the methods that exposed access to the org.hibernate.mapping
> objects that Configuration used to manage.
>
> ---
>
> == Integrator
>
> This one is a little tougher.  In retrospect I think I would have just
> gone for a number of discrete contributor contracts.  For example,
> usually Integrator is used to add event listeners, so an
> EventListenerContributor would have worked.  Then I would have used
> Integrator as a grouping of contributors.
>
>
> == PersisterFactory (and persister constructors)
>
> Forms taking Configuration and org.hibernate.mapping objects should,
> imo, get removed.  But I can live with deprecation if someone wants to
> "pound the table" for that.  But realize that the
> Configuration+org.hibernate.mapping forms would not be called ever.
> _______________________________________________
> 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