File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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
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 and and oracle sample code
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 ??
I agree. Here's the link:
subject: javax.sql.DataSource and connection pooling
It's not a secret anymore!