Re: Occasional long wait for a JDBC connection

2015-01-13 Thread Christopher Schultz
. > > Agreed. > >> It's also strange that this only happens 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 pooli

RE: Occasional long wait for a JDBC connection

2015-01-13 Thread MWick
> 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, > >

Re: Occasional long wait for a JDBC connection

2015-01-13 Thread Christopher Schultz
ing "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, not with the connection

Re: Occasional long wait for a JDBC connection

2015-01-13 Thread Daniel Mikusa
f a validation query, to each connection sitting idle in the pool. - set maxAge 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 you

Re: Occasional long wait for a JDBC connection

2015-01-13 Thread Darren Davis
this only happens 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 docum

Re: Occasional long wait for a JDBC connection

2015-01-13 Thread Daniel Mikusa
On Tue, Jan 13, 2015 at 9:51 AM, Darren Davis 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) for >

Occasional long wait for a JDBC connection

2015-01-13 Thread Darren Davis
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

RE: Tomcat JDBC connection pool: Using initSql together with validatorClassName

2014-12-04 Thread Iris Hupkens
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

Re: Tomcat JDBC connection pool: Using initSql together with validatorClassName

2014-12-03 Thread Filip Hanik
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 wrote: > These actions seems to incorrectly conflated in the code. I'd a

RE: Tomcat JDBC connection pool: Using initSql together with validatorClassName

2014-12-03 Thread Wes Clark
g' Subject: 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

Tomcat JDBC connection pool: Using initSql together with validatorClassName

2014-12-03 Thread Iris Hupkens
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

Re: tomcat-jdbc vs. tomcat-dbcp

2014-11-28 Thread Christopher Schultz
-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.

tomcat-jdbc vs. tomcat-dbcp

2014-11-28 Thread Christian
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? Re

Re: Tomcat JDBC pool - too many connections in TIME_WAIT state

2014-11-06 Thread Daniel Mikusa
net/ipv4/tcp_fin_timeoutecho 15 > > > /proc/sys/net/ipv4/tcp_fin_timeout > > > > > > On Wed, Nov 5, 2014 at 7:36 AM, Daniel Mikusa > wrote: > > > > > On Wed, Nov 5, 2014 at 9:13 AM, Vasily Kukhta > > > wrote: > > > > > > >

Re: Tomcat JDBC pool - too many connections in TIME_WAIT state

2014-11-06 Thread chris derham
On 6 November 2014 05:36, Vasily Kukhta 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 listeners in the

Re: Tomcat JDBC pool - too many connections in TIME_WAIT state

2014-11-05 Thread Vasily Kukhta
/tcp_fin_timeout > > > On Wed, Nov 5, 2014 at 7:36 AM, Daniel Mikusa wrote: > > > On Wed, Nov 5, 2014 at 9:13 AM, Vasily Kukhta > > wrote: > > > > > Hello all! > > > > > > I have developed an application using Tomcat JDBC pool. Eve

Re: Tomcat JDBC pool - too many connections in TIME_WAIT state

2014-11-05 Thread Filip Hanik
014 at 7:36 AM, Daniel Mikusa wrote: > On Wed, Nov 5, 2014 at 9:13 AM, Vasily Kukhta > 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 T

Re: Tomcat JDBC pool - too many connections in TIME_WAIT state

2014-11-05 Thread Daniel Mikusa
On Wed, Nov 5, 2014 at 9:13 AM, Vasily Kukhta 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? TC

Tomcat JDBC pool - too many connections in TIME_WAIT state

2014-11-05 Thread Vasily Kukhta
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

RE: NameNotFoundException: Name [jdbc/weblogin01b] is not bound in this Context. Unable to find [jdbc]

2014-10-29 Thread vince.webb
he current 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 > b

Re: NameNotFoundException: Name [jdbc/weblogin01b] is not bound in this Context. Unable to find [jdbc]

2014-10-29 Thread Daniel Mikusa
On Wed, Oct 29, 2014 at 12:45 PM, 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 &

NameNotFoundException: Name [jdbc/weblogin01b] is not bound in this Context. Unable to find [jdbc]

2014-10-29 Thread vince.webb
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 pas

Re: Tomcat 7 JDBC Connection Pool - question about usage from Java code

2014-10-28 Thread Ric Bernat
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

Re: Tomcat 7 JDBC Connection Pool - question about usage from Java code

2014-10-28 Thread Ric Bernat
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 d

Re: Tomcat 7 JDBC Connection Pool - question about usage from Java code

2014-10-28 Thread Christopher Schultz
-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) usi

Re: Tomcat 7 JDBC Connection Pool - question about usage from Java code

