connection-pooling

java.lang.ClassNotFoundException: org.apache.tomcat.jdbc.pool DataSourceFactory

半世苍凉 提交于 2019-11-28 19:40:39
I'm investigating moving away from an Oracle connection pool and using the Tomcat connection pool. I followed the myriad of example for configuring the <Resource> in Tomcat's /conf/server.xml . I found great info here . However, when I start Tomcat, I get the following error: javax.naming.NamingException: Could not load resource factory class [Root exception is java.lang.ClassNotFoundException: org.apache.tomcat.jdbc.pool DataSourceFactory] I'm using Tomcat 6.0. My <Resource> config in /conf/server.xml is: <Resource name="jdbc/myds" type="javax.sql.DataSource" auth="Container" factory="org

How to Debug / Log Tomcat JDBC Connection Pool's connections?

故事扮演 提交于 2019-11-28 16:52:45
I am using Tomcat JDBC connection pool along with Spring boot, JDBC template and SQL Server. I need to know what is going inside connection pool while application is waiting for database connection. Such as.... No of active connections No of idle connections No of blocked connections, additional info why this connection is blocked No of available connections and ... Is there any way to get these info by debugging or using logging frameworks like log4j? Any idea will be appreciated. Sundararaj Govindasamy After a lot of research, I am able to find 3 ways to log & monitor database connection

How to detect SqlServer connection leaks in a ASP.net applications?

吃可爱长大的小学妹 提交于 2019-11-28 16:51:39
I'm currently doing some GUI testing on a ASP.net 2.0 application. The RDBMS is SQL Server 2005. The host is Win Server 2003 / IIS 6.0. I do not have the source code of the application because it was programmed by an external company who's not releasing the code. I've noticed that the application performs well when I restart IIS but after some testing, after I have opened and closed my browser for a couple of hours, the application starts to get slower and slower. I was wondering if this behaviour was due to a bad closing connection practice from the programmers : I'm suspecting an open

Hibernate: What is the connection pool and why is the default one unsuitable for production?

老子叫甜甜 提交于 2019-11-28 16:05:50
I'm very unfamiliar with Hibernate and have just started working on a web app that uses it with a MySQL database. I notice that the community documentation tutorial states: The built-in Hibernate connection pool is in no way intended for production use. It lacks several features found on any decent connection pool. Can someone elaborate on this? What exactly is it missing and what are problems people have with the 'default' one? On googling I found a website here but it doesn't really explain the problems, just what you should be using instead. jpkrohling What is the connection pool and why is

How does pgBouncer help to speed up Django

我是研究僧i 提交于 2019-11-28 16:02:03
问题 I have some management commands that are based on gevent. Since my management command makes thousands to requests, I can turn all socket calls into non-blocking calls using Gevent. This really speeds up my application as I can make requests simultaneously. Currently the bottleneck in my application seems to be Postgres. It seems that this is because the Psycopg library that is used for connecting to Django is written in C and does not support asynchronous connections. I've also read that

.NET best practices for MongoDB connections?

喜夏-厌秋 提交于 2019-11-28 15:46:53
I've been playing with MongoDB recently (It's AMAZINGLY FAST) using the C# driver on GitHub. Everything is working just fine in my little single threaded console app that I'm testing with. I'm able to add 1,000,000 documents (yes, million) in under 8 seconds running single threaded. I only get this performance if I use the connection outside the scope of a for loop. In other words, I'm keeping the connection open for each insert rather than connecting for each insert. Obviously that's contrived. I thought I'd crank it up a notch to see how it works with multiple threads. I'm doing this because

How to properly keep a DB connection from a Connection Pool opened in JBoss

喜夏-厌秋 提交于 2019-11-28 11:32:57
问题 I'm using JBoss AS 7.1 as a server and I have my DataSource configured with pooling. I'm quite new to this so please excuse any rookie mistakes... after all I'm here to learn. When a client logs-in it gets a connection to the database and I need to keep that connection(from the pool) open until the user logs-out or the HttpSession expires. This is an absolute requirement coming from our DB Admin. who says that he needs the DB session variables. I am using a servlet for all this. Playing with

How do I configure HikariCP for postgresql?

一笑奈何 提交于 2019-11-28 09:59:49
问题 I'm trying to use HikariCP in postgresql and I can't find anywhere the configuration for postgresql. Please point me to any example for postgresql with HikariCP or any configurations tutorial for the same. I tried to use it like below but it didn't work and then I realized it was meant for MySQL public static DataSource getDataSource() { if(datasource == null) { HikariConfig config = new HikariConfig(); config.setJdbcUrl("jdbc:mysql://localhost/test"); config.setUsername("root"); config

how to do connection pooling in java?

∥☆過路亽.° 提交于 2019-11-28 09:29:51
I am trying to understand connection pooling in java , i am using jsp, servlet and tomcat 6 server in my application. I have written the following code in a java class dbconnection.java : I am using type 4 jdbc connection with oracle 10g EE in windows Xp OS import java.sql.Connection; import java.sql.DriverManager; import java.sql.SQLException; public class dbconnection { public Connection con = null; public Connection getConnection() throws Exception, SQLException { try { Class.forName("oracle.jdbc.driver.OracleDriver"); con=DriverManager.getConnection("jdbc:oracle:thin:@localhost:1521:abc",

Node js - http.request() problems with connection pooling

落花浮王杯 提交于 2019-11-28 08:36:48
Consider the following simple Node.js application: var http = require('http'); http.createServer(function() { }).listen(8124); // Prevent process shutting down var requestNo = 1; var maxRequests = 2000; function requestTest() { http.request({ host: 'www.google.com', method: 'GET' }, function(res) { console.log('Completed ' + (requestNo++)); if (requestNo <= maxRequests) { requestTest(); } }).end(); } requestTest(); It makes 2000 HTTP requests to google.com, one after the other. The problem is it gets to request No. 5 and pauses for about 3 mins, then continues processing requests 6 - 10, then