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 com.sun.corba.se.impl.protocol.LocalClientRequestDispatcherBase

Fields Summary
private com.sun.corba.se.spi.oa.OAInvocationInfo
cachedInfo
protected com.sun.corba.se.impl.logging.POASystemException
wrapper
Constructors Summary
protected ServantCacheLocalCRDBase(com.sun.corba.se.spi.orb.ORB orb, int scid, com.sun.corba.se.spi.ior.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 ;