Module: Java::org.hornetq.core.server::HornetQServer

Defined in:
lib/hornetq/server/org_hornetq_core_server_hornet_q_server.rb

Overview

Add methods to Server Interface

Instance Method Summary collapse

Instance Method Details

#enable_shutdown_on_signalObject

Shutdown the server when a typical interrupt signal (1,2,15) is caught



5
6
7
8
9
10
11
12
# File 'lib/hornetq/server/org_hornetq_core_server_hornet_q_server.rb', line 5

def enable_shutdown_on_signal
  ['HUP', 'INT', 'TERM'].each do |signal_name|
    Signal.trap(signal_name) do
      HornetQ.logger.info "Caught #{signal_name}, stopping server"
      stop
    end
  end
end