org.openwms.core.service.spring.aop
Class UserChangedEventAspect
java.lang.Object
org.openwms.core.service.spring.aop.UserChangedEventAspect
@Component(value="userChangedEventAspect")
public class UserChangedEventAspect
- extends Object
An UserChangedEventAspect fires events after a method invocation completes.
It's main purpose is to fire events after a transaction succeeds, thereby the
advice must be enabled around Spring's Transaction advice.
Use the FireAfterTransaction
event and declare some type of events
inside the value
attribute. Instances of these events will then
be fired after the transaction completes.
Example:
@FireAfterTransaction(events = { UserChangedEvent.class })
public User save(User user) { .. }
The component can be referenced by name "userChangedEventAspect".
- Since:
- 0.1
- Version:
- $Revision: 1539 $
- Author:
- Heiko Scherrer
- See Also:
FireAfterTransaction
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
COMPONENT_NAME
public static final String COMPONENT_NAME
- Springs component name.
- See Also:
- Constant Field Values
UserChangedEventAspect
public UserChangedEventAspect()
fireUserEvent
public void fireUserEvent(Object publisher,
FireAfterTransaction events)
throws Throwable
- Only
ApplicationEvent
s are created and published over Springs
ApplicationContext
.
- Parameters:
publisher
- The instance that is publishing the eventevents
- A list of event classes to fire
- Throws:
Throwable
- Any exception is re-thrown
Copyright © 2005-2011 openwms.org. All Rights Reserved.