[jboss-user] [Clustering/JBoss] - Re: Clustering and Load Balancing in Jboss-4.0.2 using Apach
chillal.kishor
do-not-reply at jboss.com
Thu Apr 19 02:53:05 EDT 2007
Actually DMWebSession which extends UserSession is having inner classes. They are also Serialized. There are 4 to 5 inner classes and each inner class contains public static final String variables.
Following is my DMWebSession class....I am creating the object of this and calling from login.jsp and settirng true or false.
----------DMWebSession.java-----------
public class DmWebSession extends UserSession {
private HttpSession session_;
private static final String SESSION_MGR = "SESSION_MANAGER";
public static DmWebSession getDmWebSession(HttpSession session) {
DmWebSession sessionMgr = null;
sessionMgr = (DmWebSession) session.getAttribute(SESSION_MGR);
if (sessionMgr == null) {
sessionMgr = new DmWebSession(session);
}
return sessionMgr;
}
private DmWebSession(HttpSession session) {
session.setAttribute(SESSION_MGR, this);
session_ = session;
}
protected Object getAttribute(String key) {
return session_.getAttribute(key);
}
protected void setAttribute(String key, Object value) {
session_.setAttribute(key, value);
}
protected void removeAttribute(String key) {
session_.removeAttribute(key);
}
public void invalidateSession() {
session_.invalidate();
session_ = null;
}
public void removeSelectedItems() {
//This class is also Serialized
UtilitiesBean util = new UtilitiesBean();
util.cleanSession(session_);
}
}
The classes which are imported is it necessary they should also be Serialized ?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4038730#4038730
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4038730
More information about the jboss-user
mailing list