Hi,
Could please anybody tell me If it is safe and recommended to catch SQL and other exceptions within @Transactional methods ? When programmatic transaction management is used, I can simply catch the exception and do whatever I want, but I don't know if I don't break the transactional AOP system by catching these exceptions that would...
Do we have to have to enable MSDTC to use TransactionScope?
I am using TransactionScope and I had error message telling me that the MSDTC not enabled. So I have enabled it.
Why am I having this error message? Is that normal? What`s MSDTC use?
Is transactionScope SQLSecver specific?
...
This syntax does not produce unique values across different Fetch Groups:
@Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
private long id;
So I've written the method below to simulate generating a database sequence for my Order model. But what I'm not sure about is what the transactional state needs to be configured as here ...
Can anyone help me on how this error came up
There is already an open DataReader associated with this Connection which must be closed first.
the error fails when it trying to read this code.
transConn = mySqlConn.BeginTransaction(IsolationLevel.ReadCommitted)
Is there is a connection between the Datareader and in initializing the tr...
Hi all,
I tried to use several transactions in Doctrine (v1.2.2).
Here my test:
// Open a new database connection
$cnx1 = Doctrine_Manager::connection('mydsn'); // $cnx1 will be named '0'
// Open a second database connection
$cnx2 = Doctrine_Manager::connection('mydsn'); // $cnx2 will be named '1'
// Start a transaction on connection...
I have existing project which uses 2 database (DB2),and the records which are saved in the 2 databases are related.So the transactions need to be maintained.Eg whenever a new thing is to be added then entries must be done to x number of tables in Database1 and and y number of tables in database2.
Now in the code that is preexisting(devel...
Hi,
What is the preferable way to write Delphi database applications using transactions and also data-aware components?
I have to write a client app that access InnoDB tables, and do some master-detail kind of things inside transactions. After doing some research on transactions (from general point-of-view), then I humbly make a conclu...
Hi
Have a transaction in a grails Service class on which a rollback flag is set:
TransactionAspectSupport
.currentTransactionInfo()
.transactionStatus
.setRollbackOnly()
what happens is that when we return to the Controller an exception:
org.springframework.transaction.UnexpectedRollbackE...
Subquestioning SQL - when should you use “with (nolock)”
In one local financial institution I was rebuked by their programmers for expressing them my opinion that (their programmers' obsession with) (b)locking issues in their MS SQL Server 2005 database(s) did not make much sense to me.
What are the possible issues with possible locki...
I'm building RESTful web service, and I want to allow it to participate in distributed transactions.
An example scenario would be that my REST service might save a file on a server somewhere, and at the same time the caller marks this file as saved in its database. However, if either the file server is full, or if his database call f...
We know that there are some scenarios that require us to implement transactions in code, such as SqlTransaction/TransactionScope in .Net framework. The questions are:
What are the overheads (besides
speed)?
Does it gets worse if we add more
layers between the transaction and
the DB? If yes, then what are the
overheads and what cause ...
Hi all,
I'm using the following code in sql server 2005.
BEGIN TRANSACTION;
CREATE TABLE dbo.MyTable
(
idLang int NOT NULL IDENTITY (1, 1),
codeLang nvarchar(4) NOT NULL
) ON [PRIMARY];
IF @@ERROR = 0
BEGIN
PRINT 'before_commit';
COMMIT TRANSACTION;
PRINT 'after_commit';
END
ELSE
BEGIN
PRINT 'before_rollback';
ROLLBACK...
Edited Question : I am working on a multithreaded JMS receiver and publisher code (stand alone multithreaded java application). MOM is MQSonic.
XML message is received from a Queue, stored procedures(takes 70 sec to execute) are called and response is send to Topic within 90 sec.
I need to handle a condition when broker is down or appli...
I have a unit test for some code that occasionally throws a "The transaction has already been implicitly or explicitly committed or aborted." exception. Google gives me lots of wonderful hits but none that I've read seem to apply.
If I run the unit test locally the exception is never thrown.
If I run it on the build server manually the...
I'm using Spring 2.5 transaction management and I have the following set-up:
Bean1
@Transactional(noRollbackFor = { Exception.class })
public void execute() {
try {
bean2.execute();
} catch (Exception e) {
// persist failure in database (so the transaction shouldn't fail)
// the exception is not re-thrown
}
}
Bean2
...
My code:
mysql_query("SET AUTOCOMMIT=0");
mysql_query("START TRANSACTION");
insert_query, update_query1, update_query2
mysql_query("COMMIT");
update_query3
Why does update_query3 query doesn't work if I put it after COMMIT? It works if I put it before the COMMIT. Why is that? It's really strange.
Thank you
...
What is the general pattern or approach to managing transactions in a web-based e-commerce system? How do you handle the situation where more than one user tries to buy the last item, for example?
...
How to make transaction using IB Expert? I need a manual or something like
begin transaction
create table someTable(a int,b int)
insert into someTable values(1,2)
insert into someTable values(3,4)
commit transaction
but working in Firebird to see the syntax.
...
Currently on some operations I have to delete the old data and insert new one. But I noticed that inspite of deleting data the identity column did not reset and continued from its last max value. So i used the DBCC CheckIdent for achieve the same all this is taking place within a trasaction. Can i rollback the transaction back to the int...
hello
i'm a beginner java developer and this is one question in a list i'm posting since i've started porting a very old web service . I'm trying to improve the access to db and i'm finding a lot of code i believe migth be dangerous, but being not so experienced with java i cannot be sure .
Actually i've a class which manages the db conn...