Hi,
I have a business object whose methods I want to execute transactionally, except for one method. The object is proxied by a TransactionProxyFactoryBean declared in the Spring config file. Let us say the object is Foo and the methods are bar0, bar1, bar2, etc. bar0 has the attribute PROPAGATION_NOT_SUPPORTED and the rest of the methods have the attribute PROGAGATION_REQUIRED. bar0 and bar1 read data from the MS SQL Server database db1 and bar2 reads data from the both db1 and another MS SQL Server database db2.
Now I have this sequence of calls within another object's method:
Foo foo = .. (get foo bean from the config file)
foo.bar0();
foo.bar1();
Where in Foo, I have
public void bar0() {
// Read some data from db1
...
}
public void bar1() {
// Read some data from db1
....
this.bar2();
}
public void bar2() {
// Read some data from db1
...
// Read some data from db2
...
}
In the line where bar2() reads data from db2, I get this exception:
javax.transaction.xa.XAException: [Microsoft][SQLServer 2000 Driver for JDBC][SQLServer]Import of MSDTC transaction failed: Result Code = 0x8004d00e.
So, the read from the second database fails.
We have another instance in the application where we read data from the second database using a method with PROPAGATION_NOT_SUPPORTED and it works. The SQL Server seems to be OK.
So, does anyone know why the transaction would fail in this case?
Thanks in advance.


Reply With Quote
