|
From: Alef A. <al...@jt...> - 2004-02-04 23:25:23
|
There's an issue that just came up with the TransactionManager. I haven't spend enough time on it to fully figure it out, but before I dig into it further, maybe you guys can give an opinion: When using a DataSourceTransactionManager, in a bean I'm asking the applicationcontext for the transactionmanager. After calling setRollbackOnly() is doesn't rollback. I've reproduced this using petclinic, by implementing ApplicationContextAware in AbstractJdbcClinic and in one of the store*** methods calling: PlatformTransactionManager mgr = (PlatformTransactionManager)appCtx.getBean( "transactionManager"); // does this give me the current transaction??? mgr.getTransaction(null).setRollbackOnly(); AFAIK this should result in a rollback, shouldn't it... Thanx, Alef P.s. we're doing this because of some legacy code that needs to rollback as well. We can't reimplement it right now... |