Uploaded image for project: 'Infinispan'
  1. Infinispan
  2. ISPN-3969

Can't retrieve values from FineGrainedAtomicMap with "storeAsBinary" option enabled

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Obsolete
    • Icon: Major Major
    • None
    • 6.0.1.Final
    • None
    • None

      When using the "storeAsBinary" option, a value added to a FineGrainedAtomicMap via put() can't be read back via get():

      Configuration configuration = new ConfigurationBuilder()
      	.storeAsBinary()
      		.enable()
      	.transaction()
      		.transactionMode(TransactionMode.TRANSACTIONAL )
      		.transactionManagerLookup(new JBossStandaloneJTAManagerLookup() )
      	.build();
      
      EmbeddedCacheManager manager = new DefaultCacheManager();
      manager.defineConfiguration( "testCache", configuration );
      manager.getCache( "testCache", true );
      		
      CacheKey cacheKey = new CacheKey( "Some Key" );
      Object key = "the key";
      Object value = "the value";
      
      FineGrainedAtomicMap<Object, Object> map = AtomicMapLookup.getFineGrainedAtomicMap( cache, cacheKey, true );
      map.put( key, value );
      
      //fails
      assertNotNull( map.get( key ) );
      

      See the attached file for a complete test case.

            Unassigned Unassigned
            gunnar.morling Gunnar Morling
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: