transactions

Any issues with join hints in a SQL Server 2000 view?

I have some ad-hoc reporting users hitting some SQL Server views. Occasionally the read locks taken by these users for particularly lengthy queries causes trouble elsewhere in the system. I am considering adding some strategic with(nolock) hints to the views but wanted to know if there are any gotchas associated with hints in views. P...

Mutlithread-safe JDBC Save or Update

We have an interesting problem: We have a JMS queue of job statuses, and two identical processes pulling from the queue to persist the statuses via JDBC. When a job status is pulled from the queue, the database is checked to see if there is already a row for the job. If so, the existing row is updated with new status. If not, a row is c...

WAIT in Transaction - Firebird

Hi all, Can we set the index active when another transaction is in progress. Will firebird wait till the other transaction completes its operation and the index will become inactive/active (this is for reindexing) after that ? Thank you. Regards, Sabu ...

Preserve Autoincrement ID Within MySQL Transaction

I have two MySQL database tables that are meant to hold data for eshop orders. They're built as such (extremely simplified version): CREATE TABLE `orders` ( `id` int(11) NOT NULL auto_increment PRIMARY KEY (`id`) ); CREATE TABLE `order_items` ( `id` int(11) NOT NULL auto_increment, `orderID` int(11) NOT NULL, PRIMARY KEY (`id`)...

EJB3/DB2 Transactions not rolling back.

Hello all, I have a situation where I have a tree of Entities, and a Session Bean. The Session Bean simply persists or merges the entities, and the method in question is marked as @TransactionAttribute(TransactionAttributeType.REQUIRES_NEW). Now in the case that a child entity fails to be persisted/merged due to (for example) a foreig...

Transactional File Access and Caching in JBoss AS 5

We need to locally store a cache on a File System through JBoss 5. The files we need to store are big (~50 Mbyte) and there are many consumer (through WS on JBoss) that read these files and one producer (JBoss Biz Logic) that creates the last one. Because there are concurrent read and write problems, I would like to know if there is a ...

NServiceBus and NHibernate - Message Handler and Transactions

From my understanding NServiceBus executes the Handle method of an IMessageHandler within a transaction, if an exception propagates out of this method, then NServiceBus will ensure the message is put back on the message queue (up X amount of times before error queue) etc.. so we have an atomic operation so to speak. Now when if I inside...

When should I consider using a in memory database and what are the issue to look out for?

I was just think that now it is common to have enough RAM on your database server to cache your complete database why are the specialist in memory database (e.g TimesTen, see also Wikipedia page) that were all the rage a few years ago not being used more? It seems to be that as time go on, none disk based databases are being used less...

How do you prevent database changes inside a Rails ActiveRecord before_create filter from getting rolled back when it returns false?

I've added a before_create filter to one of my Rails ActiveRecord models and inside that filter I'm doing some database updates. Sometimes I return false from the filter to prevent the creation of the target model, but that is causing all the other database changes I made (while inside the filter) to get rolled back. How can I preven...

Atomic increment of a counter in django

I'm trying to atomically increment a simple counter in Django. My code looks like this: from models import Counter from django.db import transaction @transaction.commit_on_success def increment_counter(name): counter = Counter.objects.get_or_create(name = name)[0] counter.count += 1 counter.save() If I understand Django c...

Long-running transactions structured approach

I'm looking for a structured approach to long-running (hours or more) transactions. As mentioned here, these type of interactions are usually handled by optimistic locking and manual merge strategies. It would be very handy to have some more structured approach to this type of problem using standard transactions. Various long-running i...

Hibernate 2nd level cache invalidation when another process modifies the database

We have an application that uses Hibernate's 2nd level caching to avoid database hits. I was wondering if there is some easy way to invalidate the Java application's Hibernate 2nd level cache when an outside process such as a MySQL administrator directly connected to modify the database (update/insert/delete). We are using EHCache as...

No Hibernate Session bound to thread

I'm using Struts + Hibernate + Spring for my project development. And here is my Spring Context XML file. When I called "sessionFactory.getCurrentSession()" in the beginning of userDao.getXXXX method, the exception whose detail message is "No Hibernate Session bound to thread, and configuration does not allow creation of non-transactiona...

transparent png using wpf in VS2008

Hi, I want make a UI that is semi transparent in WPF VS2008, so I made my form transparent and I want to show a semi transparent png (Which includes "holes") on top of it. How do I show the semi transparent png? Semi transparent, meaning it has holes you can see through. Also how can I get this done in C#, without using WPF. Thanks. ...

How to make a trasanction cover several stored procedure ?

I need to include several stored procedure in a single transaction in a single database, if any of stored procedure fail then roll back transaction of all stored procedure procesed in the scope. I work with SQL-SERVER 2008 ...

MSDTC problem with transactions in ADO.NET Entity Framework

Hi, in our current project we are using ADO.NET Entity Framework as data layer for the application. There are some tasks which require to run in a transaction because there's a lot of work to do in the database. I am using a TransactionScope to surround those tasks. using (TransactionScope transactionScope = new TransactionScope(Transa...

jBPM + Spring transactions sharing and scope

Hi all. I've inherited an app using jBPM and Spring and am trying to figure out if it is configured the way it should be. First question: Does jBPM span a single JTA (JDBC and/or Hibernate) transaction across multiple actions in the same transition by default? If not, can it be configured to? So in the example below is there a way to sp...

Power failure and Oracle data recovery

Database is OracleXE and here is the problem: data gets entered in tables UPS does not survive power shock Oracle server reboots after power failure everything seems normal after some time we realize that some data is missing from few tables (this is ok, because all inserts happened in one transaction), and some data seems like half-c...

Spring @Transactional read-only propagation

I'm experimenting with using the command pattern to allow my web layer to work with Hibernate entities within the context of a single transaction (thus avoiding lazy loading exceptions). I am, however, confused now with how I should deal with transactions. My commands call service layer methods that are annotated with @Transactional ann...

What is the best Clustering or Distributed System solution for Java applications

What are the best approaches to clustering/distributing a Java server application ? I'm looking for an approach that allows you to scale horizontally by adding more application servers, and more database servers. What technologies (software engineering techniques or specific technologies) would you suggest to approach this type of pro...