Java Code Examples for com.sun.corba.se.spi.oa.OAInvocationInfo

The following examples show how to use com.sun.corba.se.spi.oa.OAInvocationInfo. These examples are extracted from open source projects. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source Project: openjdk-jdk9   Author: AdoptOpenJDK   File: CorbaServerRequestDispatcherImpl.java    License: GNU General Public License v2.0 6 votes vote down vote up
private java.lang.Object getServant(ObjectAdapter objectAdapter, byte[] objectId,
    String operation)
    throws OADestroyed
{
    try {
        if (orb.subcontractDebugFlag) {
            dprint(".getServant->");
        }

        OAInvocationInfo info = objectAdapter.makeInvocationInfo(objectId);
        info.setOperation(operation);
        orb.pushInvocationInfo(info);
        objectAdapter.getInvocationServant(info);
        return info.getServantContainer() ;
    } finally {
        if (orb.subcontractDebugFlag) {
            dprint(".getServant<-");
        }
    }
}
 
Example #2
Source Project: hottub   Author: dsrg-uoft   File: FullServantCacheLocalCRDImpl.java    License: GNU General Public License v2.0 6 votes vote down vote up
public ServantObject servant_preinvoke( org.omg.CORBA.Object self,
    String operation, Class expectedType )
{
    OAInvocationInfo cachedInfo = getCachedInfo() ;
    if (!checkForCompatibleServant( cachedInfo, expectedType ))
        return null ;

    // Note that info is shared across multiple threads
    // using the same subcontract, each of which may
    // have its own operation.  Therefore we need to clone it.
    OAInvocationInfo info = new OAInvocationInfo( cachedInfo, operation ) ;
    orb.pushInvocationInfo( info ) ;

    try {
        info.oa().enter() ;
    } catch (OADestroyed pdes) {
        throw wrapper.preinvokePoaDestroyed( pdes ) ;
    }

    return info ;
}
 
Example #3
Source Project: jdk1.8-source-analysis   Author: raysonfang   File: CorbaServerRequestDispatcherImpl.java    License: Apache License 2.0 6 votes vote down vote up
private java.lang.Object getServant(ObjectAdapter objectAdapter, byte[] objectId,
    String operation)
    throws OADestroyed
{
    try {
        if (orb.subcontractDebugFlag) {
            dprint(".getServant->");
        }

        OAInvocationInfo info = objectAdapter.makeInvocationInfo(objectId);
        info.setOperation(operation);
        orb.pushInvocationInfo(info);
        objectAdapter.getInvocationServant(info);
        return info.getServantContainer() ;
    } finally {
        if (orb.subcontractDebugFlag) {
            dprint(".getServant<-");
        }
    }
}
 
Example #4
Source Project: openjdk-jdk8u-backup   Author: AdoptOpenJDK   File: CorbaServerRequestDispatcherImpl.java    License: GNU General Public License v2.0 6 votes vote down vote up
private java.lang.Object getServant(ObjectAdapter objectAdapter, byte[] objectId,
    String operation)
    throws OADestroyed
{
    try {
        if (orb.subcontractDebugFlag) {
            dprint(".getServant->");
        }

        OAInvocationInfo info = objectAdapter.makeInvocationInfo(objectId);
        info.setOperation(operation);
        orb.pushInvocationInfo(info);
        objectAdapter.getInvocationServant(info);
        return info.getServantContainer() ;
    } finally {
        if (orb.subcontractDebugFlag) {
            dprint(".getServant<-");
        }
    }
}
 
Example #5
Source Project: hottub   Author: dsrg-uoft   File: CorbaServerRequestDispatcherImpl.java    License: GNU General Public License v2.0 6 votes vote down vote up
private java.lang.Object getServant(ObjectAdapter objectAdapter, byte[] objectId,
    String operation)
    throws OADestroyed
{
    try {
        if (orb.subcontractDebugFlag) {
            dprint(".getServant->");
        }

        OAInvocationInfo info = objectAdapter.makeInvocationInfo(objectId);
        info.setOperation(operation);
        orb.pushInvocationInfo(info);
        objectAdapter.getInvocationServant(info);
        return info.getServantContainer() ;
    } finally {
        if (orb.subcontractDebugFlag) {
            dprint(".getServant<-");
        }
    }
}
 
