You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Tom Götz <to...@decoded.de> on 2016/05/13 06:02:04 UTC

Best way to track logged in users?

Hi there,

I’d like to track the currently logged in users with the corresponding session ids for displaying them on an admin page. What’s the best way to do that? I was thinking about storing sessionId/userId data in the database, but I’m not sure yet if that would be the best approach.

What do you think?

Cheers,
   Tom



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


Re: Best way to track logged in users?

Posted by Martin Grigorov <mg...@apache.org>.
Wicket creates Session objects but until they are something calls
Session#bind() there is no Http Session created, i.e. the Wicket Session is
temporary for the current request.
ISessionListener is notified when Wicket Session is created.

Martin Grigorov
Wicket Training and Consulting
https://twitter.com/mtgrigorov

On Fri, May 13, 2016 at 9:28 AM, Tom Götz <to...@decoded.de> wrote:

> Hi Martin,
>
> thanks for the pointers, will have a look at 2):
> can I also use org.apache.wicket.ISessionListener? What’s the difference
> to org.apache.wicket.session.ISessionStore.BindListener (besides that the
> bind/unbind methods are split into two separate interfaces)?
>
> Cheers,
>    Tom
>
>
> > On 13.05.2016, at 08:45, Martin Grigorov <mg...@apache.org> wrote:
> >
> > Hi,
> >
> > You can use:
> > 1) plain Servlet APIs -
> >
> http://docs.oracle.com/javaee/6/api/javax/servlet/http/HttpSessionListener.html
> > 2) Wicket APIs - ISessionStore#register[Un]BindListener()
> >
> > Martin Grigorov
> > Wicket Training and Consulting
> > https://twitter.com/mtgrigorov
> >
> > On Fri, May 13, 2016 at 8:02 AM, Tom Götz <to...@decoded.de> wrote:
> >
> >> Hi there,
> >>
> >> I’d like to track the currently logged in users with the corresponding
> >> session ids for displaying them on an admin page. What’s the best way
> to do
> >> that? I was thinking about storing sessionId/userId data in the
> database,
> >> but I’m not sure yet if that would be the best approach.
> >>
> >> What do you think?
> >>
> >> Cheers,
> >>   Tom
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>

Re: Best way to track logged in users?

Posted by Tom Götz <to...@decoded.de>.
Hi Martin,

thanks for the pointers, will have a look at 2):
can I also use org.apache.wicket.ISessionListener? What’s the difference to org.apache.wicket.session.ISessionStore.BindListener (besides that the bind/unbind methods are split into two separate interfaces)?

Cheers,
   Tom


> On 13.05.2016, at 08:45, Martin Grigorov <mg...@apache.org> wrote:
> 
> Hi,
> 
> You can use:
> 1) plain Servlet APIs -
> http://docs.oracle.com/javaee/6/api/javax/servlet/http/HttpSessionListener.html
> 2) Wicket APIs - ISessionStore#register[Un]BindListener()
> 
> Martin Grigorov
> Wicket Training and Consulting
> https://twitter.com/mtgrigorov
> 
> On Fri, May 13, 2016 at 8:02 AM, Tom Götz <to...@decoded.de> wrote:
> 
>> Hi there,
>> 
>> I’d like to track the currently logged in users with the corresponding
>> session ids for displaying them on an admin page. What’s the best way to do
>> that? I was thinking about storing sessionId/userId data in the database,
>> but I’m not sure yet if that would be the best approach.
>> 
>> What do you think?
>> 
>> Cheers,
>>   Tom


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


Re: Best way to track logged in users?

Posted by Martin Grigorov <mg...@apache.org>.
Hi,

You can use:
1) plain Servlet APIs -
http://docs.oracle.com/javaee/6/api/javax/servlet/http/HttpSessionListener.html
2) Wicket APIs - ISessionStore#register[Un]BindListener()

Martin Grigorov
Wicket Training and Consulting
https://twitter.com/mtgrigorov

On Fri, May 13, 2016 at 8:02 AM, Tom Götz <to...@decoded.de> wrote:

> Hi there,
>
> I’d like to track the currently logged in users with the corresponding
> session ids for displaying them on an admin page. What’s the best way to do
> that? I was thinking about storing sessionId/userId data in the database,
> but I’m not sure yet if that would be the best approach.
>
> What do you think?
>
> Cheers,
>    Tom
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>

Re: Best way to track logged in users?

Posted by Robby O'Connor <ro...@gmail.com>.
I just realized I gave the wrong answer...disregard

--Rob
Sent from my cell, please excuse any typos.
On May 13, 2016 2:37 AM, "Christos Stieglitz" <ch...@gnosys.de> wrote:

