简体   繁体   English

在ejb 2.0中记录数据库事务

[英]Database transactions logging in ejb 2.0

I need some help i re-designing a application. 我需要重新设计应用程序的帮助。 I will explain the scenario. 我将解释这种情况。 My application is built on ejb 2.0 and oracle. 我的应用程序基于ejb 2.0和oracle构建。

During transaction(X) at nth step there was a exception then we just serialize the required object in the catch block and start a new transaction(Y) after a specified time period from the nth step. 在第n步的transaction(X)期间发生异常,然后我们只是在catch块中序列化了所需的对象,并在第n步指定的时间段后开始了新的transaction(Y)。 But while reaching to nth step the transaction (X) had performed some db updates/inserts/deletes . 但是在到达第n步时,事务(X)已经执行了一些db update / inserts / deletes。 But these all get rolled back with the transaction (X). 但是这些都随事务(X)一起回滚。 we want to get a log of all those updates and re perform all those with our new serialized object in just one step . 我们希望获得所有这些更新的日志,并只需一步就可以使用我们的新序列化对象重新执行所有这些更新。 can you suggest some way to do it ?? 你能建议一些方法吗?

There is no support in the EJB programming model for recording and playing back a sequence of events. EJB编程模型不支持记录和回放一系列事件。 You will have to build the infrastructure to track this yourself. 您将必须构建基础结构来自己进行跟踪。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM