User Experience: Connection Pool Attendees: Kshitiz Saxena, Jagadish Ramu, Jane Young, Scott Oaks, Steve Essery (UK), Stephen Wolf, Tony (Bangalore), Siraj Ghaffar, Anissa Lam, Vince Kraemer, Nazrul Islam Summary:
- GlassFish v1 has 5 new features ([slide 9|^/gfwiki/attach/OnePagersOrFunctionalSpecs/ConnectionPool-UserExperience-Aug29.pdf])
- Validation - Validates each connection before handing out the connection.
- Fail Connections - Fails all connections when pool detects an invalid connection.
- Lazy Connection Enlishment - If true, a connection is not enlisted in a transaction until it is used. If false, any connection object available to a transaction is enlisted in the transaction.
- Lazy Connection Association - If true, a physical connection is not associated with a logical connection until it is used. If false, a physical connection is associated with a logical connection even before it is used.
- Association With Thread - If true, allows a connection to be saved as a ThreadLocal in the calling thread. This connection gets reclaimed only when the calling thread dies or when the calling thread is not in use and the pool has run out of connections.
- GlassFish v2 Features
- Merging Resource and Connection Pool ([slide 17|^/gfwiki/attach/OnePagersOrFunctionalSpecs/ConnectionPool-UserExperience-Aug29.pdf])
- Allow user to create a resource without a pool (ex. JAXR-RA).
- Ability to create resource and pool in one command (slide 18). The suggested CLI command on slide 18 seems to be confusing. It is trying to create both the pool and resource. connectionpoolid can be a coma separated list (slide 13) for clustered-pool feature. What happens when user specify two connection pool ids?
- Clustered Pools
- Load balancing and fail over support (ex. Oracle RealApplicationCluster)
- In v2, only round robin load balancing support will be provided.
- It was not clear how fail over is achieved since validation of connection is not turned on by default.
- Differentiate mandatory, sun specific and driver specific properties.
- Switch off connection pooling in Application Client Container. ACC typically has single client.
- Ability to detect connection leaks.
- It was not clear why we need to introduce Connection Leak Timeout attribute when we have Max-Wait Timeout.
- It was not clear how the information will be presented to the user. Are we going to dump the stack traces to the server log?
- Retry (attempts, interval) for connection creation failures.
- Validate atmost period to avoid overhead.
- Statement timeout for long running SQL queries.
- Suggested Features
- Auto Deploy from Templates - Provide templates for different databases and support auto-deploy from templates. User should be able to provide required information (ex. user/password) and copy one the templates to the auto-deploy directory to create the resources.
- Mark a bad connection - When application gets a bad connection, there is no way to tell the application server to get rid of it. Call to close method returns the bad connection to the pool.
- Oracle 10g has load monitoring stats and requires some integration work from client. We should look into providing that from Application Server.
Open Issues/Action Items:
- GlassFish v1 docs does not give any guidance to the user about how the new v1 features should be used. - Hanan Lang, Jagadish, Kshitiz
- No monitoring information seems to be available for the v1 and v2 features. - Siraj, Jagadish, Kshitiz
- Clarify CLI syntax for merging resource and pool creation - Jane, Jagadish, Kshitiz
- Blog about clustered pool feature and clarify how (loadbalancing &) failover works - Jagadish, Kshitiz
- Blog about how connection leak detection feature will work - Jagadish, Kshitiz
- Investigate auto-deploy from templates - Jagadish, Kshitiz
- Look into Oracle 10g integration - Jagadish, Kshitiz
comments It seems like the default state of the validation flag was an open issue. jane raised a question about how a user would see that a JDBC resource was associated with multiple pools... On slide 14, it seemed like there was mention of dumping a bunch of stacks into the server log if the MAX-WAIT-TIMEOUT passed without a freed up connection. Based on the numerous forum postings about useless stack traces, this may not be the best choice.
|