connection-pooling

Connection Timeout and Connection Lifetime

What is the advantage and disadvantage of connection timeout=0? And what is the use of Connection Lifetime=0? e.g (Database=TestDB;port=3306;Uid=usernameID;Pwd=myPassword;Server=192.168.10.1;Pooling=false;Connection Lifetime=0;Connection Timeout=0) and what is the use of Connection Pooling? ...

SQLite connection pooling with Fluent NHibernate

Is there a way to setup SQLite connection pooling using Fluent NHibernate configuration? E.g. equivalent of DataSource=:memory: would be: var sessionFactory = Fluently .Configure() .Database(SQLiteConfiguration.Standard.InMemory) (etc.) Is there something eqivalent to "Pooling=True;Max Pool Size=1;"? ...

How to share connection pool among multiple Java applications

Hi all. I'm implementing several JavaSE applications on single server. Is it possible to setup a single connection pool (e.g. C3P0) and share among these applications? I just want to have an easy way to manage the total number of DB connections. Is there any drawbacks using such centralized connection pool? Thank you, Wilson ...

ASP.NET - dynamically creating database connection in datasets

I am currently using datasets for my data access layer. I currently store the connection string in the web.config file. I need the ability to change the connection to another database before any queries are processed. Is there an event that is triggered or a base class that can be modified that intercepts the process of retrieving the...

SQL Server: ODBC Connection pooling / C API

I want to clarify how to do connection pooling with SQL Server from C, using ODBC. I know this question is, like.... sooooo 1998, but... I've never done it in C, so... here goes: First I think I have to set the attribute to enable pooling: rc = SQLSetEnvAttr( NULL, // make process level cursor pooling SQL_ATTR_CO...

Do I need to use C3P0 pooling library in my (grails) web application?

Hi, I am not familiar at all with connection pooling library. I've just discovered it through this blog article) and I am not sure that I should use one in my web application based on grails/hibernate/mysql. So my question is simple : in which situations would you suggest to integrate a connection pooling library into a grails applica...

exception creating a JDBC Conection Pool Glassfish v3

Hi all, I am experiencing problems creating a connection pool in glassfish v3, just for reference i am using the Java EE glassfish bundle. my enviroment vars are as follows Url: jdbc:oracle:thin:@localhost:1521:xe User: sys Password : xxxxxxxx which i think is all i need to make a connection. but i get the following exception W...

Need Code to create Connection Pool in java

Need code to create the connection pool in java? How does we make sure that connection pool doesn't return the same object which is already in use? How happens if client closed the connection after taking it out from Connection pool? Update 1: I want to create this in Simple Java terms and want to see how it works in Multithreading Env...

What is best approach for connection pooling?

I am implementing connection pooling in project. Performance wise which is better approach to do it? Hibernate (using C3PO or DBCP) Configuring JDBC data-source in Application server. Application server Portability is not an important factor for me. Please suggest the approach. ...

How does a tcp connection pool distinguish between different clients

In my understanding, a tcp connection in a connection pool can be reused only if the client trying to connect to the server is the one previously created the connection (i.e.same IP, etc). So when the server tries to connect to a specific client (i.e. fetches a connection from the pool) how does the server do it? Do I have to provide IP ...

jdbc connection pooling

Can anybody provide examples or links on how to establish a JDBC connection pool? From searching google I see many different ways of doing this and it is rather confusing. Ultimately I need the code to return a java.sql.Connection object, but I am having trouble getting started..any suggestions welcome. Update: Doesn't javax.sql or j...

Tomcat connection pooling, install jdbc driver for web-app

Hello, I am making a web-app with Tomcat 6 as the container and I'm trying to use connection pooling. The jdbc driver I am using is jtds-1.2.2. The pool works fine when the driver jar is placed under ${Catalina_Home}/lib, but my hosting provider would not let me do so. I get a CNF-Exception when the driver is placed in the WEB-INF/lib....

Connection Pooling vs Per-Thread JDBC Connection

Which of these approaches is better: connection pooling or per-thread JDBC connections? ...

SQL Server and MySQL connection pooling: is it really important?

After a lot of problems with my web host, I disabled connection pooling within my application. The problem was related to the number of concurrent connections : only five. The result is that my web app doesn't crash. I didn't notice any poor performance after disabling it. Are there any "collateral" or side effects to disabling con...

Labeling connections using Oracle Universal Connection Pool (UCP) doesn't seem to work

I'm evaluating the Oracle Universal Connection Pool (UCP) included with their 11.2 JDBC driver, but cannot get the labeling functionality to work properly (which I'd like to use to minimize the amount of ALTER SESSION statements). I'm basically following their sample code to implement the ConnectionLabelingCallback interface. The callba...

How to limit the number of connections to a SQL Server server from my tomcat deployed java application?

I have an application that is deployed on tomcat on server A and sends queries to a huge variety of SQL Server databases on an server B. I am concerned that my application could overload this SQL Server database server and would like some way to preventing it making requests to connect to any database on that server if some arbitrary nu...

MySQL best usage in Tomcat?

Which one is better way of using MySQL in Tomcat : A) assign a DB connection for user as long as it's session is valid. [OR] B) open connection to DB, on every request come to server and when it's done close that. C) Connection pool. [BEST answer] ...

DB2 Driver Connection Hanging in Glassfish Connection Pool

We have an intermittent issue around the DB2 used from a Glassfish connection pool. What happens is this: Under situations where the database (DB2 on ZOS) is under stress, our application (which is a multi-threaded application using connections to DB2 via a Glassfish connection pool) stops doing anything. The following are observed: 1...

Java JDBC connections and Oracle

I have a scenario and the question follows Application server has two connections pools to DB. A and B A points to -> DatabaseA -> has 128 connections A has Stored Procedures which access tables residing in DatabaseB over the DB link B points to -> DatabaseB -> has 36 connections Now lets say that Java code calls Stored Proc in Dat...

what is the optimal database connection strategy

i have a asp.net mvc website which runs a number of queries for each page. Should i open up a single connection or open and close a connection on each query? ...