atomikos / transactions-essentials

Development repository for next major release of
https://www.atomikos.com/Main/TransactionsEssentials
Other
461 stars 139 forks source link

Query: How do I use HikariCP instead of AtomikosDataSourceBean? #134

Closed gimantha closed 3 years ago

gimantha commented 3 years ago

Hello there,

For connection pooling, I was using HikariCP, But it seems the transaction log is not produced when I used HikariCP instead of AtomikosDataSourceBean. Is there a way to wrap HikariCP with AtomikosDataSourceBean? or is there a way to configure AtomikosDatasourceBean with external connection pooling libraries?

Thanks.!

GuyPardon commented 3 years ago

Hi!

Since HikariCP is not aware of JTA/XA, it is not compatible with transactions managed by Atomikos.

What is it that you prefer about Hikari?

Thanks Guy

gimantha commented 3 years ago

Hello @GuyPardon , Thank for replying. Yes. I found out that Hikari has not implemented XADataSource interface, so it cannot be used with Atomikos.

We are using it just because of its performance of connection pooling.

But it seems Atomikos also has very good performance in that case (https://www.atomikos.com/Blog/JTAXAReliabilityWithoutThePerformanceOverhead).

gimantha commented 3 years ago

@GuyPardon Hi, Does Atomikos not derive the datasource name when only the jdbc url given? It seems that the driver name always has to be provided. HikariCP seems to require either jdbc url or driver class name.

gimantha commented 3 years ago

@GuyPardon Hi, Does Atomikos not derive the datasource name when only the jdbc url given? It seems that the driver name always has to be provided. HikariCP seems to require either jdbc url or driver class name.

I think this is an invalid question.

Thanks!