English 中文(简体)
Integration of Spring TransactionManager with BoneCP connection pooling
原标题:

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?

问题回答

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.





相关问题
C# binding a combobox to a growing list

WinForms, .NET 3.5 I have a ComboBox that needs to display a growing list of items -- there is a long running process fetching items, and I want to be able to display items to the user as they build ...

Dynamic Datasource in SQL Server Stored Procudure

I have a SQL Server that houses Several Databases. I have a Main Database that holds several tables with entities and ID numbers. Then, each one of those entities has a correlating database (not a ...

数据清单

所有类型都安装了电子数据接口,可用于数据数据交换。 例如,清单。 但是,我们将为项目Template中的数据约束性表述写什么?

Grails - schema configuration

How can I configure Grails (in DataSource.groovy file) to use specific schema that a given username has access to, but it is not necessarily the default schema for that user. Thanks

JNDI Names -- Is Prefix "jdbc/" needed?

What s up with JNDI names? I m trying to get a javax.sql.DataSource using the new annotations feature of Java 5. It s not working for me, so I want to ask... I have a in my web.xml, inside of it is ...

热门标签