summaryrefslogtreecommitdiff
path: root/src/rabbit.erl
diff options
context:
space:
mode:
authorMichael Bridgen <mikeb@lshift.net>2010-03-18 12:42:57 +0000
committerMichael Bridgen <mikeb@lshift.net>2010-03-18 12:42:57 +0000
commit02becf40efe0665aef62493554fd3c12a5e16bfa (patch)
tree6007d8832daa28778bcd9eb388468b04158064a4 /src/rabbit.erl
parent2bfce36f9575fb2465550b095e9e612b0ba159f6 (diff)
parent928aa9c03865357b82539bdcb1cd22f5f4ca3dc8 (diff)
downloadrabbitmq-server-git-02becf40efe0665aef62493554fd3c12a5e16bfa.tar.gz
Non-trivial merge of default into amqp_0_9_1. Queue exclusivity (bug
20578) and exchange hooks intersect in a few places. The main things to take care over are that the post-queue-deletion hooks gets called, and the exclusivity check is called. NB: exchange auto-delete machinery needs to be removed, which will simplify things in a few places.
Diffstat (limited to 'src/rabbit.erl')
-rw-r--r--src/rabbit.erl33
1 files changed, 20 insertions, 13 deletions
diff --git a/src/rabbit.erl b/src/rabbit.erl
index ac883a1b45..65416f39c7 100644
--- a/src/rabbit.erl
+++ b/src/rabbit.erl
@@ -53,9 +53,16 @@
[{mfa, {rabbit_mnesia, init, []}},
{enables, kernel_ready}]}).
+-rabbit_boot_step({rabbit_exchange_type_registry,
+ [{description, "exchange type registry"},
+ {mfa, {rabbit_sup, start_child,
+ [rabbit_exchange_type_registry]}},
+ {enables, kernel_ready}]}).
+
-rabbit_boot_step({rabbit_log,
[{description, "logging server"},
- {mfa, {rabbit_sup, start_child, [rabbit_log]}},
+ {mfa, {rabbit_sup, start_restartable_child,
+ [rabbit_log]}},
{enables, kernel_ready}]}).
-rabbit_boot_step({rabbit_hooks,
@@ -80,13 +87,15 @@
-rabbit_boot_step({rabbit_router,
[{description, "cluster router"},
- {mfa, {rabbit_sup, start_child, [rabbit_router]}},
+ {mfa, {rabbit_sup, start_restartable_child,
+ [rabbit_router]}},
{requires, kernel_ready},
{enables, core_initialized}]}).
-rabbit_boot_step({rabbit_node_monitor,
[{description, "node monitor"},
- {mfa, {rabbit_sup, start_child, [rabbit_node_monitor]}},
+ {mfa, {rabbit_sup, start_restartable_child,
+ [rabbit_node_monitor]}},
{requires, kernel_ready},
{requires, rabbit_amqqueue_sup},
{enables, core_initialized}]}).
@@ -115,7 +124,8 @@
-rabbit_boot_step({guid_generator,
[{description, "guid generator"},
- {mfa, {rabbit_sup, start_child, [rabbit_guid]}},
+ {mfa, {rabbit_sup, start_restartable_child,
+ [rabbit_guid]}},
{requires, persister},
{enables, routing_ready}]}).
@@ -187,15 +197,12 @@ stop() ->
ok = rabbit_misc:stop_applications(?APPS).
stop_and_halt() ->
- spawn(fun () ->
- SleepTime = 1000,
- rabbit_log:info("Stop-and-halt request received; "
- "halting in ~p milliseconds~n",
- [SleepTime]),
- timer:sleep(SleepTime),
- init:stop()
- end),
- case catch stop() of _ -> ok end.
+ try
+ stop()
+ after
+ init:stop()
+ end,
+ ok.
status() ->
[{running_applications, application:which_applications()}] ++