-
15. Re: org.infinispan.util.concurrent.TimeoutException
hr.stoyanov Apr 14, 2015 10:57 AM (in response to hr.stoyanov)... some more info: it appears that the issue starts after an attempt to clean up the cache:
============================================================================
/**
* Purge all caches, or for a specific user (if HTTP request parameter "userId" is specified.
*/
@WebServlet( urlPatterns={"/invalidateCache"})
public class InvalidateCache extends HttpServlet{
private static final org.slf4j.Logger logger = org.slf4j.LoggerFactory.getLogger(InvalidateCache.class);
@Inject @S4G
private EntityManagerFactory emf;
@Resource(lookup = CACHE_DEFAULT_JNDI)
private Cache<String,Object> cache;
/**
* Purge all caches, or for a specific user (if HTTP request parameter "userId" is specified.
*
* @param req
* @param res
*/
@Override
public void service(ServletRequest req, ServletResponse res){
emf.getCache().evictAll();
logger.info( "JPA cache invalidated");
HttpServletRequest httpReq = (HttpServletRequest) req;
String userId = String.class.cast(httpReq.getParameter("userId"));
if(!Strings.isNullOrEmpty(userId)){
cache.remove(userId);
logger.info( "Infinispan cache invalidated for user: {0}", userId);
}else{
cache.clear();
logger.info("Infinispan cache invalidated for everything");
}
}
}
-
16. Re: org.infinispan.util.concurrent.TimeoutException
hr.stoyanov Apr 14, 2015 11:00 AM (in response to hr.stoyanov)More info: it appears that the issue starts after an attempt to clear the cache in WF8.2:
/**
* Purge all caches, or for a specific user (if HTTP request parameter "userId" is specified.
*/
@WebServlet( urlPatterns={"/invalidateCache"})
public class InvalidateCache extends HttpServlet{
private static final org.slf4j.Logger logger = org.slf4j.LoggerFactory.getLogger(InvalidateCache.class);
@Inject @S4G
private EntityManagerFactory emf;
@Resource(lookup = CACHE_DEFAULT_JNDI)
private Cache<String,Object> cache;
/**
* Purge all caches, or for a specific user (if HTTP request parameter "userId" is specified.
*
* @param req
* @param res
*/
@Override
public void service(ServletRequest req, ServletResponse res){
emf.getCache().evictAll();
logger.info( "JPA cache invalidated");
HttpServletRequest httpReq = (HttpServletRequest) req;
String userId = String.class.cast(httpReq.getParameter("userId"));
if(!Strings.isNullOrEmpty(userId)){
cache.remove(userId);
logger.info( "Infinispan cache invalidated for user: {0}", userId);
}else{
cache.clear();
logger.info("Infinispan cache invalidated for everything");
}
}
}
-
17. Re: org.infinispan.util.concurrent.TimeoutException
humanbeing Apr 14, 2015 11:22 AM (in response to hr.stoyanov)Hristo,
Just curious, is this from your own code?
-
18. Re: org.infinispan.util.concurrent.TimeoutException
humanbeing May 13, 2015 5:08 PM (in response to hr.stoyanov)Hristo,
Try here for a solution:
HTTP Session Replication - org.infinispan.util.concurrent.TimeoutException