GeeCON Prague 2014*
The moose likes JBoss/WildFly and the fly likes how to disable session time out Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Products » JBoss/WildFly
Bookmark "how to disable session time out" Watch "how to disable session time out" New topic
Author

how to disable session time out

Nasir Munir
Greenhorn

Joined: May 31, 2002
Posts: 22
I have this application running on JBoss 4.0.5.GA.
Big picture is: an input file is split into certain blocks, those blocks are given certain order and are re-combined to form a file again. Then an executable is run on them and results are generated. These results are displayed on a file, and a list is provided to the user to download. If not, the next step would zip those files and send an email to the user as an attachment and then delete the files on the server.
Problem: it works fine, however, with larger files (1GB), it displays the files to download, but on the next step I am getting this error message:


I have checked the log file ( i am using log4j ), and it is showing this error:

I am suspecting it is happneing becuase of session time out, because it is running fine with the smaller files. Can I get some help here ? If I need to post my code here or if I need to explain more, please let me know.
Thanks
Jaikiran Pai
Marshal

Joined: Jul 20, 2005
Posts: 10146
    
165

2007-06-26 15:47:14,814 INFO [formjavabean.application] (step 12)Deleting files on the server - starts
2007-06-26 15:47:14,939 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost].[/RLFA].[jsp]] Servlet.service() for servlet jsp threw exception
java.lang.NumberFormatException: null
at java.lang.Integer.parseInt(Integer.java:415)
at java.lang.Integer.parseInt(Integer.java:497)
at formjavabean.application.send_del(application.java:224)


Not sure whether this is a session timeout issue. As per the logs, while deleting the files on the server, null is being passed to the Integer.parseInt method, which is causing this NumberFormatException. You might have to check why the null is being passed to that method.


[My Blog] [JavaRanch Journal]
Jaikiran Pai
Marshal

Joined: Jul 20, 2005
Posts: 10146
    
165

Anyways, if you are interested in knowing how to disable session timeout - By default the session timeout is 30 minutes for all the web applications deployed on JBoss. In order to override this value, you can add the following element in the web.xml file of your application:



The session-timeout value is in minutes. As per the web.xml dtd

If the timeout is 0 or less, the container ensures the default
behaviour of sessions is never to time out.
Nasir Munir
Greenhorn

Joined: May 31, 2002
Posts: 22
here is my send_del() method:


and here is my send mail method:

Can anyone help me figure out the problem ? log file also suggest : illegal address, and then produces the error listed above. I fail to understand, how is running fine with smaller input files and not with larger files. I have tried using negative session time out time, it works but now it is sending an email with the result.zip (the size of the file is not right). I can see the size as 109KB on the server, but the attached result.zip is just 9KB.
Someone, please help.
Thanks
[ July 04, 2007: Message edited by: Nasir Munir ]
 
GeeCON Prague 2014
 
subject: how to disable session time out