I have two WebLogic 8.1 servers in a cluster. HTTP sessions as well as stateful
session beans are configured to replicate in memory. I create a stateful session
bean inside a servlet and store its handle in the session. Now I kill the server
on which this session and the SSB reside. The next hit to the servlet goes to
the second server that is still up. It gets the SSB handle from the session -
no problem so far. However, when it tries to convert the handle to a SSB reference
it gets the following exception:

java.lang.ClassCastException: Cannot narrow remote object to org.automotive.autopreferencessession.AutoPreferen cesSession
at weblogic.iiop.PortableRemoteObjectDelegateImpl.nar row(PortableRemoteObjectDelegateImpl.java:242)

I was assuming that since the handle is serializable, it should be convertable
to a replicated copy of the SSB on the second server. What am I doing wrong? Here's
the code that gets the handle from the session and tries to convert it to a reference:

Handle autoPreferencesSessionHandle =
(Handle)session.getAttribute("autoPreferencesSessionHandle");
if (autoPreferencesSessionHandle != null) {
autoPreferencesSession = (AutoPreferencesSession)PortableRemoteObject.narro w(
autoPreferencesSessionHandle.getEJBObject(), AutoPreferencesSession.class);
}