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

Custom interceptor with Position.LAST set programmatically doesn't work

This issue belongs to an archived project. You can view it, but you can't modify it. Learn more

XMLWordPrintable

      When configuring cache programmatically, adding a custom interceptor with position set to Position.LAST cause not calling this interceptor.

      Code sample:

      EmbeddedCacheManager manager = new DefaultCacheManager();
            Configuration c2 = new ConfigurationBuilder()
                  .customInterceptors()
                     .addInterceptor()               .position(InterceptorConfiguration.Position.LAST).interceptor(new MyInterceptor())               
                  .build();
      
            manager.defineConfiguration("interceptors", c2);
            Cache<String, String> cache = manager.getCache("interceptors");
            cache.put("hello", "world");
      

      MyInterceptor is very simple, reacting to all events. When changing to Position.FIRST, everything works fine. Also tried two/three interceptors, various combinations, but always with same result - when position set to Position.LAST, interceptors is not called.

      Note that no problem when setting by index().

              mircea.markus Mircea Markus (Inactive)
              jholusa Jiří Holuša (Inactive)
              Archiver:
              rhn-support-adongare Amol Dongare

                Created:
                Updated:
                Resolved:
                Archived: