[ejabberd] Way to ensure that a process is started before loading the rest of the modules
johann.prieur at gmail.com
Mon Dec 7 16:45:22 MSK 2009
Is there a way to ensure that a specific gen_server is started and
registered before the gen_mod modules are loaded?
My use case is that my implementations of the authentication module,
mod_roster and mod_vcard are relying on contacting an external API. To
handle the logic of dealing with that API, I created a gen_server that acts
as a singleton client to it and that I want to use from my different mod_*
I guess I could do that by modifying ejabberd's code, which I'd like to
avoid. Or maybe there is a better way to achieve what I'm trying to do? I
could start the API client lazily when a module needs it but then it would
introduce a potential race condition, I think.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the ejabberd