Sha256: 9823bb7cceebb4631328825ef0bbecb79b0b9015c07d405c5f23d097c23ea458

Contents?: true

Size: 692 Bytes

Versions: 9

Compression:

Stored size: 692 Bytes

Contents

# This file runs a JRuby DRb server, and is run by `akephalos --server`.
require "pathname"
require "drb/drb"
require "akephalos/client"

# In ruby-1.8.7 and later, the message for a NameError exception is lazily
# evaluated. There are, however, different implementations of this between ruby
# and jrby, so we realize these messages when sending over DRb.
class NameError::Message
  def _dump
    to_s
  end
end

[Akephalos::Page, Akephalos::Node].each { |klass| klass.send(:include, DRbUndumped) }

module Akephalos
  class Server
    def self.start!(socket_file)
      client = Client.new
      DRb.start_service("drbunix://#{socket_file}", client)
      DRb.thread.join
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
akephalos-0.2.3-java lib/akephalos/server.rb
akephalos-0.2.3 lib/akephalos/server.rb
akephalos-0.2.2-java lib/akephalos/server.rb
akephalos-0.2.2 lib/akephalos/server.rb
akephalos-0.2.1 lib/akephalos/server.rb
akephalos-0.2.0 lib/akephalos/server.rb
akephalos-0.2.0-java lib/akephalos/server.rb
akephalos-0.1.0-java lib/akephalos/server.rb
akephalos-0.1.0 lib/akephalos/server.rb