开发者

Create a local transaction inside a Spring JTA transaction

开发者 https://www.devze.com 2023-01-27 18:16 出处:网络
I want to execute a stored procedure inside a JTA transaction, but have to use a local transaction instead for some reason. I\'ve create a pointcut, using a local transaction manager for this, but exc

I want to execute a stored procedure inside a JTA transaction, but have to use a local transaction instead for some reason. I've create a pointcut, using a local transaction manager for this, but exception threw as below. Did anyone have such problem? How you solve this?

*

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)

开发者_StackOverflow中文版*


Why can't you use Spring's "requires new" transaction annotation? You get then a new transaction and if that transaction involves a single resource it is as good as a "local" transaction.

0

精彩评论

暂无评论...
验证码 换一张
取 消