connection-pooling

Connection Pooling in .NET/SQL Server?

旧巷老猫 提交于 2019-11-29 06:28:10
Is it necessary or advantageous to write custom connection pooling code when developing applications in .NET with an SQL Server database? I know that ADO.NET gives you the option to enable/disable connection pooling -- does that mean that it's built into the framework and I don't need to worry about it? Why do people talk about writing their own connection pooling software and how is this different than what's built into ADO.NET? The connection pooling built-in to ADO.Net is robust and mature. I would recommend against attempting to write your own version. Chris Roberts I'm no real expert on

Problem with OleDbConnection, Excel and connection pooling

混江龙づ霸主 提交于 2019-11-29 05:18:46
So, I have the same symptoms as described in C#/ASP.NET Oledb - MS Excel read "Unspecified error" , but my my answer did not seem to fix it. Even always closing the OleDBConnection and disposing of it show the same symptoms. var connectionString = string.Format("Provider=Microsoft.ACE.OLEDB.12.0; data source={0}; Extended Properties=Excel 12.0;", _excelFile); using (var conn = new OleDbConnection(connectionString)) { try { DoSomething(); } finally { conn.Close(); } } Now I have found the following info on connection pooling: The .NET Framework Data Provider for OLE DB automatically pools

Using PreparedStatement pooling in dbcp

时光总嘲笑我的痴心妄想 提交于 2019-11-29 04:38:12
Can someone explain how exactly prepared connection pooling using dbcp can be used? (with some example code if possible). I've figured out how to turn it on - passing a KeyedObjectPoolFactory to the PoolableConnectionFactory. But how should the specific prepared statements be defined after that? Right now I'm only using a PoolingDataSource to get connections from the pool. How do I use the prepared statements from the pool? Well talking about getting connection from the pool vs getting "not-pooled" connection, do you have any change in your code :)? I bet you do not. Same way with prepared

Basic DB connection pool with Java and Tomcat 7

血红的双手。 提交于 2019-11-29 03:44:00
I'm trying to create my first connection pool. I'm creating a Java web aplication with Tomcat 7 and a MySQL DB, and I'd like to create the simplest connection pool possible. I've taken a look at several tutorials but it's not really clear for me, so I'd like you to confirm if I'm doing well. I've written the following class as a connection pool manager: package dao.mysql; import java.sql.Connection; import java.sql.SQLException; import org.apache.tomcat.jdbc.pool.DataSource; import org.apache.tomcat.jdbc.pool.PoolProperties; public class MySQLConnectionPool { private static DataSource

mongodb connection pooling

|▌冷眼眸甩不掉的悲伤 提交于 2019-11-29 03:35:17
问题 I am using Java driver to access mongodb. I assume the db connection pooling is internally handled by the driver.But my connection count getting increased every time I access db. This is my serverStatus log. "connections" : { "current" : 276, "available" : 543 } Do I need to explicitly close mongo connections? how should I manage connection pooling in java? 回答1: You should use a single Mongo object, so it will do pooling for you. However, if you do use multiple objects, you do need to call

What is the maximum and minimum size of connection pool ADO.Net Supports in the connection string?

徘徊边缘 提交于 2019-11-29 03:13:15
What is the maximum and minimum size of connection pool ADO.Net Supports in the connection string. Min Pool Size=[max size ?] Max Pool Size=[min size] There is no documented limit on Max Pool Size. There is however an exact documented limit on maximum number of concurrent connections to a single SQL Server (32767 per instance, see http://msdn.microsoft.com/en-us/library/ms143432(v=SQL.90).aspx) . A single ADO.NET pool can only go to a single instance, so maximum effective limit is therefore 32767. Min pool size is zero Default Max Pool Size 100 Min Pool Size 0 Connection Pooling for the .NET

Is there a way to share object between php pages?

本小妞迷上赌 提交于 2019-11-29 02:50:16
问题 I am new to php, but in other web technologies, you can share objects between page instances. For example, in java jsp pages you easily have on class that exist as static class for the whole server instance. How to do this in php? I am not refering to sessions variables (at least I don't think so). This is more for the purpose of resource pooling (perhaps a socket to share, or database connections etc). So a whole class needs to be shared between subsequent loads, not just some primitive

node-mysql connection pooling

南楼画角 提交于 2019-11-29 02:33:13
问题 I am using node-mysql module (https://github.com/felixge/node-mysql) OR (http://utahjs.com/2010/09/22/nodejs-and-mysql-introduction/) . Is this API handling connection pooling as well? I mean with every user request I am calling Client.connect() to query the MySQL and to release the connection: Client.end() . Is this the right way, or should I connect/disconnect only once in a code. I am learning from this document: https://github.com/felixge/node-mysql/blob/master/Readme.md 回答1: Update: Feb

Is the Session object from Python's Requests library thread safe?

♀尐吖头ヾ 提交于 2019-11-29 00:55:34
Python's popular Requests library is said to be thread-safe on its home page, but no further details are given. If I call requests.session() , can I then safely pass this object to multiple threads like so: session = requests.session() for i in xrange(thread_count): threading.Thread( target=target, args=(session,), kwargs={} ) and make requests using the same connection pool in multiple threads? If so, is this the recommended approach, or should each thread be given its own connection pool? (Assuming the total size of all the individual connection pools summed to the size of what would be one

Configure SQL Server connection pool on Tomcat

南笙酒味 提交于 2019-11-29 00:23:47
I've been trying to configure a connection pool for a SQL Server 2012 database. I currently have Informix and Oracle pools configured and working, only SQL Server is giving me a headache. This is how my resource on Context.xml looks so far: <Resource name="jdbc/sqlserv" auth="Container" factory="org.apache.tomcat.dbcp.dbcp.BasicDataSourceFactory" driverClass="com.microsoft.sqlserver.jdbc.SQLServerDriver" type="javax.sql.DataSource" maxActive="50" maxIdle="10" maxWait="15000" username="username" password="password" url="jdbc:sqlserver://127.0.0.1:1433;databaseName=SQLDB;" removeAbandoned="true"