[jboss-jira] [JBoss JIRA] Updated: (JBCACHE-695) PojoCache transaction rollback has limitation under certain transaction context
Ben Wang (JIRA)
jira-events at jboss.com
Mon Aug 14 22:58:17 EDT 2006
[ http://jira.jboss.com/jira/browse/JBCACHE-695?page=all ]
Ben Wang updated JBCACHE-695:
-----------------------------
Fix Version/s: 2.0.0
(was: PojoCache)
> PojoCache transaction rollback has limitation under certain transaction context
> -------------------------------------------------------------------------------
>
> Key: JBCACHE-695
> URL: http://jira.jboss.com/jira/browse/JBCACHE-695
> Project: JBoss Cache
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: PojoCache
> Reporter: Ben Wang
> Assigned To: Ben Wang
> Fix For: 2.0.0
>
>
> Currently PojoCache supports transaction rollback. For instance,
> cache.attach(id, pojo);
> is transactional even if there is no user transaction. However, with user transaction,
> tx.begin();
> cache.attach(id, pojo);
> pojo.setAge(20);
> tx.rollback();
> the replication is rollbacked but the in-memory copy is not, e.g., pojo.getAge() == 20. There is a workaround if you are using transaction by yourself:
> // Just make sure this one succeeds first.
> tx.begin();
> cache.attach(id, pojo);
> tx.commit();
> // All subsquent field update will be transactional then.
> tx.begin();
> pojo.setAge(20);
> tx.rollback();
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the jboss-jira
mailing list