> This is not a wicket related issue.
>
> There are some frameworks out there, both open source and  commercial,
> with this functionality. One of my customers uses Omniture (commercial)
> with good results. But perhaps you need a subset of the omniture features,
> so another framework may suit you better.
>
> Just google some keywords like "web analytics" etc.
>
> Cheers
>
> Christos
>
> On Fri, May 13, 2016 08:02, Tom Götz wrote:
> > Hi there,
> >
> >
> > I=3DE2=3D80=3D99d like to track the currently logged in users with the
> > =3D
> > corresponding session ids for displaying them on an admin page.
> > What=3DE2=3D80=3D
> > =3D99s the best way to do that? I was thinking about storing =3D
> > sessionId/userId data in the database, but I=3DE2=3D80=3D99m not sure yet
> > if =3D that would be the best approach.
> >
> > What do you think?
> >
> >
> > Cheers,
> > Tom
> >
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> > For additional commands, e-mail: users-help@wicket.apache.org
> >
> >
> >
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>

Re: Best way to track logged in users?

Posted by Christoph Läubrich <la...@googlemail.com>.
In fact there is no reliable way, since a client can close whenever it 
needs to without notify the server.

You can try to guess it by observing sessions, and the you should use a 
session-listener for maximum felxibility. In this listener you can of 
course obtain the WicketSession it is stored as a property inside the 
raw HttpSession.

Am 13.05.2016 08:43, schrieb Tom G�tz:
> Thanks for you hint, I hoped that there would also be a Wicket based solution. As I have a custom Wicket-Session class I\u2019d like to also display certain properties of that session objects. So what I\u2019m looking for is a way to get a List<MyWebsession>  for displaying in a DataTable \u2026
>
>     Tom
>
>    
>


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


Re: Best way to track logged in users?

Posted by Tom Götz <to...@richmountain.de>.
Thanks for you hint, I hoped that there would also be a Wicket based solution. As I have a custom Wicket-Session class I’d like to also display certain properties of that session objects. So what I’m looking for is a way to get a List<MyWebsession> for displaying in a DataTable …

   Tom


> On 13.05.2016, at 08:37, Christos Stieglitz <ch...@gnosys.de> wrote:
> 
> This is not a wicket related issue.
> 
> There are some frameworks out there, both open source and  commercial,
> with this functionality. One of my customers uses Omniture (commercial)
> with good results. But perhaps you need a subset of the omniture features,
> so another framework may suit you better.
> 
> Just google some keywords like "web analytics" etc.
> 
> Cheers
> 
> Christos
> 
> On Fri, May 13, 2016 08:02, Tom Götz wrote:
>> Hi there,
>> 
>> 
>> I=3DE2=3D80=3D99d like to track the currently logged in users with the
>> =3D
>> corresponding session ids for displaying them on an admin page.
>> What=3DE2=3D80=3D
>> =3D99s the best way to do that? I was thinking about storing =3D
>> sessionId/userId data in the database, but I=3DE2=3D80=3D99m not sure yet
>> if =3D that would be the best approach.
>> 
>> What do you think?
>> 
>> 
>> Cheers,
>> Tom
>> 
>> 
>> 
>> 
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>> For additional commands, e-mail: users-help@wicket.apache.org
>> 
>> 
>> 
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
> 


Re: Best way to track logged in users?

Posted by Christos Stieglitz <ch...@gnosys.de>.
This is not a wicket related issue.

There are some frameworks out there, both open source and  commercial,
with this functionality. One of my customers uses Omniture (commercial)
with good results. But perhaps you need a subset of the omniture features,
so another framework may suit you better.

Just google some keywords like "web analytics" etc.

Cheers

Christos

On Fri, May 13, 2016 08:02, Tom G�tz wrote:
> Hi there,
>
>
> I=3DE2=3D80=3D99d like to track the currently logged in users with the
> =3D
> corresponding session ids for displaying them on an admin page.
> What=3DE2=3D80=3D
> =3D99s the best way to do that? I was thinking about storing =3D
> sessionId/userId data in the database, but I=3DE2=3D80=3D99m not sure yet
> if =3D that would be the best approach.
>
> What do you think?
>
>
> Cheers,
> Tom
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>
>



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


Re: Best way to track logged in users?

Posted by Robby O'Connor <ro...@gmail.com>.
Session cookies.

--Rob
Sent from my cell, please excuse any typos.
On May 13, 2016 2:02 AM, "Tom Götz" <to...@decoded.de> wrote:

> Hi there,
>
> I’d like to track the currently logged in users with the corresponding
> session ids for displaying them on an admin page. What’s the best way to do
> that? I was thinking about storing sessionId/userId data in the database,
> but I’m not sure yet if that would be the best approach.
>
> What do you think?
>
> Cheers,
>    Tom
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>