Tuesday, August 14, 2007
What is connection pooling?
With servlets, opening a database connection is a major bottleneck because we are creating and tearing down a new connection for every page request and the time taken to create connection will be more. Creating a connection pool is an ideal approach for a complicated servlet. With a connection pool, we can duplicate only the resources we need to duplicate rather than the entire servlet. A connection pool can also intelligently manage the size of the pool and make sure each connection remains valid. A number of connection pool packages are currently available. Some like DbConnectionBroker are freely available from Java Exchange Works by creating an object that dispenses connections and connection Ids on request. The ConnectionPool class maintains a Hastable, using Connection objects as keys and Boolean values as stored values. The Boolean value indicates whether a connection is in use or not. A program calls getConnection() method of the ConnectionPool for getting Connection object it can use; it calls returnConnection() to give the connection back to the pool.
Subscribe to:
Post Comments (Atom)
Topics
- ActionScript (1)
- Ajax (1)
- Apache mod_SSL (1)
- Apache SSL (2)
- Backup a Certificate (1)
- CA (1)
- connection pooling (1)
- cryptography (1)
- CSR (1)
- CSR Generation Instructions- Tomcat (1)
- Database Connection Pooling with Tomcat (1)
- datasource connection (1)
- Difference between equals and hashCode method (1)
- Difference between JDBC and hibernate (1)
- Difference between String StringBuffer and StringBuilder (1)
- Different types of SQL Joins (1)
- digital certificate (1)
- Digital Certificate Enrollment (1)
- digital certificate installation (1)
- DOM (2)
- DTD (1)
- encryption (1)
- Events in Flex (1)
- Flex Data Access (1)
- generate certificate (1)
- Good Java Interview questions (1)
- Hibernate (1)
- Hibernate Interview questions (1)
- Hibernate Interview questions 1 (1)
- Hibernate Interview questions 2 (1)
- Hibernate Interview questions 3 (1)
- Hibernate Vs. iBatis? (1)
- https (2)
- Import Certificate (1)
- Java Web development interview questions (1)
- JavaInterviewQuestions (1)
- JavaScriptAJAXinterview (1)
- jdbc connection (1)
- JDBC Questions 1 (1)
- JDBC Questions 2 (1)
- JSP interview questions (1)
- Junit (5)
- links (1)
- Move a Certificate (1)
- Multithreading (1)
- MXML (1)
- private key (1)
- public key (1)
- Running multiple Tomcat instances on one server (1)
- SAX (1)
- SCHEMA (1)
- Secure Socket Layer (1)
- Servlet Questions 1 (1)
- Servlet Questions 2 (1)
- Servlet Questions 3 (1)
- ShellScriptingquestions (1)
- Simple Java Questions (1)
- Singleton Design Pattern (1)
- siteminder sso netegrity (1)
- SSL (3)
- StringBuffer versus String (1)
- Third Normal Form (1)
- Unix (1)
- What is connection pooling? (1)
- What's the difference between "PreparedStatement" and "Statement"? (1)
- What's the differences between object and object references? (1)
- XML (1)
- XML Questions 1 (1)
- XML Questions 2 (1)
No comments:
Post a Comment