Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Remote Application Platform (RAP) » Best place to shutdown Ehcache
Best place to shutdown Ehcache [message #507504] Wed, 13 January 2010 17:09 Go to next message
Setya Nugdjaja is currently offline Setya NugdjajaFriend
Messages: 567
Registered: July 2009
Senior Member
Hi all,

Our application uses Ehcache caching library which needs to be shutdown
when application exits. The recommended way to shutdown for web app is
by registering ShutdownListener in web.xml.

I was considering the SessionStoreListener, but since Ehcache scope is
supposed to be application wide, I don't think it's the appropriate
place to shutdown when a session is about to be destroyed.


Any advice would be greatly appreciated.


Regards,

Setya
Re: Best place to shutdown Ehcache [message #507510 is a reply to message #507504] Wed, 13 January 2010 17:50 Go to previous messageGo to next message
Rüdiger Herrmann is currently offline Rüdiger HerrmannFriend
Messages: 581
Registered: July 2009
Senior Member
On 13.01.2010 18:09, Setya wrote:
> Hi all,
>
> Our application uses Ehcache caching library which needs to be shutdown
> when application exits. The recommended way to shutdown for web app is
> by registering ShutdownListener in web.xml.
What keeps you from using the recommended way?
If you are running on plain OSGi (without a servlet engine), you could
use the Activators stop() method.

>
> I was considering the SessionStoreListener, but since Ehcache scope is
> supposed to be application wide, I don't think it's the appropriate
> place to shutdown when a session is about to be destroyed.
>
>
> Any advice would be greatly appreciated.
>
>
> Regards,
>
> Setya
Re: Best place to shutdown Ehcache [message #507609 is a reply to message #507510] Thu, 14 January 2010 03:50 Go to previous messageGo to next message
Setya Nugdjaja is currently offline Setya NugdjajaFriend
Messages: 567
Registered: July 2009
Senior Member
Hi,

> What keeps you from using the recommended way?
> If you are running on plain OSGi (without a servlet engine), you could
> use the Activators stop() method.

I've tried the Activator#stop(), when I stop the bundle individually
from OSGI console (stop <bundleid> command) it's got called, but if I
shutdown OSGI itself (exit command) it's not.


Regards,

Setya
Re: Best place to shutdown Ehcache [message #507637 is a reply to message #507609] Thu, 14 January 2010 03:38 Go to previous messageGo to next message
Rüdiger Herrmann is currently offline Rüdiger HerrmannFriend
Messages: 581
Registered: July 2009
Senior Member
Hm, I think you will be better off asking this on the Equinox newsgorup.

On 14.01.2010 04:50, Setya wrote:
> Hi,
>
>> What keeps you from using the recommended way?
>> If you are running on plain OSGi (without a servlet engine), you could
>> use the Activators stop() method.
>
> I've tried the Activator#stop(), when I stop the bundle individually
> from OSGI console (stop <bundleid> command) it's got called, but if I
> shutdown OSGI itself (exit command) it's not.
>
>
> Regards,
>
> Setya
Re: Best place to shutdown Ehcache [message #507900 is a reply to message #507637] Fri, 15 January 2010 03:55 Go to previous message
Setya Nugdjaja is currently offline Setya NugdjajaFriend
Messages: 567
Registered: July 2009
Senior Member
Hi,

> Hm, I think you will be better off asking this on the Equinox newsgorup.

OK. I will.

Thanks & Regards,

Setya
Previous Topic:[ANN] Equinox 3.6M4 needed for CVS HEAD
Next Topic:Why reflection doesn't work in rap
Goto Forum:
  


Current Time: Fri Apr 26 04:16:22 GMT 2024

Powered by FUDForum. Page generated in 0.04325 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top