rollback

JPA transaction rollback fails with call to stateless bean

眉间皱痕 提交于 2019-12-23 12:54:40
问题 Inside a BMT (using a UserTransaction ) I call a method on another stateless EJB. When I rollback this transaction, the entity created in the EJB method is not rolled back. I use EJB 3.1 with JPA 2.0. The transaction begins in method doTheTransaction() : @Stateless @LocalBean @TransactionManagement(TransactionManagementType.BEAN) public class TaskExecutor { @Inject private SomeEntityFacade someEntityEJB; @Inject private RandomEJB randomEJB; @Resource private UserTransaction ut; @Asynchronous

Spring @Transactional wont rollback after putting aspect around method

冷暖自知 提交于 2019-12-23 05:37:07
问题 I have two transactional methods one inside other. When around aspect is not set around methodA Transactional anotation work well. After calling methodA we call methodB, methodB write something in DB, then we return in methodA, throw an exception and then methodB roolback. But when I put my aspect around methodA, methodB wont rollback. I cant figure out what is happening there. I tried many combination of propagation attributes but none seems to work. Thanks in advance. I use Spring 2.5.4 I

JDBC Transaction control in Sybase

旧街凉风 提交于 2019-12-23 02:44:14
问题 Need help in JDBC transaction control mechanism in JAVA. Issue: There are certain stored procedures in our Sybase DB that needs to be run on Unchained mode. Since we are updating our data on two different databases (unfortunately, both Sybase) we need to be able to rollback all our previous transactions, if there is any failure. But running with Unchained Mode (Auto commit - on) is not helping us with the rollbacks as some of the SPs have already committed the transactions. Connection

How to rollback nHibernate transaction when an exception occurs during request having Ninject for managing sessions?

浪子不回头ぞ 提交于 2019-12-22 14:53:51
问题 I use nHibernate for ORM and Ninject for IoC. I create nHibernate sessions per some custom scope (which you can assume is per request). I begin the transaction onActivation. I commit the transaction onDeactivation. The problem is that if an exception happens during the request I want to rollback the transaction rather than committing it. Any idea how to detect (in a clean way, most probably using Ninject Context) that an exception has happened? Note: I am not concerned about the exceptions

SQL Server 2008 Transaction, rollback required?

ⅰ亾dé卋堺 提交于 2019-12-21 04:27:23
问题 I have a stored procedure that has a BEGIN TRANSACTION and COMMIT TRANSACTION statement. Within the transaction is a select query WITH(XLOCK, ROWLOCK) . The transaction can potentially fail due to some calculations that cause an arithmetic overflow error if out of bounds values are supplied. This error would happen before any insert/update statements. My question is, should I wrap the transaction in a TRY/CATCH and rollback or is this not really required and all locks would be released

Rollback multiple commits (before Pushed to public) in Mercurial

时光毁灭记忆、已成空白 提交于 2019-12-21 03:23:07
问题 I am aware that rollbacks can remove commits from the latest changeset in a local repository. However, is it possible to remove all the latest commits since the previous push without having to re-clone the share repository? 回答1: You could make a new repo with hg clone: hg clone -r last_good_changeset localrepo newlocalrepo 回答2: You can use the hg strip command, part of the mq extension: hg strip REV This will remove that revision + all its descendants. Before you try this, make a copy/clone

In mercurial, how do I apply a reverse-patch to a particular file?

痞子三分冷 提交于 2019-12-20 10:26:53
问题 Related to Mercurial: Merging one file between branches in one repo , I'm trying to perform a backout operation on a single file, even though that file was one of many participants in the revision being backed out. HG being the changeset-oriented tool that it is, it doesn't want to operate on files. Closest I could find was to use hg export to create a diff, hand-edit the diff, and then hg import to patch the file in reverse order. ..but then I hit this annoying situation where http://hgbook

In mercurial, how do I apply a reverse-patch to a particular file?

拥有回忆 提交于 2019-12-20 10:26:03
问题 Related to Mercurial: Merging one file between branches in one repo , I'm trying to perform a backout operation on a single file, even though that file was one of many participants in the revision being backed out. HG being the changeset-oriented tool that it is, it doesn't want to operate on files. Closest I could find was to use hg export to create a diff, hand-edit the diff, and then hg import to patch the file in reverse order. ..but then I hit this annoying situation where http://hgbook

What is the meaning of revert this commit and roll back this commit in GitHub for Windows?

假装没事ソ 提交于 2019-12-20 09:14:21
问题 Github for Windows features these two commands described as: revert this commit - create a new commit that reverts the changes of this commit rollback this commit - roll back this commit leaving all changes made in this and later commits in your working directory Could you explain the exact meaning of these two commands and how they can be used. Specifically I fail to understand what is the purpose of the second one. It makes no sense to me. Is it possible to revert to a previous commit check

Disable automatic rollback of InstallFiles

萝らか妹 提交于 2019-12-20 05:48:10
问题 I've implemented my first MSI-Installer with WIX-Toolset 3.6 which includes Custom Actions for Backup , Installation and Rollback . The Backup and Installation works fine, but I have a problem with my Rollback Custom Action. I have defined my Custom Actions like this: <!-- Custom actions --> <CustomAction Id="CA_Install" Return="check" BinaryKey="BIN_CaLibrary" Execute="deferred" DllEntry="CaInstall" /> <CustomAction Id="CA_Rollback" Return="check" BinaryKey="BIN_CaLibrary" Execute="rollback"