如何在 Exasol 上启用 JDBC 连接池?

How to enable JDBC connection pooling on Exasol?

我们在 Web 应用程序中将 Hibernate 与 Exasol 结合使用。当我们将Hibernate的hibernate.connection.pool_size属性设置为大于1的值(或任何JDBC连接池对应的属性,例如HikariCP,c3p0,设置为大于1的值1), 我们得到:

java.sql.SQLException: syntax error, unexpected FOR_READ_ONLY_, expecting end_of_input or ';' [line 1, column 93] (Session: 1622929410050974585)
    at com.exasol.jdbc.ExceptionFactory.createSQLException(ExceptionFactory.java:164)
    at com.exasol.jdbc.ExceptionFactory.createSQLException(ExceptionFactory.java:21)
    at com.exasol.jdbc.AbstractEXAPreparedStatement.<init>(AbstractEXAPreparedStatement.java:62)
    at com.exasol.jdbc.AbstractEXAPreparedStatement_14.<init>(AbstractEXAPreparedStatement_14.java:14)
    at com.exasol.jdbc.EXAPreparedStatement.<init>(EXAPreparedStatement.java:12)
    at com.exasol.jdbc.DialectGeneric.createPreparedStatement(DialectGeneric.java:10)
    at com.exasol.jdbc.AbstractEXAConnection.prepareStatement(AbstractEXAConnection.java:608)
    at org.hibernate.id.enhanced.TableGenerator.prepareStatement(TableGenerator.java:618)
    at org.hibernate.id.enhanced.TableGenerator.access0(TableGenerator.java:127)

来自Exasol's user manual,

The Connection Pooling of the driver manager is deactivated by default. You can explicitly activate it in the configuration tool "ODBC Data Source Administrator". But please note that in that case reused connections keep their session settings which were set via SQL commands (see ALTER SESSION).

这里提到ODBC,而我们使用JDBC。所以我的问题是,如何在 Exasol 上启用 JDBC 连接池?

我们应该 add/update 排在 EXA_PARAMETERS view/table 中吗?

对于JDBC,EXASOL 本身没有集成的连接池。 但是我们发现以下库非常有用: http://commons.apache.org/proper/commons-dbcp/download_dbcp.cgi 例如,这也用于 JMeter 并且在那里工作正常。 但是,我们没有任何将此库与 hibernate 结合使用的经验。 对了,你用过https://github.com/exasol/hibernate-exasol吗?

请告诉我们进展情况,我们很乐意提供帮助! (联系我们:www.exasol.com/contact)

此致, Exasol 队