The Spring Framework provides two means of programmatic transaction management:
1)Using the TransactionTemplate.
2)Using a PlatformTransactionManager implementation directly.
Above is mentioned at At http://static.springsource.org/spring/docs/2.0.8/reference/transaction.html
Spring site has not mentioned JDBC template here. ... |
I am currently dealing with code where there is a singleton which is used by many threads and has no state except two fields for a TransactionTemplate and a SimpleJdbcTemplate which ... |
I'm trying to create mock of TransactionTemplate
var tTemplate = MockRepository.GenerateMock<TransactionTemplate>();
var tDelegate = MockRepository.GenerateMock<ITransactionCallback>();
tTemplate.Expect(x => x.Execute(tDelegate)).IgnoreArguments().Throw(new Exception());
on last line i get NullPointerException from
at Spring.Transaction.Support.TransactionTemplate.Execute(ITransactionCallback action)
any idea what may be the reason?
|
I'm not quite sure how to formulate the question, so feel free too tell my that I am thinking completly wrong.
I want to use the JdbcTemplate and the TransactionTemplate. I start ... |
I am wondering what exactly setPropagationBehavior of the TransactionTemplate does. Who propagats what to whom? I see it is well documented but I don't grasp the basic concept of this PropagationBehavior.
The ... |
I am using a connection pool and the Spring TransactionTemplate. If you want to shutdown the connection pool first all connection have to be returned to the pool, this means connection.close() ... |
I've got a problem with a corrupted data structure due to concurrent access. I'm trying to rule out possible causes, but I'm not sure how the Spring TransactionTemplate works.
There are multiple ... |
|
Does Spring TransactionTemplate create threads? I've got a problem with a corrupted data structure due to concurrent access. I'm trying to rule out possible causes, but I'm not sure how the ... |
Question on using TransactionTemplate Hi, I am using TransactionTemplate to programatically control database transaction. I kind of copied the code from reference. Object result = tt.execute(new TransactionCallback() { public Object doInTransaction(TransactionStatus ... |
Register Help Remember Me? Forum Today's Posts FAQ Calendar Forum Actions Mark Forums Read Quick Links View Forum Leaders What's New? Advanced Search ... |
Passing parameters into TransactionTemplate I'm trying to evaluate the pros/cons of the TransactionTemplate vs PlatformTransactionManager mechanisms for programmatic transaction management. From the API and the User Guide samples, I gather there ... |
TransactionTemplate: FULL Programmatic Access Hi, everyone. Having used Spring now for several months, we have found parts of it that we like very much. Other parts we dislike, but that may ... |
TransactionTemplate newbie: what'd I do wrong? Hi, I'm a newbie to transactions and would appreciate any pointers (even reference materials). In the TransactionTemplate, I open a connection and set it to ... |
TransactionTemplate Question?? Hi I have two Dao objects extending from JdbcDaoSupport. I use programmatic transactions where i set the datasource with setDataSource method. Following is a method from my first DAO. ... |
Jan 23rd, 2008, 01:55 AM #1 haclegaspi View Profile View Forum Posts Private Message Junior Member Join Date Jan 2008 Posts 1 TransactionTemplate Rollback Problem Hi, I'm currently learning Spring - ... |
spring TransactionTemplate/JdbcTemplate work very slow under load tests hi, i work with the following environment: spring version: spring 2.0.8. data source: org.apache.commons.dbcp.BasicDataSource tx manager: org.springframework.jdbc.datasource.DataSourceTran sactionManager I use JdbcTemplate/TransactionTemplate. I test ... |
hi.. using jboss 3.2.5 , and i've been trying to use TrasnactioNTemplate with it's jta, however when i do getTransaction, i always get a Timedout transaction, i have no idea why.. ... |
I have the following beans defined in the context file. Code: ... |
private PlatformTransactionManager transactionManager; public void setTransactionManager( PlatformTransactionManager transactionManager) { this.transactionManager = transactionManager; } RuleBasedTransactionAttribute attr = new RuleBasedTransactionAttribute(); attr.getRollbackRules().add(new RollbackRuleAttribute(ArithmeticException.class)); attr.getRollbackRules().add(new NoRollbackRuleAttribute(IOException.class)); TransactionTemplate transactionTemplate = new TransactionTemplate(transactionManager,attr); transactionTemplate.execute(new TransactionCallbackWithoutResult() { protected ... |
Using TransactionTemplate in spring integration Hi, I am trying to use spring's TransactionTemplate to perform programmatic transaction management in our application's web service layer which uses spring integration framework to work ... |
Two TransactionTemplate use my single application. Dear experts, In my spring application i have used two different daos,DataSourceTransactionManager, and TransactionTemplate(module1,common1) in various places. Please find below code more info, Dao1.xml: Code: ... |