become_java! does not create java class which can be loaded by the 
context-classloader (as of >= 1.6.0.RC1)
-----------------------------------------------------------------------------------------------------------

                 Key: JRUBY-5564
                 URL: http://jira.codehaus.org/browse/JRUBY-5564
             Project: JRuby
          Issue Type: Bug
    Affects Versions: JRuby 1.6RC2, JRuby 1.6RC1
            Reporter: kristian meier
            Assignee: Thomas E Enebo
             Fix For: JRuby 1.6RC3


the following snippet works nice in jruby-1.5.6 and this allows to use
such classes in libraries (hibernate) which load the classes from the
context_classloader. with 1.6.0 the classname changed from ruby.A to
rubyobj.A and cannot be found with the context classloader. 

{noformat}
require 'jruby/core_ext'

class A; end

#make a java class out of the ruby class
AA = A.become_java!
p AA.get_name

# load the java class from the classloader
cl = java.lang.Thread.current_thread.getContextClassLoader
p cl.load_class AA.get_name
{noformat}

-- 
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