jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Benjamin Brown <benjamin.br...@thisisnumero.com>
Subject Auditing required - JCR hack added
Date Fri, 29 May 2009 09:25:03 GMT
Hi,

I need to add low level auditing to JCR - the auditing class writes entries to a completely
separate auditing database outside of JackRabbit. This should be similar in operation to a
HibernateInterceptor in Hibernate, which operates at the point of item state changes in the
API.

To do this I've implemented a NodeStateListener class - which seems to do everything that
I need such as watching for added/removed nodes etc etc.
Unfortunately since the Session.getItemStateManager() method has a *protected* method (which
is the object I need to add the listener to), the only *clean* way to add this listener is
to wrap and override (as a minimum!!) jcrtemplate (we use Spring) sessionfactory, and session
(not including having to wrap all the transactional and support interfaces too) .

So far I've cheated and used reflection to bodge it in instead - is there a better clean way
of just adding the NodeStateListener to the session that I've missed - it seems this should
be a basic operation, and support is already in the API, but unlike Hibernate's capability
it doesn't seem publicly exposed?

Thanks,

Benjamin



Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message