top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

Tomcat Connection Pool Alias

+2 votes
379 views

With Tomcat 7.0.40 version, we are using Tomcat DBCP for pooling connections.

We are able to pool connections for different aliases. But for one alias, connections are not pooling. The user and password is good because the same alias in apache dbcp works fine.

Why are we not able to pool any connections here?

posted May 2, 2014 by Abhay Kulkarni

Looking for an answer?  Promote on:
Facebook Share Button Twitter Share Button LinkedIn Share Button

Similar Questions
+3 votes

I'm developing a permission system in Tomcat and I would like to restrict incoming connections per application. I mean, I want to restrict incoming connections in some applications and permit them in others.

I have tried to do it with the Security Manager (SocketPermission), but it doesn't restrict all incoming connections. And also I have tried with RemoteAddrValve and RemoteHostValve () but it restricts all connections, not only the incoming ones. I have been searching other way to do that but I couldn't find anything.

Is it possible? Could anybody help me?

+2 votes

I try to run www.icescrum.org on my Tomcat 7 on Ubuntu 12.04 with OpenJDK.

I have installed Tomcat with apt-get and also I have installed the libmysql-java package. On starting Tomcat it reports on a stacktrace log, that the mySQL connector is not found (java.lang.ClassNotFoundException: "com.mysql.jdbc.Driver").

So I have try to create a symlink in Tomcats lib dir to the jar file and try to modify the properties of the search paths:

common.loader=${catalina.base}/lib,${catalina.base}/lib/*.jar,${catalina.home}/lib,
${catalina.home}/lib/*.jar,/var/lib/tomcat7/common/classes,/var/lib/tomcat7/common/*.jar
server.loader=/var/lib/tomcat7/server/classes,/var/lib/tomcat7/server/*.jar
shared.loader=/var/lib/tomcat7/shared/classes,/var/lib/tomcat7/shared/*.jar

The JDBC mySQL Jar is stored under /usr/share/java with two symlinks, I have tried to create a symlink from Tomcats lib dir (/usr/share/tomcat7/lib) to ../../java/mysql.jar but the mySQL is also not loaded. The CATALINA_HOME is set to /usr/share/tomcat7 and the CATALINA_BASE is /var/lib/tomcat7, so imho it should be worked.

How can I create a working IceScrum with mySQL and a shared mySQL connector?

+2 votes

I would like to apply the Pool.map method to a member of a class. Here is a small example that shows what I would like to do:

from multiprocessing import Pool

class A(object):
 def __init__(self,x):
 self.value = x
 def fun(self,x):
 return self.value**x

l = range(10)

p = Pool(4)

op = p.map(A.fun,l)

using this with the normal map doesn't cause any problem

This fails because it says that the methods can't be pickled. (I assume it has something to do with the note in the documentation: "functionality within this package requires that the __main__ module be importable by the children.", which is obscure to me).

I would like to understand two things: why my code fails and when I can expect it to fail? what is a possible workaround?

0 votes

I am using Tomcat version 7.0.63.
I have registered the dbconnection pool with MBeanServer.
Is there a way to make those methods hot setting? What I mean by this is, for example if I change statement cache size in the jconsole, it should take effect immediately.

Any help is greatly appreciated.

+1 vote

I have some doubts about pool of connections with my application developed in PHP. I want optimize the use of resources and database connections has a high computational cost. So the idea is keep a pool of open connections with database.
I'm using Apache webserver, language PHP and PostgreSQL database. In this case the pool of conections must be configured on Apache, PHP or PostgreSQL?

...