Connection pooling questions and answers
 Technote (troubleshooting)
 
Problem(Abstract)
A series of connection pooling related questions and answers to help you understand connection pooling more clearly.
 
Resolving the problem
  1. What does it mean when the connection pool maximum size is set to 0?

    It means that there is no limit on the number of connections in the connection pool.

  2. What does it mean when a connection in the pool is unsharable?

    If a connection in the pool is unsharable, it means that the connection will remain in the unshared pool until the transaction associated with the connection completes. The connection remains associated with the transaction in case the transaction needs to be rolled back. When the transaction is committed, the connection will be returned to the free pool, at which point it becomes available to the next connection request.

  3. When a connection request is made from a LocalTransactionContext, how long does the LocalTransactionContext remain in effect on the connection?

    By default, a connection request made from a LocalTransactionContext will remain in effect until the end of the method. At this time, the LocalTransactionContext will either be committed or rolledback. Commit or rollback options are set on the Web or Enterprise JavaBeans™ (EJB™) deployment descriptor as the unresolved action.

  4. If the transactions are not being completed, what are some of the options to resolve the problem?

    • Set the unresolved action to commit. Then when the method ends, the connection will be returned to the free pool. The application must leave the method in which it gets a connection.

    • Manually commit the connection. The LocalTansaction associated with the connection can be obtained through javax.resource.cci.Connection.getLocalTransaction(). The LocalTransaction that is returned can be committed and will cause the connection to be returned to the free pool.

    • Issue the getConnection calls from within a UserTransaction and commit the UserTransaction when appropriate.

  5. When does the matchManagedConnection get called?

    The matchManagedConnection will be called if there are connections in the free pool that the connection manager can pass in to match.
 
 
Cross Reference information
Segment Product Component Platform Version Edition
Application Servers Runtimes for Java Technology Java SDK
 
 


Document Information


Product categories: Software > Application Servers > Distributed Application & Web Servers > WebSphere Application Server > DB Connections/Connection Pooling
Operating system(s): Windows
Software version: 5.0.2.4
Software edition:
Reference #: 1163257
IBM Group: Software Group
Modified date: Mar 15, 2004