The following gist are available as support to the answer: JRuby: Calling Java Code From A Rack App And Keeping It In Memory
- StatelessCalculator.java a class used by StatefullCalculator
- StatefulCalculator.java the class shared
- sample_app.rb the sinatra app
- Gemfile This file is used by
$ bundle install
- .rvmrc if you use
rvm
to have a sandboxed gemset and a well defined jruby env.