4pie0
4pie0

Reputation: 29724

how can I avoid connection time out in glassfish jsf?

I have a site deployed in JSF, running on glassfish server. I am not sure what is happening but after few minutes idle connection doesn't work longer and client has to refresh the page to make it works again. I know about paremeters in Pool Settings and HTTP Service but this is not clear to me: particularly I don't want to set this time after which client has to refresh page to some minutes, every website that I know never do such thing! So I want my website to work still if he opened it, then left and now he returns after 2 weeks, because he has this still open in browser. Is something wrong with this?

I am not sure if I have some misconfiguration issue or is this a default behavior?

Upvotes: 0

Views: 3723

Answers (2)

user1361683
user1361683

Reputation:

where_is_tftp's answer worked on mine for a while, but my glassfish eventually stopped working, throwing a NullPointerException at java.util.concurrent.ConcurrentHashMap.remove(ConcurrentHashMap.java:922). To reset the timeout using asadmin since the gui was down, I found this answer, which gives this command:

asadmin set server.web-container.session-config.session-properties.timeout-in-seconds=3600

Sidenote: I wanted to post this as a comment on the previous answer but don't have 50 rep. If someone does and sees this, feel free to repost it as a comment and delete this answer.

Upvotes: 2

4pie0
4pie0

Reputation: 29724

Glassfish admin console -> Configurations -> server-config -> Web Container -> Session Timeout

set to 0: session never expires

http://www.cryptoengine.org/component/content/article/42-subinstall/68-configure-glassfish31.html

Upvotes: 1

Related Questions