Pooling in hsqldb

What is the best way to implement a connection pool in hsqldb without sacrificing speed?

+3
source share
3 answers

Hibernate receives connections from a DataSource, uses them, and closes them. Do you need a connection pool or it will be very inefficient, consuming a lot of resources both on your application and on the DBMS, regardless of the database server used.

You should try commons-dbcp from Apache-Jakarta, it is very efficient and very simple to configure. It depends on the shared pool. You simply define the underlying data source using DBCP, and it will manage connections to any JDBC driver you tell it. It has connection checking and many other things. If you are writing a web application, configure the connection pool in the container that you will use and use, instead of defining your own pool.

+3
source

You compare apples and oranges:

  • If you want orm to compare the performance of different orm tools with the same db.
  • If you want the connection pool to compare different connection pool libraries with the same db.

ORM , , JDBC. , ( ), . ORM .

orm. , hibernate .

, , mgmt. , J2EE ( API- JDBC Datasource API) . () .

J2EE orm, C3P0, Commons-Pool ..

+2

If you used your own Hibernate connection pool, can you consider using c3p0 ? (If you are already using c3p0, I can’t help further) I myself have not used HSQLDB, but I think it's worth a try.

+1
source

Source: https://habr.com/ru/post/1699159/


All Articles