[jboss-user] [JBossCache] - Re: Problem reading (deserializing) objects from FileCacheLo

bstansberry@jboss.com do-not-reply at jboss.com
Wed Nov 21 14:29:30 EST 2007

This is a workaround -- a hack, but still a workaround:

Let's assume you're getting a ref to the TreeCacheMBean via setter dependency injection.  Write your setter like this:

  | private TreeCacheMBean treeCache;
  | public void setTreeCache(TreeCacheMBean cache) {
  |    this.treeCache = (cache == null ? null : cache.getInstance();  
  | }

The getInstance() call returns you a direct ref to the cache, replacing the JMX proxy that got passed in.  So, later on you are directly invoking on the cache, bypassing the JMX logic that switches out the TCCL.

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

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

More information about the jboss-user mailing list