Java Code Examples for com.sun.corba.se.spi.ior.ObjectKeyTemplate

The following examples show how to use com.sun.corba.se.spi.ior.ObjectKeyTemplate. 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
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 2
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 3
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 4
/** 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 5
/** 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 6
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
protected LocalClientRequestDispatcherBase(ORB orb, int scid, IOR ior)
{
    this.orb = orb ;

    TaggedProfile prof = ior.getProfile() ;
    servantIsLocal = orb.getORBData().isLocalOptimizationAllowed() &&
        prof.isLocal();

    ObjectKeyTemplate oktemp = prof.getObjectKeyTemplate() ;
    this.scid = oktemp.getSubcontractId() ;
    RequestDispatcherRegistry sreg = orb.getRequestDispatcherRegistry() ;
    oaf = sreg.getObjectAdapterFactory( scid ) ;
    oaid = oktemp.getObjectAdapterId() ;
    ObjectId oid = prof.getObjectId() ;
    objectId = oid.getId() ;
}
 
Example 8
Source Project: TencentKona-8   Source File: TOAImpl.java    License: GNU General Public License v2.0 6 votes vote down vote up
public TOAImpl( ORB orb, TransientObjectManager tom, String codebase )
{
    super( orb ) ;
    servants = tom ;

    // Make the object key template
    int serverid = ((ORB)getORB()).getTransientServerId();
    int scid = ORBConstants.TOA_SCID ;

    ObjectKeyTemplate oktemp = new JIDLObjectKeyTemplate( orb, scid, serverid ) ;

    // REVISIT - POA specific
    Policies policies = Policies.defaultPolicies;

    // REVISIT - absorb codebase into a policy
    initializeTemplate( oktemp, true,
                        policies,
                        codebase,
                        null, // manager id
                        oktemp.getObjectAdapterId()
                        ) ;
}
 
Example 9
public void initializeServerPIInfo( CorbaMessageMediator request,
    ObjectAdapter oa, byte[] objectId, ObjectKeyTemplate oktemp )
{
    if( !hasServerInterceptors ) return;

    RequestInfoStack infoStack =
        (RequestInfoStack)threadLocalServerRequestInfoStack.get();
    ServerRequestInfoImpl info = new ServerRequestInfoImpl( orb );
    infoStack.push( info );
    printPush();

    // Notify request object that once response is constructed, make
    // sure we execute ending points.
    request.setExecutePIInResponseConstructor( true );

    info.setInfo( request, oa, objectId, oktemp );
}
 
Example 10
public void write( ObjectKeyTemplate okeyTemplate, ObjectId id, OutputStream os)
{
    giopVersion.write( os ) ;
    primary.write( os ) ;

    // Note that this is NOT an encapsulation: do not marshal
    // the endianness flag.  However, the length is required.
    // Note that this cannot be accomplished with a codec!

    // Use the byte order of the given stream
    OutputStream encapsulatedOS =
        sun.corba.OutputStreamFactory.newEncapsOutputStream(
            (ORB)os.orb(), ((CDROutputStream)os).isLittleEndian() ) ;

    okeyTemplate.write( id, encapsulatedOS ) ;
    EncapsulationUtility.writeOutputStream( encapsulatedOS, os ) ;

    if (giopVersion.getMinor() > 0)
        EncapsulationUtility.writeIdentifiableSequence( this, os ) ;
}
 
Example 11
public void write( ObjectKeyTemplate okeyTemplate, ObjectId id, OutputStream os)
{
    giopVersion.write( os ) ;
    primary.write( os ) ;

    // Note that this is NOT an encapsulation: do not marshal
    // the endianness flag.  However, the length is required.
    // Note that this cannot be accomplished with a codec!

    // Use the byte order of the given stream
    OutputStream encapsulatedOS =
        sun.corba.OutputStreamFactory.newEncapsOutputStream(
            (ORB)os.orb(), ((CDROutputStream)os).isLittleEndian() ) ;

    okeyTemplate.write( id, encapsulatedOS ) ;
    EncapsulationUtility.writeOutputStream( encapsulatedOS, os ) ;

    if (giopVersion.getMinor() > 0)
        EncapsulationUtility.writeIdentifiableSequence( this, os ) ;
}
 
Example 12
/** 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 13
Source Project: openjdk-8   Source File: PIHandlerImpl.java    License: GNU General Public License v2.0 6 votes vote down vote up
public void initializeServerPIInfo( CorbaMessageMediator request,
    ObjectAdapter oa, byte[] objectId, ObjectKeyTemplate oktemp )
{
    if( !hasServerInterceptors ) return;

    RequestInfoStack infoStack =
        (RequestInfoStack)threadLocalServerRequestInfoStack.get();
    ServerRequestInfoImpl info = new ServerRequestInfoImpl( orb );
    infoStack.push( info );
    printPush();

    // Notify request object that once response is constructed, make
    // sure we execute ending points.
    request.setExecutePIInResponseConstructor( true );

    info.setInfo( request, oa, objectId, oktemp );
}
 
Example 14
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 15
Source Project: jdk8u60   Source File: TOAImpl.java    License: GNU General Public License v2.0 6 votes vote down vote up
public TOAImpl( ORB orb, TransientObjectManager tom, String codebase )
{
    super( orb ) ;
    servants = tom ;

    // Make the object key template
    int serverid = ((ORB)getORB()).getTransientServerId();
    int scid = ORBConstants.TOA_SCID ;

    ObjectKeyTemplate oktemp = new JIDLObjectKeyTemplate( orb, scid, serverid ) ;

    // REVISIT - POA specific
    Policies policies = Policies.defaultPolicies;

    // REVISIT - absorb codebase into a policy
    initializeTemplate( oktemp, true,
                        policies,
                        codebase,
                        null, // manager id
                        oktemp.getObjectAdapterId()
                        ) ;
}
 
Example 16
Source Project: openjdk-jdk8u   Source File: PIHandlerImpl.java    License: GNU General Public License v2.0 6 votes vote down vote up
public void initializeServerPIInfo( CorbaMessageMediator request,
    ObjectAdapter oa, byte[] objectId, ObjectKeyTemplate oktemp )
{
    if( !hasServerInterceptors ) return;

    RequestInfoStack infoStack =
        (RequestInfoStack)threadLocalServerRequestInfoStack.get();
    ServerRequestInfoImpl info = new ServerRequestInfoImpl( orb );
    infoStack.push( info );
    printPush();

    // Notify request object that once response is constructed, make
    // sure we execute ending points.
    request.setExecutePIInResponseConstructor( true );

    info.setInfo( request, oa, objectId, oktemp );
}
 
Example 17
Source Project: hottub   Source File: TOAImpl.java    License: GNU General Public License v2.0 6 votes vote down vote up
public TOAImpl( ORB orb, TransientObjectManager tom, String codebase )
{
    super( orb ) ;
    servants = tom ;

    // Make the object key template
    int serverid = ((ORB)getORB()).getTransientServerId();
    int scid = ORBConstants.TOA_SCID ;

    ObjectKeyTemplate oktemp = new JIDLObjectKeyTemplate( orb, scid, serverid ) ;

    // REVISIT - POA specific
    Policies policies = Policies.defaultPolicies;

    // REVISIT - absorb codebase into a policy
    initializeTemplate( oktemp, true,
                        policies,
                        codebase,
                        null, // manager id
                        oktemp.getObjectAdapterId()
                        ) ;
}
 
Example 18
/**
 * Stores the various sources of information used for this info object.
 */
