[
http://jira.jboss.com/jira/browse/JBCACHE-674?page=comments#action_12339742 ]
Ben Wang commented on JBCACHE-674:
----------------------------------
Further thoughs on this issue. It is really difficult to implement a callback mechanism
for pojo update callback. For one, I can't differentitate what is field and what is
whole pojo update.
So one workaround maybe just to document the usage that if the clustering node are all
active (e.g., each node can do attach simultaneously), the best practice is then:
cacheA.attach("1", pojo1);
pojo1 = cacheA.find("1");
cacheB.attach("1", pojo2);
pojo2 = cacheB.find("1");
that is, after doing attach, we will always do another find again to retrieve the latest
version. If it has been updated, PojoCache will recontruct the POJO instance. If not, the
operation will return right away.
PojoCache to handle simultaneous pojo attach on the clustering nodes
--------------------------------------------------------------------
Key: JBCACHE-674
URL:
http://jira.jboss.com/jira/browse/JBCACHE-674
Project: JBoss Cache
Issue Type: Task
Security Level: Public(Everyone can see)
Components: PojoCache
Reporter: Ben Wang
Assigned To: Ben Wang
Fix For: POJOCache
Original Estimate: 1 week
Remaining Estimate: 1 week
Currently we don't handle cases with active attachment of pojo on all clustering
nodes. For example,
cacheA.attach("1", pojo1);
cacheB.attach("1", pojo2);
pojo2 will overwrite pojo1 but pojo1 will still have cache interceptor attached to it. So
solution will have to be some sort of check dirty mechanism when any POJO operation is
called. But this will introduce more overheads.
Still need to gather more use case for this.
--
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