Doc on JNDI / Rails 2.2

is there a cohesive doc on using Rails 2.2 with JNDI connection pooling
and
how it is used in conjunction with the new activereord-jdbc gem ?

From the changelog it seems you can simply use jndi line in the
database.yml, set pool > JNDI pool and you should be good, but not sure
if
that is all that is needed.

Nick any advice here? We are looking to use JNDI (since other apps will
need the connection pool that are non-rails) so we want to make sure we
set
this up correctly.

Thanks
Adam

On Mon, Dec 22, 2008 at 2:52 PM, AD [email protected] wrote:

is there a cohesive doc on using Rails 2.2 with JNDI connection pooling and
how it is used in conjunction with the new activereord-jdbc gem ?

From the changelog it seems you can simply use jndi line in the
database.yml, set pool > JNDI pool and you should be good, but not sure if
that is all that is needed.

Nick any advice here? We are looking to use JNDI (since other apps will
need the connection pool that are non-rails) so we want to make sure we set
this up correctly.

That’s pretty much it, set the “jndi:” setting to point to your data
source. Although currently I haven’t found a good way to completely
route around Rails’ connection pool, so you’ll want to make sure that
the Rails connection pool (“pool:” setting in database.yml) is sized
at least as big as your JNDI pool. (I should have thought through it a
little more since I wrote it, but it needed to get out the door :). So
what’s happening is there’s an extra, somewhat unnecessary layer of
pooling of the Rails adapters. But activerecord-jdbc 0.9 should be set
up to properly release the JNDI connection pool when the Rails
connection adapter is checked in.

/Nick


To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email

Ok thanks, with the new Rails 2.2, this is definitely something worthy
of a
Wiki update. i will try and work on something once I get the kinks all
worked out.

So does this mean we are connectionpooling to a rails connectionpool ?

Thx
Adam

On Mon, Dec 22, 2008 at 4:03 PM, AD [email protected] wrote:

Ok thanks, with the new Rails 2.2, this is definitely something worthy of a
Wiki update. i will try and work on something once I get the kinks all
worked out.

So does this mean we are connectionpooling to a rails connectionpool ?

Basically, yes.

/Nick


To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email

is there a cohesive doc on using Rails 2.2 with JNDI connection
pooling and how it is used in conjunction with the new
activereord-jdbc gem ?

From the changelog it seems you can simply use jndi line in the
database.yml, set pool > JNDI pool and you should be good, but not
sure if that is all that is needed.

This article might be helpful:

http://syntatic.wordpress.com/2008/08/20/connection-pooling-for-rails-on-jruby-using-jndi-and-jdbc/

They focus on Oracle and JBoss but claim the techniques are general.

Right now there are two jndi related pages in the jruby wiki:

http://wiki.jruby.org/wiki/Rails_with_H2_in_JNDI_on_Jetty

And a link titled “JNDI with Rails” that points to an external url:

http://blarg.slackworks.com/posts/jndi-with-rails

It would probably be good to have a main JNDI_with_Rails page that
references both of these resources as well as the first link I
mentioned.


To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email