Java Code Examples for com.sun.corba.se.spi.ior.ObjectKey#getTemplate()

The following examples show how to use com.sun.corba.se.spi.ior.ObjectKey#getTemplate() . 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 File: CorbaServerRequestDispatcherImpl.java    From openjdk-8 with GNU General Public License v2.0 6 votes vote down vote up
/** XXX/REVISIT:
 * We do not want to look for a servant in the POA/ServantManager case,
 * but we could in most other cases.  The OA could have a method that
 * returns true if the servant MAY exist, and false only if the servant
 * definitely DOES NOT exist.
 *
 * XXX/REVISIT:
 * We may wish to indicate OBJECT_HERE by some mechanism other than
 * returning a null result.
 *
 * Called from ORB.locate when a LocateRequest arrives.
 * Result is not always absolutely correct: may indicate OBJECT_HERE
 * for non-existent objects, which is resolved on invocation.  This
 * "bug" is unavoidable, since in general the object may be destroyed
 * between a locate and a request.  Note that this only checks that
 * the appropriate ObjectAdapter is available, not that the servant
 * actually exists.
 * Need to signal one of OBJECT_HERE, OBJECT_FORWARD, OBJECT_NOT_EXIST.
 * @return Result is null if object is (possibly) implemented here, otherwise
 * an IOR indicating objref to forward the request to.
 * @exception OBJECT_NOT_EXIST is thrown if we know the object does not
 * exist here, and we are not forwarding.
 */
public IOR locate(ObjectKey okey)
{
    try {
        if (orb.subcontractDebugFlag)
            dprint(".locate->");

        ObjectKeyTemplate oktemp = okey.getTemplate() ;

        try {
            checkServerId(okey);
        } catch (ForwardException fex) {
            return fex.getIOR() ;
        }

        // Called only for its side-effect of throwing appropriate exceptions
        findObjectAdapter(oktemp);

        return null ;
    } finally {
        if (orb.subcontractDebugFlag)
            dprint(".locate<-");
    }
}
 
Example 2
Source File: CorbaServerRequestDispatcherImpl.java    From openjdk-jdk8u with GNU General Public License v2.0 6 votes vote down vote up
/** XXX/REVISIT:
 * We do not want to look for a servant in the POA/ServantManager case,
 * but we could in most other cases.  The OA could have a method that
 * returns true if the servant MAY exist, and false only if the servant
 * definitely DOES NOT exist.
 *
 * XXX/REVISIT:
 * We may wish to indicate OBJECT_HERE by some mechanism other than
 * returning a null result.
 *
 * Called from ORB.locate when a LocateRequest arrives.
 * Result is not always absolutely correct: may indicate OBJECT_HERE
 * for non-existent objects, which is resolved on invocation.  This
 * "bug" is unavoidable, since in general the object may be destroyed
 * between a locate and a request.  Note that this only checks that
 * the appropriate ObjectAdapter is available, not that the servant
 * actually exists.
 * Need to signal one of OBJECT_HERE, OBJECT_FORWARD, OBJECT_NOT_EXIST.
 * @return Result is null if object is (possibly) implemented here, otherwise
 * an IOR indicating objref to forward the request to.
 * @exception OBJECT_NOT_EXIST is thrown if we know the object does not
 * exist here, and we are not forwarding.
 */
public IOR locate(ObjectKey okey)
{
    try {
        if (orb.subcontractDebugFlag)
            dprint(".locate->");

        ObjectKeyTemplate oktemp = okey.getTemplate() ;

        try {
            checkServerId(okey);
        } catch (ForwardException fex) {
            return fex.getIOR() ;
        }

        // Called only for its side-effect of throwing appropriate exceptions
        findObjectAdapter(oktemp);

        return null ;
    } finally {
        if (orb.subcontractDebugFlag)
            dprint(".locate<-");
    }
}
 
