Hi Ulsa, I'm going to describe what I'm doing.
I need to use transaction for LDAP now (after a time, I'm going to incorporate JDBC transactions, so in the future I'm going to have two transactions: LDAP and JDBC), I chose the programmatic manner to do transactions for LDAP, and I'm trying to use the TransactionTemplate and PlatformTransactionManager classes following the examples in http://static.springframework.org/sp...ansaction.html, but I didn't see how has to be my xml configuration. Before to use the TransactionTemplete and PlatformTransactionManager, I tried to use the ContextSourceTransactionManager and ContextSourceAndDataSourceTransactionManager class but I saw that I had the same problem with my xml configuration, because I think that I mixed the programmatic and declarative manner, and I don't know how has to be my xml configuration for programmatic manner. I know that my xml configuration is wrong because I get exceptions.
What class have I to use to do a transaction manager object? To use a TransactionTemplate object is similar or equivalent to use a ContextSourceTransactionManager or ContextSourceAndDataSourceTransactionManager object? and What changes have I to do in my xml configuration for the programmatic manner?
When I used the ContextSourceTransactionManager class for PlatformTransactionManager, I did the follow manner:
Code:
ContextSourceTransactionManager txManager = (ContextSourceTransactionManager)context.getBean("myDataAccessObject");
and, for the TransactionTemplate class:
Code:
TransactionTemplate tt = (TransactionTemplate)context.getBean("contextSourceTarget");
I don't know if is correct use "getBean", I assume that is the manner for get the context of xml and initialize the transaction object.
I hope that was understandable my explanation, thank you