transactions

MySQL Stored Procedure Times Out When Called From C#

SP_A is a stored procedure that calls SP_B, then does a SELECT, and then UPDATES the same records/column that SP_B just UPDATED. SP_A has a TRANSACTION around the SELECT and UPDATE statements followed by a COMMIT. Now, everything works perfectly when I call SP_A from a MySQL command prompt. However, when I call it from C#, it times ou...

NHibernate with multiple databases and transactions

We are having a few problems understanding how best to use NHibernate. We typically have a relatively large number of quite small (in terms of number of tables) SQL Server databases rather than one database with a lot of objects. We are looking at various options for handling multiple session factories and probably have this under cont...

When transactionManager is not named "transactionManager" ...

I am trying Spring 3(.0.2.RELEASE) and JPA2 and Hibernate 3.5.1-Final... One thing upsets me is that spring seems only accept a transaction Manager named "transactionManager" If I don't name it "transactionManager" , Spring will throws NoSuchBeanDefinitionException: No bean named 'transactionManager' is defined. Here is my config : <c...

Why qry.post executed with asynchronous mode?

Recently I met a strange problem, see code snips as below: var sqlCommand: string; connection: TADOConnection; qry: TADOQuery; begin connection := TADOConnection.Create(nil); try connection.ConnectionString := 'Provider=Microsoft.Jet.OLEDB.4.0;Data Source=Test.MDB;Persist Security Info=False'; connection.Open(); qr...

What is "read operations inside transactions can't allow failover" ?

From time to time I got the following exception message on GAE for my GAE/J app. I searched with Google, no relevant results were found. Does anyone know about this? Thanks in advance for any response! The exception message is as below: Nested in org.springframework.orm.jpa.JpaSystemException: Illegal argument; nested exception ...

Storing task state between multiple django processes

I am building a logging-bridge between rabbitmq messages and Django application to store background task state in the database for further investigation/review, also to make it possible to re-publish tasks via the Django admin interface. I guess it's nothing fancy, just a standard Producer-Consumer pattern. Web application publishes to...

Can JPA do batch update | put | write | insert as pm.makePersistentAll() does in GAE/J

I searched through multiple discussions here. Can someone just give me a quick and direct answer? And if with JPA you can't do a batch update, what if I don't use transaction, and just use the following flow: em = emf.getEntityManager // do some query // make some data modification em.persist(..) // do some query // make some data modi...

Starting new transaction in Spring bean

We have: @Transactional(propagation = Propagation.REQUIRED) public class MyClass implementes MyInterface { ... MyInterface has a single method: go(). When go() executes we start a new transaction which commits/rollbacks when the method is complete - this is fine. Now let's say in go() we call a private method in MyClass that has @...

Flush separate Castle ActiveRecord Transaction, and refresh object in another Transaction

I've got all of my ASP.NET requests wrapped in a Session and a Transaction that gets commited only at the very end of the request. At some point during execution of the request, I would like to insert an object and make it visible to other potential threads - i.e. split the insertion into a new transaction, commit that transaction, and ...

OO Design / Patterns - Fat Model Vs Transaction Script?

Ok, 'Fat' Model and Transaction Script both solve design problems associated with where to keep business logic. I've done some research and popular thought says having all business logic encapsulated within the model is the way to go (mainly since Transaction Script can become really complex and often results in code duplication). Howeve...

How do you check individual SqlCommands ran during a SqlTransactions to see if they will run?

I've been reading up on SqlTransactions and have found a great load of examples like: http://www.devhood.com/tutorials/tutorial_details.aspx?tutorial_id=451 The problem is, when I do a BeginTransaction() (Execute all the commands) and then Commit() at the end all the commands I execute get run and the ones with syntax errors or other er...

How to read changed values with native query during one transaction? (Spring and JPA)

We have container transaction with Spring and JPA (Hibernate). I need to make an update on a table to "flag" some rows via native statements. Then we insert some rows via EntityManager from JPATemplate to this table. After that, we need to calculate changes in the table via native statement (with Oracle's union and minus, complex groups....

AUTONOMOUS_TRANSACTION: pros and cons

Can be autonomous transactions dangerous? If yes, in which situations? When autonomous transactions are necessary? ...

How do i set Savepoints for Linq to SQL and use "NO" ExecuteCommand ?

TransactionScope TransactionABC = new TransactionScope(); try { context.Connection.Open(); { context.ExecuteCommand("insert into test (test) values (1)") context.SubmitChanges(); context.ExecuteCommand("savepoint test"); context.ExecuteCommand("insert in...

Catching TransactionRolledbackLocalException in Java

I receive javax.ejb.TransactionRolledbackLocalException in Websphere 7 from the container and I wonder how is it possible to catch this exception? I have a timeout set in Websphere and get this message after this time. I run session beans. I am trying to find what SQl statement was the cause of this exception. Where can i find that? ...

NHibernate, MySQL, InnoDB and nested transactions

I'm using NHibernate to access an MySQL database using InnoDB tables. I know InnoDB doesn't support nested transactions, but I keep thinking things would have been much simpler if it did. Take a look at this method for instance.. SessionManager opens a new session per thread. If I didn't store the transaction, it previous would have bee...

Can we ask user for credit card number or paypal details,store credit card number on our server, can we use SSL in iphone application for transaction?

Can we get credit card number from user or paypal details & use them for premium service of our application ? is apple accept this application if we directly get this information & use it in our api on server for transaction. Using ssl will be accpted by apple ? I have check from 1) http://stackoverflow.com/questions/1763306/credit-c...

Using transactions with ADO.NET Data Adapters.

Scenario: I want to let multiple (2 to 20, probably) server applications use a single database using ADO.NET. I want individual applications to be able to take ownership of sets of records in the database, hold them in memory (for speed) in DataSets, respond to client requests on the data, perform updates, and prevent other applications ...

Saving an ActiveRecord non-transactionally.

My application accepts file uploads, with some metadata being stored in the DB, and the file itself on the file system. I am trying to make the metadata visible in the application before the file upload and post-processing are finished, but because saves are transactional, I have had no success. I have tried the callbacks and calling c...

LOCK TABLE as a prepared statement?

Does it make sense to prepare a LOCK TABLE statement? I'm not really concerned about efficiency here, because it would only execute once a transaction and at most a few times a minute. I'm more wondering if the concept is meaningful. I'm using the PostgreSQL JDBC driver, if it matters. ...