Is there a way to use EF without transaction? I have very simple single insert and don't want to roll-back when something goes wrong as there may be a trigger logging then raising error from the DB side which I have no control over. I just want to insert then catch any exceptions but don't want to roll-back.
...
I am currently retrieving both a UserTransaction and a DataSource from a Weblogic 10.3 server using JNDI.
I have set the Datasource up to 'Support Global Transactions' and to use 'Logging Last Resource'
My hope was that by beginning a UserTranscation and then retrieving a JDBC connection from the Datasource the connection would partici...
I have one process which creates a database entity and then launches a second process. It then waits on the second process to find and update the database entity before completing its processing, and thereby committing the database entity. The trouble seems to be that since the initial process which performed the entity creation has no...
I just read a fantastic article about WCF transactions and flow. Pretty much only left me with one unanswered question:
I have a single project with two service methods defined:
ServiceA.svc
[OperationBehavior(TransactionScopeRequired = true)]
OperationA()
ServiceB.svc
[OperationBehavior(TransactionScopeRequired = true)]
...
I'm using Ayende's NHibernate Linq version 2.1.2, available here, and when I use NHProf to inspect queries that use this method:
public IQueryable<T> GetAll()
{
return Session.Linq<T>();
}
It gives me the warning that I'm using an implicit transaction. Problem is, I'm using this in a repository to abstract out the database session...
I have three database operations like so:
public void Add<T>(T entity)
{
using (var transaction = Session.BeginTransaction())
{
if (entity is IEnumerable)
{
foreach (var item in (IEnumerable) entity)
{
Session.Save(item);
}
}
else
{
...
I have a list of Channels. I need to use an available one of these if there is one and allocate it to a session. If no available ones are left over I need to create a new one and allocate it to the session, and let the calling routines know that it is a new Channel.
I have the following implementation, which seems to work, but I was won...
Consider the following perl code:
$schema->txn_begin();
my $r = $schema->resultset('test1')->find({id=>20});
my $n = $r->num;
$r->num($n+1);
print("updating for $$\n");
$r->update();
print("$$ val: ".$r->num."\n");
sleep(4);
$schema->txn_commit();
I'm expecting that since the update is protected by a transaction, then if two proc...
In our application, there's a database update that is committed only after a consequent update is being executed (both using the same transaction, of course). However, we've discovered a rare flow in which the user exits the application before the second update, causing the first to be discarded. I'm looking for a way to recognize this u...
I am looking at the Activty Monitor for SQL Server 2005 and we have some processes that are taking up large amounts of the CPU. When I look at what is trying to be run I get:
set transaction isolation level read committed
This code is not coming from any of our applications.
What is causing it?
What should be done?
...
If I want to select all records in a table that have not been processed yet and then update those records to reflect that they have been processed, I would do the following:
SELECT * FROM [dbo].[MyTable] WHERE [flag] IS NULL;
UPDATE [dbo].[MyTable] SET [flag] = 1 WHERE [flag] IS NULL;
How do I ensure that the UPDATE works on only th...
I have seen a number of different cftransaction examples and read different sites and still have not been able to find a definitive answer to what parts of cftransaction are necessary. What I am trying to accomplish is very simple:
start a transaction
run multiple inserts/updates
close the transaction
If there is an error at any time...
I am using hibernate, trying to simulate 2 concurrent update to the same row in database.
Edit: I moved em1.getTransaction().commit to be right after em1.flush(); I am not getting any StaleObjectException, the two transactions committed successfully.
Session em1=Manager.sessionFactory.openSession();
Session em2=Manager.sessionFactory....
I'm using MySQL and PHP.
Running this transaction:
begin;
....
commit;
How should I judge whether it failed in PHP?
...
<context:annotation-config/>
<context:component-scan...
this is used for class that i need to annotated with @Repository @Service @Component...
<context:spring-configured />
<context:component-scan...
use if i need to use @Configurable
<tx:annotation-driven transaction-manager="transactionManager" />
<context:component-sc...
I have 2 databases (MySql and HSQLDB). I configured 2 data sources and 2 EntityManagerFactory beans. I can also configure 2 correspondent JpaTransactionManager beans.
But I don't know how to specify which of them should be used to manage transactions for concrete service-class. I want to use @Transactional annotation for that purpose, ...
Hi,
we are using linq-to-sql in a desktop project? How should we handle transactions? What about using transaction scope?
...
I'm building a sinatra Ruby app that interacts with Jambool Social Gold API (a virtual currency platform).
After a transaction is complete (the user purchases points) Jambool sends a "postback" to "foo.com/postback?signature=foo".
The API documentation says that it expects an OK response in the body of the postback (after I validate th...
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 op...
I am using DBExpress with blackfish.
How can I do multi Transaction?
I have several GRIDs all in editing at once and all will have to be saved at once.
The begin editing and post are to be determined by the end user, as he works, and in different place of the application, so difficult to do in one only transaction.
UPDATE:
OK the pr...