[infinispan-dev] Replication of ConcurentHashMap object failure

Manik Surtani manik at jboss.org
Mon Aug 17 08:34:05 EDT 2009


Thanks for reporting this.  Looks like a bug in JBoss Marshalling.   
I've just created a JIRA for JBMAR.

	https://jira.jboss.org/jira/browse/JBMAR-68

Cheers
Manik

On 17 Aug 2009, at 12:00, Łukasz Moreń wrote:

> Hi,
>
> I've noticed that attempt to replication ConcurentHashMap object  
> causes an error. With other Map's it works.
>
> Example test:
>
> public void testConcurrentHashMap() {
> 		Cache cache1 = getCache(); //from somewhere, problem appears on  
> many confs
> 		Cache cache2 = getCache();
>
> 		Map plainMap = new HashMap();
> 		plainMap.put( "plainKey", "plainValue" );
>
> 		Map concurrentMap = new ConcurrentHashMap();
> 		concurrentMap.put( "concurrentKey", "concurrentValue" );
>
> 		cache1.put( "plainMap", plainMap );
> 		Map retrPlainMap = ( Map ) cache2.get( "plainMap" );
>
> 		assertEquals( retrPlainMap, plainMap );
> 		assertEquals( retrPlainMap.get( "plainKey" ), "plainValue" );
>
> 		cache1.put( "concMap", concurrentMap );
> 		retrPlainMap = ( Map ) cache2.get( "concMap" );
>
> 		assertEquals( retrPlainMap, concurrentMap );
> 		assertEquals( retrPlainMap.get( "concurrentKey" ),  
> "concurrentValue" );
> 	}
>
> Cheers,
> Lukasz Moren
> _______________________________________________
> infinispan-dev mailing list
> infinispan-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/infinispan-dev

--
Manik Surtani
manik at jboss.org
Lead, Infinispan
Lead, JBoss Cache
http://www.infinispan.org
http://www.jbosscache.org








More information about the infinispan-dev mailing list