I have a Sinatra application that is written in jruby and compiled into java and deployed on multi threaded Apache Tomcat server.
In one of the controllers, I want to be able to specify the model to use a particular database connection. So far I have looked at octopus gem. I am not sure if octopus is thread safe or not.
Is there an easy way to do this while being thread safe?