-
1. Re: Tyrex doesn't work
araujo Oct 11, 2002 6:16 AM (in response to vinny)Hi,
i have exactly the same problem.
Have you find a solution to this problem ?
Thanks
.david -
2. Re: Tyrex doesn't work
azakkerman Oct 14, 2002 3:40 PM (in response to vinny)Can you provide a stack trace?
I may take a look at it if I have time. -
3. Re: Tyrex doesn't work
vinny Oct 15, 2002 8:10 AM (in response to vinny)I found a problem. Problem occures because JBoss bug #610392. In order to fix this bug in MarshalledInvocation.writeExternal()
we need to filter content of as_is_payload map and don't
write transaction objects.
I fix it - it seems working (on distributed transaction
with Tyrex transaction manager).
If anybody want my fix - write me on vinny5@rambler.ru.
Best regards,
Igor Vinnikov -
4. Re: Tyrex doesn't work
melaraj Nov 15, 2002 12:45 AM (in response to vinny)Igor,
Please post the resolution. We are having exactly this issue. I think JBOSS 3.0.X should start shiping with tyrex as the default transaction manager.
Thanks,
Manuel -
5. Re: Tyrex doesn't work
melaraj Nov 19, 2002 3:50 PM (in response to vinny)Although the code changes I got from Igor cause the error to go away tranasctions are not being completed correctly. If one of the beans calls setRollback only, the rest of the bean's changes to the databases are commited. The tyrex plugin for JBOSS is not working correctly. What is the point of a J2EE server that supports clustering if it does not support distributed transactions? I am sure this is going to become and important issue. Is anyone from development reading these threads?
Manuel -
6. Re: Tyrex doesn't work
slaboure Nov 20, 2002 5:57 AM (in response to vinny)For the pure Tyrex thing, Anatoly seems to be your man. As for clustering, most (if not all) deployments do not use distributed transactions (and this not only with JBoss, but with WL, etc.): they are much much slower, and may have strange consequences at the db level. Furthermore, very few DBs have a correctly implemented XA driver.
I don't remember the URL, but a few times ago there was a very nice article about this issue on Borland web site written by one of their app server lead architect.
Consequently, use homogeneous deployments and deploy everything everywhere.
Cheers,
sacha
P.S.: BTW, Tyrex doesn't fully implement a 2PC DTM. I don't think that transaction logging and recovery is implemented. -
7. Re: Tyrex doesn't work
vinny Nov 22, 2002 4:32 AM (in response to vinny)In standard Tyrex implementation I found some problems, so standatd Tyrex version cause some errors where it works with JBoss. I constantly found some problems in it implementation. So I found such problems:
1. Tyrex doesn't correctly works with JBoss. JBoss compares 2 transactions by equals() method. This two transactions can be equal, but use different objects in case of distributed call and restoring transaction from TPC. I implemented equals() method in TransactionImpl.java
2. Error in detection of possibility 2PC. If there are some enlisted resources - one phase commit is performed.
Cause an error when I reguster my own XAResource (other XAResource was DB connect), which must rollback transaction. In this case transaction detects that can perform one-phase commit, so data in DB was commited.
I change implementation of canUseOnePhaseCommit() in TransactionImpl.java
3. Fix problem with distributed transactions. When remote invoke occurs TPC is propagated. On remote side new transaction creates (it is mould of current transaction). This new transaction registers as OTS resource in current transaction. When current transaction completes, there are determiniation of possibility one-phase-commit. If current transaction contains only one OTS resource one-phase-commit performed and all is OK. But if there are two-phase-commit, TransactionImpl.prepare() method invokes firstly. This method call prepare() for all resources, so in our case prepare() invokes for remote side transaction (mould of current transaction). Because of this transaction does not contain resources, it votes as Vote.VoteReadOnly, so current transaction determines that is read-only, so commit for resources is not performed (it is a error, because remote transaction not finished - is alive forever, so after some timeout TransactionDomain try to forget it, but can't because transaction is active). So we need to commit also in case of Heuristic.READONLY when there are no any resources.
I change prepare() method of TransactionImpl.java
4. There are problems with set of transaction timeout. The maximum value of timeout is 10min. Even if your set 2h :)), it will be only 10min. I need to more flexible setting of timout time, so I fix it too.
Also, I fix bug in JBoss clustering (solve problem with Transaction marshalling, about which I post it this thread firstly)
Possible there are other bugs in Tyrex (and in JBoss clustering too), but with this fixes, my current projects works correctly. I don't specially tested Tyrex and JBoss clustering, I implement my project and when I found bug I try to fix it. So list of bugs, possibly is not complete :) If you found any other problems, or you have questions, write my on vinny5@rambler.ru
Best regards,
Igor Vinnikov -
8. Re: Tyrex doesn't work
vinny Nov 22, 2002 5:04 AM (in response to vinny)In standard Tyrex implementation I found some problems, so standatd Tyrex version cause some errors where it works with JBoss. I constantly found some problems in it implementation. So I found such problems:
1. Tyrex doesn't correctly works with JBoss. JBoss compares 2 transactions by equals() method. This two transactions can be equal, but use different objects in case of distributed call and restoring transaction from TPC. I implemented equals() method in TransactionImpl.java
2. Error in detection of possibility 2PC. If there are some enlisted resources - one phase commit is performed.
Cause an error when I reguster my own XAResource (other XAResource was DB connect), which must rollback transaction. In this case transaction detects that can perform one-phase commit, so data in DB was commited.
I change implementation of canUseOnePhaseCommit() in TransactionImpl.java
3. Fix problem with distributed transactions. When remote invoke occurs TPC is propagated. On remote side new transaction creates (it is mould of current transaction). This new transaction registers as OTS resource in current transaction. When current transaction completes, there are determiniation of possibility one-phase-commit. If current transaction contains only one OTS resource one-phase-commit performed and all is OK. But if there are two-phase-commit, TransactionImpl.prepare() method invokes firstly. This method call prepare() for all resources, so in our case prepare() invokes for remote side transaction (mould of current transaction). Because of this transaction does not contain resources, it votes as Vote.VoteReadOnly, so current transaction determines that is read-only, so commit for resources is not performed (it is a error, because remote transaction not finished - is alive forever, so after some timeout TransactionDomain try to forget it, but can't because transaction is active). So we need to commit also in case of Heuristic.READONLY when there are no any resources.
I change prepare() method of TransactionImpl.java
4. There are problems with set of transaction timeout. The maximum value of timeout is 10min. Even if your set 2h :)), it will be only 10min. I need to more flexible setting of timout time, so I fix it too.
Also, I fix bug in JBoss clustering (solve problem with Transaction marshalling, about which I post it this thread firstly)
Possible there are other bugs in Tyrex (and in JBoss clustering too), but with this fixes, my current projects works correctly. I don't specially tested Tyrex and JBoss clustering, I implement my project and when I found bug I try to fix it. So list of bugs, possibly is not complete :) If you found any other problems, or you have questions, write my on vinny5@rambler.ru
Best regards,
Igor Vinnikov