You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ofbiz.apache.org by Brett Palmer <br...@gmail.com> on 2009/12/22 17:12:03 UTC

Method to tie into the ofbiz shutdown process

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

Re: Method to tie into the ofbiz shutdown process

Posted by Brett Palmer <br...@gmail.com>.
David,

Thanks for the information.  A simple container would fit our needs.

Thanks,


Brett

On Tue, Dec 22, 2009 at 10:02 AM, David E Jones <de...@me.com> wrote:

>
> 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
>
>

Re: Method to tie into the ofbiz shutdown process

Posted by David E Jones <de...@me.com>.
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