Hi guys, please help me resolve this problem:
There is an ambient MSMQ transaction. I'm trying to use new transaction for logging, but get next error while attempt to submit changes - "Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding." Here is code:
public static void Sav...
In my specific case, I am making use of a discriminator column strategy. This means that my JPA implementation (Hibernate) creates a users table with a special DTYPE column. This column contains the class name of the entity. For example, my users table can have subclasses of TrialUser and PayingUser. These class names would be in the DTY...
I'm analyzing the different behaviors between the JTA (Java Transactions API) and the .NET counterpart System.Transactions: the approach is quite different between the two of them.
In fact, Java's version of Transactions seems more a specification, leaving to developers the obligation to implement either the Transactions, TransactionMana...
Is there any truly practical way to avoid using DTOs, when passing data through Hibernate-backed transactional service methods? In other words, are DTOs the only non-hacky solution to avoiding lazy initialization problems?
I think the two popular alternatives to DTOs and the reasons I don't really like them are:
Open Session in View p...
i have looked for and compreensive article on this and have yet to find one good enough.
Can some one explain to me the workings of the transaction types?
(Required, RequiresNew, Mandatory, Never...) and mainly how these affect service calls between services with diferent types?
...
I have to insert some records in a table in a legacy database and, since it's used by other ancient systems, changing the table is not a solution.
The problem is that the target table has a int primary key but no identity specification. So I have to find the next available ID and use that:
select @id=ISNULL(max(recid)+1,1) from subscri...
I have a piece of code that involves multiple inserts but need to execute submitchanges method before I finish inserting in other tables so that I can aquire an Id. I have been searching through the internet and couldnt find how to create a transaction in linq to sql. I have put comments in the code where I want the transaction to take p...
How far does the spring framework go with transaction handling? My reading of the book "Spring In Action" suggestions with its examples that you create DAO methods that don't worry about Session and Transaction management fairly simply by setting up a session factory and transaction template in XML and then wiring them into your DAO. Spr...
I have a web application that issues requests to 3 databases in the DAL. I'm writing some integration tests to make sure that the overall functionality round trip actually does what i expect it to do. This is completely separate from my unit tests, just fyi.
The way I was intending to write these tests were something to the effect of ...
I'm getting annoyed with writing the following code all over the place in my MVC app.
using(var tx = new TransactionScope()){
blah...
tx.Complete()
}
I'd like to make this DRYer somehow.
I've thought of a couple different options for this.
An action filter to declaratively mark certain actions as transactional.
Override OnAct...
Let's say i have two tables in db: Car and Part. Car owns arbitrialy number of parts.
Because i use EJB 3.0 i have entity beans for Car and Part and Car entity bean contains list of Part objects.
I want to save new Part to db and right after that fetch from db all Cars. I exepect Part i've just added to be amongst parts associated with...
We have a Websphere JEE application that requires parallelization, for which we're looking to use CommonJ work components.
Each 'thread' would require its own view onto data coming from a database. Most of this would be pre-fetched, but it would still need to go to the database to get some. We anticipate that the duration of the overa...
It seems that Hibernate transactional cache mode requires the use of a JTA transaction manager. In an app server such as Glassfish, Weblogic, etc, Spring can use the JTA transaction manager. Tomcat does not have a JTA transaction manager.
Is there one that people use in this scenario? Or do people just not use transactional cache mod...
Suppose I am doing the following:
using (OracleConnection conn = new OracleConnection(connStr))
{
OracleTransaction trans = conn.BeginTransaction();
OracleCommand command = new OracleCommand(cmdTxt, conn, trans);
// this statement is executed in a transaction context:
command.ExecuteNonQuery();
}
// the using statement w...
This SQL (called from c#) occasionally results in a deadlock.
The server is not under much load so the approach used is to lock as much as possible.
-- Lock to prevent race-conditions when multiple instances of an application calls this SQL:
BEGIN TRANSACTION
-- Check that no one has inserted the rows in T1 before me, and th...
I'm busy building a software update application in C#, WinForms, .NET 3.5, where I have a collection of pluggable task classes with a common base class. I would like one task, the database upgrade, to begin a transaction, and another task, the web site upgrade, to commit or roll back the same transaction, so the web site and DB are alwa...
So I've got this generic DAO thing going on and at face value it appears to be ok. It's basically modeled after the CaveatEmptor sample application from the Hibernate guys.
On top of that I have a business layer...the guts of the application. It's completely unaware of any specific DAO implementation.
Everything up to this point se...
Working with SQL server with isolation level "read committed snapshot", we routinely write data to the database and read it further on in the context of the same transaction. Usually when reading from the database we see our own uncommitted changes but only committed changes made by others. We assumed that this is the expected behavior ....
This is related to the Nested Database transactions in C#.
The objects in collection I want to take in transaction implement their own transactions using SqlConnection.BeginTransaction method.
After reading this post I am not sure if I can mix those too or not.
I am using SQL Server 2005 and each object uses connection details from sta...
I am planning an application that must provide services that are very much like those of a JEE container to third party extension code. Basically, what this app does is find a set of work items (currently, the plan is to use Hibernate) and dispatch them to work item consumers.
The work item consumers load the item details, invoke third...