Atomikos Forum |
|
Was just curious if anyone has successfully setup their webapp using Atomikos 3.9.3 Tomcat 8 and Hibernate 5.0.x?
I have everything up and running, my app looks up the TransactionManager through JNDI however it appears as if the connection pool keeps getting exhausted after which point no new connections can be borrowed. So the app works for the first few requests, and then I see errors in the log like: INFO com.atomikos.jdbc.AbstractDataSourceBean - AtomikosDataSoureBean 'Tol_Resource': getConnection ( null )... INFO com.atomikos.jdbc.AbstractDataSourceBean - AtomikosDataSoureBean 'Tol_Resource': init... DEBUG com.atomikos.icatch.imp.BaseTransactionManager - getCompositeTransaction() returning instance with id DsubTMLocal-0002400032 DEBUG com.atomikos.icatch.imp.BaseTransactionManager - getCompositeTransaction() returning instance with id DsubTMLocal-0002400032 DEBUG com.atomikos.icatch.imp.BaseTransactionManager - getCompositeTransaction() returning instance with id DsubTMLocal-0002400032 DEBUG com.atomikos.icatch.imp.BaseTransactionManager - getCompositeTransaction() returning instance with id DsubTMLocal-0002400032 DEBUG com.atomikos.icatch.imp.BaseTransactionManager - getCompositeTransaction() returning instance with id DsubTMLocal-0002400032 DEBUG com.atomikos.icatch.imp.BaseTransactionManager - getCompositeTransaction() returning instance with id DsubTMLocal-0002400032 DEBUG com.atomikos.icatch.imp.BaseTransactionManager - getCompositeTransaction() returning instance with id DsubTMLocal-0002400032 DEBUG com.atomikos.icatch.imp.BaseTransactionManager - getCompositeTransaction() returning instance with id DsubTMLocal-0002400032 DEBUG com.atomikos.icatch.imp.BaseTransactionManager - getCompositeTransaction() returning instance with id DsubTMLocal-0002400032 DEBUG com.atomikos.icatch.imp.BaseTransactionManager - getCompositeTransaction() returning instance with id DsubTMLocal-0002400032 DEBUG com.atomikos.icatch.imp.BaseTransactionManager - getCompositeTransaction() returning instance with id DsubTMLocal-0002400032 DEBUG com.atomikos.icatch.imp.BaseTransactionManager - getCompositeTransaction() returning instance with id DsubTMLocal-0002400032 DEBUG com.atomikos.icatch.imp.BaseTransactionManager - getCompositeTransaction() returning instance with id DsubTMLocal-0002400032 DEBUG com.atomikos.icatch.imp.BaseTransactionManager - getCompositeTransaction() returning instance with id DsubTMLocal-0002400032 DEBUG com.atomikos.icatch.imp.BaseTransactionManager - getCompositeTransaction() returning instance with id DsubTMLocal-0002400032 DEBUG com.atomikos.icatch.imp.BaseTransactionManager - getCompositeTransaction() returning instance with id DsubTMLocal-0002400032 DEBUG com.atomikos.datasource.pool.ConnectionPool - atomikos connection pool 'Tol_Resource': about to wait for connection during 30000ms... DEBUG com.atomikos.datasource.pool.ConnectionPool - atomikos connection pool 'Tol_Resource': done waiting. DEBUG com.atomikos.datasource.pool.ConnectionPool - atomikos connection pool 'Tol_Resource': about to wait for connection during 1ms... DEBUG com.atomikos.datasource.pool.ConnectionPool - atomikos connection pool 'Tol_Resource': done waiting. WARN com.atomikos.jdbc.AtomikosSQLException - Connection pool exhausted - try increasing 'maxPoolSize' and/or 'borrowConnectionTimeout' on the DataSourceBean. Followed by: java.lang.IllegalStateException: Transaction no longer active So just curious if anyone else has gotten things to work using a similar configuration (I'm utilizing XA as well via MSSql...)
FYI, got this resolved... The magic Hibernate property that fixed it all was:
setProperty("hibernate.transaction.coordinator_class", "jta"); https://docs.jboss.org/hibernate/ogm/5.0/reference/en-US/html/ch04.html#ogm-configuration-environments-javaee |