I have multiple applications under tomcat.
They all connect to a postgres database server.
To do this I’ve put the jdbc driver under libraries directory, but
I’ve to do for all applications.
There is a way to share the driver for all the applications?
I have multiple applications under tomcat.
They all connect to a postgres database server.
To do this I’ve put the jdbc driver under libraries directory, but
I’ve to do for all applications.
There is a way to share the driver for all the applications?
You should be able to put it in Tomcat’s lib or ext dir (I don’t
remember which) and then the driver will be available for all
applications.
All you need to do is put the jar files under <tomcat_root>/shared/lib .
The jar file will be available to all applications, but will not be
visible to Tomcat itself. You can however put the jar file under
<tomcat_root>/common/lib if Tomcat needs to see it.
On Tue, Jan 19, 2010 at 11:58 AM, Frederic J. [email protected]
wrote:
All you need to do is put the jar files under <tomcat_root>/shared/lib . The
jar file will be available to all applications, but will not be visible to
Tomcat itself. You can however put the jar file under
<tomcat_root>/common/lib if Tomcat needs to see it.
For Tomcat 6.0.x (which is a big improvement over 5.5.x), there is
only one /lib dir under <tomcat_root>.
On Tue, Jan 19, 2010 at 11:58 AM, Frederic J. [email protected] wrote:
All you need to do is put the jar files under <tomcat_root>/shared/lib . The
jar file will be available to all applications, but will not be visible to
Tomcat itself. You can however put the jar file under
<tomcat_root>/common/lib if Tomcat needs to see it.
For Tomcat 6.0.x (which is a big improvement over 5.5.x), there is
only one /lib dir under <tomcat_root>.
Yes, I have tomcat6 and there is only one lib directory.
No. You can manage with just activerecord-jdbc-adapter and use a jdbc or
jndi connection string in your database.yml file.
I’ve uninstalled jdbc-postresql.
Now when I try to create the war with warbler it complains for missing
jdbc-postgresql gem.
I’ve created the war file setting config.gem_dependencies = false in
the warble.rb file.
I’ve put jdbc-postgres driver under tomcat lib, I’ve deployed the war
but it doesn’t work.
There are difficulties to share the jdbc driver over multiple
applications with jruby.
With grails I simply delete the driver in the application and put it
under tomcat lib and all works fine.
I’ve created the war file setting config.gem_dependencies = false in
the warble.rb file.
I’ve put jdbc-postgres driver under tomcat lib, I’ve deployed the war
but it doesn’t work.
There are difficulties to share the jdbc driver over multiple
applications with jruby.
With grails I simply delete the driver in the application and put it
under tomcat lib and all works fine.
Perhaps no
I don’t know how to share jdbc-postgres driver between multiple applications.
Have you tried leaving the jdbc-postgres gem intact AND putting a copy
of the jar in lib? It should pick up the more “global” one. Another
possibility as a temporary workaround you could just provide a stub
(empty) postgres driver jar for the Rails app.
But we need a better way to manage jars within gems within
warbled/bundled/jarred applications. Any thoughts, Nick?
Perhaps no
I don’t know how to share jdbc-postgres driver between multiple applications.
Have you tried leaving the jdbc-postgres gem intact AND putting a copy
of the jar in lib? It should pick up the more “global” one. Another
possibility as a temporary workaround you could just provide a stub
(empty) postgres driver jar for the Rails app.
This should work, except in your case the
“activerecord-jdbcpostgresql-adapter” depends on “jdbc-postgres” being
present. Instead, try using just “postgresql” as the adapter name, and
you shouldn’t have to bundle “activerecord-jdbcpostgresql-adapter” nor
“jdbc-postgres”. All of the functionality is in the main
“activerecord-jdbc-adapter” gem.
This should work, except in your case the
“activerecord-jdbcpostgresql-adapter” depends on “jdbc-postgres” being
present. Instead, try using just “postgresql” as the adapter name, and
you shouldn’t have to bundle “activerecord-jdbcpostgresql-adapter” nor
“jdbc-postgres”. All of the functionality is in the main
“activerecord-jdbc-adapter” gem.
I’ll try this, thank you.
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.