FileDocCategorySizeDatePackage
ServantCacheLocalCRDBase.javaAPI DocJava SE 5 API2197Fri Aug 26 14:54:32 BST 2005com.sun.corba.se.impl.protocol

ServantCacheLocalCRDBase

public abstract class ServantCacheLocalCRDBase extends LocalClientRequestDispatcherBase

Fields Summary
private OAInvocationInfo
cachedInfo
protected POASystemException
wrapper
Constructors Summary
protected ServantCacheLocalCRDBase(ORB orb, int scid, IOR ior)

	super( orb, scid, ior ) ;
	wrapper = POASystemException.get( orb,
	    CORBALogDomains.RPC_PROTOCOL ) ;
    
Methods Summary
protected synchronized com.sun.corba.se.spi.oa.OAInvocationInfogetCachedInfo()

	if (!servantIsLocal)
	    throw wrapper.servantMustBeLocal() ;

	if (cachedInfo == null) {
	    ObjectAdapter oa = oaf.find( oaid ) ;
	    cachedInfo = oa.makeInvocationInfo( objectId ) ;

	    // InvocationInfo must be pushed before calling getInvocationServant
	    orb.pushInvocationInfo( cachedInfo ) ;

	    try {
                oa.enter( );
		oa.getInvocationServant( cachedInfo ) ;
	    } catch (ForwardException freq) {
		throw wrapper.illegalForwardRequest( freq ) ;
            } catch( OADestroyed oades ) {
		// This is an error since no user of this implementation
		// should ever throw this exception
		throw wrapper.adapterDestroyed( oades ) ;
	    } finally {
                oa.returnServant( );
                oa.exit( );
		orb.popInvocationInfo() ;
	    }
	}

	return cachedInfo ;