[jboss-user] [Clustering/JBoss] - Re: Jgroups jboss cache deadlock

lmouton do-not-reply at jboss.com
Wed Sep 13 02:03:05 EDT 2006


We only use put.

We do call to the cache in a synchronised method. This is how we call the cache. 
	public synchronized Object put(String fqn, Object key, Object value) throws CacheImplementationException {
  | 		if (isCacheActive()) {
  | 			try {
  | 				StringBuffer buffer = new StringBuffer();
  | 				buffer.append(fqn);
  | 				buffer.append(FORWARD_SLASH);
  | 				buffer.append(key.toString());
  | 
  | 				HashMap<String, MarshalledValue> map = new HashMap<String, MarshalledValue>(1, 1.0f);
  | 				map.put(key.toString(), new MarshalledValue(value));
  | 				
  | 				 return server.invoke(cacheService, "put", 
  | 						new Object[] { buffer.toString(), map }, 
  | 						new String[] { String.class.getName(), Map.class.getName() });
  | 			} catch (Exception e) {
  | 				e.printStackTrace();
  | 				throw new CacheImplementationException(e);
  | 			}
  | 		}
  | 		else {
  | 			return null;
  | 		}
  | 	}

Do we need to have this synchronised? In our TreeCache setup we set the SyncReplTimeout to 10000ms.
 
The first dump we posted looks like it is blocking in org.jgroups.blocks.GroupRequest.doExecute(GroupRequest.java:492) which is jgroups itself. Are we reading this right?

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3971173#3971173

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3971173



More information about the jboss-user mailing list