[hibernate-dev] Make HibernatePersistenceProvider easier to extend
sanne at hibernate.org
Wed Mar 19 09:54:15 EDT 2014
looks like a good idea to me, but my advice would be to make all the
changes and send a pull request: would make it easier to reason about
You should either see it "just gets merged", os get some more concrete
Such an approach might make you occasionally code something which
doesn't get included, but it's rare to hit and actual deal breaker and
I'd argue it's never entirely a waste of time to play with
refactorings and iterate multiple times. We all learn from it.
On 19 March 2014 11:10, Guillaume Smet <guillaume.smet at hibernate.org> wrote:
> Any thoughts on this one?
> I have bandwidth this week if it's considered something we want.
> On Thu, Jan 23, 2014 at 2:08 PM, Guillaume Smet
> <guillaume.smet at gmail.com> wrote:
>> I'm starting our migration to ORM 4.3 to be able to provide some
>> (hopefully useful) feedback on ORM 4.3 and Search 4.5.
>> One thing we did in most of our apps was injecting Spring managed
>> interceptor into the session factory using a trick very similar to
>> what is explained there:
>> This (kinda ugly) trick doesn't work any more in 4.3 and I ended up
>> doing the following:
>> which works but is IMHO very fragile as I only changed one
>> initialization method and if I would have liked to change them all, I
>> would have to duplicate a lot of code.
>> Would it be possible to create a protected method which centralizes
>> the call to Bootstrap.getEntityManagerFactoryBuilder( persistenceUnit,
>> integration, providedClassLoader ); call we could override easily?
>> This way I could simply override this method to return a different
>> EntityManagerFactoryBuilder aware of my interceptor for every way to
>> initialize an EntityManagerFactory.
>> And minor nitpicking, I think the wrap method should be protected as
>> it's used in a protected method we might want to tweak without having
>> to implement this method again. see
>> I can open a Jira issue and do the work if you agree there is
>> something to fix and we come up with a plan (and a clever method
>> Thanks for your feedback.
> hibernate-dev mailing list
> hibernate-dev at lists.jboss.org
More information about the hibernate-dev