You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@shiro.apache.org by Lenny Primak <lp...@hope.nyc.ny.us> on 2014/03/20 16:24:12 UTC

[Possible Bug] Native Session Management and Last Access Time

Hi,

I'm a long-time Shiro user, but new at native session management.
I have a programmatically-configured app (no shiro.ini)
with default SessionManagement (native) turned on.

When doing Session.getAttributeKeys() and Session.getAttribute(),
the lastAccessTime isn't getting touched.  I have to explicitly use session.touch() to update last access time.
Is this a bug?

Thanks


Re: [Possible Bug] Native Session Management and Last Access Time

Posted by Dominic Farr <do...@gmail.com>.
This isn't clear from the shiro docs. One for the developers?
On 20 Mar 2014 17:05, "Lenny Primak" <lp...@hope.nyc.ny.us> wrote:

> So, since shiro native sessions are not associated with web requests, what
> actions are supposed to update lastAccessTime?
>
> Thanks.
>
>
>
> On Mar 20, 2014, at 12:12 PM, Dominic Farr <do...@gmail.com> wrote:
>
> Not sure it is. The spec for lastAccessTime states
>
> Actions that your application takes, such as getting or setting a value
> associated with the session, do not affect the access time.
>
>
> On 20 March 2014 15:24, Lenny Primak <lp...@hope.nyc.ny.us> wrote:
>
>> Oh, and I am using Shiro 1.2.2 on MacOS
>>
>> On Mar 20, 2014, at 11:24 AM, Lenny Primak wrote:
>>
>> > Hi,
>> >
>> > I'm a long-time Shiro user, but new at native session management.
>> > I have a programmatically-configured app (no shiro.ini)
>> > with default SessionManagement (native) turned on.
>> >
>> > When doing Session.getAttributeKeys() and Session.getAttribute(),
>> > the lastAccessTime isn't getting touched.  I have to explicitly use
>> session.touch() to update last access time.
>> > Is this a bug?
>> >
>> > Thanks
>> >
>>
>>
>

Re: [Possible Bug] Native Session Management and Last Access Time

Posted by Lenny Primak <lp...@hope.nyc.ny.us>.
So, since shiro native sessions are not associated with web requests, what actions are supposed to update lastAccessTime?  

Thanks. 



> On Mar 20, 2014, at 12:12 PM, Dominic Farr <do...@gmail.com> wrote:
> 
> Not sure it is. The spec for lastAccessTime states 
> 
> Actions that your application takes, such as getting or setting a value associated with the session, do not affect the access time.
> 
> 
>> On 20 March 2014 15:24, Lenny Primak <lp...@hope.nyc.ny.us> wrote:
>> Oh, and I am using Shiro 1.2.2 on MacOS
>> 
>> On Mar 20, 2014, at 11:24 AM, Lenny Primak wrote:
>> 
>> > Hi,
>> >
>> > I'm a long-time Shiro user, but new at native session management.
>> > I have a programmatically-configured app (no shiro.ini)
>> > with default SessionManagement (native) turned on.
>> >
>> > When doing Session.getAttributeKeys() and Session.getAttribute(),
>> > the lastAccessTime isn't getting touched.  I have to explicitly use session.touch() to update last access time.
>> > Is this a bug?
>> >
>> > Thanks
>> >
> 

Re: [Possible Bug] Native Session Management and Last Access Time

Posted by Dominic Farr <do...@gmail.com>.
Sorry I should have added the spec.

http://docs.oracle.com/javaee/7/api/javax/servlet/http/HttpSession.html#getLastAccessedTime()


On 20 March 2014 16:12, Dominic Farr <do...@gmail.com> wrote:

> Not sure it is. The spec for lastAccessTime states
>
> Actions that your application takes, such as getting or setting a value
> associated with the session, do not affect the access time.
>
>
> On 20 March 2014 15:24, Lenny Primak <lp...@hope.nyc.ny.us> wrote:
>
>> Oh, and I am using Shiro 1.2.2 on MacOS
>>
>> On Mar 20, 2014, at 11:24 AM, Lenny Primak wrote:
>>
>> > Hi,
>> >
>> > I'm a long-time Shiro user, but new at native session management.
>> > I have a programmatically-configured app (no shiro.ini)
>> > with default SessionManagement (native) turned on.
>> >
>> > When doing Session.getAttributeKeys() and Session.getAttribute(),
>> > the lastAccessTime isn't getting touched.  I have to explicitly use
>> session.touch() to update last access time.
>> > Is this a bug?
>> >
>> > Thanks
>> >
>>
>>
>

Re: [Possible Bug] Native Session Management and Last Access Time

Posted by Dominic Farr <do...@gmail.com>.
Not sure it is. The spec for lastAccessTime states

Actions that your application takes, such as getting or setting a value
associated with the session, do not affect the access time.


On 20 March 2014 15:24, Lenny Primak <lp...@hope.nyc.ny.us> wrote:

> Oh, and I am using Shiro 1.2.2 on MacOS
>
> On Mar 20, 2014, at 11:24 AM, Lenny Primak wrote:
>
> > Hi,
> >
> > I'm a long-time Shiro user, but new at native session management.
> > I have a programmatically-configured app (no shiro.ini)
> > with default SessionManagement (native) turned on.
> >
> > When doing Session.getAttributeKeys() and Session.getAttribute(),
> > the lastAccessTime isn't getting touched.  I have to explicitly use
> session.touch() to update last access time.
> > Is this a bug?
> >
> > Thanks
> >
>
>

Re: [Possible Bug] Native Session Management and Last Access Time

Posted by Lenny Primak <lp...@hope.nyc.ny.us>.
Oh, and I am using Shiro 1.2.2 on MacOS

On Mar 20, 2014, at 11:24 AM, Lenny Primak wrote:

> Hi,
> 
> I'm a long-time Shiro user, but new at native session management.
> I have a programmatically-configured app (no shiro.ini)
> with default SessionManagement (native) turned on.
> 
> When doing Session.getAttributeKeys() and Session.getAttribute(),
> the lastAccessTime isn't getting touched.  I have to explicitly use session.touch() to update last access time.
> Is this a bug?
> 
> Thanks
>