I have a special case Model which must not become part of an outer transaction:
Outer.Transaction do
...
Inner.create(:blah)
...
end
How do I stop Inner becoming part of the transaction, assuming Inner should know nothing about which specific transaction it is getting pulled into?
For example, creating an inner transaction is...
I created a transaction in a stored procedure with some update statements. What will happen if the transaction is running, and one select request the value from the updating table?
...
Hi,
Could anyone direct me as to whether there is a special way of sending images (specifically .jpeg files) across a tcp socket? So far I am developing a webserver that seems to send all the text data well. When it comes to jpeg images, the headers are sent however, the Cygwin console just freezes when it comes to sending the actual da...
I have an application using Tomcat/Spring 3/JPA/Hibernate but my merges do not commit to
datbase. This is the configuration:
spring-conf.xml:
<bean id="dataSource"
class="org.springframework.jdbc.datasource.DriverManagerDataSource">
<property name="driverClassName" value="com.mysql.jdbc.Driver" />
<property name="url" value="jd...
Asp.Net Pipeline
Transaction Management in .Net/Sql Server
...
Hi,
I'm calling a third party stored procedure in Oracle from VB that is not rolling back.
Code first (I'm simplifying):
Connection string:
String sqlstr = "SERVER=x.x.x.x;Database=db;uid=sa;pwd=admin;Connect Timeout=60; Min Pool Size=5; Max Pool Size=100;";
The call (I've just forced a rollback immediately after the execute to tes...
Hi;
class MyService {
public void a() {
synchronized(somekey) {
b();
}
}
@Transactional(propagation = Propagation.REQUIRES_NEW)
public void b() {
...do DB works...
}
}
My aim is
1 - get the key
2 - start transaction
3 - commit transaction
4 - release the key
When i call a() method from outsid...
My spring definition regarding trasnsaction are defined as following:
<bean id="txInterceptor" class="org.springframework.transaction.interceptor.TransactionInterceptor">
<property name="transactionManager" ref="transactionManager"/>
</bean>
<aop:config>
<aop:pointcut id="defaultServiceOperation"
ex...
I have a scenario that I commonly run into. It's simple to do with a
standard ADO Transaction, but not so much with NH (that I know of).
I have 2 tables to update. The first contains profile information
(Profile) and the other (Work) contains records changes that need to
be made and the status of those changes. For each update to the...
Hi,
I want to make transactional a series of sp call (sql server 2005) in a .net 2.0 project surrounding some piece of business logic with a
using(TransactionScope...)
Unluckily, I inherited the DAL from another project and I don't want to make many changes there..the problem is that every method that calls a stored procedure opens...
According to NHProf, the use of implicit transactions is discouraged:
http://nhprof.com/Learn/Alerts/DoNotUseImplicitTransactions
However, NHibernate LINQ returns an IQueryable<> when reading objects from the database, and this is lazily evaluated. I have this method in a repository:
public IQueryable<T> GetAll<T>()
{
using (var t...
So in the latest version of Spring we are able to use the @Configuration annotation to setup our configurations for Spring. Now in JavaConfig it is possible to use the @AnnotationDrivenTx (@AnnotationDrivenTx Reference Link) annotation to setup transactions in our Config class. But since JavaConfig has been decommissioned I was wondering...
Anybody has an idea why adding the annotation-driven declaration leads to the aopalliance classes not found. I have not explicitly defined the weaving so using Spring defaults.
Any help is appreciated
...
Hi all,
I want to know wether or not it is possible to suppress a transaction inside a SQL stored procedure. I have the following situation in my SP (that I want to achieve):
WHILE TRUE
BEGIN TRY
BEGIN TRANSACTION A
RECEIVE MESSAGE FROM SSB QUEUE WITH TIMEOUT
BEGIN SUPPRESS TRANSACTION
WHILE RECORD IN TABLE
...
Hi!
I have a @Stateless EJB with a @WebService interface, using container managed transactions, meaning transactions are automatically committed by the container after a method has been called if it doesn't throw a system exception.
If i try to EntityManager.persist(...) two objects with the same value for a column with a unique const...
What is the difference between using
using (var scope = new TransactionScope(TransactionScopeOption.Required))
{
using (ISession session = NHibernateHelper.OpenSession())
{
using (ITransaction transaction = session.BeginTransaction())
{
session.Delete(entity);
...
From the MSDN entry for TransactionCompleted:
You can register for this event instead of using a volatile enlistment to get outcome information for transactions.
Caution Signing up for this event negatively affects the performance of the transaction it is attached to.
Does anyone have an example, or even an explanation, of how...
Have you encountered this exception for a stored procedure which does indeed have a balanced transaction block?
I double-checked the stored procedure and it has exactly one TRANSACTION BEGIN and cooresponding TRANSACTION END
Error logged
SqlException - Transaction count after EXECUTE indicates a mismatching number of BEGIN and COMMIT ...
Hi all!!!
I'm inserting a value in table A, that has a serial type as primary key. I wanna use the returned value of the query as a foreign key of table B... but I get this message:
*ERROR: insert or update on table "tb_midia_pessoa" violates foreign key constraint "tb_midia_pessoa_id_pessoa_fkey" DETAIL: Key (id_pessoa)=(30) is not pre...
I've run into an issue that I'm hoping to get a little help on. I'm using the following:
Kohana 3.0.7
PostgreSQL 8.4
Transactions in PostgreSQL using
$db->query(NULL, 'BEGIN', FALSE)
$db->query(NULL, 'ROLLBACK', FALSE);
$db->query(NULL, 'COMMIT', FALSE);
The issue is that when I send a query to the database that results in a...