JBoss envers and huge audit tables
I am auditing my Java EE application with JBoss Evers and the nature of my application causes the audit table to grow very fast. The historic data is queried infrequently and access time is not really an issue, apart from the data from the last week. This data IS queried frequently and access needs to be fast. Ideally, I would split the data and distribute it over two tables, with the older data in compressed format.
开发者_JAVA技巧Unfortunately, Envers does not allow spreading data over multiple tables as far as I can tell from the docs.
Does somebody have any idea what would be the best way to achieve this (if possible while still using Envers)?
For the first time, StackOverflow does not know the answer to a question!
I posted the same question in the JBoss forum and Adam's answer was very helpful:
Hello, not sure which version of Envers you are using, but maybe you can try using the ValidityAuditStrategy (present from 3.6). Also, see: http://opensource.atlassian.com/projects/hibernate/browse/HHH-5371
Adam
Backlink to the forum entry: http://community.jboss.org/message/579047
精彩评论