Life Cycle Listener
From Documentation
You could have some custom initialization and cleanup when an application, a session, a desktop or an execution is instantiated or about to being destroyed.
There are two steps:
- Implements the corresponding interface. For example, WebAppInit for application's initialization
- Register it in WEB-INF/zk.xml, or in Java.
Version | Date | Content |
---|---|---|
Scope | Interfaces | Description |
Application |
|
The registration in WEB-INF/zk.xml is the same, no matter what interface you implement:
<listener>
<listener-class>my.MyImplementation</listener-class>
</listener>
The registration in Java is done by Configuration.addListener(Class).
webapp.getConfiguration().addListener(my.MyImplementation.class);
Version History
Version | Date | Content |
---|---|---|