connection-pooling

Hibernate not throwing exception when openSession is called and the connection to DB cannot be established

When I configure hibernate to connect to a DB and for some reason the connection fails, I noticed that it doesnt throw any exception neither when building the factory (which is acceptable) nor when I call sessionFactory.openSession() (which is less acceptable). What is more annoying is that session.isConnected() returns true after I call...

Repository Connection Pooling

I'm in a hoo-ha with my boss as I can't shift to using newer technologies until I have proof of some outstanding issues. One of the main concerns is how repositories deal with connections. One of the supposedly largest overheads is connecting and disconnecting to/from the database. If I have a repository where I do the following: pub...

What is the missing parameter in connection pooling?

<property name="connection.provider_class">org.hibernate.connection.C3P0ConnectionProvider</property> <property name="c3p0.max_size">100</property> <property name="c3p0.idleConnectionTestPeriod">300</property> <property name="c3p0.acquire_increment">1</property> <property name="c3p0.idle_test_period">100</property> <!-...

Managing concurrent access to an Apache Derby database

Hi, I have an Apache Derby database running (in networked mode) inside a java swing application, I connect to it through direct JDBC calls via a java client application. This is all very good and works great however I know have an additional requirement to implement concurrent licenses for this client/server application. Ideally a user...

Auto reconnect to MySql after connection lost

Hi, I have a c# application that uses a MySql database, the problem that after a period of inactivity (8 hours) or when connection to the server where database is host is lost, the connection to the database is closed and database queries cannot be executed. how can i enable the auto reconnect to the database. Best regards. ...

How do I decide the number of connections required in connection pooling?

I am using hibernate 3.2.2 in my application. For connection pooling, we are using c3p0 0.9.1. I am using Generic DAO Pattern and Open Session in View pattern to do database operation. We are working on new website of existing website. Right now, the no of visits is half million page visit in existing application. I am confused with t...

Using Memcache for storing connection objects

Is it advisable to store SQL Connection objects in memcache? ...

Setting DB2 Client Audit information with a dbcp connection pool in a Java app

I'm developing Java apps on Tomcat 5.5 using JNDI to connect to shared dbcp connection pools with JDBC 3.0 drivers and DB2 8 on zOS and also DB2 9 on LUW. In my app, I use org.springframework.jndi.JndiObjectFactoryBean to get the dataSource and feed it into an org.springframework.jdbc.core.simple.SimpleJdbcTemplate to run the queries. ...

Validating Connection Before Handing over to WebApp in ConnectionPooling

I have connection pooling implemented in spring using Oracle Data Source. Currently we are facing an issue where connections are becoming invalid after a period of time. (May be Oracle is dropping those idle connections after a while). Here are my questions: Can Oracle database be configured to drop idle connections automatically after...

How to alter connection in EclipseLink

I use EclipseLink in my application. EclipseLink uses some connection pool. I use EclipseLink internal one. Connection pool creates connection when it is needed and then keeps it for future use. I need to make one specific SQL call on each connection when it is created, but only once. What I need to do is to grant user specific role on ...

ADO.NET + LINQ Connection = Can they reuse the same?

I have an ADO.NET connection object to an SQL Server (which will use connection pooling and all the nice things about it) in one Winforms application. We're adding some new stuff to this application and we thought that we could do it in LINQ to SQL, the question is, if we open a new connection like this: MyDataContext dc = new MyDataCo...

Connection Pool Strategy: Good, Bad or Ugly?

I'm in charge of developing and maintaining a group of Web Applications that are centered around similar data. The architecture I decided on at the time was that each application would have their own database and web-root application. Each application maintains a connection pool to its own database and a central database for shared data ...

How to resolve the idlewait time in tomcat ?

Hi, I have connection pooling error.Please help me out. Currently working properly..but after long idle time getting error. url="jdbc:mysql://localhost:3306/test?autoReconnect=true"/> ...

JDBC Connection pooling using C3P0

Following is my helper class to get DB connection: I've used the C3P0 connection pooling as described here. public class DBConnection { private static DataSource dataSource; private static final String DRIVER_NAME; private static final String URL; private static final String UNAME; private static final String PWD; ...

Java Database Connection Pool for multiple databases (Shards)

Hello, I was wondering what the best technique for implementing a DB connection pool for a web application which uses shards. From what I can tell most (all?) open-source implementations only support a single database behind. At least, I have not found one that supports shards. Also, even though I using shards not all of the database w...

Setting and updating connection pool (OracleConnectionPoolDataSource) properties for best performance

In a Java web application I am working on, we are using OracleConnectionPoolDataSource for a database connection pool functionality. Each getConnection call includes the user's Oracle ID and password. So each user in a sense ends up with their own database connection pool. Currently we are using the default values for most properties. T...

Will php autoreconnect to MySQL?

$con = mysql_connect("localhost:".$LOCAL_DB_PORT, $LOCAL_DB_USER, $LOCAL_DB_PASS); mysql_select_db("hr", $con); mysql_query("set names utf8", $con); while(true) { do_stuff($con); sleep(50); } If connection timesout in 50 seconds,will $con still work? ...

Is there a way to use System.Transactions with connection pooling?

I think the System.Transaction classes in Framework 2.0 are a great tool, well designed, aimed to simplify code when working with transactions. But, (big but), it's impossible to use those classes with multiple connections to the same database (same connection string) without promoting to distributed transactions. http://social.msdn.m...

Connection pooling in SQL SERVER (express)- recommended amount ?

Hi there, is there a recommended amount of connections fro each application i have for use with connection pooling.., my apps are using asp.net and c# against sql express on the "same" server. I have 5 applications running, they are not used intensively, all connections are opened and closed.. So i was thinking of setting each app to ...

What happens to an uncommitted transaction when the connection is closed?

Are they rolled back immediately? Are they rolled back after some period of time? Are they left in an uncommitted state? Is the behavior the same if connection pooling is used and the connections are simply reset? ...