to something less than the limit set by the firewall. If
using Tomcat's jdbc-pool (not sure if this is supported by other pools), it
will throw out connections older than this value (in ms).
- reconfigure your idle limits so you don't have as many idle
connections. You've likely got connections sitting
Recently we deployed our production application on a Tomcat 8.0.14 web
server. We are using the Tomcat JDBC Connection pool against MySQL 5. Our
web application uses Spring (3.2.11.RELEASE) /Hibernate (3.6.10.Final) for
transaction management. We are using a Cent OS 6 linux server in the cloud
On Tue, Jan 13, 2015 at 9:51 AM, Darren Davis dar...@virtualvoodoo.net
wrote:
Recently we deployed our production application on a Tomcat 8.0.14 web
server. We are using the Tomcat JDBC Connection pool against MySQL 5. Our
web application uses Spring (3.2.11.RELEASE) /Hibernate (3.6.10.Final
sporadically, and not every time a
new connection is being birthed by the system.
We've tried two different pooling technologies: DBCP and the new Apache
JDBC pooling on this server and both exhibit the same 15 minute occasional
wait.
we've come across documentation that suggests we could modify our
From: Christopher Schultz [mailto:ch...@christopherschultz.net]
Sent: Tuesday, January 13, 2015 1:05 PM
To: Tomcat Users List
Subject: Re: Occasional long wait for a JDBC connection
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256
Darren,
On 1/13/15 11:49 AM, Darren Davis wrote
technologies: DBCP and the new
Apache JDBC pooling on this server and both exhibit the same 15
minute occasional wait.
The problem is with the driver and/or database, not with the
connection pool. It's not surprising that you are experiencing
problems regardless of the pool being used
sporadically, and not
every time a new connection is being birthed by the system.
We've tried two different pooling technologies: DBCP and the new
Apache JDBC pooling on this server and both exhibit the same 15
minute occasional wait.
The problem is with the driver and/or database
the
original validator. It’s a bit unintuitive to use the validator like that, but
I’m glad to have it working ☺
Thanks for your responses!
From: Filip Hanik [mailto:fi...@hanik.com]
Sent: woensdag 3 december 2014 19:47
To: Tomcat Users List
Cc: Iris Hupkens
Subject: Re: Tomcat JDBC connection pool
Hello,
I am using the Tomcat JDBC connection pool (version 7.0.55) as a stand-alone
library. The connection pool is configured with a custom validator class in
order to use the JDBC4 isValid method for connection validation. I would also
like to use initSql to perform some preparation on all
: Tomcat JDBC connection pool: Using initSql together with
validatorClassName
Hello,
I am using the Tomcat JDBC connection pool (version 7.0.55) as a stand-alone
library. The connection pool is configured with a custom validator class in
order to use the JDBC4 isValid method for connection
You should be able to run init SQL commands yourself in your custom
validator
https://tomcat.apache.org/tomcat-7.0-doc/api/org/apache/tomcat/jdbc/pool/Validator.html
On Wed, Dec 3, 2014 at 11:42 AM, Wes Clark wcl...@guidewire.com wrote:
These actions seems to incorrectly conflated
Hi,
reading tomcat 8.x documentation, I don't find anything about tomcat-dbcp. The
use of tomcat-jdbc is described at [1].
Some of the disadvantages just apply for DBCP 1.x.
Is the use of tomcat-jdbc still recommended compared to the repackaged DBCP 2.x
in tomcat-dbcp package?
Regards
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256
Christian,
On 11/28/14 7:57 AM, Christian wrote:
reading tomcat 8.x documentation, I don't find anything about
tomcat-dbcp. The use of tomcat-jdbc is described at [1]. Some of
the disadvantages just apply for DBCP 1.x. Is the use of
tomcat
On 6 November 2014 05:36, Vasily Kukhta v.b.kuk...@gmail.com wrote:
I have received additional details - the application starts getting
java.sql.SQLException: Listener refused the connection with the following
error: ORA-12519, TNS:no appropriate service handler found, although the
amount of
...@pivotal.io
wrote:
On Wed, Nov 5, 2014 at 9:13 AM, Vasily Kukhta v.b.kuk...@gmail.com
wrote:
Hello all!
I have developed an application using Tomcat JDBC pool. Everything is
fine
except that the pool leaves hundreds of TCP connections in TIME_WAIT
state
Hello all!
I have developed an application using Tomcat JDBC pool. Everything is fine
except that the pool leaves hundreds of TCP connections in TIME_WAIT state,
which kills the server sooner or later... Could you please suggest what to
fix, my configuration is below:
PoolProperties
On Wed, Nov 5, 2014 at 9:13 AM, Vasily Kukhta v.b.kuk...@gmail.com wrote:
Hello all!
I have developed an application using Tomcat JDBC pool. Everything is fine
except that the pool leaves hundreds of TCP connections in TIME_WAIT state,
I have to ask, but are you sure it's the pool? TCP
at 7:36 AM, Daniel Mikusa dmik...@pivotal.io wrote:
On Wed, Nov 5, 2014 at 9:13 AM, Vasily Kukhta v.b.kuk...@gmail.com
wrote:
Hello all!
I have developed an application using Tomcat JDBC pool. Everything is
fine
except that the pool leaves hundreds of TCP connections in TIME_WAIT
state
:36 AM, Daniel Mikusa dmik...@pivotal.io wrote:
On Wed, Nov 5, 2014 at 9:13 AM, Vasily Kukhta v.b.kuk...@gmail.com
wrote:
Hello all!
I have developed an application using Tomcat JDBC pool. Everything is
fine
except that the pool leaves hundreds of TCP connections in TIME_WAIT
Hello
I'm having difficulty getting a JDBC DataSource using Tomcat 8.
I want to define the JDBC details in server.xml so the database identified
depends on the server and not the application. It will be beneficial for me if
the applications only need to know the JDBC name and not password
On Wed, Oct 29, 2014 at 12:45 PM, vince.w...@thomsonreuters.com wrote:
Hello
I'm having difficulty getting a JDBC DataSource using Tomcat 8.
I want to define the JDBC details in server.xml so the database identified
depends on the server and not the application. It will be beneficial for me
potential for having the same stuff in both.
Thanks again
Vince
-Original Message-
From: Daniel Mikusa [mailto:dmik...@pivotal.io]
Sent: 29 October 2014 17:10
To: Tomcat Users List
Subject: Re: NameNotFoundException: Name [jdbc/weblogin01b] is not
bound in this Context. Unable to find
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256
Neven,
On 10/26/14 6:28 PM, Neven Cvetkovic wrote:
Hey Ric,
Here's another thing you could do:
http://stackoverflow.com/questions/7195556/how-to-manage-connections-to-dynamically-created-databases
If your databases are all on the same db
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256
Ric,
On 10/26/14 2:31 PM, Ric Bernat wrote:
Thanks, Nevin. I certainly appreciate your deep treatment of my
question/issue!
I would like to ask for clarification about a point in your #2:
(2) CONTAINER-MANAGED CONNECTION POOL. (a) using
Thanks, Chris. To answer your suggestion first, differing
username/password didn't come into play, because I found that the
PostgreSQL JDBC driver does not implement the setCatalog method to
change databases on the fly in the first place. (Apparently this is
optional for JDBC driver
Thanks, Neven.
It turns out the PostgreSQL JDBC driver does not implement the
setCatalog method, so this option is not available to me. However, I
went ahead and set up my own cache of connection pools (dataSource
instances) in a HashMap, and configured Jersey to persist this across
web
of particular application). See more details here:
http://tomcat.apache.org/tomcat-7.0-doc/config/resources.html
On Tomcat, this is now implemented by Tomcat JDBC Connection Pool (
http://tomcat.apache.org/tomcat-7.0-doc/jdbc-pool.html) and has replaced
the older traditional Apache Commons DBCP project
. (In your case, the bean exists already, so
you'll just be registering the bean from tomcat-pool):
http://people.apache.org/~schultz/ApacheCon%20NA%202014/Monitoring%20Apache%20Tomcat%20with%20JMX.pdf
Hope that helps,
- -chris
[1] http://tomcat.apache.org/tomcat-8.0-doc/jdbc-pool.html#JMX
Thanks, Nevin. I certainly appreciate your deep treatment of my question/issue!
I would like to ask for clarification about a point in your #2:
(2) CONTAINER-MANAGED CONNECTION POOL.
(a) using container injection
@Resource(name=)
private DataSource datasource
(b) traditional JNDI
Hey Ric,
Here's another thing you could do:
http://stackoverflow.com/questions/7195556/how-to-manage-connections-to-dynamically-created-databases
If your databases are all on the same db instance, but different
schema/database name, you could avoid connecting to the specific database
name, but
I am using Tomcat 7.0.53, and I am using Tomcat JDBC connection pooling
to connect to multiple PostgreSQL (9.3) databases. My application is a
JAX-RS (Jersey) web server application that provides a set RESTful web
services (no UI). My data layer uses the Spring JdbcTemplate library.
First
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
On 10/25/2014 12:12 PM, Ric Bernat wrote:
I am using Tomcat 7.0.53, and I am using Tomcat JDBC connection
pooling to connect to multiple PostgreSQL (9.3) databases. My
application is a JAX-RS (Jersey) web server application that
provides a set
2014-10-25 23:12 GMT+04:00 Ric Bernat r...@brinydeep.net:
I am using Tomcat 7.0.53, and I am using Tomcat JDBC connection pooling to
connect to multiple PostgreSQL (9.3) databases. My application is a JAX-RS
(Jersey) web server application that provides a set RESTful web services (no
UI). My
Subject: Re: Tomcat 7 JDBC Connection Pool - question about usage from Java code
2014-10-25 23:12 GMT+04:00 Ric Bernat r...@brinydeep.net:
I am using Tomcat 7.0.53, and I am using Tomcat JDBC connection
pooling to connect to multiple PostgreSQL (9.3) databases. My
application is a JAX-RS
List
Subject: Re: Tomcat 7 JDBC Connection Pool - question about usage from Java
code
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
On 10/25/2014 12:12 PM, Ric Bernat wrote:
I am using Tomcat 7.0.53, and I am using Tomcat JDBC connection
pooling to connect to multiple PostgreSQL (9.3) databases
2014-10-26 1:49 GMT+04:00 Ric Bernat r...@brinydeep.net:
There is no such method to be called like on the above line.
DataSource(PoolConfiguration) is a constructor. To call a constructor you
need the keyword new.
My bad: I copied some code around and dropped the new. You are quite right:
would be able to create JNDI declarations for just-created databases on the fly.
Ric
-Original Message-
From: Konstantin Kolinko [mailto:knst.koli...@gmail.com]
Sent: Saturday, October 25, 2014 3:25 PM
To: Tomcat Users List
Subject: Re: Tomcat 7 JDBC Connection Pool - question about usage
Hi friends,
I have a question regarding the ability of Tomcat JDBC pool to reconnect
automatically to a database in case of temporarily network failures.
I'm developing a high-load application which uses Oracle 11g database. It
may happen that the DB can become unavailable for several minutes
On Fri, Oct 10, 2014 at 9:51 AM, Vasily Kukhta v.b.kuk...@gmail.com wrote:
Hi friends,
I have a question regarding the ability of Tomcat JDBC pool to reconnect
automatically to a database in case of temporarily network failures.
I'm developing a high-load application which uses Oracle 11g
:36 AM, Christopher Schultz
ch...@christopherschultz.net wrote:
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256
Todd,
On 9/23/14 11:41 AM, Todd Chapman wrote:
My application uses the Tomcat JDBC pool. While using netstat and
tcpdump to diagnose connection problems I noticed that the client
wrote:
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256
Todd,
On 9/23/14 11:41 AM, Todd Chapman wrote:
My application uses the Tomcat JDBC pool. While using netstat and
tcpdump to diagnose connection problems I noticed that the client
side occasionally closes a DB connection
:
My application uses the Tomcat JDBC pool. While using netstat and
tcpdump to diagnose connection problems I noticed that the client
side occasionally closes a DB connection and opens a new one. That
is unexpected based on my configuration.
poolProperties.setInitialSize(10
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256
Todd,
On 9/23/14 11:41 AM, Todd Chapman wrote:
My application uses the Tomcat JDBC pool. While using netstat and
tcpdump to diagnose connection problems I noticed that the client
side occasionally closes a DB connection and opens a new one
uses the Tomcat JDBC pool. While using netstat and tcpdump
to diagnose connection problems I noticed that the client side occasionally
closes a DB connection and opens a new one. That is unexpected based on my
configuration.
poolProperties.setInitialSize(10
Hi,
My application uses the Tomcat JDBC pool. While using netstat and tcpdump
to diagnose connection problems I noticed that the client side occasionally
closes a DB connection and opens a new one. That is unexpected based on my
configuration.
poolProperties.setInitialSize(10
name from the JDBC URL (or maybe change
it to something everyone can access, like the 'test' database or
'information_schema' depending on your version of MySQL).
Then, you have your code call
DataSource.getConnection(username,password) instead of calling
DataSource.getConnection(). This gets
automatically? If the network connection dies, the
server should auto-rollback the transaction. The JDBC connection will
fail due to the same reason and the pool will re-establish a new
Connection. Are you sure you have to manage this yourself?
We do this with:
PooledConnection pooledConnection
.
Won't this happen automatically? If the network connection dies, the
server should auto-rollback the transaction. The JDBC connection will
fail due to the same reason and the pool will re-establish a new
Connection. Are you sure you have to manage this yourself?
For the pool to re-establish a new
the
connection for death is when a rollback fails with an
exception. An example of this kind of error is a network
error.
Won't this happen automatically? If the network connection dies,
the server should auto-rollback the transaction. The JDBC
connection will fail due to the same reason and the pool
...@christopherschultz.net]
Sent: Tuesday, August 12, 2014 8:28 PM
To: Tomcat Users List
Subject: Re: Question on Tomcat JDBC Connection Pool
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256
Wes,
On 8/12/14, 5:26 PM, Wes Clark wrote:
(If the answer differs between Tomcat 7 and Tomcat 8, please note
(If the answer differs between Tomcat 7 and Tomcat 8, please note that.)
When a SQL exception occurs, often the database connection will be broken and
should be evicted from the pool. In our code, we call this marking the
connection for death. We do this because we don't want to set the
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256
Wes,
On 8/12/14, 5:26 PM, Wes Clark wrote:
(If the answer differs between Tomcat 7 and Tomcat 8, please note
that.)
When a SQL exception occurs, often the database connection will be
broken and should be evicted from the pool.
I'm
:07 PM
To: Tomcat Users List
Subject: Re: Tomcat JDBC Connection Pool initialization question
On 23. Juli 2014 01:20:27 MESZ, Wes Clark wcl...@guidewire.com wrote:
I want to initialized a new connection being added to the pool with
more than one SQL statement. I cannot see how to override
On 23. Juli 2014 01:20:27 MESZ, Wes Clark wcl...@guidewire.com wrote:
I want to initialized a new connection being added to the pool with
more than one SQL statement. I cannot see how to override the existing
methods to do this. Has anyone done this, or have a suggestion for me?
Have you
at
all in that situation?
Than you!
2014-07-21 20:40 GMT+04:00 Daniel Mikusa dmik...@gopivotal.com:
On Mon, Jul 21, 2014 at 11:05 AM, Vasily Kukhta v.b.kuk...@gmail.com
wrote:
Hello, dear tomcat users!
I am developing high-load application using tomcat jdbc connection pool
and
Oracle
Vasily, the exception depends on where the timeout occurs.
If the timeout is triggered by the driver, because you hit the
setQueryTimeout limit
http://docs.oracle.com/javase/7/docs/api/java/sql/Statement.html#setQueryTimeout(int)
then yes, as per javadoc, it is up to the JDBC driver to throw
, the exception depends on where the timeout occurs.
If the timeout is triggered by the driver, because you hit the
setQueryTimeout limit
http://docs.oracle.com/javase/7/docs/api/java/sql/Statement.html#setQueryTimeout(int)
then yes, as per javadoc, it is up to the JDBC driver to throw an
exception
() on the driver connection, if that yields an exception
if another thread is executing a query or not, depends on the driver itself.
See
http://tomcat.apache.org/tomcat-7.0-doc/jdbc-pool.html
On Wed, Jul 23, 2014 at 10:56 AM, Vasily Kukhta v.b.kuk...@gmail.com
wrote:
So, it means
I want to initialized a new connection being added to the pool with more than
one SQL statement. I cannot see how to override the existing methods to do
this. Has anyone done this, or have a suggestion for me?
Hello, dear tomcat users!
I am developing high-load application using tomcat jdbc connection pool and
Oracle database. It is very important to ensure my app to have very small
DB query timeouts (no longer than 3 seconds) to prevent long-running
queries or database slowness from blocking all my
On Mon, Jul 21, 2014 at 11:05 AM, Vasily Kukhta v.b.kuk...@gmail.com
wrote:
Hello, dear tomcat users!
I am developing high-load application using tomcat jdbc connection pool and
Oracle database. It is very important to ensure my app to have very small
DB query timeouts (no longer than 3
application. To simulate long-running queries I have put the DB in
QUIESCE state using ALTER SYSTEM QUIESCE RESTRICTED statement.
It's important to note that nothing in the JDBC driver will prevent a
/series/ of queries from taking more than 3 seconds. For example:
String connprops
Hi All,
Is it possible to configure JDBC-Pool for the following functionality or I
need to write my own interceptors and Validator?
- Retry N times to getConnection() for OnBorrow/OnConnect and WhileIdle;
- Wait X ms between each Retry.
Are there any examples?
Regards,
Miro.
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256
Miro,
On 6/19/14, 9:42 AM, Miroslav Nachev wrote:
Is it possible to configure JDBC-Pool for the following
functionality or I need to write my own interceptors and
Validator?
- Retry N times to getConnection() for OnBorrow/OnConnect
, Miroslav Nachev wrote:
Is it possible to configure JDBC-Pool for the following
functionality or I need to write my own interceptors and
Validator?
- Retry N times to getConnection() for OnBorrow/OnConnect and
WhileIdle; - Wait X ms between each Retry.
Why would you want to throttle
an XAConnection from an
XADataSource, it does all of the necessary XA boiler plate, and then calls
XAConnection.getConnection() to get the java.sql.Connection object that will be
used for all of the standard JDBC calls. If the application is using a
connection pool, then I think XAConnection.getConnection
of the
standard JDBC calls. If the application is using a connection pool,
then I think XAConnection.getConnection should NOT return the
physical connection, but a handle that when closed will return the
connection to the pool.
That's clearly what the Javadoc says it should do. It looks like
the
java.sql.Connection object that will be used for all of the
standard JDBC calls. If the application is using a connection pool,
then I think XAConnection.getConnection should NOT return the
physical connection, but a handle that when closed will return the
connection to the pool.
That's clearly what
I am trying to use the tomcat jdbc pool library (outside of tomcat)
along with the Apache Aries Transaction library in an OSGi environment
to handle distributed transactions.
One of the classes (XADataSourceEnlistingWrapper) provided by the
Aries Transaction wrappers library is a DataSource
If that is the case the tomcat jdbc
pooling library handling the call incorrectly and its a bug.
I'd be suspect of this. Are you actually using *org.apache.tomcat.jdbc.pool*?
Since it's a Tomcat module it seems an odd choice to use outside of Tomcat.
http://docs.oracle.com/javase/7/docs/api
...@gmail.comwrote:
I am trying to use the tomcat jdbc pool library (outside of tomcat)
along with the Apache Aries Transaction library in an OSGi environment
to handle distributed transactions.
One of the classes (XADataSourceEnlistingWrapper) provided by the
Aries Transaction wrappers library
(); ?
Jonathan, Filip,
If it is a bug then my answer is way off the mark. I'm sorry. If it's not a
problem, could you explain, in this case, what acts as the connection pool
manager when the Tomcat jdbc pool library is used outside of Tomcat?
Best,
John
I've created Bug 56310 for this issue.
Jonathan
-Original Message-
From: Pierce, Jonathan D
Sent: Tuesday, March 25, 2014 10:54 AM
To: Tomcat Users List
Subject: RE: PooledConnection.getConnection - Tomcat JDBC Pool
In the Aries class, the expectation is that
XAConnection.getConnection
the library outside of Tomcat is because I need a
connection pooling library, and I'm running in an OSGi environment (not a Java
Servlet Container).
I came across tomcat-jdbc and after reading the documentation and doing some
research it seemed like an improved drop in replacement for Apache Commons
pooling library, and I'm running in an OSGi
environment (not a Java Servlet Container). I came across
tomcat-jdbc and after reading the documentation and doing some
research it seemed like an improved drop in replacement for Apache
Commons DBCP.
We have been using it for over a year without
From: Christopher Schultz [mailto:ch...@christopherschultz.net]
Subject: Re: PooledConnection.getConnection - Tomcat JDBC Pool
On 3/25/14, 10:53 AM, Pierce, Jonathan D wrote:
In the Aries class, the expectation is that
XAConnection.getConnection().close() will return the connection
On Fri, Mar 7, 2014 at 11:21 AM, Christopher Schultz
ch...@christopherschultz.net wrote:
Neven,
On 3/5/14, 8:25 PM, Neven Cvetkovic wrote:
On Wed, Mar 5, 2014 at 3:15 PM, S Ahmed sahmed1...@gmail.com
Ahmed, thanks for asking this question - it is sometimes very
confusing with all
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256
Neven,
On 3/5/14, 8:25 PM, Neven Cvetkovic wrote:
On Wed, Mar 5, 2014 at 3:15 PM, S Ahmed sahmed1...@gmail.com
wrote:
Hi,
With jdbc pool, is each socket connection in the pool handled by
a separate thread?
Ahmed, thanks for asking
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256
Martin,
On 3/6/14, 7:53 AM, Martin Gainty wrote:
From: neven.cvetko...@gmail.com Date: Wed, 5 Mar 2014 20:25:36
-0500 Subject: Re: understanding jdbc pool To:
users@tomcat.apache.org
On Wed, Mar 5, 2014 at 3:15 PM, S Ahmed sahmed1
From: neven.cvetko...@gmail.com
Date: Wed, 5 Mar 2014 20:25:36 -0500
Subject: Re: understanding jdbc pool
To: users@tomcat.apache.org
On Wed, Mar 5, 2014 at 3:15 PM, S Ahmed sahmed1...@gmail.com wrote:
Hi,
With jdbc pool, is each socket connection in the pool handled
in TOMCAT_DIR/conf/server.xml
(b) per application resource, as defined in
YOURAPP.war/META-INF/context.xml (as Chris suggested).
I'm trying to get option (b) to work and I'm getting this error:
Cannot create JDBC driver of class '' for connect URL 'null'
java.lang.NullPointerException
It also seems like
create JDBC driver of class '' for connect URL 'null'
java.lang.NullPointerException
Uh. I hate getting this error. I have honestly never figured out what
the root cause is... the only thing that seems to work is to throw out
the whole Resource configuration and start from scratch. I'm fairly
Hi,
With jdbc pool, is each socket connection in the pool handled by a separate
thread?
Say you have 20 connections set to be open at minimum, does that mean there
will be 20 threads? If not, then there is a degree of serialization then
right?
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256
Ahmed,
On 3/5/14, 3:15 PM, S Ahmed wrote:
With jdbc pool, is each socket connection in the pool handled by a
separate thread?
Why would a JDBC connection need a thread?
Say you have 20 connections set to be open at minimum, does that
mean
On Wed, Mar 5, 2014 at 3:15 PM, S Ahmed sahmed1...@gmail.com wrote:
Hi,
With jdbc pool, is each socket connection in the pool handled by a separate
thread?
Ahmed, thanks for asking this question - it is sometimes very confusing
with all different kind of pools: connection pools, threadpools
On Mar 3, 2014, at 7:04 PM, Scott Dudley sc...@telesoft.com wrote:
I'm using the Tomcat JDBC connection pool on apache-tomcat-7.0.30.
My context xml resource name is as follows:
Resource name=jdbc/mypool ...
When running under Tomcat, calling ConnectionPool.getName() from my custom
Hi,
I am testing the jdbc pool to replace the c3p0 pool we were using for our
Tomcat connection pool. We are also using Spring 2.0 and Hibernate (and
Tomcat 6).
When I put this in my hibernate-context.xml, our application is using the
jdbc pool and appears to work:
bean id=dataSource class
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256
Charles,
On 3/4/14, 1:03 PM, Charles Richard wrote:
Hi,
I am testing the jdbc pool to replace the c3p0 pool we were using
for our Tomcat connection pool. We are also using Spring 2.0 and
Hibernate (and Tomcat 6).
When I put this in my
PGP SIGNED MESSAGE-
Hash: SHA256
Charles,
On 3/4/14, 1:03 PM, Charles Richard wrote:
Hi,
I am testing the jdbc pool to replace the c3p0 pool we were using
for our Tomcat connection pool. We are also using Spring 2.0 and
Hibernate (and Tomcat 6).
When I put this in my
attributes, and then add a Resource as a child to
configure your DataSource. You'll also need to move your JDBC driver
from WEB-INF/lib into Tomcat's lib/ directory.
- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG v1
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG
and path attributes, and then add a Resource as a child to
configure your DataSource. You'll also need to move your JDBC driver
from WEB-INF/lib into Tomcat's lib/ directory.
In our /ourpath/META-INF, there is no context.xml, just a MANIFEST.MF
file. I can create one if that's what I'm supposed
.
Move that Context into META-INF/context.xml, remove the
docBase and path attributes, and then add a Resource as a
child to configure your DataSource. You'll also need to move your
JDBC driver from WEB-INF/lib into Tomcat's lib/ directory.
In our /ourpath/META-INF
and path attributes, and then add a Resource as a
child to configure your DataSource. You'll also need to move your
JDBC driver from WEB-INF/lib into Tomcat's lib/ directory.
In our /ourpath/META-INF, there is no context.xml, just a
MANIFEST.MF file. I can create one if that's what I'm supposed
).
There are pros and cons for both approaches.
Once you register your resource with JNDI, you can reference that
datasource in your spring configuration with:
jee:jndi-lookup id=dataSource jndi-name=jdbc/MyDataSource/
(works in newer Spring 3.x, and possibly 2.x)
You can see more details here:
http
I'm using the Tomcat JDBC connection pool on apache-tomcat-7.0.30.
My context xml resource name is as follows:
Resource name=jdbc/mypool ...
When running under Tomcat, calling ConnectionPool.getName() from my
custom JdbcInterceptor returns Tomcat Connection Pool[1-992158371].
Under JSE
Leo,
On 27.1.2014 18:17, Leo Medina wrote:
Can you please elaborate more as to what you meant by: com.mysql.jdbc.Driver
must be present in one of your webapps. I'd expect
it to be in a JAR that has mysql in the name. If you don't need it remove
it. I meant that we don't have a mysql db. in
\
$PATH_TO_WEBAPP/WEB-INF/lib/*.jar \
; do echo $jar ; unzip -v $jar | grep -i mysql ; done
That ought to find it.
I'm not sure why it would be auto-loaded... JDBC drivers don't
auto-load themselves just because they are available to a ClassLoader.
Some code somewhere must be loading
it.
I'm not sure why it would be auto-loaded... JDBC drivers don't
auto-load themselves just because they are available to a ClassLoader.
Some code somewhere must be loading the driver, whether explicitly
using Class.forName(...) or by referencing part of Connector/J
elsewhere in the code, causing
on that statement, can
you please clarify.
$ for jar in $CATALINA_HOME/lib/*.jar \
$PATH_TO_WEBAPP/WEB-INF/lib/*.jar \ ; do echo $jar ; unzip -v $jar
| grep -i mysql ; done
That ought to find it.
I'm not sure why it would be auto-loaded... JDBC drivers don't
auto-load themselves just because
been a while since I installed tomcat and having some jdbc errors
with
version 6.0.20.
Time to upgrade.
We don't have a mysql.jdbc.driver
com.mysql.jdbc.Driver must be present in one of your webapps. I'd expect
it to be in a JAR that has mysql in the name. If you don't need it
remove
301 - 400 of 1590 matches
Mail list logo