java - Spring transaction management txAdvice -


I have got some problems while configuring the Spring Transaction Manager on which I am working, there is a layered architecture. Therefore there is a service level with all transaction services in it I wanted to rollback the transaction for spring when there was an investigation (application specific) exception. I was doing this by annotation:

@ Transactional (value = "transaction DDS", for rollback = "throbable")

This fix But since I have so many services, I want to transfer this configuration to XML (Spring DAO Reference File). I did this:

  & lt; Tx: advice id = "txAdvice" transaction-manager = "transactionManagerDds" & gt; & Lt; Tx: blames the account & gt; & Lt; Tx: method name = "*" read-only = "false" promotion = "required" rollback-for = "throwable" /> & Lt; / Tx: Explains responsible & gt; & Lt; / Tx: Advice & gt; & Lt; Aop: config & gt; & Lt; Aop: pointcut id = "transRollbackOp" expression = "execution (* fr.def.iss.ult.moduleManagement.service.dds. *. *. * (..))" /> & Lt; High: Advisory Advice-Riff = "TxAdvis", Bindoot-Riff = "Transistorback Op" /> & Lt; / Aop: config & gt; & Lt; Bean id = "transactionManagerDds" class = "org.springframework.jdbc.datasource.DataSourceTransactionManager" & gt; & Lt; Property Name = "Data Source" Ref = "BinDataSourceFactor" / & gt; & Lt; Qualifier value = "transactionDds" /> & Lt; / Bean & gt;  

So basically, I'va is a transaction manager who is associated with a consultation that rolls back to possible ways when a throbbling exception occurs. And this advice is linked to an AOP configuration, the way we specify all the interfaces in the service layer of the application on which this transaction configuration is applied. But this does not work, the transaction does not roll back. Throwable exception occurs. I do not understand that it works with annotations but not with declarative configurations in XML

I'm really keen on your suggestions. I'm completely blocked Plz help me in Thanx in advance

  & lt; Aop: config & gt; & Lt; Aop: pointcut id = "transRollbackOp" expression = "execution (* fr.def.iss.ult.moduleManagement.service.dds. *. *. * (..))" /> & Lt; High: Advisory Advice-Riff = "TxAdvis", Bindoot-Riff = "Transistorback Op" /> & Lt; / Aop: config & gt;  

Your & lt; Aop: config / & gt; The expression you entered is invalid, it should contain a white space between at least * and fr.def . . * * *. Instead of * * * * * , I recommend writing code * * * * * * * which selects all the sections in all the subpages, whether in depth.

Execution (* fr.def.iss.ult.moduleManagement.service.dds .. *. * (..)) to work it out in fewer changes in your expression needed .


Comments

Popular posts from this blog

java - Can't add JTree to JPanel of a JInternalFrame -

javascript - data.match(var) not working it seems -

javascript - How can I pause a jQuery .each() loop, while waiting for user input? -