FileDocCategorySizeDatePackage
EJBObjectInputStream.javaAPI DocGlassfish v2 API4656Fri May 04 22:32:56 BST 2007com.sun.ejb.base.io

EJBObjectInputStream

public class EJBObjectInputStream extends com.sun.enterprise.util.ObjectInputStreamWithLoader
A class that is used to restore SFSB conversational state
author
Mahesh Kannan

Fields Summary
private static final Logger
_ejbLogger
Constructors Summary
EJBObjectInputStream(InputStream in, ClassLoader cl, boolean resolve)


         
          
    
        super(in, cl);
        if (resolve == true) {
            enableResolveObject(resolve);
        }
    
Methods Summary
protected java.lang.ObjectresolveObject(java.lang.Object obj)

        try {
            if ( StubAdapter.isStub(obj) ) {
                // connect the Remote object to the Protocol Manager
                Switch.getSwitch().getProtocolManager().
                    connectObject((Remote)obj);
                return obj;
            } else if (obj instanceof SerializableObjectFactory) {
                return ((SerializableObjectFactory) obj).createObject();
            } else {
                return obj;
            }
        } catch (IOException ioEx ) {
            _ejbLogger.log(Level.SEVERE, "ejb.resolve_object_exception", ioEx);
            throw ioEx;
        } catch (Exception ex) {
            _ejbLogger.log(Level.SEVERE, "ejb.resolve_object_exception", ex);
            IOException ioe = new IOException();
            ioe.initCause(ex);
            throw ioe;
        }
    
protected java.lang.ClassresolveProxyClass(java.lang.String[] interfaces)

        Class[] classObjs = new Class[interfaces.length];
        for (int i = 0; i < interfaces.length; i++) {
            Class cl = Class.forName(interfaces[i], false, loader);
            // If any non-public interfaces, delegate to JDK's
            // implementation of resolveProxyClass.
            if ((cl.getModifiers() & Modifier.PUBLIC) == 0) {
                return super.resolveProxyClass(interfaces);
            } else {
                classObjs[i] = cl;
            }
        }
        try {
            return Proxy.getProxyClass(loader, classObjs);
        } catch (IllegalArgumentException e) {
            throw new ClassNotFoundException(null, e);
        }