You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@turbine.apache.org by Quinton McCombs <qm...@nequalsone.com> on 2002/12/04 18:47:14 UTC

Accessing all sessions on the server

I need to be able to get a list of all sessions currently active.  I
want to be able to get a collection of all of the active session objects
on the server and access the data that they contain.
 
Can someone point me in the right direction for this?  

Re: Accessing all sessions on the server

Posted by "Henning P. Schmiedehausen" <hp...@intermeta.de>.
"Quinton McCombs" <qm...@nequalsone.com> writes:

>I need to be able to get a list of all sessions currently active.  I
>want to be able to get a collection of all of the active session objects
>on the server and access the data that they contain.
>=20
>Can someone point me in the right direction for this? =20

As Turbine uses the container to provide session information, you must
query this information from your servlet runner (e.g. Tomcat). Please
look at the relevant documentation from the servlet API; I'd guess
that you have to implement some listener for this and configure it in
the web.xml, but I never actually needed that.

To my knowledge, there is no code in Turbine or Fulcrum that provides
this information. You're welcome to contribute a Turbine Service. :-)

	Regards
		Henning

-- 
Dipl.-Inf. (Univ.) Henning P. Schmiedehausen       -- Geschaeftsfuehrer
INTERMETA - Gesellschaft fuer Mehrwertdienste mbH     hps@intermeta.de

Am Schwabachgrund 22  Fon.: 09131 / 50654-0   info@intermeta.de
D-91054 Buckenhof     Fax.: 09131 / 50654-20   

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Accessing all sessions on the server

Posted by Scott Eade <se...@backstagetech.com.au>.
> From: "Quinton McCombs" <qm...@nequalsone.com>
> 
> I need to be able to get a list of all sessions currently active.  I
> want to be able to get a collection of all of the active session objects
> on the server and access the data that they contain.
> 
> Can someone point me in the right direction for this?
> 
I asked a fairly similar question a long long time ago and received no
response.  I don't think Turbine currently provides for this.

For my purpose I was mainly interested in knowing the number of active
sessions in my application.  To do this I created a SessionTracker class
that implements HttpSessionListener and then configure my web-app to use it.
Given that SessionTracker has access to the actual sessions, I would think
you could get at the data if you maintained a static List of the sessions.
You would have to code this to be thread safe manner it could prove to be a
performance bottle-neck.

HTH,

Scott
-- 
Scott Eade
Backstage Technologies Pty. Ltd.
http://www.backstagetech.com.au



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>