This all sounds good to me. For runtime enhancement I am ok with
deprecating that setting, as long as in the meantime until its removal we
continue to treat it as enabling all the enhancement features in addition
to logging that warning.
On Fri, Dec 4, 2015 at 12:29 AM Luis Barreiro <lbarreiro(a)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(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/hibernate-dev