protected void setInfo( CorbaMessageMediator request, ObjectAdapter oa,
    byte[] objectId, ObjectKeyTemplate oktemp )
{
    this.request = request;
    this.objectId = objectId;
    this.oktemp = oktemp;
    this.objectAdapter = oa ;
    this.connection = (com.sun.corba.se.spi.legacy.connection.Connection)
        request.getConnection();
}
 
Example 19
Source Project: openjdk-jdk9   Source File: IORImpl.java    License: GNU General Public License v2.0 5 votes vote down vote up
private void initializeIORTemplateList()
{
    // Maps ObjectKeyTemplate to IORTemplate
    Map oktempToIORTemplate = new HashMap() ;

    iortemps = IORFactories.makeIORTemplateList() ;
    Iterator iter = iterator() ;
    ObjectId oid = null ; // used to check that all profiles have the same oid.
    while (iter.hasNext()) {
        TaggedProfile prof = (TaggedProfile)(iter.next()) ;
        TaggedProfileTemplate ptemp = prof.getTaggedProfileTemplate() ;
        ObjectKeyTemplate oktemp = prof.getObjectKeyTemplate() ;

        // Check that all oids for all profiles are the same: if they are not,
        // throw exception.
        if (oid == null)
            oid = prof.getObjectId() ;
        else if (!oid.equals( prof.getObjectId() ))
            throw wrapper.badOidInIorTemplateList() ;

        // Find or create the IORTemplate for oktemp.
        IORTemplate iortemp = (IORTemplate)(oktempToIORTemplate.get( oktemp )) ;
        if (iortemp == null) {
            iortemp = IORFactories.makeIORTemplate( oktemp ) ;
            oktempToIORTemplate.put( oktemp, iortemp ) ;
            iortemps.add( iortemp ) ;
        }

        iortemp.add( ptemp ) ;
    }

    iortemps.makeImmutable() ;
}
 