Example 3
Source File: CorbaServerRequestDispatcherImpl.java    From hottub with GNU General Public License v2.0 6 votes vote down vote up
/** XXX/REVISIT:
 * We do not want to look for a servant in the POA/ServantManager case,
 * but we could in most other cases.  The OA could have a method that
 * returns true if the servant MAY exist, and false only if the servant
 * definitely DOES NOT exist.
 *
 * XXX/REVISIT:
 * We may wish to indicate OBJECT_HERE by some mechanism other than
 * returning a null result.
 *
 * Called from ORB.locate when a LocateRequest arrives.
 * Result is not always absolutely correct: may indicate OBJECT_HERE
 * for non-existent objects, which is resolved on invocation.  This
 * "bug" is unavoidable, since in general the object may be destroyed
 * between a locate and a request.  Note that this only checks that
 * the appropriate ObjectAdapter is available, not that the servant
 * actually exists.
 * Need to signal one of OBJECT_HERE, OBJECT_FORWARD, OBJECT_NOT_EXIST.
 * @return Result is null if object is (possibly) implemented here, otherwise
 * an IOR indicating objref to forward the request to.
 * @exception OBJECT_NOT_EXIST is thrown if we know the object does not
 * exist here, and we are not forwarding.
 */
public IOR locate(ObjectKey okey)
{
    try {
        if (orb.subcontractDebugFlag)
            dprint(".locate->");

        ObjectKeyTemplate oktemp = okey.getTemplate() ;

        try {
            checkServerId(okey);
        } catch (ForwardException fex) {
            return fex.getIOR() ;
        }

        // Called only for its side-effect of throwing appropriate exceptions
        findObjectAdapter(oktemp);

        return null ;
    } finally {
        if (orb.subcontractDebugFlag)
            dprint(".locate<-");
    }
}
 
Example 4
Source File: CorbaServerRequestDispatcherImpl.java    From openjdk-jdk9 with GNU General Public License v2.0 6 votes vote down vote up
protected void checkServerId(ObjectKey okey)
{
    try {
        if (orb.subcontractDebugFlag) {
            dprint(".checkServerId->");
        }

        ObjectKeyTemplate oktemp = okey.getTemplate() ;
        int sId = oktemp.getServerId() ;
        int scid = oktemp.getSubcontractId() ;

        if (!orb.isLocalServerId(scid, sId)) {
            if (orb.subcontractDebugFlag) {
                dprint(".checkServerId: bad server id");
            }

            orb.handleBadServerId(okey);
        }
    } finally {
        if (orb.subcontractDebugFlag) {
            dprint(".checkServerId<-");
        }
    }
}
 
Example 5
Source File: CorbaServerRequestDispatcherImpl.java    From jdk8u60 with GNU General Public License v2.0 6 votes vote down vote up
protected void checkServerId(ObjectKey okey)
{
    try {
        if (orb.subcontractDebugFlag) {
            dprint(".checkServerId->");
        }

        ObjectKeyTemplate oktemp = okey.getTemplate() ;
        int sId = oktemp.getServerId() ;
        int scid = oktemp.getSubcontractId() ;

        if (!orb.isLocalServerId(scid, sId)) {
            if (orb.subcontractDebugFlag) {
                dprint(".checkServerId: bad server id");
            }

            orb.handleBadServerId(okey);
        }
    } finally {
        if (orb.subcontractDebugFlag) {
            dprint(".checkServerId<-");
        }
    }
}
 
Example 6
Source File: CorbaServerRequestDispatcherImpl.java    From TencentKona-8 with GNU General Public License v2.0 6 votes vote down vote up
protected void checkServerId(ObjectKey okey)
{
    try {
        if (orb.subcontractDebugFlag) {
            dprint(".checkServerId->");
        }

        ObjectKeyTemplate oktemp = okey.getTemplate() ;
        int sId = oktemp.getServerId() ;
        int scid = oktemp.getSubcontractId() ;

        if (!orb.isLocalServerId(scid, sId)) {
            if (orb.subcontractDebugFlag) {
                dprint(".checkServerId: bad server id");
            }

            orb.handleBadServerId(okey);
        }
    } finally {
        if (orb.subcontractDebugFlag) {
            dprint(".checkServerId<-");
        }
    }
}
 
