Skip to content

Commit

Permalink
Docs for how :main behaves in-container [IMMUTANT-558, IMMUTANT-559]
Browse files Browse the repository at this point in the history
  • Loading branch information
tobias committed May 15, 2015
1 parent d65e890 commit 4d53399
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 0 deletions.
3 changes: 3 additions & 0 deletions docs/guides/installation.md
Expand Up @@ -103,6 +103,9 @@ then start your app like so:

lein run

If you are deploying your application to [WildFly], see the
[WildFly guide] for information on how `:main` is handled there.

## Incremental Builds

If you need cutting-edge features/fixes that aren't in the latest
Expand Down
18 changes: 18 additions & 0 deletions docs/guides/wildfly.md
Expand Up @@ -167,6 +167,24 @@ this and set your context path to "/" instead, name your war file

$ lein immutant war -o /srv/wildfly -n ROOT

## Initialization Caveats

There are two issues to be aware of with regards to application
initialization in WildFly:

* Your `:main` function *must* return when initialization is
complete - deployment will not finish until it does. If it doesn't
return within 4 minutes, the deployment will be aborted. If you need
more than 4 minutes, you can override the default with
`-Dwunderboss.deployment.timeout=<n seconds>`. Note that if you set
that to more than 5 minutes, you will also need to increase
WildFly's own coarser grained deployment timeout with
`-Djboss.as.management.blocking.timeout=<m seconds>`.

* Any `immutant.web/run` calls *have* to occur before `:main`
returns. A limitation of the JavaEE specification prevents us from
registering any servlets after that point.

## Logging in WildFly

To learn about how logging works when inside WildFly, along with how
Expand Down

0 comments on commit 4d53399

Please sign in to comment.