开发者

Do MySql Connector J JDBC drivers not support connection pooling?

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 motivati开发者_JAVA技巧on for not introducing it in the Connector J driver itself? Is this something that the J2EE spec dictates?


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