• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Devaka Cooray
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Tim Moores
  • Carey Brown
  • Mikalai Zaikin
Bartenders:
  • Lou Hamers
  • Piet Souris
  • Frits Walraven

Time of last visit reset on JForum restart (HSQLDB?)

 
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I'm not sure if this is HSQLDB specific or not, but that's what I'm running for my database, so I thought I'd mention that first .

Anyways, every time I restart Tomcat the "last visited on" time for the user I'm testing with resets to the time at which I created the user. While everyting is up and running, I can log out and log back in again, and it shows a properly updated "last visited on" time, but as soon as I shut things down and start back up, it reverts.

I'm not 100% sure that this is a bug, because I'm setting the JForum servlet to run on Tomcat startup, so I figured I'd mention it here before reporting it on JIRA. The reason for having it run on startup is that I've created an auto-login JSP page that needs the backend to be started up before it will work properly. I don't see how this could be causing this problem, but you never know :?.

Regards,
Colin
[originally posted on jforum.net by Colin Walsh]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
So, the problem is with your restarts. For the sake of performance, I don't hit the database all the time to update the user's session data. I only do that when he logs off, or when the user comes back to the site, after leaving it (logging off or not).

So, when you restart the servlet container, you don't give a change to the values be updated.

Rafael
[originally posted on jforum.net by Rafael Steil]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The thing is, it happens even if I log the user out before I restart the container.

-Colin
[originally posted on jforum.net by Colin Walsh]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hmm.. if you click in the link "Logout", I write the information to the database. Check the method "lougout()" in UserAction.java:

https://jforum.dev.java.net/source/browse/jforum/src/net/jforum/view/forum/UserAction.java?rev=1.39&view=markup

It's the call to "userSession.storeSessionData()"

Rafael
[originally posted on jforum.net by Rafael Steil]
 
this is supposed to be a surprise, but it smells like a tiny ad:
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic