migration to jruby, enable threadsafe