[hibernate-dev] EntityManagetFactory unwrap - HHH-9665

Sanne Grinovero sanne at hibernate.org
Tue Apr 28 06:49:31 EDT 2015


I don't feel the need to be over protective on what the user can do.
Some people know what they are doing, everyone else should stay away
from "unwrap".

Sanne

On 24 April 2015 at 21:00, Hardy Ferentschik <hardy at hibernate.org> wrote:
> On Fri, Apr 24, 2015 at 02:20:55PM -0500, Steve Ebersole wrote:
>> Also I wanted to clarify that, as I told you on IRC, I am fine to change
>> this expectation if that is the general consensus as long as it is all done
>> by next Wednesday.
>
> Sure, I got that.
>
>> I know that sounds short notice, but in reality I have
>> been trying to ping you about that for weeks.
>
> My wrong, I missed that.
>
>> However, even given that the Pull Request is only partial:
>> 1) it moves exposing some internal types to an API/SPI method.  IMO the
>> Pull Request should be complete and fix that as well.
>
> On second thought, I think it was a mistake to move the methods which expose
> internal types into the interface. I had a wrong thinking about backwards compatibility
> in mind. However, since the methods are anyways still in the EntityManagerFactoryImpl
> we can just say that if you need to use these methods you need a cast. This way
> you get a "clean" interface for HibernateEntityManagerFactory. WDYT?
>
>> 2) there is code in ORM that casts to EntityManagerFactoryImpl in order to
>> access these methods, no?.  unless I missed it, you did not fix those
>> usages to now refer to HibernateEntityManagerFactory.
>
> I guess in ORM code it is also ok to cast, no? However I could have a look at
> clean up the ones where it would make sense to unwrap.
>
> --Hardy
>
> _______________________________________________
> 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