[wildfly-dev] Could WildFly automatically detect Hibernate native applications and auto add Hibernate dependencies to the application classpath...

Sanne Grinovero sanne at hibernate.org
Tue Mar 28 13:59:07 EDT 2017


Thanks Scott for reviving the subject.

Let me remind that an application wishing to use `org.hibernate:main`
without Javassist won't work.. so I don't see why "being able to
exclude it" is a realistic use case.

On the other hand, moving the "automatic inclusion" currently handled
by the JPA subsystem into an explicit dependency of the ORM module
allows us to finally get rid of this need for Javassist in the near
future.

Thanks,
Sanne


On 28 March 2017 at 17:32, Scott Marlow <smarlow at redhat.com> wrote:
> Hibernate native applications that are deployed on WildFly, need the
> application classpath to include org.hibernate:main + org.javassist:main
> static modules.  We proposed via WFLY-459 [1], that the Hibernate ORM
> module should export the javassist module but that is not overrideable
> by applications (since module exclusions are ignored for export=true
> modules).
>
> Another approach could be adding a (tattletale like?) deployment unit
> processor to WildFly, that could scan through application classes,
> without loading them, to check for references to certain Hibernate
> classes, like "org.hibernate.Session".  Would that introduce too much
> overhead to deployment?  If we did this scanning, we would have to scan
> through all application classes to verify that the application doesn't
> already depend on a Hibernate static module or include its own copy of
> Hibernate classes.
>
> Perhaps an alternative could be a wildflySomething.xml way to indicate
> that a deployment is a Hibernate native application and that
> Hibernate/Javassist dependencies should be auto added.
>
> What do you think?
>
> Scott
>
> [1] https://issues.jboss.org/browse/WFLY-459
>
>
>
> _______________________________________________
> wildfly-dev mailing list
> wildfly-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/wildfly-dev


More information about the wildfly-dev mailing list