[hibernate-dev] Envers

Adam Warski adam at warski.org
Thu Sep 11 07:16:18 EDT 2008


Hello,

> this is looking very promising, congratulations for the slides too
> they made me understand it well without needing explanations.
Thanks :)

> I am seeing many similarities with Hibernate Search,
> maybe it is possible to reuse the annotations (and/or code)
> of it for your upcoming "support for persistent collections"...
> just thinking that both teams (Envers and Search) have probably
> written much "framing" and startup code the same way.
Code similarities are probably quite easy to see, as before writing  
Envers I looked through Hibernate, Validator and Search code :).
The startup code is indeed similar, but then it diverges (as these are  
two librarie for different purposes). When versioning relations, I  
have to change the original mapping to include the revision number  
etc, so that complicates things.

> Also Emmanuel has added "autoregistration" of listeners
> for when Search is on classhpath during the EntityManager
> factory startup; IMHO it would be nice to register this one
> in the same way.
As far as I remember, the autoregistration is done by checking if the  
listener classes (their names are simply written there as String-s)  
can be loaded by the current class loader. So adding a similar feature  
for Envers would require changing Hibernate code. But maybe that  
changed :). That's really not a question for me.

-- 
Adam



More information about the hibernate-dev mailing list