在 Spring JTA 事务中创建本地事务

发布于 2024-10-05 17:58:10 字数 674 浏览 0 评论 0原文

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

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)

*

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

绅士风度i 2024-10-12 17:58:10

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

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文