On 08/03/2011 11:44 AM, Strong Liu wrote:
I get envers embedded into as7 :D
1. org.hibernate module and org.hibernate.envers module depends on each other.
We might make the Hibernate to envers dependency optional in the
<module name="org.envers" optional="true"/>
So, that it is possible for the envers module to be removed for some
reason (I cannot think of why at the moment but just a thought).
2. org.hibernte.envers module automaticly injected into app when it
is a jpa project.
This is where it gets tricky to package envers with the app. Have you
synced up with AS7 (7.0.1) master yet? I have another change coming
that could impact yours (in queue waiting to be merged).
Anyway, start with packaging envers as a standalone module and try
bringing a envers test into the as7/testsuite/compat/* based on the
current embedded test (there are only two tests and one is @Ignored).
Nice work! :-)
4. use org.hibernate.integrator.internal.ServiceLoader instead
java.util.ServiceLoader to load META-INF/services file
this custom ServiceLoader uses ClassLoaderService.
Scott, question, if there is envers.jar embedded in app too, will app class loader see it
before the envers.jar in org.hibernate.envers module?
As mentioned above, special care is needed to avoid having two envers
classloaders in the app deployment. We might have to make further
changes to not inject envers into the app, if the app already has its
own hibernate + envers.
Strong Liu<stliu at redhat.com>
On Aug 3, 2011, at 6:25 PM, Strong Liu wrote:
> Begin forwarded message:
>> can you send your test app to me?
>> use cases:
>> 1. envers and hibernate core in as7
>> 2. envers jar in app, and hibernate core in as7
>> 3. envers and hibernate core in app
>> #1 is almost done, just need some code clean up
>> (Scott, we missed services="import", that's why ClassLoaderService
can't find resource in envers/META-INF/services)