private TreeCacheMBean cache; void put(String path, Object key, Object value) throws Exception { cache.put(path, key, getMarshalledValue(value)); Object get(String path, Object key) throws Exception { return getUnMarshalledValue(cache.get(path, key)); } private Object getUnMarshalledValue(Object value) throws IOException, ClassNotFoundException { return ((MarshalledValue) value).get(); } private Object getMarshalledValue(Object value) throws IOException { return new MarshalledValue(value); }
You need to create an account or log in to post comments to this site.