Thanks. Is the code for this Goldspike in the trunk?
On Aug 2, 2007, at 4:30 PM, Robert Egglestone wrote:
On every request GoldSpike selects a runtime from the pool to use
for processing that request.
It'll need to be updated to be compatible with your work, as it'll
now need to call Ruby.setCurrentInstance before invoking any Ruby
code.
The situation will be similar for any other applications that
change runtimes.
Cheers,
Robert
Alan McKean wrote:
I have been using JRuby in Rails while developing a small demo of
using GemStone persistence in place of ActiveRecord. I found that
detaching the runtime by sticking the runtime in a thread local
'currentInstance' did not quite do the trick.
It seemd to work fine in plain old Ruby scripts, but Rails
apparently uses runtimes differently. In particular, it looks like
RubyNil's getRuntime() gets called in a thread that does not have
a thread local runtime. So I put in lazy initialization (using a
default instance of runtime) in the Ruby.getCurrentInstance()
method and that fixed it. Can anyone explain the workings of Rails
and how (and when) it creates or uses runtimes? I think I will
need some pointers to get this right.
---------------------------------------------------------------------
To unsubscribe from this list please visit:
http://xircles.codehaus.org/manage_email
---------------------------------------------------------------------
To unsubscribe from this list please visit:
http://xircles.codehaus.org/manage_email
---------------------------------------------------------------------
To unsubscribe from this list please visit:
http://xircles.codehaus.org/manage_email