Sha256: cadf00222e90eb31743341dee0508e508bcb74739532f756229d97f1a6c1bc81

Contents?: true

Size: 387 Bytes

Versions: 6

Compression:

Stored size: 387 Bytes

Contents

# Add methods to Server Interface
module Java::org.hornetq.core.server::HornetQServer

  # Shutdown the server when a typical interrupt signal (1,2,15) is caught
  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
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
jruby-hornetq-0.5.0.alpha lib/hornetq/server/org_hornetq_core_server_hornet_q_server.rb
jruby-hornetq-0.4.0 lib/hornetq/server/org_hornetq_core_server_hornet_q_server.rb
jruby-hornetq-0.3.3 lib/hornetq/server/org_hornetq_core_server_hornet_q_server.rb
jruby-hornetq-0.3.2 lib/hornetq/server/org_hornetq_core_server_hornet_q_server.rb
jruby-hornetq-0.3.1 lib/hornetq/server/org_hornetq_core_server_hornet_q_server.rb
jruby-hornetq-0.3.0.alpha lib/hornetq/server/org_hornetq_core_server_hornet_q_server.rb