[erlang-questions] Mnesia in an OTP application

Ludovic Coquelle <>
Fri Aug 17 07:32:50 CEST 2007


Hi,
What is the common (or easy) way to integrate Mnesia in an OTP application?

I mean, my app rely on Mnesia.
Thus, when my app start, it check that mnesia is running and start it if
necessary.
If my app started mnesia, I would like to stop mnesia when I stop my app ...
but I cannot call mnesia:stop/0 while I am in myapp:stop/0 (it hangs,
probably there is  single application manager... or something like that).

How do you guys solved this problem for your app?
Is it a real case or is it a bad idea to start mnesia from another app?

Is there a mnesia supervisor I could use to put mnesia inside my app
supervision tree?
Could I see Mnesia as a "included application"?

Thanks
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20070817/1a2c71d3/attachment.html>


More information about the erlang-questions mailing list