In connection pooling, the pool size is defined by the _________ and _________ parameters.

  • initialConnections, maxConnections
  • initialSize, maxSize
  • minConnections, maxConnections
  • minSize, maxSize
In connection pooling, the pool size is defined by the initialSize and maxSize parameters.

The process of retrieving a connection from the pool, using it, and then returning it is known as _________.

  • Connection Fetching
  • Connection Recycling
  • Connection Recycling
  • Connection Releasing
The process of retrieving a connection from the pool, using it, and then returning it is known as Connection Fetching.

To ensure efficient use of database connections, pools use a technique called _________.

  • Connection Caching
  • Connection Optimization
  • Connection Pooling
  • Connection Recycling
To ensure efficient use of database connections, pools use a technique called Connection Pooling.

When no connections are available in the pool, the request is put into a __________ until a connection becomes available.

  • buffer
  • hold
  • queue
  • stack
When no connections are available, the request is put into a queue until a connection becomes available in the pool.

_________ in connection pools helps to identify and replace connections that are no longer viable.

  • Expiration
  • Monitoring
  • Replacement
  • Validation
Validation in connection pools helps to identify and replace connections that are no longer viable or have become stale.

During peak usage, a web application's response time degrades significantly. Which connection pool setting should be investigated?

  • Connection Timeout
  • Max Connections Per Partition
  • Min Pool Size
  • Partition Count
To address degraded response time during peak usage, investigate the Max Connections Per Partition setting, which controls the maximum number of connections allowed in each partition.

What is the primary advantage of using a PreparedStatement in JDBC?

  • PreparedStatements are faster than Statement objects.
  • PreparedStatements are used for executing stored procedures.
  • PreparedStatements help prevent SQL injection attacks.
  • PreparedStatements require a connection pool.
PreparedStatements are precompiled SQL statements that are faster than Statement objects, providing better performance in JDBC operations.

To set a date in a PreparedStatement, the method _________ is used.

  • setDate()
  • setDateValue()
  • setTime()
  • setTimestamp()
The setDate() method is used to set a date in a PreparedStatement when working with JDBC.

When using a CallableStatement, the method _________ is used to register an OUT parameter.

  • outParameter()
  • registerOutParameter()
  • registerOutput()
  • setOutParameter()
When using a CallableStatement in JDBC, the registerOutParameter() method is used to register an OUT parameter.

A __________ strategy in connection pooling helps to optimize resource utilization under varying load conditions.

  • Adaptive Allocation
  • Dynamic Allocation
  • Incremental Allocation
  • Static Allocation
An Adaptive Allocation strategy in connection pooling helps optimize resource utilization under varying load conditions.