transactions

Java spring database application won't quit reference to org.enhydra.jdbc.pool.PoolKeeper is still active why?

Hello all I have a simple Spring application which will not end as there is still a reference left to org.enhydra.jdbc.pool.PoolKeeper. I include all the references I feel are revelant below does it look ok and has anyone experienced this before? I ran jstack to see what non daemon threads where running and found the following. "Threa...

Are single statement UPDATES atomic, regardless of the isolation level? (SQL Server 2005)

In an app, Users and Cases have a many-to-many relationship. Users pull their list of Cases often, Users can update a single case at a time (a 1-10 second operation, requiring more than one UPDATE). Under READCOMMITTED, any in-use Case would block all associated Users from pulling their list of Cases. Also, the most recent data is a h...

Transactions with TransactionScope on Sql Compact Edition 3.5

Hi, I have question I'm developing small application to desktop in win Forms. I'm using SQL CE 3.5 SP1 for the database. When I make inserts on few tables by few methods I'm using the TansactionScope. When I use this methods alone I want to use normal Transaction from database connection. Is there anyway to check in called method if...

Django transaction management

I have a django project in which database values need to be updated fairly often on their own. There's a cronjob that runs to update these values in the database, but some of the operations require atomic transactions. Does anybody know how to make a model method be a complete transaction in django without going through views? Ideally, ...

Can anyone suggest a DBMS which is fast and efficient at writes?

I have a project which is going to be write-heavy rather than read-heavy. I was wondering if anyone had any suggestions for open source DBMS setups which are quick at writes? It doesn't necessarily have to be a relational DBMS either; I'm open to suggestions. ...

How to write this in SQL?

I have one table called Visit and another called Measurement. Primary key on Visit is vis_id and it is also foreign key in table Measurement. Now I would like to write a report based on data in table Measurement on following conditions: Visit has field "itemAmount". I want only have data that has itemAmount = 2 in table Visit and both r...

How to detect transaction conflicts with Hibernate?

I am using Hibernate 2.6 with hibernate-entitymanager. I am trying to catch and handle situations when 2 transactions conflict on an object. Here is what happens: Two threads are updating a single object wich has a @Version field. The thread which looses commit race logs StaleObjectStateException on flush. The exception is not thrown, i...

How do I make my pojos transactional?

I have a multi-threaded, multi-server web application with hibernate and spring managing transactions with AOP. The problem is, I need to maintain in-memory data and keep it current with the state of the database...essentially I'm implementing an in-memory cache. Now, is there any way to make my in-memory pojos transactional on the same...

How do I make an in-memory process transactional?

I'm very familiar with using a transaction RDBMS, but how would I make sure that changes made to my in-memory data are rolled back if the transaction fails? What if I'm not even using a database? Here's a contrived example: public void TransactionalMethod() { var items = GetListOfItems(); foreach (var item in items) { ...

READ COMMITTED database isolation level in oracle

Hi there, I'm working on a web app connected to oracle. We have a table in oracle with a column "activated". Only one row can have this column set to 1 at any one time. To enforce this, we have been using SERIALIZED isolation level in Java, however we are running into the "cannot serialize transaction" error, and cannot work out why. ...

distribution transaction lock in oracle database

Hi, I have some question around transaction lock in oracle database. What I have found out so far is that: Cause: The time to wait on a lock in a distributed transaction has been exceeded. This time is specified in the initialization parameter DISTRIBUTED_LOCK_TIMEOUT. Action: This situation is treated as a deadlock and the statement ...

Is it possible combine transaction scope with committing a transaction inside a stored procedure?

We have a test that runs within a transaction scope. We dispose of the transaction scope at the end to avoid changing the database. This works fine in most cases. However, when we use Entity Framework to execute a stored procedure which contains a transaction, which is committed inside the stored procedure. We get the following error: ...

Tracking changes in SQL Server during transactions

My employer has developed a utility that will run a stored procedure line by line against a DataTable, passing the fields of each row as parameters into the Stored Procedure. This is particularly useful for automated imports. However, I now need to extend this to provide a transactional-ized version so that we can see the potential resu...

Does Oracle roll back the transaction on an error?

This feels like a dumb question, but I see the following in the Oracle concepts guide on transaction management: A transaction ends when any of the following occurs: A user issues a COMMIT or ROLLBACK statement without a SAVEPOINT clause. A user runs a DDL statement such as CREATE, DROP, RENAME, or ALTER. If the cur...

Proper way to set up transactions in Spring for different data sources?

I have an application which needs to connect to multiple databases. This is an administrative application which is basically used to manage entries in different databases - we do not need to access multiple databases simultaneously nor do we need any sort of distributed transaction management. Basically one area of the application lets ...

SubSonic Batch insert

I am familiar with SubSonic 2.2 and am coming up to speed with 3.0 and am unsure of the best way to do something. I have a CSV file that I am parsing and then inserting the records into the database. I want to be able to process the batch of inserts all at once. IE I would like to parse through the records and add them to a List inser...

How to use transactions in DotNetNuke?

I'm trying to do the most simple thing and apply a transaction to the CreatePortal method. If I'm using TransactionScope - It promotes to DTC for some unknown reason - BAD. using (var ts = new TransactionScope()) { var portalController = new PortalController(); var portalId = portalController.CreatePortal( ...

Does a transaction affect all queries?

I started a transaction using BEGIN TRANSACTION in Management Studio but I forgot to ROLLBACK or COMMIT it for about 10 minutes. I freaked out and went back to ROLLBACK my changes. Did this rollback all queries that went through the server during that time or just through my user/connection? ...

SQL guaranteed start/end index?

I (will) have hundreds of thousand of records where i insert once, never update with many rows holding the same previousId. Can i guaranteed a start/end index? where i insert X number of rows in table_c with a transaction and write the start and end (or start and length or end and length) into table_b instead of having each row hold tabl...

Preserve historical data.

I am writing a standard database-backed business application. Assume that I work with bank accounts as well as "Decisions". A decision is a choice the user takes of moving money from one account to another. Each decision is taken at a particular date. A decision can have one or more "source accounts", and each "source account" will have ...