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

Question

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

Answers 0
Added at 2016-12-21 19:12
Tags
Question

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?

Answers to

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

Source Show
◀ Wstecz