4 Replies Latest reply on Jan 19, 2012 5:09 AM by galder.zamarreno

    How to configure transport using ConfigurationBuilder?

    jmfaerman

      I am trying to configure infinispan like this, using CDI:

       

       @ConfigureCache("greeting-cache")
       @Produces
          public Configuration greetingCacheConfiguration() {
              return new ConfigurationBuilder()        
                        .clustering()         
                        .cacheMode(CacheMode.REPL_ASYNC)     
                        .build();
          }
      

       

      and getting this error:

       

      org.infinispan.config.ConfigurationException: Cache cannot use a clustered mode (DIST_ASYNC) mode and not define a transport!

       

      How can i set such transport using the ConfigurationBuilder?