On 22/02/10 3:22 PM, Indrajit Raychaudhuri wrote:
Given that setting initParams is the usual webapp idiom, should we not
consider that at all? That would have served the purpose for Petr.

So the calcRunMode could roughly have something like:

customRunMode or context.initParam("run.mode") or
Box.!!(System.getProperty("run.mode"))

with provision for having customRunMode customized heartily.

On second thought, the order probably should be other way round.

Box.!!(System.getProperty("run.mode")) or context.initParam("run.mode") or customRunMode

-Drun.mode=... is more transient (and suitable for fast mode switching during development) than static definition in the code and thus to be tried first.


Cheers, Indrajit


On 22/02/10 1:50 PM, Jeppe Nejsum Madsen wrote:
On Mon, Feb 22, 2010 at 8:48 AM, Heiko Seeberger
<heiko.seeber...@googlemail.com> wrote:
Folks,
I really do not understand the value of setting the run mode
statically via
code in LiftRules. The run mode should be set externally, right? In
order to
use the same artifact (WAR) on a dev or a prod server.
Heiko

Agreed. This was more so that people could change how "externally" is
defined, ie in a hosted env you can't change system properties.

The default would still be the current lookup in system properties,
but you could change this to look at servlet params, hostname, day of
month etc :-)

/Jeppe


--
You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to lift...@googlegroups.com.
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en.

Reply via email to