[jboss-user] [JBossCache] - JBoss PojoCache 2.0: Bug in CachedListImpl?

chasta do-not-reply at jboss.com
Mon Dec 11 15:57:52 EST 2006


Hi,
it seems there's a bug in the latest CVS version of PojoCache 2.0, in CachedListImpl (though it looks like it's probably a bug in another place in the code, that affects CachedListImpl). The bug causes any list which is inserted to the PojoCache to only keep its last item (all other items are discarded).

How so?

When attaching a list to the PojoCache, the CollectionClassHandler iterates through it and adds the items from the original list to the List proxy. When an item is added, CacheListImpl inserts the item at an index determined by the current size of the list (which in turn is the number of children of the node). However, the node constantly indicates it has no children - therefore, CachedListImpl.size() constantly returns 0 and all of the items in the list are inserted under '0'. (This is when working in optimistic locking mode).

What do you say? Any idea for a workaround?

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3992896#3992896

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3992896



More information about the jboss-user mailing list