transactions

is there a difference between a select statement inside a transaction and one that is outside of it

I was just wondering if that default READ COMMITTED isolation level somehow makes the select statement act different inside of a transaction than one that is not in a transaction, anybody knows ? I am using MSSQL ...

spring transactional cpool. Which one do I use?

I originally set up spring with xapool, but it turns out that's a dead project and seems to have lots of problems. I switched to c3p0, but now I learn that the @Transactional annotations don't actually create transactions when used with c3p0. If I do the following it will insert the row into Foo even through an exception was thrown insi...

Transaction error while updating data

Following error occurs while updating a particular data in my web application.I am using HibernateTransactionManager to manage all transactions in the application. Error:- Pre-bound JDBC Connection found! HibernateTransactionManager does not support running within DataSourceTransactionManager if told to manage the DataSource...

error while implementing spring transaction

I am new to springs. i want to implement JtaTransactionManager in my application instead of HibernateTransactionManager.But i am get following error when i write the following code in my xml. <bean id="transactionManager" class="org.springframework.transaction.jta.JtaTransactionManager"/> On server start up following error occur...

How can I test if the DBI driver state is within a transaction?

I've got a couple of methods that should be executed only in the case my DBI driver class is currently into a transaction to ensure data integrity. I'm looking to write something like this: sub m{ my ($self , $dbh ) = @_ ; unless( $dbh->isInTransaction()){ die "Use this only within a transaction\n" ; } etc ... } From the ...

Spring transaction manager error: Transaction MARKED_FOR_JOINED after isOpen() call

What does the following error message mean? Googling for MARKED_FOR_JOINED doesn't return any useful information. ERROR org.hibernate.AssertionFailure.<init>(AssertionFailure.java:47): an assertion failure occured (this may indicate a bug in Hibernate, but is more likely due to unsafe use of the session) org.hibernate.AssertionFailure: ...

How to save in Transaction?

Consider this scenario; suppose I have WPF window which have four objects bonded to its controls (Schedule, Customer, Contract, ScheduleDetails and Signer specifically ) which represent four database tables in the backend database. I want when the user request save for the information he/she entered to be joined in atom operation in anot...

On the google app engine, how do I implement database Transactions?

I know that the way to handle DB transactionality on the app engine is to give different entities the same Parent(Entity Group) and to use db.run_in_transaction. However, assume that I am not able to give two entities the same parent. How do I ensure that my DB updates occur in a transaction? Is there a technical solution? If not, is ...

ASP.NET: Proper implementation of nested API calls using connection pool and nested transactions

I need to know the best way to do the following. I have nested business level APIs (say level 1 & level 2). L1 needs to call L2. Both APIs use the database layer directly at their own nesting levels. Now, in the database layer, I fetch the db connection from the pool each time as follows: SqlConnection conn = new SqlConnection(conn...

How to do locking in SQL Server like MYSQL

Hi all, I'm converting a webapp from mysql to SQL Server. Now I want to convert the following code (this is a simplified version): LOCK TABLES media WRITE, deleted WRITE; INSERT INTO deleted (stuff) SELECT stuff FROM media WHERE id=1 OR id=2; DELETE FROM media WHERE id=1 OR id=2; UNLOCK TABLES; Because I'm copying stuff which is goin...

How should I integrate SqlTransaction legacy code with TranactionScope?

I have an existing application that uses a lot of SqlTranaction calls. The way the application is built we get a bunch of code that looks a bit like this (error handling etc removed for brevity): Using transaction As SqlTransaction = Database.CreateSqlTransaction() If Not Me.FitnessSession.FitnessTestSessionID.HasValue Then ...

How can I do the reverse of a regular PayPal transaction? (Pay out to the customer rather than them paying us)

How can I do the reverse of a regular PayPal transaction. The only information I found in their documents was for the customer to pay us for things. What if we want to pay out the customer? Is there a way to give a transaction type to reverse and pay out to the customer instead of them paying us? Update: Turns out you can use Mass Paym...

What differences do I have to take into account if using MySQL Transactions?

I was recently told that I should use transactions in my application as they can help run code quicker and prevent MySQL code from executing before a whole page has loaded (e.g. if someone is just refreshing on my page and the whole page doesn't load, no MySQL calls will start and it reduces load on the server.) I'm wondering if I wante...

Using NHibernate transaction in SqlBulkCopy

I'm storing some data using NHibernate, and I need to insert huge amount of data as a part of this action - i.e. in the same transaction. Code looks like this: using (ISession session = NHibernateHelper.OpenSession()) using (ITransaction transaction = session.BeginTransaction()) { session.SaveOrUpdate(something); // ... Sq...

Master-Detail with jqGrid+Asp.Net MVC and transaction

Hi, I'm coming from the delphi world and I want to make a master/detail interface, like Order and Products. I already made actions to display the data using fields and a jqGrid. What I want know is how make possible to add lines, edit or remove them, but, just make the changes in db when the user confirm the changes in the master. On del...

SQL server transactions in PHP

I'm trying to grasp the idea of transactions fully. Therefore the following question... (ofcourse newbie, so don't laugh :D ) I have set up a (simplified) transaction in PHP (using the PHP SQL driver from microsoft). I want to get the rows I'm going to delete for some extra processing later: sqlsrv_begin_transaction($conn); $sql = "SEL...

TSQL Snapshot Isolation

Using SQL2k5, I have a staging table that contains columns that will populate numerous other tables. For instance, a statement like this: INSERT INTO [appTable1] ([colA], [colB]) SELECT [appTable1_colA], [appTable1_colB] FROM [stageTable] A trigger on [appTable1] will then populate the identity column values of the newly inserted ...

Should I put my faith in SQLite transactions to avoid file corruption?

Short version If my process is terminated in the middle of a transaction, or while SQLite is committing a transaction, what are the chances that the database file will be corrupted? Long version My application uses an SQLite database for storage (directly, not via Core Data). I'm working on a new version of the application which will ...

How to check if i am in a transaction?

I have a piece of code i recently expanded but now must use a transaction. It looks like it can only be access while in a transaction but looks like doesnt make me feel comfortable. Using SQLite and ADO.NET i wrote if(cmd.Transaction==null) but it is null and in a transaction. How should i check? NOTE: I will be using this code with TSQ...

How to check if my transactional methods really support transactions?

I'm using Spring 3.0, and I have a set of methods like this: @Transactional (value = "authTransactionManager") public void remove(User user) { ... } I use 2 different transaction managers and specify necessary manager (authTransactionManager in example above). I was curious what would happen if I specify nonexistent manager. I ...