2010-12-02 74 views
0

我想在JTA事務中執行一個存儲過程,但由於某種原因必須使用本地事務。我創建了一個切入點,爲此使用本地事務管理器,但是異常如下所示。有沒有人有這樣的問題?你如何解決這個問題?在Spring JTA事務中創建一個本地事務

*

After increasing transaction time-out to 300, no timeout exception. But the following exception is still thrown: 
Exception [TOPLINK-23011] (Oracle TopLink - 10g Release 3 (10.1.3.3.0) (Build 070428)): oracle.toplink.exceptions.TransactionException 
Exception Description: UnitOfWork [UnitOfWork(
DatabaseAccessor(connected) 
Oracle10Platform)] was rendered inactive before associated externally managed transaction was complete. 
at oracle.toplink.exceptions.TransactionException.inactiveUnitOfWork(TransactionException.java:105) 

*

回答

0

你爲什麼不能使用Spring的 「需要新的」 交易註解?然後您會得到一個新的交易,如果該交易涉及單個資源,則它與「本地」交易一樣好。