Sha256: 185a47f4467a0d9b3e01c5a73ebbcbd6e4cc0001156966e2b048420df811958e

Contents?: true

Size: 985 Bytes

Versions: 6

Compression:

Stored size: 985 Bytes

Contents

#!/usr/bin/env jruby

require 'rubygems'
require 'yaml'
require 'hornetq'

unless ARGV[0]
  $stderr.puts <<EOF

Usage: hornetq_server <uri-or-yml-file>

  Examples:

    # start standalone server on port #{HornetQ::DEFAULT_NETTY_PORT}
    hornetq_server hornetq://0.0.0.0/?data_directory=./data

    # start backup server
    hornetq_server hornetq://0.0.0.0:5446/?backup=true\\&data_directory=./data_backup

    # start live server attached to backup on same server
    hornetq_server hornetq://0.0.0.0:5445,localhost:5446/?data_directory=./data

EOF
  exit 1
end

# Check if the argument is a yaml file or a uri
if ARGV[0] =~ /\.ya?ml$/
  config = YAML.load_file(ARGV[0])
  # Allow sub items
  (1...ARGV.size).each do |i|
    config = config[ARGV[i]] || config[ARGV[i].to_sym]
  end
  puts "config=#{config.inspect}"
  server = HornetQ::Server.create_server(config)
else
  uri = ARGV[0]
  server = HornetQ::Server.create_server(uri)
end
server.enable_shutdown_on_signal
server.start

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
jruby-hornetq-0.5.0.alpha bin/hornetq_server
jruby-hornetq-0.4.0 bin/hornetq_server
jruby-hornetq-0.3.3 bin/hornetq_server
jruby-hornetq-0.3.2 bin/hornetq_server
jruby-hornetq-0.3.1 bin/hornetq_server
jruby-hornetq-0.3.0.alpha bin/hornetq_server