Re: Occasional long wait for a JDBC connection

2015-01-13 Thread Daniel Mikusa
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

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: Occasional long wait for a JDBC connection

2015-01-13 Thread Daniel Mikusa
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

Re: Occasional long wait for a JDBC connection

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

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, On 1/13/15 11:49 AM, Darren Davis wrote

Re: Occasional long wait for a JDBC connection

2015-01-13 Thread Christopher Schultz
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

Re: Occasional long wait for a JDBC connection

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

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

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 connection pool: Using initSql together with validatorClassName

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

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 wcl...@guidewire.com wrote: These actions seems to incorrectly conflated

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? Regards

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. Is the use of tomcat

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

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

2014-11-06 Thread Daniel Mikusa
...@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

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

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

2014-11-05 Thread Filip Hanik
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

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

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

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 password

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

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

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

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 db

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) using

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 driver

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

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

2014-10-26 Thread Christopher Schultz
. (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

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) traditional JNDI

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

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 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 provides a set

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

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

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

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

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

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

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

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

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 minutes

Re: Tomcat JDBC pool - auto reconnect

2014-10-10 Thread Daniel Mikusa
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

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 diagnose connection problems I noticed that the client

Re: Debugging Tomcat JDBC pool disconnects.

2014-10-07 Thread Aniket Bhoi
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

Re: Debugging Tomcat JDBC pool disconnects.

2014-10-07 Thread Todd Chapman
: 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: 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 a new one

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

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

Re: FW: Question on Tomcat JDBC Connection Pool

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

Re: Question on Tomcat JDBC Connection Pool

2014-08-19 Thread Bertrand Renuart
. 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

Re: Question on Tomcat JDBC Connection Pool

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

FW: Question on Tomcat JDBC Connection Pool

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

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

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

RE: Tomcat JDBC Connection Pool initialization question

2014-07-24 Thread Wes Clark
: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

Re: Tomcat JDBC Connection Pool initialization question

2014-07-23 Thread Felix Schumacher
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

Re: Query timeouts using tomcat jdbc pool

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

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

Re: Query timeouts using tomcat jdbc pool

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

Re: Query timeouts using tomcat jdbc pool

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

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?

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: Query timeouts using tomcat jdbc pool

2014-07-21 Thread Daniel Mikusa
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

Re: Query timeouts using tomcat jdbc pool

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

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: 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 OnBorrow/OnConnect

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

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

RE: PooledConnection.getConnection - Tomcat JDBC Pool

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

Re: PooledConnection.getConnection - Tomcat JDBC Pool

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

Re: PooledConnection.getConnection - Tomcat JDBC Pool

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

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: 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.oracle.com/javase/7/docs/api

Re: PooledConnection.getConnection - Tomcat JDBC Pool

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

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

RE: PooledConnection.getConnection - Tomcat JDBC Pool

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

Re: PooledConnection.getConnection - Tomcat JDBC Pool

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

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().close() will return the connection

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 sahmed1...@gmail.com Ahmed, thanks for asking this question - it is sometimes very confusing with all

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 sahmed1...@gmail.com wrote: Hi, With jdbc pool, is each socket connection in the pool handled by a separate thread? Ahmed, thanks for asking

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 On Wed, Mar 5, 2014 at 3:15 PM, S Ahmed sahmed1

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 sahmed1...@gmail.com wrote: Hi, With jdbc pool, is each socket connection in the pool handled

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

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

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

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

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: 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 that mean

Re: understanding jdbc pool

2014-03-05 Thread Neven Cvetkovic
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

Re: Tomcat JDBC Connection Pool Resource Name Issue

2014-03-04 Thread Daniel Mikusa
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

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: bean id=dataSource class

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). When I put this in my

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

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

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

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

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

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

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

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

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

2014-03-04 Thread Mark Eggers
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

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

2014-03-04 Thread Neven Cvetkovic
). 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

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: Resource name=jdbc/mypool ... When running under Tomcat, calling ConnectionPool.getName() from my custom JdbcInterceptor returns Tomcat Connection Pool[1-992158371]. Under JSE

[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-28 Thread Christopher Schultz
\ $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

Re: Tomcat JDBC Error

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

Re: [OT] Tomcat JDBC Error

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

Re: Tomcat JDBC Error

2014-01-27 Thread Leo Medina
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

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