I'm using the following:
- Spring 3.1
- Java EE 6 (GlassFish 3.1.2)
- Maven for project builds, etc
- Ant for live deployment
We have a bunch of environments at work: DEV, UAT, TRAINING, PROD, etc. In our TRAINING environment a request has been made for me to up the session timeout to 8 hours. It is 2 hours in all other environments. What I'd love to do is simply use a property placeholder in web.xml
. But I don't think this is possible:
<session-config>
<session-timeout>${session.timeout}</session-timeout>
</session-config>
The solutions I have thought of are:
- Use Maven filtering - I really do not wish to do this. It would mean a separate war for training.
- Remove the session timeout from
web.xml
and configure GlassFish in TRAINING to timeout after 8 hours - I don't like this too much, as I'd prefer to keep all our environments pure and in sync. - Set this manually in some initialisation code. Yuck.
I should mention that we use <env>.properties
files to configure the web-app. The properties file is selected using a VM argument.
Can anyone think of another, nicer solution?
Thanks in advance, Muel.