-
1. Re: transaction and replication in one application
belaban Aug 20, 2005 2:50 AM (in response to mica)There's a unit test that tests SERIALIZBLE, please run it first to check whether this works with JOTM
-
2. Re: transaction and replication in one application
mica Aug 22, 2005 12:15 PM (in response to mica)could you specify which unit test do you mean? You use SERIALIZABLE mode in most unit tests.
-
3. Re: transaction and replication in one application
belaban Aug 22, 2005 12:57 PM (in response to mica)ConcurrentTransactionalTest is one of them, but I guess there are more.
-
4. Re: transaction and replication in one application
mica Aug 22, 2005 8:31 PM (in response to mica)ConcurrentTransactionalTest uses Local CacheMode and I'm more concerned about replication. SyncReplTXTest also uses SERIALIZABLE mode, but it runs both TreeCache from the same process. What I'm trying to do is to perform similar test, but with two TreeCache in different processes.
It seems, that if I run it with JOTM obtained through JNDI it doesn;t work. Namely what I do is:
1) Without any explicit transaction in process A put value "1" for key "a".
2) Start transaction in process A, modify key "a" and wait.
3) Start process B and obtain value for key "a", which appears to be null.
4) Start transaction in process B and modify key "a".
If I understand the problem well, both steps 3 and 4 should wait until the transaction in process A ends. And of course obtaining value from "a" should not return null.
Of course without transactions cache replicates correctly.
Can it be a problem with cache? -
5. Re: transaction and replication in one application
belaban Aug 23, 2005 3:13 AM (in response to mica)Yes, with isolation level SERIALIZABLE, B should wait accessing "a" (either read or write) until A completes. There are unit tests that do exactly that, also for the replicated case. Look under org.jboss.cache.replicated.
If you don't find one, it would be nice if you could submit a unit test that shows the problem.