2 Replies Latest reply on Jul 29, 2013 10:05 AM by Tommy T

    @CachePut not executing

    Tommy T Newbie



      I have a method annotated with @CachePut as per below but while the method is getting executed the cache is never updated (Interceptor not getting called). In the snippet below i have left in the manual addition to the cache that I am forced to leave in for now, this manual addition to the same cache works fine (more complete code snippets can be seen here: https://community.jboss.org/thread/230469). The class in question is in a war maven module and the beans.xml has been updated as per below.





                   public void login(@CacheKeyParam String cookieValue, @CacheValue Long userId) {

                      logger.info(" *********** Logging in user into cache map : "+ userId+", "+cookieValue);



                 //below code staying until i can fgure out why @CachePut is not working

                      logger.info("Manually adding to cache");

                      userCacheMananger.put(cookieValue, userId);

                      logger.info("Post Manual add... cache size is ..."+ userCacheMananger.getNumberOfEntries());











      <?xml version="1.0" encoding="UTF-8"?>

      <!-- This file can be an empty text file (0 bytes) -->

      <!-- We're declaring the schema to save you time if you do have to configure

         this in the future -->

      <beans xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
















      Am i forgetting something else?

      JBoss: 7.1

      Infinispan:  5.1.0.FINAL