[jruby-user] JDBC connection from Java to jRuby on Rails

Chason Choate <[email protected]>
Newsgroups gmane.comp.lang.jruby.user
Message-ID <CADgFOvo=3J7U0ZOgeAZEbHiGkPQwMxC+fzEHDYhrEcxoUdgEEw@mail.gmail.com>
Hello all,

I have a question regarding JDBC connections between Java and jRuby on
Rails.

Environment:

Centos 6.5
Java 7
jRuby on Rails 4.1
activerecord-jdbc-adapter

At my company we are a Java shop. We have recently starting using jRuby
(which is awesome) and jRuby on Rails for web development. The Java app
will boot up rails via the rack-servlet (
https://github.com/square/rack-servlet) which looks for a config.ru file.
Once that happens the Rails app will call back to the Java app for it's DB
type and java.sql.datasource object. At this point how do I configure
ActiveRecord to use the passed java.sql.datasource object?

Thanks for your time, and if you need me to clarify anything please let me
know.

-- 
Thanks,
Chason Choate
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.