Example 20
private ObjectAdapter findObjectAdapter(ObjectKeyTemplate oktemp)
{
    try {
        if (orb.subcontractDebugFlag) {
            dprint(".findObjectAdapter->");
        }

        RequestDispatcherRegistry scr = orb.getRequestDispatcherRegistry() ;
        int scid = oktemp.getSubcontractId() ;
        ObjectAdapterFactory oaf = scr.getObjectAdapterFactory(scid);
        if (oaf == null) {
            if (orb.subcontractDebugFlag) {
                dprint(".findObjectAdapter: failed to find ObjectAdapterFactory");
            }

            throw wrapper.noObjectAdapterFactory() ;
        }

        ObjectAdapterId oaid = oktemp.getObjectAdapterId() ;
        ObjectAdapter oa = oaf.find(oaid);

        if (oa == null) {
            if (orb.subcontractDebugFlag) {
                dprint(".findObjectAdapter: failed to find ObjectAdaptor");
            }

            throw wrapper.badAdapterId() ;
        }

        return oa ;
    } finally {
        if (orb.subcontractDebugFlag) {
            dprint(".findObjectAdapter<-");
        }
    }
}
 
Example 21
public IIOPProfileImpl( ORB orb, ObjectKeyTemplate oktemp, ObjectId oid,
    IIOPProfileTemplate proftemp )
{
    this( orb ) ;
    this.oktemp = oktemp ;
    this.oid = oid ;
    this.proftemp = proftemp ;
}
 
Example 22
Source Project: hottub   Source File: ObjectKeyFactoryImpl.java    License: GNU General Public License v2.0 5 votes vote down vote up
/** Creates an ObjectKeyTemplate from the InputStream.  Most of the
* decoding is done inside the handler.
*/
private ObjectKeyTemplate create( InputStream is, Handler handler,
    OctetSeqHolder osh )
{
    ObjectKeyTemplate oktemp = null ;

    try {
        is.mark(0) ;
        int magic = is.read_long() ;

        if (validMagic( magic )) {
            int scid = is.read_long() ;
            oktemp = handler.handle( magic, scid, is, osh ) ;
        }
    } catch (MARSHAL mexc) {
        // XXX log this error
        // ignore this: error handled below because oktemp == null
    }

    if (oktemp == null)
        // If we did not successfully construct a oktemp, reset the
        // stream so that WireObjectKeyTemplate can correctly construct the
        // object key.
        try {
            is.reset() ;
        } catch (IOException exc) {
            // XXX log this error
            // ignore this
        }

    return oktemp ;
}
 
