« Return to Thread: question about H2, Tomcat, JNDI and JRuby

Re: question about H2, Tomcat, JNDI and JRuby

by cdwillie76 :: Rate this Message:

Reply to Author | View in Thread

Just a quick bump on this topic since I think I am having the same problem but with Embedded derby.  Can you please post your tomcat JNDI settings?  I didn't see anything on the Wiki yet.

Thanks!
Chris

Stephen Bannasch-3 wrote:
Hi Frank,

At 9:25 AM -0700 3/12/08, Frank LeHouillier wrote:
>Using a JNDI DataSource works great, thanks.  I will
>try to add what I've learned to the wiki soon.

I have exactly this problem -- multiple instances of my RoR webapp need access to the H2 database.

Did you add any documentation to the wiki. If you don't have time can you send me any info about how you did it and I'll add to the wiki after I get it working.

I discovered a problem that might only occur using JRuby-Rack -- I had to specify the full path to the database like this in config/database.yml:

production:
  adapter: jdbch2
  database: <%= RAILS_ROOT %>/db/sds_h2_database

see:

http://www.nabble.com/problem-accessing-H2-db-in-tomcat%2C-w-warble-war-and-jruby-rack-td16136614.html#a16136614

for more details.

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email

 « Return to Thread: question about H2, Tomcat, JNDI and JRuby