tomee-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Romain Manni-Bucau <rmannibu...@gmail.com>
Subject Re: JCS beta-2 bug
Date Thu, 15 Dec 2016 13:31:07 GMT
Before digging can you check with a higher value? ~50ms the jvm is not
precise enough depending the os and api. Try around 300ms or 1s maybe.

Le 15 déc. 2016 14:21, "hwaastad" <helge@waastad.org> a écrit :

> Hi Romain,
> I'll take my chance asking you since you were the one to solve earlier JCS
> issue :-)
> (and I discovered this issue using tomee :-) )
>
> https://github.com/hwaastad/JcsTest.git (develop)
>
> when using AccessedExpiryPolicy this will fail using beta-2 while using
> beta-1 it's ok:
>
> cachingProvider = Caching.getCachingProvider();
>         cacheManager =
> cachingProvider.getCacheManager(cachingProvider.getDefaultURI(),
> Thread.currentThread().getContextClassLoader(),
> cachingProvider.getDefaultProperties());
>         cacheManager.createCache(
>                 cacheName,
>                 new MutableConfiguration<Integer, Integer>()
>                 .setStoreByValue(false)
>                 .setStatisticsEnabled(true)
>                 .setManagementEnabled(true)
>                 .setTypes(Integer.class, Integer.class)
>                 .setExpiryPolicyFactory(AccessedExpiryPolicy.factoryOf(new
> Duration(TimeUnit.MILLISECONDS, 10))));
>
> @Test
>     public void testTwo() throws Exception {
>         cache = cacheManager.getCache(cacheName, Integer.class,
> Integer.class);
>         cache.put(name, value);
>         cache.get(name);
>         Thread.sleep(12);
>         assertFalse(cache.containsKey(name));
>         cache.put(name, value);
>         assertTrue(cache.containsKey(name));
>     }
>
>
> /hw
>
>
>
>
>
> --
> View this message in context: http://tomee-openejb.979440.
> n4.nabble.com/JCS-beta-2-bug-tp4680745.html
> Sent from the TomEE Users mailing list archive at Nabble.com.
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message