[erlang-questions] Included applications in releases : differences between r14 and r15
Russell Brown
russelldb@REDACTED
Thu Jul 26 11:25:47 CEST 2012
Going to answer my own question here, sorry.
{my_app, load} in the rel_app list in the `rel` tuple in my retool.config fixes the problem.
Is that the correct way?
Cheers
Russell
On 26 Jul 2012, at 09:54, Russell Brown wrote:
> Hi,
> I have an application that wants to supervise another application. Looking at http://www.erlang.org/doc/design_principles/included_applications.html it seemed that an included application was the way to go.
>
> I added the included app like this
>
> {included_applications, [the_app]},
>
> in the primary applications .app file.
>
> When I build a release with rebar under r15 the boot script does _NOT_ start the included app, as hoped and expected. However, the exact same code and config on r14 results in this line appearing in the boost script
>
> {apply,{application,start_boot,[the_app,permanent]}},
>
> Which means the app is started on boot, and my subsequent call to start the top level supervisor of the included app fails with `already_started`.
>
> What is the correct way to include an app so that it is loaded, but not started, in r14, so that I may have my primary app call the top level supervisor of the included application, please?
>
> Also, in Learn You some Erlang, there is a section that says "don't do this" (http://learnyousomeerlang.com/the-count-of-applications#included-applications.) Is there a better way to achieve what I am after?
>
> Cheers
>
> Russell
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20120726/6bbe7295/attachment.htm>
More information about the erlang-questions
mailing list