Example 23
Source Project: hottub   Source File: IORImpl.java    License: GNU General Public License v2.0 5 votes vote down vote up
private void addTaggedProfiles( IORTemplate iortemp, ObjectId id )
{
    ObjectKeyTemplate oktemp = iortemp.getObjectKeyTemplate() ;
    Iterator templateIterator = iortemp.iterator() ;

    while (templateIterator.hasNext()) {
        TaggedProfileTemplate ptemp =
            (TaggedProfileTemplate)(templateIterator.next()) ;

        TaggedProfile profile = ptemp.create( oktemp, id ) ;

        add( profile ) ;
    }
}
 
Example 24
Source Project: openjdk-jdk8u-backup   Source File: IORImpl.java    License: GNU General Public License v2.0 5 votes vote down vote up
private void addTaggedProfiles( IORTemplate iortemp, ObjectId id )
{
    ObjectKeyTemplate oktemp = iortemp.getObjectKeyTemplate() ;
    Iterator templateIterator = iortemp.iterator() ;

    while (templateIterator.hasNext()) {
        TaggedProfileTemplate ptemp =
            (TaggedProfileTemplate)(templateIterator.next()) ;

        TaggedProfile profile = ptemp.create( oktemp, id ) ;

        add( profile ) ;
    }
}
 
Example 25
/** Creates an ObjectKeyTemplate from the InputStream.  Most of the
* decoding is done inside the handler.
*/
private ObjectKeyTemplate create( InputStream is, Handler handler,
    OctetSeqHolder osh )
{
    ObjectKeyTemplate oktemp = null ;

    try {
        is.mark(0) ;
        int magic = is.read_long() ;

        if (validMagic( magic )) {
            int scid = is.read_long() ;
            oktemp = handler.handle( magic, scid, is, osh ) ;
        }
    } catch (MARSHAL mexc) {
        // XXX log this error
        // ignore this: error handled below because oktemp == null
    }

    if (oktemp == null)
        // If we did not successfully construct a oktemp, reset the
        // stream so that WireObjectKeyTemplate can correctly construct the
        // object key.
        try {
            is.reset() ;
        } catch (IOException exc) {
            // XXX log this error
            // ignore this
        }

    return oktemp ;
}
 
Example 26
Source Project: JDKSourceCode1.8   Source File: ObjectKeyFactoryImpl.java    License: MIT License 5 votes vote down vote up
/** Creates an ObjectKeyTemplate from the InputStream.  Most of the
* decoding is done inside the handler.
*/
private ObjectKeyTemplate create( InputStream is, Handler handler,
    OctetSeqHolder osh )
{
    ObjectKeyTemplate oktemp = null ;

    try {
        is.mark(0) ;
        int magic = is.read_long() ;

        if (validMagic( magic )) {
            int scid = is.read_long() ;
            oktemp = handler.handle( magic, scid, is, osh ) ;
        }
    } catch (MARSHAL mexc) {
        // XXX log this error
        // ignore this: error handled below because oktemp == null
    }

    if (oktemp == null)
        // If we did not successfully construct a oktemp, reset the
        // stream so that WireObjectKeyTemplate can correctly construct the
        // object key.
        try {
            is.reset() ;
        } catch (IOException exc) {
            // XXX log this error
            // ignore this
        }

    return oktemp ;
}
 