Example #6
Source Project: openjdk-jdk8u-backup   Author: AdoptOpenJDK   File: FullServantCacheLocalCRDImpl.java    License: GNU General Public License v2.0 6 votes vote down vote up
public ServantObject servant_preinvoke( org.omg.CORBA.Object self,
    String operation, Class expectedType )
{
    OAInvocationInfo cachedInfo = getCachedInfo() ;
    if (!checkForCompatibleServant( cachedInfo, expectedType ))
        return null ;

    // Note that info is shared across multiple threads
    // using the same subcontract, each of which may
    // have its own operation.  Therefore we need to clone it.
    OAInvocationInfo info = new OAInvocationInfo( cachedInfo, operation ) ;
    orb.pushInvocationInfo( info ) ;

    try {
        info.oa().enter() ;
    } catch (OADestroyed pdes) {
        throw wrapper.preinvokePoaDestroyed( pdes ) ;
    }

    return info ;
}
 
Example #7
Source Project: JDKSourceCode1.8   Author: wupeixuan   File: CorbaServerRequestDispatcherImpl.java    License: MIT License 6 votes vote down vote up
private java.lang.Object getServant(ObjectAdapter objectAdapter, byte[] objectId,
    String operation)
    throws OADestroyed
{
    try {
        if (orb.subcontractDebugFlag) {
            dprint(".getServant->");
        }

        OAInvocationInfo info = objectAdapter.makeInvocationInfo(objectId);
        info.setOperation(operation);
        orb.pushInvocationInfo(info);
        objectAdapter.getInvocationServant(info);
        return info.getServantContainer() ;
    } finally {
        if (orb.subcontractDebugFlag) {
            dprint(".getServant<-");
        }
    }
}
 
Example #8
Source Project: openjdk-8   Author: bpupadhyaya   File: FullServantCacheLocalCRDImpl.java    License: GNU General Public License v2.0 6 votes vote down vote up
public ServantObject servant_preinvoke( org.omg.CORBA.Object self,
    String operation, Class expectedType )
{
    OAInvocationInfo cachedInfo = getCachedInfo() ;
    if (!checkForCompatibleServant( cachedInfo, expectedType ))
        return null ;

    // Note that info is shared across multiple threads
    // using the same subcontract, each of which may
    // have its own operation.  Therefore we need to clone it.
    OAInvocationInfo info = new OAInvocationInfo( cachedInfo, operation ) ;
    orb.pushInvocationInfo( info ) ;

    try {
        info.oa().enter() ;
    } catch (OADestroyed pdes) {
        throw wrapper.preinvokePoaDestroyed( pdes ) ;
    }

    return info ;
}
 
Example #9
Source Project: hottub   Author: dsrg-uoft   File: ORBImpl.java    License: GNU General Public License v2.0 5 votes vote down vote up
public OAInvocationInfo peekInvocationInfo()
{
    synchronized (this) {
            checkShutdownState();
    }
    StackImpl stack = (StackImpl)(OAInvocationInfoStack.get()) ;
    return (OAInvocationInfo)(stack.peek()) ;
}
 
Example #10
public ServantObject servant_preinvoke( org.omg.CORBA.Object self,
    String operation, Class expectedType )
{
    OAInvocationInfo cachedInfo = getCachedInfo() ;
    if (!checkForCompatibleServant( cachedInfo, expectedType ))
        return null ;

    // Note that info is shared across multiple threads
    // using the same subcontract, each of which may
    // have its own operation.  Therefore we need to copy it.
    OAInvocationInfo info =  new OAInvocationInfo(cachedInfo, operation) ;
    orb.pushInvocationInfo( info ) ;

    return info ;
}
 
Example #11
Source Project: jdk1.8-source-analysis   Author: raysonfang   File: FullServantCacheLocalCRDImpl.java    License: Apache License 2.0 5 votes vote down vote up
public void servant_postinvoke(org.omg.CORBA.Object self,
                               ServantObject servantobj)
{
    OAInvocationInfo cachedInfo = getCachedInfo() ;
    cachedInfo.oa().exit() ;
    orb.popInvocationInfo() ;
}
 
Example #12
Source Project: hottub   Author: dsrg-uoft   File: POACurrent.java    License: GNU General Public License v2.0 5 votes vote down vote up
private OAInvocationInfo peekThrowInternal()
{
    OAInvocationInfo invocationInfo = null;
    try {
        invocationInfo = orb.peekInvocationInfo() ;
    } catch (EmptyStackException e) {
        // The completion status is maybe because this could happen
        // after the servant has been invoked.
        throw wrapper.poacurrentUnbalancedStack( e ) ;
    }
    return invocationInfo;
}
 
