[hibernate-dev] classloading issue when trying to add envers to as7

Strong Liu stliu at hibernate.org
Mon Jun 20 23:42:04 EDT 2011


On Jun 21, 2011, at 1:56 AM, Scott Marlow wrote:

>> 
>> and adding envers into org.hibernate module, means there will no org.hibernate.envers module, and a (jpa) app's classloader can access org.hibernate module, right? so it can access envers class too.
> 
> Wrong, just adding envers to org.hibernate (either via a module dependency or the jar directly) doesn't result in envers being exported from the org.hibernate module.  There is an option to do that, if so desired (via the export="true").  The better option is knowing whether or not it is needed and dynamically injecting envers only if it is.
> 

well, my test shows it is correct :) maybe i missed something here?
and the "export=true" can only export a dependency module, not a jar inside a module, doesn't it?

> From what you previously said, I think the dependencies are:
> 
> - Application classes may reference the envers annotation.

and envers class
> 
> - Application classes may reference Hibernate classes.
> 
> - Hibernate core may reference envers.
> 
> - Hibernate envers may reference Hibernate core.
> 
> Sound right so far?
> 

yes, it is correct.





More information about the hibernate-dev mailing list