You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by pickerel <pi...@gmail.com> on 2005/11/21 11:28:25 UTC
Why a session object cannot extends from HashMap?
it's very strange, when the session extends from HashMap, the session will take
no effect,so i have to implements my session object as below:
public class SessionObject /*extends HashMap*/ implements java.io.Serializable
{
private Map data;
synchronized Map getMap()
{
if (data == null)
data = new HashMap();
return data;
}
public Object get(Object key)
{
return data.get(key);
}
public void put(Object key, Object obj)
{
data.put(key, obj);
}
}
there's no problem. I don't know why a session object cannot extends from
HashMap, do i miss something?
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org