Example 27
Source Project: openjdk-8-source   Source File: IORImpl.java    License: GNU General Public License v2.0 5 votes vote down vote up
private void initializeIORTemplateList()
{
    // Maps ObjectKeyTemplate to IORTemplate
    Map oktempToIORTemplate = new HashMap() ;

    iortemps = IORFactories.makeIORTemplateList() ;
    Iterator iter = iterator() ;
    ObjectId oid = null ; // used to check that all profiles have the same oid.
    while (iter.hasNext()) {
        TaggedProfile prof = (TaggedProfile)(iter.next()) ;
        TaggedProfileTemplate ptemp = prof.getTaggedProfileTemplate() ;
        ObjectKeyTemplate oktemp = prof.getObjectKeyTemplate() ;

        // Check that all oids for all profiles are the same: if they are not,
        // throw exception.
        if (oid == null)
            oid = prof.getObjectId() ;
        else if (!oid.equals( prof.getObjectId() ))
            throw wrapper.badOidInIorTemplateList() ;

        // Find or create the IORTemplate for oktemp.
        IORTemplate iortemp = (IORTemplate)(oktempToIORTemplate.get( oktemp )) ;
        if (iortemp == null) {
            iortemp = IORFactories.makeIORTemplate( oktemp ) ;
            oktempToIORTemplate.put( oktemp, iortemp ) ;
            iortemps.add( iortemp ) ;
        }

        iortemp.add( ptemp ) ;
    }

    iortemps.makeImmutable() ;
}
 
Example 28
private ObjectAdapter findObjectAdapter(ObjectKeyTemplate oktemp)
{
    try {
        if (orb.subcontractDebugFlag) {
            dprint(".findObjectAdapter->");
        }

        RequestDispatcherRegistry scr = orb.getRequestDispatcherRegistry() ;
        int scid = oktemp.getSubcontractId() ;
        ObjectAdapterFactory oaf = scr.getObjectAdapterFactory(scid);
        if (oaf == null) {
            if (orb.subcontractDebugFlag) {
                dprint(".findObjectAdapter: failed to find ObjectAdapterFactory");
            }

            throw wrapper.noObjectAdapterFactory() ;
        }

        ObjectAdapterId oaid = oktemp.getObjectAdapterId() ;
        ObjectAdapter oa = oaf.find(oaid);

        if (oa == null) {
            if (orb.subcontractDebugFlag) {
                dprint(".findObjectAdapter: failed to find ObjectAdaptor");
            }

            throw wrapper.badAdapterId() ;
        }

        return oa ;
    } finally {
        if (orb.subcontractDebugFlag) {
            dprint(".findObjectAdapter<-");
        }
    }
}
 
Example 29
private ObjectAdapter findObjectAdapter(ObjectKeyTemplate oktemp)
{
    try {
        if (orb.subcontractDebugFlag) {
            dprint(".findObjectAdapter->");
        }

        RequestDispatcherRegistry scr = orb.getRequestDispatcherRegistry() ;
        int scid = oktemp.getSubcontractId() ;
        ObjectAdapterFactory oaf = scr.getObjectAdapterFactory(scid);
        if (oaf == null) {
            if (orb.subcontractDebugFlag) {
                dprint(".findObjectAdapter: failed to find ObjectAdapterFactory");
            }

            throw wrapper.noObjectAdapterFactory() ;
        }

        ObjectAdapterId oaid = oktemp.getObjectAdapterId() ;
        ObjectAdapter oa = oaf.find(oaid);

        if (oa == null) {
            if (orb.subcontractDebugFlag) {
                dprint(".findObjectAdapter: failed to find ObjectAdaptor");
            }

            throw wrapper.badAdapterId() ;
        }

        return oa ;
    } finally {
        if (orb.subcontractDebugFlag) {
            dprint(".findObjectAdapter<-");
        }
    }
}
 
Example 30
/**
 * Stores the various sources of information used for this info object.
 */
protected void setInfo( CorbaMessageMediator request, ObjectAdapter oa,
    byte[] objectId, ObjectKeyTemplate oktemp )
{
    this.request = request;
    this.objectId = objectId;
    this.oktemp = oktemp;
    this.objectAdapter = oa ;
    this.connection = (com.sun.corba.se.spi.legacy.connection.Connection)
        request.getConnection();
}