Example 7
Source File: CorbaServerRequestDispatcherImpl.java    From hottub with GNU General Public License v2.0 6 votes vote down vote up
protected void checkServerId(ObjectKey okey)
{
    try {
        if (orb.subcontractDebugFlag) {
            dprint(".checkServerId->");
        }

        ObjectKeyTemplate oktemp = okey.getTemplate() ;
        int sId = oktemp.getServerId() ;
        int scid = oktemp.getSubcontractId() ;

        if (!orb.isLocalServerId(scid, sId)) {
            if (orb.subcontractDebugFlag) {
                dprint(".checkServerId: bad server id");
            }

            orb.handleBadServerId(okey);
        }
    } finally {
        if (orb.subcontractDebugFlag) {
            dprint(".checkServerId<-");
        }
    }
}
 
Example 8
Source File: CorbaServerRequestDispatcherImpl.java    From jdk1.8-source-analysis with Apache License 2.0 6 votes vote down vote up
protected void checkServerId(ObjectKey okey)
{
    try {
        if (orb.subcontractDebugFlag) {
            dprint(".checkServerId->");
        }

        ObjectKeyTemplate oktemp = okey.getTemplate() ;
        int sId = oktemp.getServerId() ;
        int scid = oktemp.getSubcontractId() ;

        if (!orb.isLocalServerId(scid, sId)) {
            if (orb.subcontractDebugFlag) {
                dprint(".checkServerId: bad server id");
            }

            orb.handleBadServerId(okey);
        }
    } finally {
        if (orb.subcontractDebugFlag) {
            dprint(".checkServerId<-");
        }
    }
}
 
Example 9
Source File: CorbaServerRequestDispatcherImpl.java    From openjdk-jdk9 with GNU General Public License v2.0 6 votes vote down vote up
/** XXX/REVISIT:
 * We do not want to look for a servant in the POA/ServantManager case,
 * but we could in most other cases.  The OA could have a method that
 * returns true if the servant MAY exist, and false only if the servant
 * definitely DOES NOT exist.
 *
 * XXX/REVISIT:
 * We may wish to indicate OBJECT_HERE by some mechanism other than
 * returning a null result.
 *
 * Called from ORB.locate when a LocateRequest arrives.
 * Result is not always absolutely correct: may indicate OBJECT_HERE
 * for non-existent objects, which is resolved on invocation.  This
 * "bug" is unavoidable, since in general the object may be destroyed
 * between a locate and a request.  Note that this only checks that
 * the appropriate ObjectAdapter is available, not that the servant
 * actually exists.
 * Need to signal one of OBJECT_HERE, OBJECT_FORWARD, OBJECT_NOT_EXIST.
 * @return Result is null if object is (possibly) implemented here, otherwise
 * an IOR indicating objref to forward the request to.
 * @exception OBJECT_NOT_EXIST is thrown if we know the object does not
 * exist here, and we are not forwarding.
 */
public IOR locate(ObjectKey okey)
{
    try {
        if (orb.subcontractDebugFlag)
            dprint(".locate->");

        ObjectKeyTemplate oktemp = okey.getTemplate() ;

        try {
            checkServerId(okey);
        } catch (ForwardException fex) {
            return fex.getIOR() ;
        }

        // Called only for its side-effect of throwing appropriate exceptions
        findObjectAdapter(oktemp);

        return null ;
    } finally {
        if (orb.subcontractDebugFlag)
            dprint(".locate<-");
    }
}
 
Example 10
Source File: IIOPProfileImpl.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
private void init( InputStream istr )
{
    // First, read all of the IIOP IOR data
    GIOPVersion version = new GIOPVersion() ;
    version.read( istr ) ;
    IIOPAddress primary = new IIOPAddressImpl( istr ) ;
    byte[] key = EncapsulationUtility.readOctets( istr ) ;

    ObjectKey okey = orb.getObjectKeyFactory().create( key ) ;
    oktemp = okey.getTemplate() ;
    oid = okey.getId() ;

    proftemp = IIOPFactories.makeIIOPProfileTemplate( orb,
        version, primary ) ;

    // Handle any tagged components (if applicable)
    if (version.getMinor() > 0)
        EncapsulationUtility.readIdentifiableSequence( proftemp,
            orb.getTaggedComponentFactoryFinder(), istr ) ;

    // If there is no codebase in this IOR and there IS a
    // java.rmi.server.codebase property set, we need to
    // update the IOR with the local codebase.  Note that
    // there is only one instance of the local codebase, but it
    // can be safely shared in multiple IORs since it is immutable.
    if (uncachedGetCodeBase() == null) {
        JavaCodebaseComponent jcc = LocalCodeBaseSingletonHolder.comp ;

        if (jcc != null) {
            if (version.getMinor() > 0)
                proftemp.add( jcc ) ;

            codebase = jcc.getURLs() ;
        }

        // Whether codebase is null or not, we have it,
        // and so getCodebase ned never call uncachedGetCodebase.
        cachedCodebase = true;
    }
}
 
