views:

17

answers:

1

Does Connector J really not support connection pooling. Looking at their documentation I have to download a 3rd party library such as DBCP or c3p0 to get this right. What is the motivation for not introducing it in the Connector J driver itself? Is this something that the J2EE spec dictates?

+1  A: 

No JDBC driver that I know of (Oracle, SQL Server, MySQL, PostgreSQL) supports connection pooling on its own. That's usually a service provided by a Java EE app server.

I don't blame you for being confused - that's how I feel when I stray into .NET territory.

I believe the reason is historical: pooling and naming are services that a CORBA ORB provided for distributed objects. When enterprise Java was conceived, the idea was to create a transaction monitor for distributed objects that encapsulated those services. All the difficulties of pooling, object lifecycle, threading, etc. were moved out of the application and into the application server on which they were housed. Enterprise Java Beans were supposed to allow users to concentrate on the objects that expressed business logic and leave all that house-keeping stuff to the app server. A market for app servers was born: WebLogic, WebSphere, JBOSS, etc.

As I understand .NET, there's just one app server: IIS. I don't know how .NET handles connection pooling, but IIS history started as a web server analog to Apache. I don't think it started in the same place.

duffymo
Thanks duffymo. I am a bit confused coming from a .Net background with regards to programming with a DB but why is that?
uriDium