[jboss-jira] [JBoss JIRA] Created: (JBCACHE-769) JDBCCacheLoader should not directly serialize a map passed to put

Brian Stansberry (JIRA) jira-events at jboss.com
Thu Sep 14 23:05:41 EDT 2006


JDBCCacheLoader should not directly serialize a map passed to put
-----------------------------------------------------------------

                 Key: JBCACHE-769
                 URL: http://jira.jboss.com/jira/browse/JBCACHE-769
             Project: JBoss Cache
          Issue Type: Bug
      Security Level: Public (Everyone can see)
          Components: Cache loaders
    Affects Versions: 1.4.0.SP1, 1.4.0, 1.3.0.SP3, 1.3.0.SP2, 1.3.0.SP1, 1.3.0, 1.2.4SP2, 1.2.4SP1, 1.2.4, 1.2.3
            Reporter: Brian Stansberry
         Assigned To: Manik Surtani
            Priority: Minor


If a user calls TreeCache.put(Fqn, Map), the passed in Map gets passed to JDBCCacheLoader.put() which then directly serializes it to the database.  Then if a later put(fqn, key, value) comes in and the cache loader needs to deserialize the node data, the Map that was originally passed in gets deserialized and directly modified with the new key/value.

Problem here is if the map originally passed in as an UnmodifiableMap, the update will fail.  Customer reported this happening.  FileCacheLoader didn't have the problem, as it makes a copy of the map before serializing.

Solution is to do what FileCacheLoader does and make a defensive copy of the map before serializing.

The other cache loaders should be checked as well.

-- 
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