Example 11
Source File: IIOPProfileImpl.java    From openjdk-8 with GNU General Public License v2.0 5 votes vote down vote up
private void init( InputStream istr )
{
    // First, read all of the IIOP IOR data
    GIOPVersion version = new GIOPVersion() ;
    version.read( istr ) ;
    IIOPAddress primary = new IIOPAddressImpl( istr ) ;
    byte[] key = EncapsulationUtility.readOctets( istr ) ;

    ObjectKey okey = orb.getObjectKeyFactory().create( key ) ;
    oktemp = okey.getTemplate() ;
    oid = okey.getId() ;

    proftemp = IIOPFactories.makeIIOPProfileTemplate( orb,
        version, primary ) ;

    // Handle any tagged components (if applicable)
    if (version.getMinor() > 0)
        EncapsulationUtility.readIdentifiableSequence( proftemp,
            orb.getTaggedComponentFactoryFinder(), istr ) ;

    // If there is no codebase in this IOR and there IS a
    // java.rmi.server.codebase property set, we need to
    // update the IOR with the local codebase.  Note that
    // there is only one instance of the local codebase, but it
    // can be safely shared in multiple IORs since it is immutable.
    if (uncachedGetCodeBase() == null) {
        JavaCodebaseComponent jcc = LocalCodeBaseSingletonHolder.comp ;

        if (jcc != null) {
            if (version.getMinor() > 0)
                proftemp.add( jcc ) ;

            codebase = jcc.getURLs() ;
        }

        // Whether codebase is null or not, we have it,
        // and so getCodebase ned never call uncachedGetCodebase.
        cachedCodebase = true;
    }
}
 
Example 12
Source File: IIOPProfileImpl.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
private void init( InputStream istr )
{
    // First, read all of the IIOP IOR data
    GIOPVersion version = new GIOPVersion() ;
    version.read( istr ) ;
    IIOPAddress primary = new IIOPAddressImpl( istr ) ;
    byte[] key = EncapsulationUtility.readOctets( istr ) ;

    ObjectKey okey = orb.getObjectKeyFactory().create( key ) ;
    oktemp = okey.getTemplate() ;
    oid = okey.getId() ;

    proftemp = IIOPFactories.makeIIOPProfileTemplate( orb,
        version, primary ) ;

    // Handle any tagged components (if applicable)
    if (version.getMinor() > 0)
        EncapsulationUtility.readIdentifiableSequence( proftemp,
            orb.getTaggedComponentFactoryFinder(), istr ) ;

    // If there is no codebase in this IOR and there IS a
    // java.rmi.server.codebase property set, we need to
    // update the IOR with the local codebase.  Note that
    // there is only one instance of the local codebase, but it
    // can be safely shared in multiple IORs since it is immutable.
    if (uncachedGetCodeBase() == null) {
        JavaCodebaseComponent jcc = LocalCodeBaseSingletonHolder.comp ;

        if (jcc != null) {
            if (version.getMinor() > 0)
                proftemp.add( jcc ) ;

            codebase = jcc.getURLs() ;
        }

        // Whether codebase is null or not, we have it,
        // and so getCodebase ned never call uncachedGetCodebase.
        cachedCodebase = true;
    }
}
 
