在 Spring JTA 事务中创建本地事务
我想在 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
为什么不能使用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.