require 'drb' raise 'Use Jruby for LuRuJu Server!!' unless am_i_jruby? $SAFE = 1 module Luruju class LurujuServer def marshal(jude_file, options={}) puts "start loadding #{jude_file} #{options}" JudeApiLoader.marshal jude_file, options rescue p $! pp $!.backtrace return $! ensure puts "end loading" end def shutdown() puts "try shutdown." DRb.stop_service nil end end end url = "druby://127.0.0.1:#{Luruju.config.drb_port}" DRb.start_service(url, Luruju::LurujuServer.new) puts "start LuRuJu Server URL=#{url}" DRb.thread.join puts "shutdown LuRuJu Server ..."