- 
        1. Re: Specifying RevisionListener.class on @RevisionEntityadamw Nov 8, 2010 3:37 PM (in response to appletree)Not yet, but patches, or rather - pull requests - are very welcome Shouldn't be hard to add the possibility to specify the rev listener using a configuration property. Adam 
- 
        2. Re: Specifying RevisionListener.class on @RevisionEntityslominskir Jun 21, 2011 9:56 AM (in response to adamw)Any news on this? I'd like to add a listener to add a username and client IP address to the revision entity. The client IP address information comes from the presentation layer, but registering a presentation layer listener in the business / persistence layer tightly couples them together. Using the AuditReader.getCurrentRevision alternative is no good because then you're mixing the auditing cross-cutting concern with business logic. 
- 
        3. Re: Specifying RevisionListener.class on @RevisionEntityadamw Jun 22, 2011 3:07 AM (in response to slominskir)Not really, but as I said - ideas on how to solve that problem & patches are always welcome Adam 
- 
        4. Re: Specifying RevisionListener.class on @RevisionEntityslominskir Sep 21, 2011 1:05 PM (in response to adamw)Maybe we can use CDI to solve this issue? 
- 
        5. Re: Specifying RevisionListener.class on @RevisionEntityadamw Sep 27, 2011 2:08 PM (in response to slominskir)Well you could lookup the BeanManager in your revision listener and invoke anything from there - that would be essentialy a static lookup. Or did you mean something else? Adam 
- 
        6. Re: Specifying RevisionListener.class on @RevisionEntityslominskir Sep 27, 2011 3:25 PM (in response to adamw)Well any dependency injection approach is convenient. I suppose adding a dependency in Envers on CDI is no good though so I guess a configuration file or lookup via the BeanManager or any service locator (JNDI?) would be good choices. 
- 
        7. Re: Specifying RevisionListener.class on @RevisionEntityadamw Sep 28, 2011 2:39 AM (in response to slominskir)Yeah, well first you need to get the BeanManager from JNDI Adam 
- 
        8. Re: Specifying RevisionListener.class on @RevisionEntityadamw Oct 1, 2011 4:38 AM (in response to slominskir)See: https://hibernate.onjira.com/browse/HHH-6696 This will be included in the next release of Hibernate 4. Adam 
 
     
    