File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JBoss/WildFly and the fly likes sessionTimeout? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » JBoss/WildFly
Bookmark "sessionTimeout?" Watch "sessionTimeout?" New topic
Author

sessionTimeout?

nimo frey
Ranch Hand

Joined: Jun 28, 2008
Posts: 580
Is it enough the define the sessionTimeout in web.xml or have I set up the timeout in my ApplicationServer (JBOSS), too?
Jaikiran Pai
Marshal

Joined: Jul 20, 2005
Posts: 10101
    
164

The web.xml session-timeout should be enough to enable session timeouts in your application.


[My Blog] [JavaRanch Journal]
nimo frey
Ranch Hand

Joined: Jun 28, 2008
Posts: 580
No, unfortunately not. I have to set up this:



Now, it works.

I have found under
[URL=
]http://www.jboss.org/community/docs/DOC-12439]
]http://www.jboss.org/community/docs/DOC-12439[/URL]

that I can set the timeout at the method-level via annotation in my stateless sessionBean:

@TransactionTimeout(10000)
void doThat()

Is this not a better approach instead of hardcoding it in the server.xml file:-)
[ December 12, 2008: Message edited by: nimo frey ]
Jaikiran Pai
Marshal

Joined: Jul 20, 2005
Posts: 10101
    
164

Is it enough the define the sessionTimeout in web.xml


Based on your first post, i assumed that you were looking for the web application's session timeout.

No, unfortunately not. I have to set up this:




Now, it works.


that I can set the timeout at the method-level via annotation in my stateless sessionBean:

@TransactionTimeout(10000)
void doThat()


Your second post is talking about a transaction timeout and is not related to the session timeout of a web application. Which one exactly are you interested in? Please provide more details about what you are looking for.
nimo frey
Ranch Hand

Joined: Jun 28, 2008
Posts: 580
Transaction Timeout.

I use JBOSS 4.2 and want use the annotation, but this does not work oi



However, this does not work, when I set up the timeout in server-xml, then it does work. But I want to use the annotation (and no ctx-lookup setTransactionTimeout).
[ December 12, 2008: Message edited by: nimo frey ]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: sessionTimeout?