2014-10-28 Thread Christopher Schultz
-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

Re: Tomcat 7 JDBC Connection Pool - question about usage from Java code

2014-10-26 Thread Neven Cvetkovic
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 ra

RE: Tomcat 7 JDBC Connection Pool - question about usage from Java code

2014-10-26 Thread Ric Bernat
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) tradition

Re: Tomcat 7 JDBC Connection Pool - question about usage from Java code

2014-10-26 Thread Christopher Schultz
om 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 -BEGIN PGP SIGNATURE- Version: GnuPG v1 Comme

Re: Tomcat 7 JDBC Connection Pool - question about usage from Java code

2014-10-26 Thread Neven Cvetkovic
cation). 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 ( http://commons.

RE: Tomcat 7 JDBC Connection Pool - question about usage from Java code

2014-10-25 Thread Ric Bernat
not sure that I 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 -

Re: Tomcat 7 JDBC Connection Pool - question about usage from Java code

2014-10-25 Thread Konstantin Kolinko
2014-10-26 1:49 GMT+04:00 Ric Bernat : >> 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: > I am

RE: Tomcat 7 JDBC Connection Pool - question about usage from Java code

2014-10-25 Thread Ric Bernat
Saturday, October 25, 2014 1:44 PM To: Tomcat Users 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

RE: Tomcat 7 JDBC Connection Pool - question about usage from Java code

2014-10-25 Thread Ric Bernat
urday, October 25, 2014 2:14 PM To: Tomcat Users List Subject: Re: Tomcat 7 JDBC Connection Pool - question about usage from Java code 2014-10-25 23:12 GMT+04:00 Ric Bernat : > I am using Tomcat 7.0.53, and I am using Tomcat JDBC connection > pooling to connect to multiple PostgreSQL (9.3) da

Re: Tomcat 7 JDBC Connection Pool - question about usage from Java code

2014-10-25 Thread Konstantin Kolinko
2014-10-25 23:12 GMT+04:00 Ric Bernat : > 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 dat

Re: Tomcat 7 JDBC Connection Pool - question about usage from Java code

2014-10-25 Thread Mark Eggers
-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 > pr

Tomcat 7 JDBC Connection Pool - question about usage from Java code

2014-10-25 Thread Ric Bernat
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

Re: Tomcat JDBC pool - auto reconnect

2014-10-10 Thread Daniel Mikusa
On Fri, Oct 10, 2014 at 9:51 AM, Vasily Kukhta 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

Tomcat JDBC pool - auto reconnect

2014-10-10 Thread Vasily Kukhta
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 mi

Re: Debugging Tomcat JDBC pool disconnects.

2014-10-07 Thread Todd Chapman
> > > > > -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 net

Re: Debugging Tomcat JDBC pool disconnects.

2014-10-07 Thread Aniket Bhoi
p 24, 2014 at 9: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 n

Re: Debugging Tomcat JDBC pool disconnects.

2014-10-07 Thread Todd Chapman
: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 di

Re: Debugging Tomcat JDBC pool disconnects.

2014-09-24 Thread Filip Hanik
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); >

Re: Debugging Tomcat JDBC pool disconnects.

2014-09-24 Thread Christopher Schultz
-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

Debugging Tomcat JDBC pool disconnects.

2014-09-23 Thread Todd Chapman
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

Re: tomcat jdbc pool, creating a pool of pools, single connection memory footprint

2014-08-20 Thread S Ahmed
> Next, you'd have to switch to tomcat-pool because commons-dbcp (the > default CP in Tomcat) does not support obtaining pooled connections > with credentials. > > Next, you remove the database name from the JDBC URL (or maybe change > it to something everyone can access, like the

Re: Question on Tomcat JDBC Connection Pool

2014-08-19 Thread Christopher Schultz
want to mark 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-r

Re: Question on Tomcat JDBC Connection Pool

2014-08-19 Thread Bertrand Renuart
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 will re-establish a new >Connection. Are you sure you have to manage this yourse

Re: FW: Question on Tomcat JDBC Connection Pool

2014-08-19 Thread Christopher Schultz
;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? > We do this with: >

FW: Question on Tomcat JDBC Connection Pool

2014-08-18 Thread Wes Clark
to:ch...@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 not

Re: Question on Tomcat JDBC Connection Pool

2014-08-12 Thread Christopher Schultz
-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 inte

Question on Tomcat JDBC Connection Pool

2014-08-12 Thread Wes Clark
(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 "te

RE: Tomcat JDBC Connection Pool initialization question

2014-07-24 Thread Wes Clark
lix.schumac...@internetallee.de] Sent: Tuesday, July 22, 2014 11:07 PM To: Tomcat Users List Subject: Re: Tomcat JDBC Connection Pool initialization question On 23. Juli 2014 01:20:27 MESZ, Wes Clark wrote: >I want to initialized a new connection being added to the pool with >more than