Example 13
Source File: IIOPProfileImpl.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
private void init( InputStream istr )
{
    // First, read all of the IIOP IOR data
    GIOPVersion version = new GIOPVersion() ;
    version.read( istr ) ;
    IIOPAddress primary = new IIOPAddressImpl( istr ) ;
    byte[] key = EncapsulationUtility.readOctets( istr ) ;

    ObjectKey okey = orb.getObjectKeyFactory().create( key ) ;
    oktemp = okey.getTemplate() ;
    oid = okey.getId() ;

    proftemp = IIOPFactories.makeIIOPProfileTemplate( orb,
        version, primary ) ;

    // Handle any tagged components (if applicable)
    if (version.getMinor() > 0)
        EncapsulationUtility.readIdentifiableSequence( proftemp,
            orb.getTaggedComponentFactoryFinder(), istr ) ;

    // If there is no codebase in this IOR and there IS a
    // java.rmi.server.codebase property set, we need to
    // update the IOR with the local codebase.  Note that
    // there is only one instance of the local codebase, but it
    // can be safely shared in multiple IORs since it is immutable.
    if (uncachedGetCodeBase() == null) {
        JavaCodebaseComponent jcc = LocalCodeBaseSingletonHolder.comp ;

        if (jcc != null) {
            if (version.getMinor() > 0)
                proftemp.add( jcc ) ;

            codebase = jcc.getURLs() ;
        }

        // Whether codebase is null or not, we have it,
        // and so getCodebase ned never call uncachedGetCodebase.
        cachedCodebase = true;
    }
}
 
Example 14
Source File: IIOPProfileImpl.java    From JDKSourceCode1.8 with MIT License 5 votes vote down vote up
private void init( InputStream istr )
{
    // First, read all of the IIOP IOR data
    GIOPVersion version = new GIOPVersion() ;
    version.read( istr ) ;
    IIOPAddress primary = new IIOPAddressImpl( istr ) ;
    byte[] key = EncapsulationUtility.readOctets( istr ) ;

    ObjectKey okey = orb.getObjectKeyFactory().create( key ) ;
    oktemp = okey.getTemplate() ;
    oid = okey.getId() ;

    proftemp = IIOPFactories.makeIIOPProfileTemplate( orb,
        version, primary ) ;

    // Handle any tagged components (if applicable)
    if (version.getMinor() > 0)
        EncapsulationUtility.readIdentifiableSequence( proftemp,
            orb.getTaggedComponentFactoryFinder(), istr ) ;

    // If there is no codebase in this IOR and there IS a
    // java.rmi.server.codebase property set, we need to
    // update the IOR with the local codebase.  Note that
    // there is only one instance of the local codebase, but it
    // can be safely shared in multiple IORs since it is immutable.
    if (uncachedGetCodeBase() == null) {
        JavaCodebaseComponent jcc = LocalCodeBaseSingletonHolder.comp ;

        if (jcc != null) {
            if (version.getMinor() > 0)
                proftemp.add( jcc ) ;

            codebase = jcc.getURLs() ;
        }

        // Whether codebase is null or not, we have it,
        // and so getCodebase ned never call uncachedGetCodebase.
        cachedCodebase = true;
    }
}
 
Example 15
Source File: IIOPProfileImpl.java    From openjdk-8-source with GNU General Public License v2.0 5 votes vote down vote up
private void init( InputStream istr )
{
    // First, read all of the IIOP IOR data
    GIOPVersion version = new GIOPVersion() ;
    version.read( istr ) ;
    IIOPAddress primary = new IIOPAddressImpl( istr ) ;
    byte[] key = EncapsulationUtility.readOctets( istr ) ;

    ObjectKey okey = orb.getObjectKeyFactory().create( key ) ;
    oktemp = okey.getTemplate() ;
    oid = okey.getId() ;

    proftemp = IIOPFactories.makeIIOPProfileTemplate( orb,
        version, primary ) ;

    // Handle any tagged components (if applicable)
    if (version.getMinor() > 0)
        EncapsulationUtility.readIdentifiableSequence( proftemp,
            orb.getTaggedComponentFactoryFinder(), istr ) ;

    // If there is no codebase in this IOR and there IS a
    // java.rmi.server.codebase property set, we need to
    // update the IOR with the local codebase.  Note that
    // there is only one instance of the local codebase, but it
    // can be safely shared in multiple IORs since it is immutable.
    if (uncachedGetCodeBase() == null) {
        JavaCodebaseComponent jcc = LocalCodeBaseSingletonHolder.comp ;

        if (jcc != null) {
            if (version.getMinor() > 0)
                proftemp.add( jcc ) ;

            codebase = jcc.getURLs() ;
        }

        // Whether codebase is null or not, we have it,
        // and so getCodebase ned never call uncachedGetCodebase.
        cachedCodebase = true;
    }
}
 
