transactions

Wrap a LINQ datacontext and non linq stored procedure into a transaction?

Is it possible to wrap some "external" API code AND a LINQ data context into a transaction? In my case, I want to wrap the ASP.NET 2.0 Membership API calls AND my own LINQ operations into a transaction. ...

Is there a transaction time out in ADO.Net which is different from command time out.

I have a large number of command executions hapening inside a single transaction. The commands are usually small such as insert/update a single row in a table. I am recieving a timeout error no matter how high I set the command time out value in ADO.Net. I am not sure if there is a transaction time out value somewhere that I am missing. ...

Websphere transaction timeouts

When a websphere transaction times out and rollsback, one gets a message in the logs like the following:- [3/12/10 19:29:56:776 GMT] 00000010 TimeoutManage I WTRN0006W: Transaction 0000012753D8E96500000002009F4FDE1E3EDD09E83C231B61DC55BCB85DAB27C20566B00000012753D8E96500000002009F4FDE1E3EDD09E83C231B61DC55BCB85DAB27C20566B000000001 ha...

sqlite - any improvements for this attach code (running multiple sql commands transactionally in sqlite)

Hi, Is this code solid? I've tried to use "using" etc. Basically a method to pass as sequenced list of SQL commands to be run against a Sqlite database. I assume it is true that in sqlite by default all commands run in a single connection are handled transactionally? Is this true? i.e. I should not have to (and haven't got in the...

EJB containing POJO instance with transaction

I have created POJO facades to be used by Stateless EJBs. These POJO classes contains convenient CRUD methods using Entity beans with transactions. My persistence.xml is defined to use JTA. However my POJO classes is using manual transactions. I think that is the reason why I'm getting this error: "A JTA EntityManager cannot use getTran...

What is a good third party transaction API platform to use for ROR?

I have been looking at paypal for a online transaction, but I wanted to know if there are other 3rd party vendor that offer a good service at a good price ( transaction fee) and ease of use of API for ruby on rails application. ...

Using separate model methods to manage transactions

If i’ve got 2(or more) model methods which do (for example, in billing system) enrolling/withdrawing, and one controller’s method that calls 2(or more) of these model methods. Is it a good way(maybe, any suggestions how to do it better) to write/use 2model methods like these: public function start_transaction(){ $this->db->trans_s...

Transaction issue in java with hibernate - latest entries not pulled from database

Hi, I'm having what seems to be a transactional issue in my application. I'm using Java 1.6 and Hibernate 3.2.5. My application runs a monthly process where it creates billing entries for a every user in the database based on their monthly activity. These billing entries are then used to create Monthly Bill object. The process is: G...

db2 jdbc driver does not release table locks

situation: We have a web service running on tomcat accessing DB2 database on AS400, we are using JTOPEN drivers for JNDI connections handled by tomcat. For handling transactions and access to database we are using Spring. For each select system takes JDBC connection from JNDI (i.e. from connection pool), does selection, and in the end ...

How do I get save (no exclamation point) semantics in an ActiveRecord transaction?

I have two models: Person and Address which I'd like to create in a transaction. That is, I want to try to create the Person and, if that succeeds, create the related Address. I would like to use save semantics (return true or false) rather than save! semantics (raise an ActiveRecord::StatementInvalid or not). This doesn't work because ...

Why are these two sql statements deadlocking? (Deadlock graph + details included).

Hi folks, I've got the following deadlock graph that describes two sql statements that are deadlocking each other. I'm just not sure how to analyse this problem and then fix up my sql code to prevent this from happening. Main deadlock graph Click here for a bigger image. Left side, details Click here for a bigger image. Right sid...

Membership.GetUser() within TransactionScope throws TransactionPromotionException

The following code throws a TransactionAbortedException with message "The transaction has aborted" and an inner TransactionPromotionException with message "Failure while attempting to promote transaction": using ( TransactionScope transactionScope = new TransactionScope() ) { try { using ( MyDataConte...

Using Small Business Accounting API with TransactionScope

Hi I want to wrap data operations involving 2 dbs one of which is an SBA db using the SBAAPI. Several problems arise: 1. The API insists on the transaction Isolation level being Snapshot. Any other level gives and error. 2. When I use Snapshot level, I get an error "SQL Server does not exist, the service is stopped, or access is denied"...

Rails testing with factories. Transactional uniqueness problem.

I keep getting validation errors when running factories due to uniqueness constraints on fields. I am using shoulda with factory_girl. I have a both a unit test and a functional test creating 2 products in the database. I can run 'rake test:units' and 'rake test:functionals' over and over in any order and everything is will be green b...

How to force Entity Framework not to lock the database

Hi All, I'm using EF4 and .Net 4 to load some XML from a file into a database. I have a class the wraps around the ObjectContext and has methods that add the marshalled objects from the XML file to the various EntityCollections that represent my tables. Each XML file contains around 200,000 objects on average, the wrapper class create...

MySQL: Transactions across multiple threads

Preliminary: I have an application which maintains a thread pool of about 100 threads. Each thread can last about 1-30 seconds before a new task replaces it. When a thread ends, that thread will almost always will result in inserting 1-3 records into a table, this table is used by all of the threads. Right now, no transactional support...

At which line in the following code should I commit my unit of work?

I have the following code which is in a transaction. I'm not sure where/when I should be commiting my unit of work. On purpose, I've not mentioned what type of Respoistory i'm using - eg. Linq-To-Sql, Entity Framework 4, NHibernate, etc. If someone knows where, can they please explain WHY they have said, where? (i'm trying to understan...

Spring Transaction Manager

Hi. I have a j2ee application running on spring framework. I am implementing a transaction manager with AOP. It works fine. When an exception occurs in my method it is detected by my AOP configuration and rolls back the changes in the DB. But the problem is the code where you expect the error should not be surrounded with try-catch. When...

Exclude LOG4J Database Logging from AOP Transaction Rollback

Hi. I have a j2ee web application running on Spring framework. It uses Log4j for logging and Spring's AOP and Spring's transaction manager (e.g DataSourceTransactionManager) for roll-bakc during exceptions. I believe the best way to put log errors or exceptions is on the catch. So assuming I put the logging here and rethrow or bubble-up...

Transaction Isolation Level of Serializable not working for me

I have a website which is used by all branches of a store and what it does is that it records customer purchases into a table called myTransactions.myTransactions table has a column named SerialNumber.For each purchase i create a record in the transactions table and assign a serial to it.The stored procedure that does this calls a UDF fu...