Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Equinox » Http Sessions
Http Sessions [message #100981] Sun, 04 November 2007 19:51 Go to next message
Eclipse UserFriend
Originally posted by: irbull.cs.uvic.ca

I am using Jetty on an OSGi server. I was wondering if there is a way
to get all the currently opened sessions. I would like to poll the
server on occasion to count the number of sessions I have. I assume
there is some way to reach inside Jetty and get the list?

cheers,
ian
Re: Http Sessions [message #101367 is a reply to message #100981] Fri, 09 November 2007 16:12 Go to previous message
Simon Kaegi is currently offline Simon KaegiFriend
Messages: 381
Registered: July 2009
Senior Member
Hi Ian,

In earlier revisions of the Servlet API there used to be an
HttpSessionContext object that used to do this. It's been deprecated for a
long time now and all implementations that I'm aware of will return no
useful information. Perhaps look for something like this however I suspect
that even if you reach down into the guts of Jetty the information might not
be readily available. It's deprecated for a good reason ;)

If you do the session counting yourself manually I'd use an
HttpSessionBindingListener and then manage counts with its
valueBound/valueUnbound methods. This would let you handle the case where
the server has decided to retire a session.

HTH
-Simon

"Ian Bull" <irbull@cs.uvic.ca> wrote in message
news:fgl7s9$p38$1@build.eclipse.org...
>I am using Jetty on an OSGi server. I was wondering if there is a way to
>get all the currently opened sessions. I would like to poll the server on
>occasion to count the number of sessions I have. I assume there is some
>way to reach inside Jetty and get the list?
>
> cheers,
> ian
Previous Topic:Calling order for activate and bind methods when using declarative services
Next Topic:Bundle-NativeCode dlls
Goto Forum:
  


Current Time: Fri Apr 26 11:52:25 GMT 2024

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

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

Back to the top