Re: Query timeouts using tomcat jdbc pool

2014-07-23 Thread Filip Hanik
close() 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 wrote: > So, it means that if the timeout is

Re: Query timeouts using tomcat jdbc pool

2014-07-23 Thread Vasily Kukhta
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 >

Re: Query timeouts using tomcat jdbc pool

2014-07-23 Thread Filip Hanik
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 an

Re: Query timeouts using tomcat jdbc pool

2014-07-23 Thread Vasily Kukhta
all in that situation? Than you! 2014-07-21 20:40 GMT+04:00 Daniel Mikusa : > On Mon, Jul 21, 2014 at 11:05 AM, Vasily Kukhta > wrote: > > > Hello, dear tomcat users! > > > > I am developing high-load application using tomcat jdbc connection pool > and > > O

Re: Tomcat JDBC Connection Pool initialization question

2014-07-22 Thread Felix Schumacher
On 23. Juli 2014 01:20:27 MESZ, Wes Clark 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 tried to separate them

Tomcat JDBC Connection Pool initialization question

2014-07-22 Thread Wes Clark
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?

Re: Query timeouts using tomcat jdbc pool

2014-07-21 Thread Christopher Schultz
cking all my > 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:

Re: Query timeouts using tomcat jdbc pool

2014-07-21 Thread Daniel Mikusa
On Mon, Jul 21, 2014 at 11:05 AM, Vasily Kukhta 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 seco

Query timeouts using tomcat jdbc pool

2014-07-21 Thread Vasily Kukhta
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

Re: JDBC-Pool: Reconnect the connection upon failures; retry queries; etc.

2014-06-19 Thread Miroslav Nachev
> > 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 and > >

Re: JDBC-Pool: Reconnect the connection upon failures; retry queries; etc.

2014-06-19 Thread Christopher Schultz
-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 OnBorro

JDBC-Pool: Reconnect the connection upon failures; retry queries; etc.

2014-06-19 Thread Miroslav Nachev
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.

Re: PooledConnection.getConnection - Tomcat JDBC Pool

2014-03-26 Thread Filip Hanik
ary 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 should NOT return t

Re: PooledConnection.getConnection - Tomcat JDBC Pool

2014-03-26 Thread Christopher Schultz
t 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

RE: PooledConnection.getConnection - Tomcat JDBC Pool

2014-03-26 Thread Pierce, Jonathan D
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

RE: PooledConnection.getConnection - Tomcat JDBC Pool

2014-03-25 Thread Caldarale, Charles R
> 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().cl

Re: PooledConnection.getConnection - Tomcat JDBC Pool

2014-03-25 Thread Christopher Schultz
, here. > The reason I'm using 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 i

RE: PooledConnection.getConnection - Tomcat JDBC Pool

2014-03-25 Thread Pierce, Jonathan D
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.getConne

RE: PooledConnection.getConnection - Tomcat JDBC Pool

2014-03-25 Thread Pierce, Jonathan D
I'm using 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 re

Re: PooledConnection.getConnection - Tomcat JDBC Pool

2014-03-25 Thread John Smith
> > 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

Re: PooledConnection.getConnection - Tomcat JDBC Pool

2014-03-25 Thread Filip Hanik
ing 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

Re: PooledConnection.getConnection - Tomcat JDBC Pool

2014-03-25 Thread John Smith
> 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.oracl

PooledConnection.getConnection - Tomcat JDBC Pool

2014-03-25 Thread Jonathan Pierce
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

Re: understanding jdbc pool

2014-03-08 Thread Neven Cvetkovic
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 > >> > > Ahmed, thanks for asking this question - it is sometimes very > > confusing with all different

Re: understanding jdbc pool

2014-03-07 Thread Christopher Schultz
-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 >>

Re: understanding jdbc pool

2014-03-07 Thread Christopher Schultz
-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 > wrote: > >> Hi, >> >> With jdbc pool, is each socket connection in the pool handled by >> a separate thread? >&g

RE: understanding jdbc pool

2014-03-06 Thread Martin Gainty
> 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 wrote: > > > Hi, > > > > With jdbc pool, is each socket conne

Re: understanding jdbc pool

2014-03-05 Thread Neven Cvetkovic
On Wed, Mar 5, 2014 at 3:15 PM, S Ahmed 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

Re: understanding jdbc pool

2014-03-05 Thread Christopher Schultz
-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 th

understanding jdbc pool

