Question

How would you set the run.mode for a Lift application running on Resin?

When deploying on Jetty I included a jetty-web.xml in the war file that set the run.mode property to "production". Now I need to deploy on Resin.

Was it helpful?

Solution

In your resin.xml or resin.properties, you can set command-line properties. If you're using one of the most recent Resin 4.0, releases you can use the /etc/resin/resin.properties "jvm_args" property:

# Arg passed directly to the JVM
jvm_args    : -Drun.mode=production -Xmx1024m

If you're using an older Resin without the resin.properties, you can set the <jvm-arg> inside the <server> or <server-default> tag in the /etc/resin/resin.xml:

<resin ...
  <cluster id="app">
    <server-default>
      <jvm-arg>-Drun.mode=production</jvm-arg>
      ...
    </server-default>

When Resin's watchdog process builds the command line to launch Resin, it uses the <jvm-arg> from the resin.xml as arguments to the child Resin.

It's possible, by the way, to have server-specific properties as well, either configured by the Resin server id or the cluster. (Or using expressions and control statements in the configuration. Probably not what you need here, though.)

OTHER TIPS

set -Drun.mode=production in the command line when you are starting resin.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top