DRb hangs when transferring Ruby objects created in Java
--------------------------------------------------------

                 Key: JRUBY-1235
                 URL: http://jira.codehaus.org/browse/JRUBY-1235
             Project: JRuby
          Issue Type: Bug
          Components: Core Classes/Modules
    Affects Versions: JRuby 1.0.0
         Environment: Mac OS X Tiger
            Reporter: Kyle Maxwell
            Priority: Minor


If I use a Java class to create Ruby objects, they cannot be sent over DRb. i.e:

package com.kylemaxwell.development;
import org.jruby.*;
import java.util.*;
public class Fu
{
  public static RubyHash rubyHashPlease()
  {
    Ruby jruby = Ruby.getDefaultInstance();
    HashMap map = new HashMap();
    map.put(
       RubyString.newUnicodeString(jruby,  "foo"), 
      RubyString.newUnicodeString(jruby,  "bar")
    );
    return new RubyHash(jruby, map, new RubyNil(jruby));
  }
}

# jirb
 > require "java"
=> true
 > Fu = com.kylemaxwell.development.Fu
=> Java::ComKylemaxwellDevelopment::Fu
 > Fu.ruby_hash_please
=> {"foo"=>"bar"}
 > Fu.ruby_hash_please
=> {"foo"=>"bar"}
 > Marshal::dump _
=> "\004\010{\006\"\010foo\"\010bar"
 > Marshal::load _
=> {"foo"=>"bar"}
 > require 'drb'
=> true
 > DRb.start_service nil, Fu
=> #<DRb::DRbServer:0x9...
 > DRb.uri
=> "druby://kyle.wan:59476"

# other window...
 > require 'drb'
=> true
 > DRb.start_service
=> #<DRb::DRbServer:0x679f...
>> Fu = DRbObject.new nil, "druby://kyle.wan:59476"
=> #<DRb::DRbObject:0x65bd14 @ref=nil, @uri="druby://kyle.wan:59476">
 > Fu.ruby_hash_please
# Hangs....

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe from this list please visit:

    http://xircles.codehaus.org/manage_email

Reply via email to