File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JForum and the fly likes new topic icons not changing state Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Products » JForum
Bookmark "new topic icons not changing state" Watch "new topic icons not changing state" New topic
Author

new topic icons not changing state

Migrated From Jforum.net
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
I'm having an issue with the new topic icons. When a new topic is created, it lights up as expected for each user. The problem is when the user actually reads the topic, the icon stays lit up until they refresh their session (ie, log back in, or the current session times out).

I was wondering if there was some sort of property that dealt with this somewhere, or something in particular I should examine to investigate this problem. Right now, I'm assuming this is some sort of caching issue, but I think its also possible that the model isn't being updated correctly.

Any advice would be appreciated. Let me know if a more in depth description of the issue is needed.

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

Joined: Apr 22, 2012
Posts: 17424
Hm, that's new for me.

Can't tell right now where's the problem. We're investigating.

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

Joined: Apr 22, 2012
Posts: 17424
I'm in the process of patching to the beta version of 2.1.7 tonight. Its taking me a little bit because I'm going back to remove all of my custom code into a different eclipse project so that I can keep the base package separate. I'll update the status of the problem here after I can take a look at it under the new release.
[originally posted on jforum.net by uniq]
Migrated From Jforum.net
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
Ok, the update didn't seem to help the problem. Is there any information I can provide that may help you?
[originally posted on jforum.net by uniq]
Migrated From Jforum.net
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
Hard... It is probably a bug in the memory tracking code..

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

Joined: Apr 22, 2012
Posts: 17424
It occurred to me that the only significant difference between our implementations is that I'm using SSO. I tried turning it off, and lo and behold it worked. Apparently some part of the session is being refreshed with this data in the nonSSO setup that isn't being put together by the SSO. I'm not quite sure where to go with this yet however, any ideas?
[originally posted on jforum.net by uniq]
Migrated From Jforum.net
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
I should note that the icons refresh as you'd expect on a relogin, so perhaps this is related to the isSessionValid (and not the authenticateMethod)
[originally posted on jforum.net by uniq]
Migrated From Jforum.net
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
After much debugging (the hard way LOL), I finally figured out the problem. Here was my code before:



The problem was both of the logical tests (the second and third else if statements) were both returning false. That is because I was simply checking to see if the name was in the session, then -intending- to return true if so. In order to make these expressions evaluate the way I wanted them too, I needed to either remove them or add the requested data to the session.



Now I realize this is essentially forcing my expressions to evaluate to true by brute force. The reason I decided to leave them, however, was that I expect that this session management should be dealt with before the call to isSessionValid by JForum. If this is not true, then perhaps this should be a part of the authenticateUser method. I would assume this would be so given the name of the method, but the fact that it does not accept a UserSession object as a parameter leads me to believe I simply do not understand its purpose.

When I figure out a more proper place to add this data to the session, I'll be moving this code fragment there. Until then, I'd like to ask if you think the authenticateUser method should be doing this session management.
[originally posted on jforum.net by uniq]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: new topic icons not changing state
 
Similar Threads
using JForum login system globally
sessions
Multiple User with same login without session mix up
Best Practice For Joined Result Set
Check duplication in a very large file