Hello everybody,
My question is probably stupid. Why, in ejabberd:start_app, the start specification is not given to application:start ?
The code is like this :
start_app([App|Apps], Type, StartFlag) ->
case application:start(App) of
ok ->
[...]
Why is it not like
start_app([App|Apps], Type, StartFlag) ->
case application:start(App, Type) of
ok ->
[...]
If Type is not provided to application:start, the default is temporary. Or, in ejabberd_app, mnesia is launched in db_init() with ejabberd:start_app(mnesia, permanent).
It depends in what you want
It depends in what you want to achieve and your use case. If you set permanent, shutting down ejabberd will shut down the whole VM.