Re: [jruby-dev] Java Integration problem

2007-05-02 Thread Bill Dortch
Actually, Java.wrap wants the recv parameter to be JavaUtilities, so you'd need to do something like this: return Java.wrap(recv.getRuntime().getModule("JavaUtilities"), JavaObject.wrap(recv.getRuntime(),c.prepareStatement(sql.toString(; You could also call Java.java_to_ruby, but it adds a

Re: [jruby-dev] Java Integration problem

2007-05-02 Thread Bill Dortch
I haven't tried this (yet, will shortly), but I think what you need to do is: return Java.wrap(recv,JavaObject.wrap( recv.getRuntime(),c.prepareStatement(sql.toString( Otherwise you're just returning a raw JavaObject, with no proxy (hence no methods). On 5/2/07, Ola Bini <[EMAIL PROTECTED

Re: [jruby-dev] Java Integration problem

2007-05-02 Thread Bill Dortch
I'm not sure why this wouldn't work. Am looking into it. -Bill On 5/2/07, Ola Bini <[EMAIL PROTECTED]> wrote: Hi, I'm investigating something that looks like a slight problem with the new JI, or with me. Basically, this code in standard JRuby Java: public static IRubyObject prepareStatem

[jruby-dev] Java Integration problem

2007-05-02 Thread Ola Bini
Hi, I'm investigating something that looks like a slight problem with the new JI, or with me. Basically, this code in standard JRuby Java: public static IRubyObject prepareStatement(IRubyObject recv, IRubyObject sql) throws SQLException { Connection c = (Connection)recv.dataGetStruct