It's not a secret anymore!*
The moose likes JForum and the fly likes Question Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » JForum
Bookmark "Question" Watch "Question" New topic
Author

Question

Migrated From Jforum.net
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
Why is it that when I log in as a guest, and then shut down my browser, and go back 20 minutes later, it shows that there is still one guest online. At one point it was up to 5 guests, and my admin account showed as being logged in. But it wasn't. I had to restart my computer and then it showed normal. I am using Apache Tomcat 5.5.9 as my servlet container.

Other than that, The installation of both tomcat and Jforums were easy as pie.

Thanks
[originally posted on jforum.net by Chronos]
Migrated From Jforum.net
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
Just a guess from developing other web applications, but until the session expires at the server, the application has no way to know you are not there any more (as you did not log in, you cannot log out to tell the server you are no longer connected).

How long does it take the session to expire? The standard one is configurable and I think the default is servlet container specific, but it usually is 30 mins. JForum might have it's own way of controlling expired sessions, but this would have to be explained by Rafael .

Shutting down the browser has no impact on the server, due to the way the HTTP protocol works.

In short, wait for 30 minutes and hopefully the count should go down. If it's really important to know how many guests you have connected, you might try to find out where the expiration period is specified and lower it down a bit. Not too much or you might hurt your registered users navigation ;).


[originally posted on jforum.net by GreenEyed]
Migrated From Jforum.net
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
Ok... I thought it was primarily wierd since my regular server software closes the connection after approx 5 min. and has the ability to close individual socket connections.

I'll have to take a look at how tomcat expires sessions. I am just used to telnet...
[originally posted on jforum.net by Chronos]
Migrated From Jforum.net
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
The default configuration is to expire the sessions after 10 minutes. However, I "ping" the server every 5 minutes, to not allow the user's session to expire while he's in the forum.

So, if you logs of but keeps the browser open in some page of the forum, your session will still be counted.

Anyway, don't pay too much attention to the number of online users currently. I'm working in some improvements to make it better (the number of logged users is ok, always)

Rafael
[originally posted on jforum.net by Rafael Steil]
Migrated From Jforum.net
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
Thanks for your speedy reply. After setting up Jforums, I am very impressed with the work that has went into this fine program. And will anxiously await new things.

Thanks,

Michael
[originally posted on jforum.net by Chronos]
Migrated From Jforum.net
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
Thanks Michael Having any thoughts, just enter in contact.

Rafael
[originally posted on jforum.net by Rafael Steil]
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Question