In my first experiments with JBossCache I'm using it in standalone mode with
the dummy Tx manager. The cache is populated with simple "ProductVO" objects
having three primitive attributes (two numbers and a String).
I'm having two threads starting one after another (I tried time intervals
around 20-50ms) . The first one updates an entry in prepopulated cache. The
update consists of calling cache get and then updating the object attributes;
the change is intercepted by the cache and replicated. Both get and change are
within a user transaction context like
UserTransaction tx = new
DummyUserTransaction(DummyTransactionManager.getInstance());
tx.begin();
try {
ProductVO p = (ProductVO) cache.getObject(prodNode(prodId));
p.setPrice(newPrice); //AOP interception
tx.commit();
} catch (Exception e) {
tx.rollback();
}
The second thread reads the same record. The problem is that sometimes the
"getter" thread returns the old value before the transaction commits, and
sometimes the new one. The tran isolation level is read_committed (or higher,
it does not matter).
I tried both v. 1.2 and earlier versions with the same results..
View the original post :
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3859940#3859940
Reply to the post :
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3859940
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://productguide.itmanagersjournal.com/
_______________________________________________
JBoss-Development mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jboss-development