0

I'm using BoneCP connection pooling mechanism and I want to manage my transactions using support of the Spring framework. I found an example about Spring Transaction Management and I tried to apply this example. I got a DataSource instance from my connection pool and give this data source to created DataSourceTransactionManager as below.

DataSource dataSource = new BoneCPDataSource(getConnectionPool().getConfig());
DataSourceTransactionManager transactionManager = new DataSourceTransactionManager();
transactionManager.setDataSource(dataSource);

But when I test it, I saw that the transaction manager has written the data to the store before commit operation.

Can it be related with creating a new data source before transaction manager is created? or do you have any idea?

duffymo
  • 305,152
  • 44
  • 369
  • 561
gul.cabuk
  • 1
  • 4

1 Answers1

0

I found the cause of the problem. I was using SDB RDF storage component. It is related with the implementation of the SDB's add triple method. I found that it directly calls the commit method of the current SQL connection. There is no problem about integrating DataSourceTransactionManager with BoneCP connection pool.

double-beep
  • 5,031
  • 17
  • 33
  • 41
gul.cabuk
  • 1
  • 4