1 /*
2 * LocalStateManager.java
3 *
4 * Created on 29 Август 2005 г., 14:13
5 *
6 * To change this template, choose Tools | Options and locate the template under
7 * the Source Creation and Management node. Right-click the template and choose
8 * Open. You can then make changes to the template in the Source Editor.
9 */
10
11 package org.weda.tapestry;
12
13 import org.apache.tapestry.engine.state.StateObjectManager;
14 import org.weda.cache.impl.SimpleCache;
15
16
17 /**
18 *
19 * @author tim
20 */
21 public class LocalStateManager implements StateObjectManager {
22 private ThreadLocal<SimpleCache> cache =
23 new ThreadLocal<SimpleCache>(){
24 protected SimpleCache initialValue() {
25 return new SimpleCache();
26 }
27 };
28 //private SimpleCache cache = new SimpleCache();
29
30 public void store(Object obj) {
31 }
32
33 public Object get() {
34 return cache.get();
35 }
36
37 public boolean exists() {
38 return true;
39 }
40
41 }