cp_db_connection_pool_create(3)

cp_dbms(3) cp_dbms cp_dbms(3)

NAME

cp_db_connection_pool_create, cp_db_connection_pool_destroy - create / deallocate a connection pool

SYNOPSIS

#include <cprops/db.h>

cp_db_connection_pool * cp_db_connection_pool_create(cp_data_source *data_source, int min_size, int max_size, int initial_size);
void cp_db_connection_pool_destroy(cp_db_connection_pool *pool);

DESCRIPTION

cp_db_connection_pool_create creates a database connection pool for connections on the given data_source. Connections may be obtained from the pool by calling cp_db_connection_pool_get_connection(3). Connections remain open until the pool is stopped by calling cp_db_connection_pool_shutdown(3), which closes all open connections. The pool must be explicitly deallocated by calling cp_db_connection_pool_destroy.

RETURN VALUE

cp_db_connection_pool_create returns a cp_db_connection_pool structure representing the newly created connection pool on success or NULL on failure.

SEE ALSO

cp_db_connection_pool_shutdown(3), cp_db_connection_pool_get_connection(3), cp_db_connection_pool_release_connection(3)

MARCH 2006 libcprops