Forum: JRuby CallbackFactory deprecated; what is a contemporary example?

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
Chris Kruger (Guest)
on 2013-05-22 04:48
(Received via mailing list)
Hello Jruby Folks,

So I am trying to implement some Jruby extensions using the
BasicLibraryService class based on this blog entry

I'm using jruby-1.7.4 and it seem that the callbackFactory method on
Ruby object is now setup to throw an exception because the that
technique is deprecated.

The documentation talks about using MethodFactories now, instead of the
CallbackFactory. However I could not glean from the documentation how
this was supposed to work.

The code that does not work looks like below

 public boolean basicLoad(final Ruby runtime) throws IOException {
         RubyModule string = runtime.getModule("String");
          CallbackFactory fact =
          return true;

What's the contemporary equivalent using MethodFactory?  Where do I get
a MethodFactory instantiated with everything I need?

Thanks in advance for any help!

Chris Kruger
This topic is locked and can not be replied to.