The org.zkoss.zk.ui.event.EventThreadCleanup interface

From Documentation
Revision as of 08:05, 6 December 2010 by Char (talk | contribs)


DocumentationZK Configuration Referencezk.xmlThe listener ElementThe org.zkoss.zk.ui.event.EventThreadCleanup interface
The org.zkoss.zk.ui.event.EventThreadCleanup interface


Property:

The org.zkoss.zk.ui.event.EventThreadCleanup interface

EventThreadCleanup is implemented by a listener class that will be used to cleanup an event processing thread, after it has processed an event.

If a listener implements this interface, an instance is created, and then the cleanup method is called in the event processing thread after the thread processes the event. Then, the complete method is called in the main thread (aka., the servlet thread), after the main thread is resumed.

Note: The complete method won't be called if the corresponding cleanup method threw an exception.

A typical use of this feature is to clean up unclosed transaction.

Once registered, an instance is constructed and the cleanup method is called after leaving the event processing thread.



Last Update : 2010/12/06

Copyright © Potix Corporation. This article is licensed under GNU Free Documentation License.