[erlang-questions] module dependencies between applications when using .appup files
Torben Hoffmann
torben.lehoff@REDACTED
Mon Nov 2 21:45:54 CET 2009
Malcom,
I think you should have a look at phased application start-up - to the best
of my recollection the principles there also apply when you do an
application upgrade.
Cheers,
Torben
On Fri, Oct 30, 2009 at 19:33, Dowse, Malcolm <malcolm@REDACTED> wrote:
> Hi,
>
>
>
> I have a question about the release handler and .appup files.
>
>
>
> I have two applications, app, and app_common, and a release which uses
> both. app_common is a dependency of app. So if app is running,
> app_common will be too.. but not the opposite.
>
>
>
> It is possible to force a module in app_common to load before one in
> app. You specify {load_module, app_module, [app_common_module]} in
> app.appup. This isn't very elegant, but it definitely works.
>
>
>
> The problem I'm having is that when upgrading the release, I want to
> load a module in app before I load one in app_common. Without a command
> like {load_module, app_module, [{reverse_dependency,
> app_common_module}]} there seems to be no way of doing this. Adding
> {load_module, app_common_module, [app_module]} to app_common.appup is
> out of the question.
>
>
>
> Can anyone tell me any clever tricks/hacks to get around this?
>
>
>
> Thanks in advance,
>
>
>
> Malcolm
>
>
--
http://www.linkedin.com/in/torbenhoffmann
More information about the erlang-questions
mailing list