Only 44 hours left in the trailboss' kickstarter!

New rewards and stretch goals. CLICK HERE!



Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Does invalidate really help  RSS feed

 
anand chawla
Ranch Hand
Posts: 91
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Guys,
I have just gone mad with this problem.
I am making a online exam like the one which has been created in javaranch.What i am doing is that i have created a vector of all the questions and answers that come from a database and vector that stores all the answers from user.Then in the end i compare these values to find the correct answers.it works perfect.
I am adding these vectors to session.
the problem is insipte of invalidating a sessoion...the problems persists is that the vector of answers selected my user doestnt get invalidated it shows me the contents of precious array and
this is really maddening...
one thing can anyone tell me does invalidating a session also invalidate objects set to it....i think yes...but practically it isnt doing so..
please help
 
David O'Meara
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You might want to post some data here to give us an example of what you are doing, it might be a thread safety problem.
Yes, invalidating a session is a good idea.
As long as the Vector of data isn't referenced elsewehere it should be available for garbage collection.
Dave.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!