[hibernate-dev] Bytecode enhancement configuration

Steve Ebersole steve at hibernate.org
Fri Dec 4 11:07:38 EST 2015


Per the discussion Luis and I had on IRC we will go with the prefix
"hibernate.enhancer..".  "enhancer" makes it more than clear what the
intended target is.


On Fri, Dec 4, 2015 at 4:50 AM Sanne Grinovero <sanne at hibernate.org> wrote:

> Hi Luis,
> thanks for this proposal, I was looking forward to see more
> improvements in the area.
>
> Adding more properties sounds good to me, although I'd not use the
> prefix "hibernate.enhance" as it sounds like it's about enhancing
> Hibernate - which might be true but one could say the same with many
> other features.
> What about
>  "hibernate.bytecode_enhancer" as a prefix?
> Or
>  "hibernate.entity_enhancer" ?
>
> About the build plugins: I could not find any documentation about
> them, in fact I don't know which features they have. Could you
> summarize those, and ideally add much needed documentation when
> implementing these improvements?
> It's hard to ask feedback from users about using these, as I don't
> know how to run them myself ;)
>
> Thanks,
> Sanne
>
> On 4 December 2015 at 06:29, Luis Barreiro <lbarreiro at redhat.com> wrote:
> > Hi all,
> >
> > I would like to start a discussion to know what is the general opinion
> > about $subject, triggered by HHH- 10356.
> > I'm also taking the opportunity to hear about some considerations I have
> > on the configuration of the build-time plugins.
> > *
> > **
> > **- Run time*
> >
> >      Right now it is not possible to configure runtime enhancement. The
> > 'hibernate.ejb.use_class_enhancer' property in persistence.xml is used
> > to enable runtime enhancement, but unlike the build-time plugins there
> > is no way to configure what functionalities are enabled.
> > DefaultEnhancementContext is always used. My propose is to define a new
> > set of properties, one for each of the features:
> >      (the names of the properties here are chosen to match the names in
> > the build-time plugins)
> >          'hibernate.enhance.enableLazyInitialization'
> >          'hibernate.enhance.enableDirtyTracking'
> >          'hibernate.enhance.enableAssociationManagement'
> >
> >      Regarding the existing property, I think the best is to deprecate
> > it. If it's used, show an warning message with instructions to update
> > the configuration.
> >
> > *
> > **- Build time*
> >
> >      Since we are on the subject, I would like to hear everyone's
> > opinion about changing the default values for each of the features in
> > the build time plugins. These would be all disabled by default, to be
> > consistent with runtime enhancement. Due to the nature of bytecode
> > enhancement, developers can sometime be caught by surprise since the
> > code they see in the IDE is not what ends up being deployed. Having to
> > enable each of the features makes developers more aware of what to
> expect.
> >      It will also help to getter better bug reports. Something like 'I
> > enabled feature X and Y start to fail' will give us clues on the
> > possible issue.
> >      To help current users unaware of this change, a warn should be
> > printed if a plugin runs without any feature enabled.
> >
> >      Finally, as part of issue HHH-10354 I propose renaming the
> > undocumented feature 'enableFieldAccessEnhancement' to
> > 'enableExtendedEnhancement' --- the big warning around it is to keep !!!
> >
> >
> > Regards,
> >
> > --
> > Luis Barreiro
> > JBoss^® by Red Hat
> > _______________________________________________
> > hibernate-dev mailing list
> > hibernate-dev at lists.jboss.org
> > https://lists.jboss.org/mailman/listinfo/hibernate-dev
>
> _______________________________________________
> 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