This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
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?
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.
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
Joined: Apr 19, 2005
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?