cleanupResources()

Release resourses that the polling method has used to access the event store.

Syntax

public void cleanupResources();
 

Parameters

None.

Return values

None.

Exceptions

None.

Notes

The cleanupResources() method is useful as one of the last steps in the pollForEvents() method. In it, you can include code that releases resources that the pollForEvents() method has allocated to access the event store. For example, if the event store is implemented as an event table, the pollForEvents() method might have allocated SQL cursors to access the event tables. In this case, you can include statements in cleanupResources() that close these cursors, thereby freeing memory usage and releasing unneeded cursors.

Important:
The cleanupResources() method is not an abstract method. However, neither does it provide a default implementation. Therefore, to provide the ability to clean up resources used to access your event store, you must override the default cleanupResources() with your own implementation.

See also

pollForEvents()

Copyright IBM Corp. 1997, 2004