transactions

How to store offline transaction data in Java Card

会有一股神秘感。 提交于 2019-12-25 05:01:10
问题 I am new to Java Card development. I have created a Java Card applet for online payment.. But I couldn't find way to how to do offline transactions. I need to know how to store offline data (such as the balance) in Java Card. Is there any way to use file structure to store data? 回答1: For offline transactions it is required that you store the data in persistent memory. Moreover, updates to this persistent memory should be atomic . This means that if a transaction is in progress and there is a

TransactionScope with IsolationLevel set to Serializable is locking all SQL SELECTs

*爱你&永不变心* 提交于 2019-12-25 04:55:26
问题 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 within the transaction but not anywhere else. This includes SSMS and other cmdlets executions. Is this expected behavior? Seems like I'm missing something... PS

Isolated ADO.NET connection and transaction within a transactionscope

♀尐吖头ヾ 提交于 2019-12-25 04:44:18
问题 Background: I have an ASP.NET MVC application that wraps controller actions in a TransactionScope using an Action Filter. Further downstream (in my infrastructure layer); I'd like to open up a new ADO.NET connection (to the same db as my outer TransactionScope, if that is relevent) and have it participate in its own transaction - without being tied to the current TransactionScope started at the controller level; how do I go about doing this? 回答1: You pass in TransactionScopeOption.RequiresNew

I get 2014 Cannot execute queries while other unbuffered queries are active when doing exec with PDO

梦想与她 提交于 2019-12-25 04:38:32
问题 I am doing a PDO::exec command on multiple updates: $MyPdo->setAttribute(PDO::MYSQL_ATTR_USE_BUFFERED_QUERY,true); $MyPdo->exec("update t1 set f1=1;update t2 set f1=2"); I am doing it inside a transaction, and I keep getting the following error: SQLSTATE[HY000]: General error: 2014 Cannot execute queries while other unbuffered queries are active. Consider using PDOStatement::fetchAll(). Alternatively, if your code is only ever going to run against mysql, you may enable query buffering by

Transaction propagation SUPPORTS leads to “HHH000326: Cannot join transaction” warning

断了今生、忘了曾经 提交于 2019-12-25 04:28:16
问题 We are using JPA (Hibernate 4) with Spring 4 managing the JTA transactions. To allow lazy initialization even when simply reading from the database without any transaction we added the "OpenEntityManager" pattern. However with this pattern active, Spring tries to join the already open entity manager to a SUPPORTS transaction as well ( EntityManagerFactoryUtils.doGetTransactionalEntityManager ). Hibernate however denies this request with a (somehow misleading) warning: WARN: HHH000326: Cannot

Transaction Isolation level Massive number of Writes

a 夏天 提交于 2019-12-25 04:14:10
问题 I may be talking nonsense but: Which isolation level is "best" for lots of Threads running on lots of connections, executing lots of updates and writes using transactions? Or isolationlevels are only for reads? --EDIT DBMS ... InnoDB mysql... best.. well what i want is to run parallel transactions of writes/updates, and if for example we have two updates on the same Column, i do not whant to get concurrency problems... so parallel writes/updates, which all run with locking on the database -

Firebird and Entity Framework Transaction Rollback

心不动则不痛 提交于 2019-12-25 03:46:09
问题 I need to use a Transaction Scope with Entity Framework 4 and a Firebird database. I am using the FireBird Entity Framework provider. My problem is that once SaveChanges has been called on an object, the data is persisted to the database, instead of when transactionScope.Complete() is called. This results in data never rolling back, even if an exception occurs inside the using (TransactionScope ...) block. This seems to be a problem with the FireBird DB, I have tested the exact same code with

VB.NET - Transaction rollback

孤街浪徒 提交于 2019-12-25 03:39:18
问题 What happens if a transaction is neither committed nor rolled back. I am looking for answers for SQL Server and/or Oracle. Please see the code below: Public Sub TransactionTest() Try Dim intCount As Integer Dim sql As SqlTransaction Dim objCon As New SqlConnection("Data Source=IANSCOMPUTER;Initial Catalog=Test;Integrated Security=True;MultipleActiveResultSets=true") objCon.Open() Dim trans As SqlTransaction trans = objCon.BeginTransaction Dim paramValues(0) As SqlParameter paramValues(0) =

JMeter Synchronizing requests and Synchronizing Timer

主宰稳场 提交于 2019-12-25 03:39:10
问题 I want to archive that various transaction controller(TA) with containing HTTP requests are always fired at the same time for each loop. Currently, he's just sending the first TA synchronized and the second one varies between 1-5 sec. JMeter Setup: Thread Group: 5 Threads, 0 Ramp up, 5 Loops Synchronizing Timer: 0 and 30000 Timeout Result View Results in Table(Filtered with Excel for Transaction Controller) 回答1: You're misusing Synchronizing Timer. If you want to group samplers you need to

Making sure JPA commits my transaction before another service accesses the data

[亡魂溺海] 提交于 2019-12-25 03:34:22
问题 It feels so simple: I have a ViewScoped bean (JPA2 + EE6 + Seam3, if that matters) where the user of the web application can invoke a method like this: public void save() { doEntityManagerStuff(); // manipulates data in the database callRemoteWebservice(); // which is to read said data and propagate it to other systems } Unfortunately, save() starts a transaction at the opening curly bracket and doesn't commit it before the closing bracket , meaning that the new data is not available to the