Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Regarding Session  RSS feed

 
Ravi Kumar Ravuru
Ranch Hand
Posts: 176
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello Friends,
Thanks for your suggestions for my questions at forum.Iam facing a typical problem regarding the session.I deployed my application at IBM Websphere Application Server 4.0.1 Advanced Edition for MultiPlatforms and set the session for 30 minutes in the application server's services tab of Session Manager.Our application consists of a program which reads the file and stores the data in Database(Oracle).Our program takes around 1 hour and 30 mins to read the file and stores the data in Database.The problem is the page expires before the data is stored in Database & shows a blank page(like when we access a page which is not availabe on the site).Can anybody suggest me how to handle session?
Thanks in advance.
Ravi
 
Suresh Selvaraj
Ranch Hand
Posts: 104
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I have worked only with Weblogic Servers.
The problem you have stated is not server specific.
Try setting the "session.setMaxInactiveInterval(3600);" This sets the maximum inactive interval to one hour.
Note: A value of -1 indicates that the session will never expire.
Regards,
Suresh Selvaraj
 
Ravi Kumar Ravuru
Ranch Hand
Posts: 176
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello Suresh Selvaraj,
Thanks for your suggestion.I know that by setting setMaxInactiveInterval(3600),my program runs.But the session will be continue to be 3600 for the rest of my application which is burden to the server.
Ravi
 
Felix Kan
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ravi,
You mentioned that increasing your session timeout value will be a burden to the rest of your application.
Is this very page you have trouble with a scheulded routine of your application, while you have regular users who will not be invoking this particular 1.5-hour page?
If I'm correct, you can consider seperating your "system routine" from the rest of your application:
1. create a seperate webapp instance
2. give it a long sesssion timeout value
3. put your 1.5-hour page there
then, you can keep a short session timeout in your regular webapp, and have your 1.5-hour page running off a different webapp (this webapp will normally contains only 1 session instance - for your 1.5-hour page)
[ September 24, 2002: Message edited by: Felix Kan ]
 
Ron Ditch
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Following along the same lines as Felix, you may want to look at re-architecting your solution.
What you are asking the web application to do can be handled asychronously.
Why don't you create a thread in a BootStrap servlet, and have your web application pass a request to do work to the thread. Then if your session times out, who cares, cause the thread has a life of its own.
You can even have the thread update a database table that lists the status of work requests periodically, and build access from your web-app to that table.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!