Saturday, October 26, 2013

BoneCP connection pool


àBoneCP is a fast, free, open-source, Java database connection pool (JDBC Pool) library.
àThis is a library that will manage a database connection for you to get faster database access in your application.
Features:
·         Free, open source and written in 100% pure Java with complete Javadocs.
·         Highly scalable, fast connection pool
·         Partitioning capability to increase performance
·         Automatic resizing of pool
·         Statement caching support
·         Support for XML/property configuration
·         Idle connection timeouts / max connection age support
·         Debugging support to show stack locations of connections that were closed twice.
Configurations:
·         JdbcUrl:
o    The JDBC connection string URL.
o    Default: None
·         username:
o    The DB username to use.
o    Default: None
·         password:
o    The DB password to use.
o    Default: None
·         PartitionCount:
o    In order to reduce lock contention and thus improve performance, each incoming connection request picks off a connection from a pool that has thread-affinity, i.e. pool[threadId % partition_count]. The higher this number, the better your performance will be for the case when you have plenty of short-lived threads. Beyond a certain threshold, maintenence of these pools will start to have a negative effect on performance (and only for the case when connections on a partition start running out).
o    Default: 1, minimum: 1, recommended: 3-4 (but very app specific)
·         maxConnectionsPerPartition:
o    The number of connections to create per partition. Setting this to 5 with 3 partitions means you will have 15 unique connections to the database. Note that BoneCP will not create all these connections in one go but rather start off with minConnectionsPerPartition and gradually increase connections as required.
·         minConnectionsPerPartition:
o    The number of connections to start off with per partition.
·         acquireIncrement:
o    When the available connections are about to run out, BoneCP will dynamically create new ones in batches. This property controls how many new connections to create in one go (up to a maximum of maxConnectionsPerPartition). Note: This is a per partition setting.
o    Default: 10


·         idleMaxAge
·         statementsCacheSize
·         releaseHelperThreads
·         hibernate.connection.provider_class
o    com.jolbox.bonecp.provider.BoneCPConnectionProvider
·         statementsCacheSize
·         releaseHelperThreads
·         idleConnectionTestPeriod






No comments:

Security Certificates

  1. Cryptography Basics Understand Key Concepts : Encryption, decryption, hashing, and digital signatures. Key terms: confidentiality, inte...