transactions

Multiple Connections With Same Connection String Under A Single Transaction, Elevated Transaction?

蓝咒 提交于 2019-12-18 07:06:22
问题 When using ado.net, and creating multiple connections to a MS SQL Server database within a single transaction (using System.Transactions.TransactionScope), does System.Transactions elevate the transaction from the lightweight transaction manager to the distributed transaction coordinator (kernel transaction coordinator on Vista), even if the connection strings are the same for all of the connection objects? The documentation is somewhat ambiguous on this specific situation. It says the

mySQL - Table locking vs Row locking

萝らか妹 提交于 2019-12-18 06:53:47
问题 Application Description I have a table which stores id's which represent area's on a map. Each map contains 1000 areas. A territory is any number of area's of a map that are touching . Users fight for ownership of different areas of the map. Database Design Currently I have a table of maps, a table of territories and a table of areas. tblMaps: MapID, MapName tblTerritories: TerrID (unique game wide), MapID, OwnerID, Status, Modified tblAreas: AreaID (1-1000), TerrID At the moment tblAreas

mySQL - Table locking vs Row locking

て烟熏妆下的殇ゞ 提交于 2019-12-18 06:52:51
问题 Application Description I have a table which stores id's which represent area's on a map. Each map contains 1000 areas. A territory is any number of area's of a map that are touching . Users fight for ownership of different areas of the map. Database Design Currently I have a table of maps, a table of territories and a table of areas. tblMaps: MapID, MapName tblTerritories: TerrID (unique game wide), MapID, OwnerID, Status, Modified tblAreas: AreaID (1-1000), TerrID At the moment tblAreas

Spring batch - One transaction over whole Job

让人想犯罪 __ 提交于 2019-12-18 05:07:15
问题 I am using Spring-Batch to execute a batch that creates some objects in the database, creates a file from these objects and then sends the file to a FTP server. Thus, I have 2 steps : One that reads conf from DB, insert into the DB and creates the file ; the second sends the file to the FTP server. The problem is when there is a problem with the FTP server, I can't rollback the transaction (to cancel the new inserts into the DB). How can I configure my Job to use just one transaction over the

Spring+Jersey transactional annotation

拈花ヽ惹草 提交于 2019-12-18 04:47:11
问题 Created boilerplate project to expose RESTful API to JPA enabled database. It's using the following versions: - Spring 3.2.6 - Hibernate 4.3.0 - Jersey 2.5.1 I finally was able to get them playing together, but still some question remains. Here's one of the most puzzling things (see excerpt from REST service class) @Service @Path("resources") @Produces({ MediaType.APPLICATION_JSON }) @Consumes({ MediaType.APPLICATION_JSON }) @Transactional public class ResourceServices extends

Android Package manager has died with TransactionTooLargeException

我怕爱的太早我们不能终老 提交于 2019-12-17 23:37:02
问题 My app reads the list of all installed APK files, and then loop through the list to read the APK info, however it throws a TransactionTooLargeException exception. From what I have read here http://developer.android.com/reference/android/os/TransactionTooLargeException.html, google recommends to break large transactions into smaller transactions. However it seems this happens in the middle when looping through the APK list. If I catch the exception and continue it, the rest all works fine. Is

Transactions and sqlalchemy

孤者浪人 提交于 2019-12-17 23:08:56
问题 I am trying to figure out how to insert many (in the order of 100k) records into a database using SQLAlchemy in Python 3. Everything points to using transactions. However, I am slightly confused as to how that is done. Some pages state that you get a transaction from connection.begin() , others places say it is session.begin() and this page here says it is session.create_transaction() which doesn't exist. Here is what I am trying to do: def addToTable(listOfRows): engine = create_engine(

Weblogic Transaction Timeout : how to set in admin console in WebLogic AS 8.1

[亡魂溺海] 提交于 2019-12-17 22:27:45
问题 I face the following exception: weblogic.transaction.internal.TimedOutException: Transaction timed out after 300 seconds this is set within the Stateless Session EJB Bean as javax.transaction.UserTransaction jtaTransaction.setTransactionTimeout(300) but I cannot figure out, where in the application console to set this property. 回答1: After logging in, on the home page of the Server Console you should see 3 sections: Information and Resources Domain Configurations Services Configurations Under

Starting new transaction in Spring bean

主宰稳场 提交于 2019-12-17 21:43:54
问题 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 @Transactional(propagation = Propagation.REQUIRES_NEW . It seems that Spring "ignores" the REQUIRES_NEW annotation and does not start a new transaction. I believe

Are long-living transactions acceptable?

三世轮回 提交于 2019-12-17 20:59:57
问题 I am thinking about using transactions in 2-tier WPF (or windows forms) applications in following way: We can begin new transaction when we open new form for editing data, edit and persist changes transparently in this transaction. Then we can click "OK" button and commit transaction, or "Cancel" button and rollback it. If we want to open another dialog window with this data, we can use nested transactions. The question is: Is this way of using transactions acceptable or not? I know that