Example 16
Source File: IIOPProfileImpl.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
private void init( InputStream istr )
{
    // First, read all of the IIOP IOR data
    GIOPVersion version = new GIOPVersion() ;
    version.read( istr ) ;
    IIOPAddress primary = new IIOPAddressImpl( istr ) ;
    byte[] key = EncapsulationUtility.readOctets( istr ) ;

    ObjectKey okey = orb.getObjectKeyFactory().create( key ) ;
    oktemp = okey.getTemplate() ;
    oid = okey.getId() ;

    proftemp = IIOPFactories.makeIIOPProfileTemplate( orb,
        version, primary ) ;

    // Handle any tagged components (if applicable)
    if (version.getMinor() > 0)
        EncapsulationUtility.readIdentifiableSequence( proftemp,
            orb.getTaggedComponentFactoryFinder(), istr ) ;

    // If there is no codebase in this IOR and there IS a
    // java.rmi.server.codebase property set, we need to
    // update the IOR with the local codebase.  Note that
    // there is only one instance of the local codebase, but it
    // can be safely shared in multiple IORs since it is immutable.
    if (uncachedGetCodeBase() == null) {
        JavaCodebaseComponent jcc = LocalCodeBaseSingletonHolder.comp ;

        if (jcc != null) {
            if (version.getMinor() > 0)
                proftemp.add( jcc ) ;

            codebase = jcc.getURLs() ;
        }

        // Whether codebase is null or not, we have it,
        // and so getCodebase ned never call uncachedGetCodebase.
        cachedCodebase = true;
    }
}
 
Example 17
Source File: CorbaMessageMediatorImpl.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 4 votes vote down vote up
protected void handleRequestRequest(CorbaMessageMediator messageMediator)
{
    // Does nothing if already unmarshaled.
    ((CDRInputObject)messageMediator.getInputObject()).unmarshalHeader();

    ORB orb = (ORB)messageMediator.getBroker();
    synchronized (orb) {
        orb.checkShutdownState();
    }

    ObjectKey okey = messageMediator.getObjectKey();
    if (orb.subcontractDebugFlag) {
        ObjectKeyTemplate oktemp = okey.getTemplate() ;
        dprint( ".handleRequest: " + opAndId(messageMediator)
                + ": dispatching to scid: " + oktemp.getSubcontractId());
    }

    CorbaServerRequestDispatcher sc = okey.getServerRequestDispatcher(orb);

    if (orb.subcontractDebugFlag) {
        dprint(".handleRequest: " + opAndId(messageMediator)
               + ": dispatching to sc: " + sc);
    }

    if (sc == null) {
        throw wrapper.noServerScInDispatch() ;
    }

    // NOTE:
    // This is necessary so mediator can act as ResponseHandler
    // and pass necessary info to response constructors located
    // in the subcontract.
    // REVISIT - same class right now.
    //messageMediator.setProtocolHandler(this);

    try {
        orb.startingDispatch();
        sc.dispatch(messageMediator);
    } finally {
        orb.finishedDispatch();
    }
}
 
