Can I use bitronix PoolingDataSource without BTM?

Can I use bitronix.tm.resource.jdbc.PoolingDataSource without using the Bitronix transaction manager and use stand-alone JBossTS instead ?

To access the database, I use Hibernate, with transaction demarcation with Spring @Transactional annotation (or Spring TransactionTemplate , which has a similar implementation). PoolingDataSource and stand-alone JBossTS are used in tests, however I would not give up on the db connection pool.

If this is not possible, then what other data source to merge will match here? Another question suggests that c3p0 is not an option. It's true?

+4
source share
1 answer

No, this is not possible, and it is also impossible to switch XA pools between transaction managers simply because there is no standard that defines the relationship between the transaction manager and the JDBC connection pool. At least this story is long: http://blog.bitronix.be/2011/02/why-we-need-jta-2-0/

AFAIK, in the case of JBossTS, your only options are to use the JBossAS connection pool, but this will not be a minor achievement, since it requires at least JCA runtime, but certainly more.

I am afraid that the only realistic options are to use all BTM or JBossTS without pooling or JBossTS with a pool, but inside JBossAS.

+2
source

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


All Articles