transactions

What happens if you don't roll back a transaction in Hibernate?

Everything I read about Hibernate states that you must roll back a transaction and close the session when an error occurs, and there's usually some variation of the following code (taken from Hibernate's docs) given as an example: Session sess = factory.openSession(); Transaction tx = null; try { tx = sess.beginTransaction(); //...

Handle NService bus messages without DTC

We are not using DTC in our message handlers. We turned off. NService bus endpoint transaction set to false. But in the distributor getting the following exception if DTC is disabled. May I know how to handle messages without DTC. 2010-08-27 14:28:34,953 [Worker.7] ERROR NServiceBus.Unicast.Transport.Msmq.MsmqTransport [(null)] - Error ...

mysql timeout error in rails 3 when using delete_all and make! in step definition

I'm using following construct in a cucumber step definition. Given "I have following stuff" do Model.delete_all list.each { |i| Model.make!(:name => i) } end (make! is from machinist 2). Above step fails with INSERT statement timeout. When I open up a console for test, environment, I can execute each statement without an issu...

drupal credit card security

what are the best security features (settings,modules) provided by drupal according to credit card transaction?. Do you have any additional prevention techniques .If possible post important and necessary setting points also please. ...

Problem with using transaction in delphi when calling to MS SQL SERVER 2008 R2 ?

I need to call some Stored Procedures from Delphi and because they are related I have to use transactions. But It always returns an error when called : 'Transaction cannot have multiple recordsets with this cursor type. Change the cursor type ,commit the transaction, or close one of the recordsets.' And this error only occurs for...

How expensive is committing a hibernate transaction?

Hi, I have a the following use case where I'm receiving a message via JMS regarding an entity, via a unique property of it (not PK) and it requires me to update the state of the entity: HibernateUtil.beginSession(); HibernateUtil.beginTransaction(); try{ Entity entity = dao.getEntityByUniqueProperty(propertyValue); if (ent...

Spring.Net using transactions in web and in service

I am looking for a way leverage a current DAL in a web app that uses Spring.Net (managed transactions leveraging OpenSessionInViewModule) in a Windows Service. Currently I am getting this error "No Hibernate Session bound to thread, and configuration does not allow creation of non-transactional one here" in the Windows Service. Is ther...

how to lock the database transtion from c#

hi, let say I am developing the transaction base application in c# and asp.net. transaction is of type money and data with sql server database. then how can i manage the scenario in terms of security? ...

EJB 3.0 transaction boundary calling one local EJB from another

Imagine the following two ejb3.0 stateless session beans, each implements a local interface and they are deployed to the same container: public class EjbA { @EJB private ejbB; public void methodA() { for (int i=0; i<100; i++) { ejbB.methodB(); } } } public class EjbB { public void m...

Isn't NHibernate's "one session per request" pattern a bit dangerous for long web requests?

In the company I work for, we're using a NHibernate session wrapper that disposes all the sessions opened in the current web request at the end of the same request, and commits all the associated transactions (we're working in a multi-database environment, and we create a session for every database). Also, in the session wrapper we're u...

LINQ + WCF + Transactions

I have a relatively simple use case which is failing. Consider the following code: [OperationBehavior(TransactionScopeRequired = true)] public IEnumerable<StatusRecord> ReadActive(int contactID, bool isActive) { var result = from n in ORM.Default.Table<StatusRecord>() where n.lng_contact_id == contactID && n.dte_effec...

Nhibernate transaction level during persist help

Hello. I have a question. Imagine you'd have an object you'd want to save in a transaction, the object having collections of other objects etc so its a more "complex" object. Anyway, sometimes we save objects like that, but in the meantime, we use another thread that occasionally reads said data and synchronizes them up to our central ...

Using paypal pro for repeat nonrecurring charges

Is there anyway to use paypal pro to allow a customer to make repeat purchases without setting up a recurring payment. The use case is a customer who does not have a paypal account enters payment info once for a purchase. When they return to the website, it would be nice if they didn't have to enter payment details again. This is poss...

Oracle Transactions doesn't work as expected in some client machines in a .net windows application

Hi. I have an windows application in VB.NET (2.0) and Oracle Database, the connections are handled by System.Data.OracleClient. My oracle client is 10g. In the server side, the AutoCommit is off. The application uses transtactions (isolationLevel: ReadCommitted) for certain operations. The problem is that in some machines (and only in...

JMS / ActiveMQ Transaction Timeout

I've been having problems with setting the transaction timeout for ActiveMQ. I want to set the timeout on a message so if it isn't committed within a certain period, then rollback() is then called. I'm not sure whats the best way to go about this - whether it is set on the activemq configuration or it is done at the time the message is...

.NET TransactionScopes and SQL 2005 Lightweight Transaction Manager - Multiple Connections same SPID?

Hi Can someone shed light on what is happening behind the scenes with the SQL Lightweight transaction manager when multiple connections are opened to the same DB? With the below code, we verified that MSDTC is indeed not required when opening 'multiple connections' to the same database. In the first scenario (where Txn1 and Txn2 use E...

TransactionScope with IsolationLevel set to Serializable is locking all SQL SELECTs

I'm using PowerShell transactions; which create a CommittableTransaction with an IsolationLevel of Serializable. The problem is that when I am executing a Transaction in this context all SELECTs are blocked on the tables affected by the transaction on any connection besides the one executing the transaction. I can perform gets from withi...

when to roll back a jdbc transaction

I have been reading an interesting statement in http://download.oracle.com/javase/tutorial/jdbc/basics/transactions.html The interesting part is: "Catching an SQLException tells you that something is wrong, but it does not tell you what was or was not committed. Since you cannot count on the fact that nothing was committed, calling the ...

NHibernate, Transaction rollback and Entity version

At the moment im trying to implement code that handles stale state exceptions (ie, another user has changed this row etc.. ) nicely when im committing a transaction using nhibernate. The idea is to, when the exception occurs when flushing, to roll back the transaction, "fix" the entities through different means, then rerun the whole tran...

Temporary tables and transactions in sql 2005

I write app in c#. I use temporary tables inside transaction. My server is sql 2005. Is there any performance threat, I read somewhere that using temporary tables inside transactions should be avoided ( http://www.sql-server-performance.com/tips/temp_table_tuning_p1.aspx post at the bottom of the screen added at 2-24-2003 ). ...