Example #13
Source Project: hottub   Author: dsrg-uoft   File: POAImpl.java    License: GNU General Public License v2.0 5 votes vote down vote up
public void getInvocationServant( OAInvocationInfo info )
{
    try {
        lock() ;

        if (debug) {
            ORBUtility.dprint( this,
                "Calling getInvocationServant on poa " + this ) ;
        }

        java.lang.Object servant = null ;

        try {
            servant = mediator.getInvocationServant( info.id(),
                info.getOperation() );
        } catch (ForwardRequest freq) {
            throw new ForwardException( getORB(), freq.forward_reference ) ;
        }

        info.setServant( servant ) ;
    } finally {
        if (debug) {
            ORBUtility.dprint( this,
                "Exiting getInvocationServant on poa " + this ) ;
        }

        unlock() ;
    }
}
 
Example #14
Source Project: jdk1.8-source-analysis   Author: raysonfang   File: POALocalCRDImpl.java    License: Apache License 2.0 5 votes vote down vote up
private OAInvocationInfo servantEnter( ObjectAdapter oa ) throws OADestroyed
{
    oa.enter() ;

    OAInvocationInfo info = oa.makeInvocationInfo( objectId ) ;
    orb.pushInvocationInfo( info ) ;

    return info ;
}
 
Example #15
Source Project: openjdk-8-source   Author: keerath   File: POACurrent.java    License: GNU General Public License v2.0 5 votes vote down vote up
private OAInvocationInfo peekThrowNoContext()
    throws
        NoContext
{
    OAInvocationInfo invocationInfo = null;
    try {
        invocationInfo = orb.peekInvocationInfo() ;
    } catch (EmptyStackException e) {
        throw new NoContext();
    }
    return invocationInfo;
}
 
Example #16
Source Project: jdk1.8-source-analysis   Author: raysonfang   File: POAPolicyMediatorImpl_NR_USM.java    License: Apache License 2.0 5 votes vote down vote up
public void returnServant()
{
    OAInvocationInfo info = orb.peekInvocationInfo();
    if (locator == null)
        return;

    try {
        poa.unlock() ;
        locator.postinvoke(info.id(), (POA)(info.oa()),
            info.getOperation(), info.getCookieHolder().value,
            (Servant)(info.getServantContainer()) );
    } finally {
        poa.lock() ;
    }
}
 
Example #17
Source Project: jdk1.8-source-analysis   Author: raysonfang   File: ORBImpl.java    License: Apache License 2.0 5 votes vote down vote up
public void pushInvocationInfo( OAInvocationInfo info )
{
    synchronized (this) {
            checkShutdownState();
    }
    StackImpl stack = (StackImpl)(OAInvocationInfoStack.get()) ;
    stack.push( info ) ;
}
 
Example #18
Source Project: jdk1.8-source-analysis   Author: raysonfang   File: ORBImpl.java    License: Apache License 2.0 5 votes vote down vote up
public OAInvocationInfo popInvocationInfo()
{
    synchronized (this) {
            checkShutdownState();
    }
    StackImpl stack = (StackImpl)(OAInvocationInfoStack.get()) ;
    return (OAInvocationInfo)(stack.pop()) ;
}
 
Example #19
Source Project: openjdk-jdk8u-backup   Author: AdoptOpenJDK   File: POAPolicyMediatorImpl_NR_USM.java    License: GNU General Public License v2.0 5 votes vote down vote up
public void returnServant()
{
    OAInvocationInfo info = orb.peekInvocationInfo();
    if (locator == null)
        return;

    try {
        poa.unlock() ;
        locator.postinvoke(info.id(), (POA)(info.oa()),
            info.getOperation(), info.getCookieHolder().value,
            (Servant)(info.getServantContainer()) );
    } finally {
        poa.lock() ;
    }
}
 
Example #20
Source Project: openjdk-8   Author: bpupadhyaya   File: POALocalCRDImpl.java    License: GNU General Public License v2.0 5 votes vote down vote up
private OAInvocationInfo servantEnter( ObjectAdapter oa ) throws OADestroyed
{
    oa.enter() ;

    OAInvocationInfo info = oa.makeInvocationInfo( objectId ) ;
    orb.pushInvocationInfo( info ) ;

    return info ;
}
 
