DataSource Pooling
Pooling its datasource connection in a real application is very important to respect its SLA.
OpenEJB (and by the way TomEE) uses commons-dbcp since many years. It works well if well configured, but suffers from an old design. What’s more, some other libraries are today interesting and are good alternatives.
Two famous of them are tomcat-jdbc (a fork from commons-dbcp) and BoneCP. Both promises great performances (particulary in high load).
Many refactoring has been done in OpenEJB to allow switching pool library keeping the JTA management (supported by commons-dbcp but no others). The result is mainly a “magic” abstract class called org.apache.openejb.resource.jdbc.pool.PoolDataSourceCreator. Its API obliges you to implement a way to pool a provided datasource, to create a pooled datasource and to destroy what you created.
But in a user life, you don’t need it, and you can simply use what is already done through configuration :).
Continue reading →
Like this:
Like Loading...