You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by GOKULA KRISHNAN <go...@gmail.com> on 2016/10/03 16:38:25 UTC

Trigger sessionDestroyed event from custom ManagerBase

Hi,

I want to trigger the sessionDestroyed event from custom implementation of
ManagerBase. sessionDestroyed is not called when session expires but called
during session invalidate. I need to call sessionDestroyed  during session
time out.

The class starts like this.

*public class CustomRequestSessionManager extends ManagerBase implements
Lifecycle*
{...
..}

Please help me ASAP, since this is an urgent need.

Thanks,
Gokul.

Re: Trigger sessionDestroyed event from custom ManagerBase

Posted by GOKULA KRISHNAN <go...@gmail.com>.
Hi Mark,

Thanks a lot for your reply.

I'm trying to implement Redis valve (included in tomcat's context.xml) for
custom session management by my own logic. Everything is working fine
except the sessionDestroyed event. My sessionDestroyed is not called when
session expires/timeout but it is called during invalidate() call.

If I remove the valve from context.xml, it works fine. Hope I explained the
issue, revert to me if you need any further clarification.

Thanks,
Gokul.

On Tue, Oct 4, 2016 at 12:51 PM, Mark Thomas <ma...@apache.org> wrote:

> On 03/10/2016 17:38, GOKULA KRISHNAN wrote:
> > Hi,
> >
> > I want to trigger the sessionDestroyed event from custom implementation
> of
> > ManagerBase. sessionDestroyed is not called when session expires but
> called
> > during session invalidate. I need to call sessionDestroyed  during
> session
> > time out.
>
> This makes no sense.
>
> session expiration, session invalidate and session timeout are all,
> essentially, the same thing.
>
> A call to isValid() checks, amongst other things, the timeout and
> expires the session if there has been no activity for at least the
> timeout period.
>
> You are going to have to be a LOT clearer about what you are trying to
> achieve. Better still, explain the real requirement rather than asking
> how to implement what you think is the right solution.
>
> Mark
>
> >
> > The class starts like this.
> >
> > *public class CustomRequestSessionManager extends ManagerBase implements
> > Lifecycle*
> > {...
> > ..}
> >
> > Please help me ASAP, since this is an urgent need.
> >
> > Thanks,
> > Gokul.
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>

Re: Trigger sessionDestroyed event from custom ManagerBase

Posted by Mark Thomas <ma...@apache.org>.
On 03/10/2016 17:38, GOKULA KRISHNAN wrote:
> Hi,
> 
> I want to trigger the sessionDestroyed event from custom implementation of
> ManagerBase. sessionDestroyed is not called when session expires but called
> during session invalidate. I need to call sessionDestroyed  during session
> time out.

This makes no sense.

session expiration, session invalidate and session timeout are all,
essentially, the same thing.

A call to isValid() checks, amongst other things, the timeout and
expires the session if there has been no activity for at least the
timeout period.

You are going to have to be a LOT clearer about what you are trying to
achieve. Better still, explain the real requirement rather than asking
how to implement what you think is the right solution.

Mark

> 
> The class starts like this.
> 
> *public class CustomRequestSessionManager extends ManagerBase implements
> Lifecycle*
> {...
> ..}
> 
> Please help me ASAP, since this is an urgent need.
> 
> Thanks,
> Gokul.
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Trigger sessionDestroyed event from custom ManagerBase

Posted by GOKULA KRISHNAN <go...@gmail.com>.
Thanks Coty, for your intro :)

Hi All,

Is there any update for my query ?

On Mon, Oct 3, 2016 at 10:16 PM, Coty Sutherland <cs...@redhat.com>
wrote:

> I set Gokul here from #tomcat on freenode :) Just for a bit more
> information (since it was excluded):
>
> <sam___> Good UGT, i'm using java - 1.8.0_74, tomcat - 8.0.32, os - win 7
>
> On Mon, Oct 3, 2016 at 12:38 PM, GOKULA KRISHNAN <go...@gmail.com> wrote:
> > Hi,
> >
> > I want to trigger the sessionDestroyed event from custom implementation
> of
> > ManagerBase. sessionDestroyed is not called when session expires but
> called
> > during session invalidate. I need to call sessionDestroyed  during
> session
> > time out.
> >
> > The class starts like this.
> >
> > *public class CustomRequestSessionManager extends ManagerBase implements
> > Lifecycle*
> > {...
> > ..}
> >
> > Please help me ASAP, since this is an urgent need.
> >
> > Thanks,
> > Gokul.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>

Re: Trigger sessionDestroyed event from custom ManagerBase

Posted by Coty Sutherland <cs...@redhat.com>.
I set Gokul here from #tomcat on freenode :) Just for a bit more
information (since it was excluded):

<sam___> Good UGT, i'm using java - 1.8.0_74, tomcat - 8.0.32, os - win 7

On Mon, Oct 3, 2016 at 12:38 PM, GOKULA KRISHNAN <go...@gmail.com> wrote:
> Hi,
>
> I want to trigger the sessionDestroyed event from custom implementation of
> ManagerBase. sessionDestroyed is not called when session expires but called
> during session invalidate. I need to call sessionDestroyed  during session
> time out.
>
> The class starts like this.
>
> *public class CustomRequestSessionManager extends ManagerBase implements
> Lifecycle*
> {...
> ..}
>
> Please help me ASAP, since this is an urgent need.
>
> Thanks,
> Gokul.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org