2014-03-05 Thread S Ahmed
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?

Re: Can I use jmx to see jdbc pool variables/properties in Tomcat 6?

2014-03-05 Thread Christopher Schultz
NDI entries here >> https://tomcat.apache.org/tomcat-7.0-doc/jndi-resources-howto.html >> >> >> You will notice there are two ways to configure your resource in Tomcat >> container: >> >> (a) a global resource, so every deployed application will have >> acc

Re: Can I use jmx to see jdbc pool variables/properties in Tomcat 6?

2014-03-05 Thread Charles Richard
ies here > https://tomcat.apache.org/tomcat-7.0-doc/jndi-resources-howto.html > > You will notice there are two ways to configure your resource in Tomcat > container: > > (a) a global resource, so every deployed application will have access to > the s

Re: Can I use jmx to see jdbc pool variables/properties in Tomcat 6?

2014-03-04 Thread Neven Cvetkovic
On Tue, Mar 4, 2014 at 2:56 PM, Charles Richard < charle...@thelearningbar.com> wrote: > On Tue, Mar 4, 2014 at 3:17 PM, Christopher Schultz < > ch...@christopherschultz.net> wrote: > > Can we still use Hibernate in our Spring application if we > > > configure the Data Source through a context.xm

Re: Can I use jmx to see jdbc pool variables/properties in Tomcat 6?

2014-03-04 Thread Mark Eggers
bet you have a WEB-INF directory directly in your webapps/ directory, right? We've got a WEB-INF folder in our appBase folder reference (/ourpath/WEB-INF). Sounds like you've got a mess on your hands. I guess. Move that into META-INF/context.xml, remove the "docBase

Re: Can I use jmx to see jdbc pool variables/properties in Tomcat 6?

2014-03-04 Thread Christopher Schultz
have a element at all in your server.xml. > It's a wonder that your application even works with a path of "" > and a docBase of "". I'll bet you have a WEB-INF directory directly > in your webapps/ directory, right? > > > > > We

Re: Can I use jmx to see jdbc pool variables/properties in Tomcat 6?

2014-03-04 Thread Charles Richard
7;ve got a WEB-INF folder in our appBase folder reference > (/ourpath/WEB-INF). > > Sounds like you've got a mess on your hands. > I guess. > > Move that into META-INF/context.xml, remove the "docBase" > and "path" attributes, and then add a as a chil

Re: Can I use jmx to see jdbc pool variables/properties in Tomcat 6?

2014-03-04 Thread Christopher Schultz
e the "docBase" and "path" attributes, and then add a 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:

Re: Can I use jmx to see jdbc pool variables/properties in Tomcat 6?

2014-03-04 Thread Charles Richard
: Thanks, Charles On Tue, Mar 4, 2014 at 2:57 PM, Christopher Schultz < ch...@christopherschultz.net> wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA256 > > Charles, > > On 3/4/14, 1:03 PM, Charles Richard wrote: > > Hi, >

Re: Can I use jmx to see jdbc pool variables/properties in Tomcat 6?

2014-03-04 Thread Christopher Schultz
-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). > &g

Can I use jmx to see jdbc pool variables/properties in Tomcat 6?

2014-03-04 Thread Charles Richard
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

Re: Tomcat JDBC Connection Pool Resource Name Issue

2014-03-04 Thread Daniel Mikusa
On Mar 3, 2014, at 7:04 PM, Scott Dudley wrote: > > I'm using the Tomcat JDBC connection pool on apache-tomcat-7.0.30. > > My context xml resource name is as follows: > > > When running under Tomcat, calling ConnectionPool.getName() from my custom > Jd

Tomcat JDBC Connection Pool Resource Name Issue

2014-03-03 Thread Scott Dudley
I'm using the Tomcat JDBC connection pool on apache-tomcat-7.0.30. My context xml resource name is as follows: When running under Tomcat, calling ConnectionPool.getName() from my custom JdbcInterceptor returns "Tomcat Connection Pool[1-992158371]". Under JSE (a stand-alone ma

Re: [OT] Tomcat JDBC Error

2014-01-28 Thread Christopher Schultz
t;> 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 >

Re: Tomcat JDBC Error

2014-01-28 Thread Leo Medina
ALINA_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 the

Re: Tomcat JDBC Error

2014-01-28 Thread Christopher Schultz
ment, 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

[OT] Re: Tomcat JDBC Error

2014-01-28 Thread Ognjen Blagojevic
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

Re: Tomcat JDBC Error

2014-01-27 Thread Leo Medina
:24, Leo Medina wrote: > > It's 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&#x

<    1   2   3   4   5   6   7   8   9   10   >