Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

javax.sql.DataSource and connection pooling

 
Kalpesh Soni
Ranch Hand
Posts: 312
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 ]
 
Peter den Haan
author
Ranch Hand
Posts: 3252
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Connections can't be serialized over the network. They are JVM-local objects, and so is your DataSource.
- Peter
 
Kalpesh Soni
Ranch Hand
Posts: 312
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
what about statements and resultsets ?
any place where this is expalined properly ??
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic