For failover at the web layer I created an object I call SessionCache, which I store
in the use session.
public class SessionCache implements Serializable {
private transient Hashtable sessBeans = new Hashtable();
private Hashtable sessHandles = new Hashtable();
public SessionBean getSessionBean (String name) {
SessionBean sb = null;
Handle hh = null;
if ((sb = (SessionBean )sessBeans.get (name)) == null) {
if ((hh = (Handle )sessHandles.get(name)) != null) {
sb = hh.getEJBObject();
} else {
// make session bean here
}
}
return sb;
}
}
Hope this helps,
Jared
View the original post :
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3846805#3846805
Reply to the post :
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3846805
---
This SF.Net email is sponsored by BEA Weblogic Workshop
FREE Java Enterprise J2EE developer tools!
Get your free copy of BEA WebLogic Workshop 8.1 today.
http://ads.osdn.com/?ad_id=5047&alloc_id=10808&op=click
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user