Hello Arne,
Thank you for you response.
> > If I implement SessionListener, and am subsequently notified of
> > session activity, presumably I would then increment or decrement a
[quoted text clipped - 3 lines]
> It is fundamentally impossible to keep track of something
> that increases and decreases without keeping track of it.
Er, OK. I mean, I could use an API which does the counting for me?
That was I don't have to keep track of it.
> The only question is whether the server does it for you or you
> have to do it yourself.
Yes, this was my original question.
> And if relying on the standard then you have to do it
> yourself.
So your saying the standard way is to do it yourself, but you're also
suggesting that I could NOT rely on the standard, and therefore do it
another way? What is this other way?
> It is very few lines and you should be able to find
> plenty of examples.
It is not the number of lines of code or complexity etc. I have a
rather strange situation where I am trying to find a solution whereby
I do not have to program a counter, but that Tomcat does this for me.
This was my original question.
> Arne
Cheers,
Jack
Yes, this is my original question. Is there a way to OBTAIN the
number of active sessions. I phrased this carefully, since I didn't
want to keep track of them myself.
I'm confused about your sentence 'if relying on the standard then you
have to do it yourself'.
Jack - 11 Apr 2008 08:43 GMT
> Hello Arne,
>
[quoted text clipped - 42 lines]
> I'm confused about your sentence 'if relying on the standard then you
> have to do it yourself'.
Typo, it should read 'That way I don't have to keep track of it.' not
'That was I don't have to keep track of it.'
Arne Vajhøj - 16 Apr 2008 03:11 GMT
>> And if relying on the standard then you have to do it
>> yourself.
>
> So your saying the standard way is to do it yourself, but you're also
> suggesting that I could NOT rely on the standard, and therefore do it
> another way? What is this other way?
I believe that:
- there are no way specified in the Java EE standard to ask the
container for the info
- there may be app server specific ways of doing it
I would not recommend using app server specific ways to avoid
writing so little and so trivial code.
And BTW I don't know any app server specific way for any of
the servers I have been using. But then I have not been
looking for it.
>> It is very few lines and you should be able to find
>> plenty of examples.
[quoted text clipped - 3 lines]
> I do not have to program a counter, but that Tomcat does this for me.
> This was my original question.
You have a very unusual context. Don't expect a standard solution
for it.
Arne