FileDocCategorySizeDatePackage
RemoteBusinessWrapperBase.javaAPI DocGlassfish v2 API5140Fri May 04 22:32:58 BST 2007com.sun.ejb.containers

RemoteBusinessWrapperBase

public class RemoteBusinessWrapperBase extends Object implements Serializable

Fields Summary
private String
businessInterface_
private Remote
stub_
private transient int
hashCode_
Constructors Summary
public RemoteBusinessWrapperBase(Remote stub, String busIntf)

        stub_ = stub;
        businessInterface_ = busIntf;
        this.hashCode_ = busIntf.hashCode();
    
Methods Summary
public booleanequals(java.lang.Object obj)

        
        boolean result = (obj == this); //Most efficient
        if ((result == false) && (obj != null)) { //Do elaborate checks
            if (obj instanceof RemoteBusinessWrapperBase) {
                RemoteBusinessWrapperBase remoteBWB =
                        (RemoteBusinessWrapperBase) obj;
                boolean hasSameBusinessInterface =
                        (remoteBWB.hashCode_ == hashCode_) &&
                        remoteBWB.businessInterface_.equals(businessInterface_);
                if (hasSameBusinessInterface) {
                    org.omg.CORBA.Object other = (org.omg.CORBA.Object) remoteBWB.stub_;
                    org.omg.CORBA.Object me = (org.omg.CORBA.Object) stub_;
                    result = me._is_equivalent(other);
                }
            }
        }
        
        return result;
    
public java.lang.StringgetBusinessInterfaceName()

        return businessInterface_;
    
public java.rmi.RemotegetStub()

        return stub_;
    
public inthashCode()

        return hashCode_;
    
private voidreadObject(java.io.ObjectInputStream ois)


        try {

            businessInterface_ = (String) ois.readObject();
            hashCode_ = businessInterface_.hashCode();

            EJBUtils.loadGeneratedRemoteBusinessClasses(businessInterface_);

            stub_ = (Remote) ois.readObject();

        } catch(Exception e) {
            IOException ioe = new IOException("RemoteBusinessWrapper.readObj "
                                              + " error");
            ioe.initCause(e);
            throw ioe;
        }
    
public java.lang.ObjectreadResolve()


        try {

            return EJBUtils.createRemoteBusinessObject(businessInterface_,
                                                       stub_);
        } catch(Exception e) {
            WriteAbortedException wae = new WriteAbortedException
                ("RemoteBusinessWrapper.readResolve error", e);
            wae.initCause(e);
            throw wae;
        }

    
private voidwriteObject(java.io.ObjectOutputStream oos)


        oos.writeObject(businessInterface_);
        oos.writeObject(stub_);

    
public java.lang.ObjectwriteReplace()

        return new RemoteBusinessWrapperBase(stub_, businessInterface_);