Example 18
Source File: CorbaMessageMediatorImpl.java    From TencentKona-8 with GNU General Public License v2.0 4 votes vote down vote up
protected void handleRequestRequest(CorbaMessageMediator messageMediator)
{
    // Does nothing if already unmarshaled.
    ((CDRInputObject)messageMediator.getInputObject()).unmarshalHeader();

    ORB orb = (ORB)messageMediator.getBroker();
    synchronized (orb) {
        orb.checkShutdownState();
    }

    ObjectKey okey = messageMediator.getObjectKey();
    if (orb.subcontractDebugFlag) {
        ObjectKeyTemplate oktemp = okey.getTemplate() ;
        dprint( ".handleRequest: " + opAndId(messageMediator)
                + ": dispatching to scid: " + oktemp.getSubcontractId());
    }

    CorbaServerRequestDispatcher sc = okey.getServerRequestDispatcher(orb);

    if (orb.subcontractDebugFlag) {
        dprint(".handleRequest: " + opAndId(messageMediator)
               + ": dispatching to sc: " + sc);
    }

    if (sc == null) {
        throw wrapper.noServerScInDispatch() ;
    }

    // NOTE:
    // This is necessary so mediator can act as ResponseHandler
    // and pass necessary info to response constructors located
    // in the subcontract.
    // REVISIT - same class right now.
    //messageMediator.setProtocolHandler(this);

    try {
        orb.startingDispatch();
        sc.dispatch(messageMediator);
    } finally {
        orb.finishedDispatch();
    }
}
 
Example 19
Source File: CorbaMessageMediatorImpl.java    From openjdk-8 with GNU General Public License v2.0 4 votes vote down vote up
protected void handleRequestRequest(CorbaMessageMediator messageMediator)
{
    // Does nothing if already unmarshaled.
    ((CDRInputObject)messageMediator.getInputObject()).unmarshalHeader();

    ORB orb = (ORB)messageMediator.getBroker();
    synchronized (orb) {
        orb.checkShutdownState();
    }

    ObjectKey okey = messageMediator.getObjectKey();
    if (orb.subcontractDebugFlag) {
        ObjectKeyTemplate oktemp = okey.getTemplate() ;
        dprint( ".handleRequest: " + opAndId(messageMediator)
                + ": dispatching to scid: " + oktemp.getSubcontractId());
    }

    CorbaServerRequestDispatcher sc = okey.getServerRequestDispatcher(orb);

    if (orb.subcontractDebugFlag) {
        dprint(".handleRequest: " + opAndId(messageMediator)
               + ": dispatching to sc: " + sc);
    }

    if (sc == null) {
        throw wrapper.noServerScInDispatch() ;
    }

    // NOTE:
    // This is necessary so mediator can act as ResponseHandler
    // and pass necessary info to response constructors located
    // in the subcontract.
    // REVISIT - same class right now.
    //messageMediator.setProtocolHandler(this);

    try {
        orb.startingDispatch();
        sc.dispatch(messageMediator);
    } finally {
        orb.finishedDispatch();
    }
}
 
Example 20
Source File: CorbaMessageMediatorImpl.java    From openjdk-jdk8u with GNU General Public License v2.0 4 votes vote down vote up
protected void handleRequestRequest(CorbaMessageMediator messageMediator)
{
    // Does nothing if already unmarshaled.
    ((CDRInputObject)messageMediator.getInputObject()).unmarshalHeader();

    ORB orb = (ORB)messageMediator.getBroker();
    synchronized (orb) {
        orb.checkShutdownState();
    }

    ObjectKey okey = messageMediator.getObjectKey();
    if (orb.subcontractDebugFlag) {
        ObjectKeyTemplate oktemp = okey.getTemplate() ;
        dprint( ".handleRequest: " + opAndId(messageMediator)
                + ": dispatching to scid: " + oktemp.getSubcontractId());
    }

    CorbaServerRequestDispatcher sc = okey.getServerRequestDispatcher(orb);

    if (orb.subcontractDebugFlag) {
        dprint(".handleRequest: " + opAndId(messageMediator)
               + ": dispatching to sc: " + sc);
    }

    if (sc == null) {
        throw wrapper.noServerScInDispatch() ;
    }

    // NOTE:
    // This is necessary so mediator can act as ResponseHandler
    // and pass necessary info to response constructors located
    // in the subcontract.
    // REVISIT - same class right now.
    //messageMediator.setProtocolHandler(this);

    try {
        orb.startingDispatch();
        sc.dispatch(messageMediator);
    } finally {
        orb.finishedDispatch();
    }
}