Any container defined in the ofbiz-containers.xml file (or other containers file, depending on your configuration) can have a tear down method. Basically the containers are started up in the order they appear in the *containers.xml file, and then the tear down or cleanup is done in reverse order when the app server shuts down.
There are many other ways to do this, but this is the lowest-level or most basic way.
-David
On Dec 22, 2009, at 10:12 AM, Brett Palmer wrote:
> We need to perform a clean up operation for some custom caching we are doing
> with our ofbiz servers. Is there a convenient way to tie into the ofbiz
> shutdown process for this type of cleanup?
>
> Another approach would be for us to write a custom servlet and implement the
> "init" and "destroy" methods to seed the cache and then clean it up when the
> server shuts down. We would then include this servlet in the ofbiz web.xml
> file.
>
> If there is an easier method to do this please share.
>
> Thanks,
>
>
> Brett