Questions tagged [transactions]

A set of interrelated operations that must all succeed in order for any of them to succeed. Failure of any operation results in a rollback of all operations in the transaction.

In computer science, transaction processing is information processing that is divided into individual, indivisible operations, called transactions. Each transaction must succeed or fail as a complete unit; it cannot remain in an intermediate state.

Transaction processing is designed to maintain a system's Integrity (typically a database or some modern filesystems) in a known, consistent state, by ensuring that interdependent operations on the system are either all completed successfully or all canceled successfully.

Since most, though not necessarily all, transaction processing today is interactive the term is often treated as synonymous with online transaction processing

16096 questions
6
votes
4 answers

Weird behaviour for transactions in django 1.6.1

I am using transaction.atomic as a context manager for transactions in django 1.6. There is a block of code which I want to be in a transaction which has a couple of network calls and some database writes. I am seeing very weird behaviour. Every…
tapan
  • 1,776
  • 2
  • 18
  • 31
6
votes
1 answer

Does the JIRA REST API require submitting a transition ID when transitioning an issue?

If I POST an issue transition like this: { "fields" : { "resolution" : { "name" : "Fixed" } } } ...I get this error: { "errorMessages" : ["Missing 'transition' identifier"], "errors" : {} } This seems to…
user565869
6
votes
1 answer

Open and Close Cursors Inside or Outside a Transaction and How to Close a Cursor if a Transaction Fails

I am writing a stored procedure in SQL Server 2012 that uses a cursor for reading and a transaction inside a TRY CATCH block. Basically, my questions are as follows: Should I declare my cursor inside the TRY CATCH block? If yes, should I declare…
HydroPowerDeveloper
  • 3,302
  • 7
  • 31
  • 38
6
votes
4 answers

Hibernate - CMT EJB using programmatic transaction idiom

What happens when the following programmatic transaction and session idiom is used with within CMT (EJB3) and Hibernate Core is set up to use CMT? Assumed a current CMT transaction is required and started using default…
djmj
  • 5,579
  • 5
  • 54
  • 92
6
votes
3 answers

Override transactional method

I have method M with @Transactional in service A. I have service B extends A with overrided method M. Will be overrided method M still transactional? Or I should add there @Transactional?
nemocean
  • 159
  • 2
  • 14
6
votes
2 answers

PayPal $0 Dollar Transaction?

I have a client who wants a paypal shopping cart. All of the services have "Buy Now" buttons, all with different prices. However, there is one service, which is a FREE 0 dollar service. The client wants the "Buy Now" button to remain there, to be…
Alex
  • 61
  • 1
  • 2
6
votes
1 answer

How to determine whether SqlConnection is enlisted into a System.Transactions' tx or not?

When we using a transation from System.Transactions (creating TransationScope for an instance) by default all Sql-connections (System.Data.SqlClient.SqlConnection) (but is't also the true for Oracle.DataAccess.OracleConnection) are enlisted on…
Shrike
  • 9,218
  • 7
  • 68
  • 105
6
votes
1 answer

Database table remains locked, if client process is killed after transaction start

I have a C# application which manipulates data in a table within a SQL Server database using transactions. The code is very simple and basically goes like this: public string ConnectionString; public OleDbConnection DbConnection; public…
Software Craftsman
  • 2,999
  • 2
  • 31
  • 47
6
votes
1 answer

pg_prepare: cannot insert multiple commands into a prepared statement

I have 2 tables, TableA and TableB. TableB has a fk field pointing to TableA. I need to use a DELETE statement for TableA, and when a record in it is deleted I need to delete all records in TableB related to that record in TableA. Pretty…
Hikari
  • 3,797
  • 12
  • 47
  • 77
6
votes
3 answers

DynamoDB: mapper and transactions using java SDK

I am developing a project in Java, and I am using the AWS SDK. I am using Dynamo DB. I am using the mapper, and it is very useful for me because I can perform basic operation directly on a java entity. Recently, I have seen the library that allows…
Ulisse
  • 483
  • 1
  • 7
  • 14
6
votes
1 answer

Ensuring a transaction within a method with ActiveRecord

I have a situation in which I would like a method to work within a transaction, but only if a transaction has not already been started. Here's a contrived example to distill what I'm talking about: class ConductBusinessLogic def…
Chris Vincent
  • 258
  • 3
  • 13
6
votes
3 answers

Update multiple records in one ActiveRecord transaction in Rails

How can I update/save multiple instances of a model in one shot, using a transaction block in Rails? I would like to update values for hundreds of records; the values are different for each record. This is not a mass-update situation for one…
Avishai
  • 4,512
  • 4
  • 41
  • 67
6
votes
2 answers

How do you find out what Exception caused the CDI Transaction Rollback?

We are using CDI with CMT (container managed transactions) to connect to the database in the web app and mark methods called from the front-end that require a transaction with: @Transactional(value=TxType.REQUIRES_NEW) This will create a new CDI…
rachekalmir
  • 614
  • 1
  • 8
  • 17
6
votes
2 answers

@Transactional does not work on method level

I have a question about Spring 3.2.3 @Transactional annotation. My Service class looks like this: @Service @Transactional class InventoryDisclosureBO { @Autowired InventoryDisclosureDAO inventoryDisclosureDAO; private static final Logger log =…
never
  • 671
  • 1
  • 6
  • 18
6
votes
6 answers

Stuck in a django south migration - TransactionManagement error

I am having a trouble when applying a django south migration: As always, I executed the migrate command after a successful schemamigration python manage.py migrate webapp The log console: Running migrations for webapp: - Migrating forwards to…
Miquel
  • 858
  • 11
  • 20