Using multiple database connections on the same model with thread safety in Sinatra

245 views Asked by At

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?

0

There are 0 answers