aspose file tools*
The moose likes JDBC and the fly likes Connection pool in cluster environment Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Connection pool in cluster environment" Watch "Connection pool in cluster environment" New topic
Author

Connection pool in cluster environment

vu lee
Ranch Hand

Joined: Apr 19, 2005
Posts: 189
The underline connection object is a socket connecting two IP addresses. Cluster is a collection of two or more app servers. Let's assume each app server is deployed to a different computer. How does connection pool in cluster environment work?
Jeanne Boyarsky
internet detective
Marshal

Joined: May 26, 2003
Posts: 30548
    
152

Vu,
Each app server instance (physical cluster) has it's own connection pool. The app servers on the same cluster share a connection pool.


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
vu lee
Ranch Hand

Joined: Apr 19, 2005
Posts: 189
Jeanne,
Could you please elaborate on this?
Each app server instance (physical cluster) has it's own connection pool. The app servers on the same cluster share a connection pool.


What is a physical cluster? Does it have its own IP address? Who create the connection pool? is it the cluster or the app server? Does it mean the same connection can be shared by multiple app servers? Thanks in advance.
Roger Chung-Wee
Ranch Hand

Joined: Sep 29, 2002
Posts: 1683
A lot of stuff relating to clustering is specific to a particular container. For WebLogic, when a server-side client obtains a JDBC Connection via a JNDI lookup and a DataSource, a local object is returned by the DataSource from the Connection pool it references (rather than going to another cluster member for its JDBC connections). The Connection is pinned to the local server instance for the duration of the database transaction, and as long as the application code retains it (until the Connection is closed).

So, clustering the Connections does not enable failover of Connections but it can ease the process of reconnection when a Connection fails.


SCJP 1.4, SCWCD 1.3, SCBCD 1.3
vu lee
Ranch Hand

Joined: Apr 19, 2005
Posts: 189
I am still confused. I'll google to learn more about this. In a mean while it would be great if some one could throw more light on this issue.

It is better to cache preparedStatement from a cluster connection pool than local app server. What is the relationship between a cluster connection pool and a local app server connection pool?
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Connection pool in cluster environment