I am able to achieve a connection pool to my database using SpringTransactionManager(dataSource) . But as my dao layer use transaction { } blocks, I get the IllegalStateException: Already value for key bound to thread [main]
t
tapac
03/05/2018, 5:15 PM
I reproduced that issue in tests in going to look why it happens.
ATM I can only recommend to do not mix SpringTransactionManager with transaction {} block from ThreadLocalTransactionManager file.
@niteesh, fixed in master. Will be available on next release
👍 1
n
niteesh
03/06/2018, 6:16 AM
@tapac I couldn't accomplish the task of configuring exposed with hikariCP on a spring-boot project using spring's application.properties file for specifying the jdbc params. (without using the SpringTransactionManager)
I was able to get the DataSource instance but the subsequent call to Database.connect(ds) failed with error:
java.lang.IllegalArgumentException: one of either dataSource or dataSourceClassName or jdbcUrl must be specified
And hence I had to import the spring-transaction dependency for the Database.connect to happen properly