Consider a table with 3 columns: ID (unique, taken from an Oracle sequence), CATEGORY and CODE (no constraints on these last two).
Each category has multiple codes attached to it, but the codes must be unique within that category. Example:
ID CATEGORY CODE
1 1 X
2 1 Y
3 1 Y //wrong
The ...
Hi All,
I have written a code block to do database transaction in SQL Server database. I am using TransactionScope class to rollback all the changes if any failures during the execution.
If I run the application in a system which running SQL SERVER, I have no problem.
If I run the application in a system and the SQL SERVER is running i...
I'm trying to write my Domain Model as persistence-ignorant as possible. The only thing I'm doing right now is marking every property and method virtual, as NHibernate requires that for lazy-loading.
In my domain model assembly I define some repository interfaces:
public interface IRepository<TEntity> where TEntity : EntityBase {
T...
I am pretty new to both NHibernate and CSLA.NET, and I'm running into an issue where I'm essentially needing to save the same row in the database twice, within the same transaction (and therefore, session). I've read the other questions on SO w.r.t. the NonUniqueObjectException, as well as done a lot of googling, but I can't seem to make...
Hello,
I'm attempting to test a Store Kit transaction with the iPhone 3.0 SDK. I am basing my code off the sample code in the Store Kit Programming Guide, but I keep getting failed transactions (status: SKPaymentTransactionStateFailed). However, the transaction's error property is nil, so that doesn't shed any light on the situation.
...
I am testing whether option from app.config listed below Is applied to all transactions in the application.
<system.transactions>
<defaultSettings timeout="00:05:00" />
</system.transactions>
Transaction are defined using transaction scope in following way
using (TransactionScope transactionScope = new TransactionScope(Transactio...
We are planning to use MSMQ transaction in one of our application.
I am not sure what is the maximum number of transaction we can have for MSMQ?
...
I have 2 tables (For simplicity many field where removed)
tblOrder
- OrderId
- OrderDate
- UserId
tblOrderDetail
- OrderDetailId
- OrderId
- ProductId
- Qantity
I go ahead and create my object and I want to save everything in memory in one transaction because if something fail in the order details, I don't want the order to be saved....
I'll try to describe the situation. We have a web service; on each request web service starts a JTA transaction. It performs several database calls through XA datasource within that and calls some other web services (out of transaction context) and also makes a couple of remote EJB calls on other server.
The problem is that container s...
Hello, I am working on a project which need to use .NET Transaction with DB2 server on window server 2003.
The point is when I tried to send the transaction from Vista platform to DB2 server, it show some error like this:
SQL0998N Error occurred during transaction or heuristic processing. Reason Code = "16". Subcode = "2-80004005"
...
Is there a way to get JTA transaction timeout value? UserTransaction interface has only setTransactionTimeout method. Is there a specific way of getting its value in WebLogic?
...
We are having a REST WCF service.
we want the save operation on this REST service to be in transaction.
Is there a way to pass Transaction object over the wire to REST WCF service?
...
I've built the following Dispose method for my Unit Of Work which essentially wraps the active NH session & transaction (transaction set as variable after opening session as to not be replaced if NH session gets new transaction after error)
public void Dispose()
{
Func<ITransaction,bool> transactionStateOkayFunc =
...
If we disable the 'redo logs' of a tablespace in Oracle, will they impact Hibernate's transactions?
These are the options present in the Oracle EM on a tablespace level:
Enable logging
Yes
Generate redo logs for creation of tables, indexes and partitions, and for subsequent inserts. Recoverable
No
Redo log entries are smaller, the a...
I'm running some bizarre Postgres migration code from OpenCongress and I'm getting this error:
RuntimeError: ERROR C25001 MVACUUM cannot run inside a transaction block
Fxact.c L2649 RPreventTransactionChain: VACUUM FULL ANALYZE;
So I'd like to try running it without getting wrapped by a transaction.
...
I want to make sure that if any error occurs during the database processing phase, program will know it need to roll back the whole process.
any good ORM in MFC/C++ for doing this ?
...
Hi all,
I want to use Java Transaction service for distributed transaction management in my Java application.
I have 3 different databases to which I have to connect using 3 different Connection objects. I want to insert certain data in each of the 3 databases.
My requirement is that atomicity should be maintained. So either data should...
I've got a simple bit of code that uses BeginTransaction(). The resulting transaction is assigned to the connection that I'm using for some sql commands.
When I profile the resulting sql, I don't see a BEGIN TRANSACTION at any point. What might be happening that would prevent the transaction from being used?
...
Hi!
I have 2 entities: Parent and Child in a one-to-many relationship. The Parent is versioned, i.e. has a @Version field. My goal is to synchronize changes to both Parent and Child entities on the Parent's version.
E.g. one thread updates the Parent and another one updates one of it's Childs, this should cause an OptimisticLockExcepti...
I encountered some curious behavior today and was wondering if it is expected or standard. We are using Hibernate against MySQL5. During the course of coding I forgot to close a transaction, I presume others can relate.
When I finally closed the transaction, ran the code and checked the table, I noticed the following. All the times I...