[hibernate-dev] Does Hibernate ORM bytecode enhance application entity classes by default?

Steve Ebersole steve at hibernate.org
Fri Jan 19 10:14:31 EST 2018


Yes.  The enhancing is done based on the underlying BytcodeProvider's
Enhancer.  However knowing what classes to enhance is driven by Hibernate's
boot-time model.  Building this boot-time model requires access to
DatabaseMetaData.

On Fri, Jan 19, 2018 at 7:41 AM Scott Marlow <smarlow at redhat.com> wrote:

> > One WildFly issue is that the application datasources aren't available
> > until late in WildFly deployment but the JPA container needs to register
> > the JPA classloader level transformers very early, so Hibernate can
> rewrite
> > application classes.  This is further complicated by our WildFly CDI
> > implementation needing to read application class definitions.
> >
> > I wonder if it could make sense for
> org.hibernate.jpa.boot.spi.EntityManagerFactoryBuilder
> > to have a separate way to register the ClassTransformer transformer early
> > and trigger the PU bootstrap on the first call to registered
> > ClassTransformer's.  If that doesn't happen, then we defer bootstrap
> until
> > EntityManagerFactoryBuilder.build() is called.
> >
>
> Related question, does ORM need the DatabaseMetaData to performs bytecode
> enhancing?  Knowing the answer to that, will help answer my question above.
>
> Scott
> _______________________________________________
> 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