Example #21
Source Project: TencentKona-8   Author: Tencent   File: FullServantCacheLocalCRDImpl.java    License: GNU General Public License v2.0 5 votes vote down vote up
public void servant_postinvoke(org.omg.CORBA.Object self,
                               ServantObject servantobj)
{
    OAInvocationInfo cachedInfo = getCachedInfo() ;
    cachedInfo.oa().exit() ;
    orb.popInvocationInfo() ;
}
 
Example #22
Source Project: hottub   Author: dsrg-uoft   File: ORBImpl.java    License: GNU General Public License v2.0 5 votes vote down vote up
public OAInvocationInfo popInvocationInfo()
{
    synchronized (this) {
            checkShutdownState();
    }
    StackImpl stack = (StackImpl)(OAInvocationInfoStack.get()) ;
    return (OAInvocationInfo)(stack.pop()) ;
}
 
Example #23
Source Project: openjdk-8   Author: bpupadhyaya   File: MinimalServantCacheLocalCRDImpl.java    License: GNU General Public License v2.0 5 votes vote down vote up
public ServantObject servant_preinvoke( org.omg.CORBA.Object self,
    String operation, Class expectedType )
{
    OAInvocationInfo cachedInfo = getCachedInfo() ;
    if (checkForCompatibleServant( cachedInfo, expectedType ))
        return cachedInfo ;
    else
        return null ;
}
 
Example #24
Source Project: openjdk-8   Author: bpupadhyaya   File: POAPolicyMediatorImpl_R_USM.java    License: GNU General Public License v2.0 5 votes vote down vote up
public void returnServant()
{
    OAInvocationInfo info = orb.peekInvocationInfo();
    byte[] id = info.id() ;
    ActiveObjectMap.Key key = new ActiveObjectMap.Key( id ) ;
    AOMEntry entry = activeObjectMap.get( key ) ;
    entry.exit() ;
}
 
Example #25
Source Project: TencentKona-8   Author: Tencent   File: POALocalCRDImpl.java    License: GNU General Public License v2.0 5 votes vote down vote up
private OAInvocationInfo servantEnter( ObjectAdapter oa ) throws OADestroyed
{
    oa.enter() ;

    OAInvocationInfo info = oa.makeInvocationInfo( objectId ) ;
    orb.pushInvocationInfo( info ) ;

    return info ;
}
 
Example #26
Source Project: openjdk-jdk8u-backup   Author: AdoptOpenJDK   File: ORBImpl.java    License: GNU General Public License v2.0 5 votes vote down vote up
public OAInvocationInfo peekInvocationInfo()
{
    synchronized (this) {
            checkShutdownState();
    }
    StackImpl stack = (StackImpl)(OAInvocationInfoStack.get()) ;
    return (OAInvocationInfo)(stack.peek()) ;
}
 
Example #27
Source Project: TencentKona-8   Author: Tencent   File: POACurrent.java    License: GNU General Public License v2.0 5 votes vote down vote up
private OAInvocationInfo peekThrowNoContext()
    throws
        NoContext
{
    OAInvocationInfo invocationInfo = null;
    try {
        invocationInfo = orb.peekInvocationInfo() ;
    } catch (EmptyStackException e) {
        throw new NoContext();
    }
    return invocationInfo;
}
 
Example #28
Source Project: TencentKona-8   Author: Tencent   File: POACurrent.java    License: GNU General Public License v2.0 5 votes vote down vote up
private OAInvocationInfo peekThrowInternal()
{
    OAInvocationInfo invocationInfo = null;
    try {
        invocationInfo = orb.peekInvocationInfo() ;
    } catch (EmptyStackException e) {
        // The completion status is maybe because this could happen
        // after the servant has been invoked.
        throw wrapper.poacurrentUnbalancedStack( e ) ;
    }
    return invocationInfo;
}
 
Example #29
Source Project: TencentKona-8   Author: Tencent   File: POAPolicyMediatorImpl_R_USM.java    License: GNU General Public License v2.0 5 votes vote down vote up
public void returnServant()
{
    OAInvocationInfo info = orb.peekInvocationInfo();
    byte[] id = info.id() ;
    ActiveObjectMap.Key key = new ActiveObjectMap.Key( id ) ;
    AOMEntry entry = activeObjectMap.get( key ) ;
    entry.exit() ;
}
 
Example #30
Source Project: openjdk-jdk8u   Author: AdoptOpenJDK   File: ServantCacheLocalCRDBase.java    License: GNU General Public License v2.0 5 votes vote down vote up
protected synchronized OAInvocationInfo getCachedInfo()
{
    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 ;
}