NOt sure this is what you want but I usually make a singleton class called Application State. Then I control what is in it with methods such as below.
public Object getItem(String key)
{
return stateItems.get(key);
}
public void setItem(String key, Object item)
{
stateItems.put(key, item);
}
public void removeItem(String item)
{
stateItems.remove(item);
}
public void cleanUp()
{
stateItems.clear();
}
It is not configured for java 5.0. This is old code, but you can update. I think I got it from the pet shop example on Sun.
Hope this helps.
p