Patches item #432611, was updated on 2001-06-12 17:42 You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=376687&aid=432611&group_id=22866 Category: JBossServer Group: v2.2.2 (stable) Status: Open Resolution: None Priority: 5 Submitted By: Peter L�ffler (pejolo) Assigned to: Nobody/Anonymous (nobody) Summary: Dynamic proxy activation (Bug #432610) Initial Comment: org.jboss.ejb.plugins.SessionInputStream overrides java.io.ObjectInputStream's resolveClass() but not its resolveProxyClass() which makes it impossible to reactivate passivated (stateful session) beans containing dynamic proxy instances (see bug #432610) The following patch solves this problem: @@ -17,6 +17,7 @@ import java.io.IOException; import java.lang.reflect.Method; import java.lang.reflect.Field; +import java.lang.reflect.Proxy; import java.lang.reflect.InvocationTargetException; import java.rmi.RemoteException; import java.rmi.ServerException; @@ -108,5 +109,19 @@ return super.resolveClass(v); } } - + + protected Class resolveProxyClass(String[] interfac es) throws IOException, ClassNotFoundException { + // see java.io.ObjectInputStream, + // the only changes concern the classloader used + Class[] classObjs = new Class[interfaces.length] ; + for (int i = 0; i < interfaces.length; i++) { + classObjs[i] = Class.forName(interfaces[i], f alse, appCl); + } + try { + return Proxy.getProxyClass(appCl, classObjs); + } catch (IllegalArgumentException e) { + throw new ClassNotFoundException(null, e); + } + } + } ---------------------------------------------------------------------- You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=376687&aid=432611&group_id=22866 _______________________________________________ Jboss-development mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-development
