Thank you Mr KJ Reddy that was quite helpful. Now one more query...
If i'm concurrently accessing two or more databases there is no doubt that i will require more than one connection. But suppose I'm going to access the databases one after another is there any way in which I can just make the existing connection refrence point to the new database? Is this a valid query in the first place...?!! I am in a doubt...
Joined: Sep 20, 2003
Ashutosh, Connection is a gateway to talk with a database. So if you are databases are same you can use same connection(that is the place Connection Pooling) concept derived. If databases are different you need to have different connections you can not use same connection.
Joined: Oct 24, 2005
Hmmm... So we can use same statement reference to query different tables in a connection but if database vendor changes the connection changes... I'm getting it?
Before we come to conclusion, we need to take care of this point.:
As part of BEA Weblogic, we have the concept of MultiPool. Here, we can have connection pools of seperate DBs. The BEA definition goes like this:
A MultiPool is a pool of connection pools. All the connections in a particular connection pool are created identically with a single database, single user, and the same connection attributes; that is, they are attached to a single database. However, the connection pools within a MultiPool may be associated with different users or DBMSs.
But I am not sure of other Application Servers.
Cheers,<br />Hemanth...<br />(When opportunity doesn't knock, build a door.)