wood burning stoves
The moose likes JDBC and Relational Databases and the fly likes javax.sql.DataSource and connection pooling Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Bookmark "javax.sql.DataSource and connection pooling" Watch "javax.sql.DataSource and connection pooling" New topic

javax.sql.DataSource and connection pooling

Kalpesh Soni
Ranch Hand

Joined: Jan 02, 2001
Posts: 312
1) I need some good example to learn about DataSources and Connection pooling
I found one in oracle documentation http://download-west.oracle.com/docs/cd/B10501_01/java.920/a96654/connpoca.htm and and oracle sample code http://otn.oracle.com/sample_code/tech/java/sqlj_jdbc/files/jdbc20/jdbc20.htm
But they are not portable enough
2) is it necessary that the client to datasource resides in the jvm in which datasource is there
what i mean is, say my data source is registered in weblogic server, and i use a standalone program to use connection objects, now where actually are connection pooled, on client jvm or server ? if on server, would it mean that my method invocations on Connection object and ResultSet will talk to server across the network?
I just want to be conceptually clear on this
[ May 09, 2003: Message edited by: Kalpesh Soni ]

Test 094, IBM WID 6.0 cert
SCJP 1.2
SCBCD 1.3 Beta
SCWCD 1.4 Beta

Peter den Haan
Ranch Hand

Joined: Apr 20, 2000
Posts: 3252
Connections can't be serialized over the network. They are JVM-local objects, and so is your DataSource.
- Peter
Kalpesh Soni
Ranch Hand

Joined: Jan 02, 2001
Posts: 312
what about statements and resultsets ?
any place where this is expalined properly ??
Don't get me started about those stupid light bulbs.
subject: javax.sql.DataSource and connection pooling
It's not a secret anymore!