Share driver jdbc

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?


To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email

On Mon, Jan 18, 2010 at 4:55 PM, Mauro [email protected] wrote:

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.

  • Charlie

To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email

On 1/18/10 3:55 PM, Mauro 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.

Fred


To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email

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>.


Hassan S. ------------------------ [email protected]
twitter: @hassan


To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email

2010/1/19 Hassan S. [email protected]:

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.


To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email

2010/1/19 Charles Oliver N. [email protected]:

Ok, but I have to install jdbc-postgres gem anyway?


To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email

No. You can manage with just activerecord-jdbc-adapter and use a jdbc
or jndi connection string in your database.yml file.

On Jan 19, 2010, at 3:50 PM, Mauro [email protected] wrote:

applications.

Ok, but I have to install jdbc-postgres gem anyway?


To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email


To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email

2010/1/20 Mauro [email protected]:

2010/1/19 Alex D. [email protected]:

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.


To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email

2010/1/19 Alex D. [email protected]:

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.


To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email

No solutions?

2010/1/20 Mauro [email protected]:

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.


To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email

Perhaps no :frowning:
I don’t know how to share jdbc-postgres driver between multiple
applications.

2010/1/21 Mauro [email protected]:

I’ve uninstalled jdbc-postresql.
With grails I simply delete the driver in the application and put it
under tomcat lib and all works fine.


To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email

On Fri, Jan 22, 2010 at 3:32 AM, Mauro [email protected] wrote:

Perhaps no :frowning:
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?

  • Charlie

To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email

On Mon, Feb 1, 2010 at 9:42 AM, Charles Oliver N.
[email protected] wrote:

On Fri, Jan 22, 2010 at 3:32 AM, Mauro [email protected] wrote:

Perhaps no :frowning:
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.

/Nick


To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email

On 1 February 2010 17:21, Nick S. [email protected] wrote:

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.

| Privacy Policy | Terms of Service | Remote Ruby Jobs