【问题标题】:Create a local transaction inside a Spring JTA transaction在 Spring JTA 事务中创建本地事务
【发布时间】:2010-12-02 03:55:12
【问题描述】:

我想在 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)

*

【问题讨论】:

    标签: java spring jta oc4j spring-transactions


    【解决方案1】:

    为什么不能使用 Spring 的“requires new”事务注解?然后,您将获得一个新事务,如果该事务涉及单个资源,则它与“本地”事务一样好。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2015-02-04
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2014-04-08
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多