org.omg.PortableInterceptor.ORBInitInfoPackage.InvalidName Java Examples

The following examples show how to use org.omg.PortableInterceptor.ORBInitInfoPackage.InvalidName. 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: ORBInitInfoImpl.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
/**
 * See orbos/99-12-02, Chapter 11, Dynamic Initial References on page
 * 11-81.  This operation is identical to ORB::register_initial_reference
 * described there.  This same functionality exists here because the ORB,
 * not yet fully initialized, is not yet available but initial references
 * may need to be registered as part of Interceptor registration.
 * <p>
 * This method may not be called during post_init.
 */
public void register_initial_reference( String id,
                                        org.omg.CORBA.Object obj )
    throws InvalidName
{
    checkStage();
    if( id == null ) nullParam();

    // As per CORBA 3.0 section 21.8.1,
    // if null is passed as the obj parameter,
    // throw BAD_PARAM with minor code OMGSystemException.RIR_WITH_NULL_OBJECT.
    // Though the spec is talking about IDL null, we will address both
    // Java null and IDL null:
    // Note: Local Objects can never be nil!
    if( obj == null ) {
        throw omgWrapper.rirWithNullObject() ;
    }

    // This check was made to determine that the objref is a
    // non-local objref that is fully
    // initialized: this was called only for its side-effects of
    // possibly throwing exceptions.  However, registering
    // local objects should be permitted!
    // XXX/Revisit?
    // IOR ior = ORBUtility.getIOR( obj ) ;

    // Delegate to ORB.  If ORB version throws InvalidName, convert to
    // equivalent Portable Interceptors InvalidName.
    try {
        orb.register_initial_reference( id, obj );
    } catch( org.omg.CORBA.ORBPackage.InvalidName e ) {
        InvalidName exc = new InvalidName( e.getMessage() );
        exc.initCause( e ) ;
        throw exc ;
    }
}
 
Example #2
Source File: ORBInitInfoImpl.java    From openjdk-8 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * This operation is only valid during post_init.  It is identical to
 * ORB::resolve_initial_references.  This same functionality exists here
 * because the ORB, not yet fully initialized, is not yet available,
 * but initial references may be required from the ORB as part
 * of Interceptor registration.
 * <p>
 * (incorporates changes from errata in orbos/00-01-01)
 * <p>
 * This method may not be called during pre_init.
 */
public org.omg.CORBA.Object resolve_initial_references (String id)
    throws InvalidName
{
    checkStage();
    if( id == null ) nullParam();

    if( stage == STAGE_PRE_INIT ) {
        // Initializer is not allowed to invoke this method during
        // this stage.

        // _REVISIT_ Spec issue: What exception should really be
        // thrown here?
        throw wrapper.rirInvalidPreInit() ;
    }

    org.omg.CORBA.Object objRef = null;

    try {
        objRef = orb.resolve_initial_references( id );
    }
    catch( org.omg.CORBA.ORBPackage.InvalidName e ) {
        // Convert PIDL to IDL exception:
        throw new InvalidName();
    }

    return objRef;
}
 
Example #3
Source File: ORBInitInfoImpl.java    From openjdk-8 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * See orbos/99-12-02, Chapter 11, Dynamic Initial References on page
 * 11-81.  This operation is identical to ORB::register_initial_reference
 * described there.  This same functionality exists here because the ORB,
 * not yet fully initialized, is not yet available but initial references
 * may need to be registered as part of Interceptor registration.
 * <p>
 * This method may not be called during post_init.
 */
public void register_initial_reference( String id,
                                        org.omg.CORBA.Object obj )
    throws InvalidName
{
    checkStage();
    if( id == null ) nullParam();

    // As per CORBA 3.0 section 21.8.1,
    // if null is passed as the obj parameter,
    // throw BAD_PARAM with minor code OMGSystemException.RIR_WITH_NULL_OBJECT.
    // Though the spec is talking about IDL null, we will address both
    // Java null and IDL null:
    // Note: Local Objects can never be nil!
    if( obj == null ) {
        throw omgWrapper.rirWithNullObject() ;
    }

    // This check was made to determine that the objref is a
    // non-local objref that is fully
    // initialized: this was called only for its side-effects of
    // possibly throwing exceptions.  However, registering
    // local objects should be permitted!
    // XXX/Revisit?
    // IOR ior = ORBUtility.getIOR( obj ) ;

    // Delegate to ORB.  If ORB version throws InvalidName, convert to
    // equivalent Portable Interceptors InvalidName.
    try {
        orb.register_initial_reference( id, obj );
    } catch( org.omg.CORBA.ORBPackage.InvalidName e ) {
        InvalidName exc = new InvalidName( e.getMessage() );
        exc.initCause( e ) ;
        throw exc ;
    }
}
 
Example #4
Source File: ORBInitInfoImpl.java    From openjdk-8-source with GNU General Public License v2.0 5 votes vote down vote up
/**
 * This operation is only valid during post_init.  It is identical to
 * ORB::resolve_initial_references.  This same functionality exists here
 * because the ORB, not yet fully initialized, is not yet available,
 * but initial references may be required from the ORB as part
 * of Interceptor registration.
 * <p>
 * (incorporates changes from errata in orbos/00-01-01)
 * <p>
 * This method may not be called during pre_init.
 */
public org.omg.CORBA.Object resolve_initial_references (String id)
    throws InvalidName
{
    checkStage();
    if( id == null ) nullParam();

    if( stage == STAGE_PRE_INIT ) {
        // Initializer is not allowed to invoke this method during
        // this stage.

        // _REVISIT_ Spec issue: What exception should really be
        // thrown here?
        throw wrapper.rirInvalidPreInit() ;
    }

    org.omg.CORBA.Object objRef = null;

    try {
        objRef = orb.resolve_initial_references( id );
    }
    catch( org.omg.CORBA.ORBPackage.InvalidName e ) {
        // Convert PIDL to IDL exception:
        throw new InvalidName();
    }

    return objRef;
}
 
Example #5
Source File: ORBInitInfoImpl.java    From openjdk-8-source with GNU General Public License v2.0 5 votes vote down vote up
/**
 * See orbos/99-12-02, Chapter 11, Dynamic Initial References on page
 * 11-81.  This operation is identical to ORB::register_initial_reference
 * described there.  This same functionality exists here because the ORB,
 * not yet fully initialized, is not yet available but initial references
 * may need to be registered as part of Interceptor registration.
 * <p>
 * This method may not be called during post_init.
 */
public void register_initial_reference( String id,
                                        org.omg.CORBA.Object obj )
    throws InvalidName
{
    checkStage();
    if( id == null ) nullParam();

    // As per CORBA 3.0 section 21.8.1,
    // if null is passed as the obj parameter,
    // throw BAD_PARAM with minor code OMGSystemException.RIR_WITH_NULL_OBJECT.
    // Though the spec is talking about IDL null, we will address both
    // Java null and IDL null:
    // Note: Local Objects can never be nil!
    if( obj == null ) {
        throw omgWrapper.rirWithNullObject() ;
    }

    // This check was made to determine that the objref is a
    // non-local objref that is fully
    // initialized: this was called only for its side-effects of
    // possibly throwing exceptions.  However, registering
    // local objects should be permitted!
    // XXX/Revisit?
    // IOR ior = ORBUtility.getIOR( obj ) ;

    // Delegate to ORB.  If ORB version throws InvalidName, convert to
    // equivalent Portable Interceptors InvalidName.
    try {
        orb.register_initial_reference( id, obj );
    } catch( org.omg.CORBA.ORBPackage.InvalidName e ) {
        InvalidName exc = new InvalidName( e.getMessage() );
        exc.initCause( e ) ;
        throw exc ;
    }
}
 
Example #6
Source File: ORBInitInfoImpl.java    From hottub with GNU General Public License v2.0 5 votes vote down vote up
/**
 * This operation is only valid during post_init.  It is identical to
 * ORB::resolve_initial_references.  This same functionality exists here
 * because the ORB, not yet fully initialized, is not yet available,
 * but initial references may be required from the ORB as part
 * of Interceptor registration.
 * <p>
 * (incorporates changes from errata in orbos/00-01-01)
 * <p>
 * This method may not be called during pre_init.
 */
public org.omg.CORBA.Object resolve_initial_references (String id)
    throws InvalidName
{
    checkStage();
    if( id == null ) nullParam();

    if( stage == STAGE_PRE_INIT ) {
        // Initializer is not allowed to invoke this method during
        // this stage.

        // _REVISIT_ Spec issue: What exception should really be
        // thrown here?
        throw wrapper.rirInvalidPreInit() ;
    }

    org.omg.CORBA.Object objRef = null;

    try {
        objRef = orb.resolve_initial_references( id );
    }
    catch( org.omg.CORBA.ORBPackage.InvalidName e ) {
        // Convert PIDL to IDL exception:
        throw new InvalidName();
    }

    return objRef;
}
 
Example #7
Source File: ORBInitInfoImpl.java    From hottub with GNU General Public License v2.0 5 votes vote down vote up
/**
 * See orbos/99-12-02, Chapter 11, Dynamic Initial References on page
 * 11-81.  This operation is identical to ORB::register_initial_reference
 * described there.  This same functionality exists here because the ORB,
 * not yet fully initialized, is not yet available but initial references
 * may need to be registered as part of Interceptor registration.
 * <p>
 * This method may not be called during post_init.
 */
public void register_initial_reference( String id,
                                        org.omg.CORBA.Object obj )
    throws InvalidName
{
    checkStage();
    if( id == null ) nullParam();

    // As per CORBA 3.0 section 21.8.1,
    // if null is passed as the obj parameter,
    // throw BAD_PARAM with minor code OMGSystemException.RIR_WITH_NULL_OBJECT.
    // Though the spec is talking about IDL null, we will address both
    // Java null and IDL null:
    // Note: Local Objects can never be nil!
    if( obj == null ) {
        throw omgWrapper.rirWithNullObject() ;
    }

    // This check was made to determine that the objref is a
    // non-local objref that is fully
    // initialized: this was called only for its side-effects of
    // possibly throwing exceptions.  However, registering
    // local objects should be permitted!
    // XXX/Revisit?
    // IOR ior = ORBUtility.getIOR( obj ) ;

    // Delegate to ORB.  If ORB version throws InvalidName, convert to
    // equivalent Portable Interceptors InvalidName.
    try {
        orb.register_initial_reference( id, obj );
    } catch( org.omg.CORBA.ORBPackage.InvalidName e ) {
        InvalidName exc = new InvalidName( e.getMessage() );
        exc.initCause( e ) ;
        throw exc ;
    }
}
 
Example #8
Source File: ORBInitInfoImpl.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * This operation is only valid during post_init.  It is identical to
 * ORB::resolve_initial_references.  This same functionality exists here
 * because the ORB, not yet fully initialized, is not yet available,
 * but initial references may be required from the ORB as part
 * of Interceptor registration.
 * <p>
 * (incorporates changes from errata in orbos/00-01-01)
 * <p>
 * This method may not be called during pre_init.
 */
public org.omg.CORBA.Object resolve_initial_references (String id)
    throws InvalidName
{
    checkStage();
    if( id == null ) nullParam();

    if( stage == STAGE_PRE_INIT ) {
        // Initializer is not allowed to invoke this method during
        // this stage.

        // _REVISIT_ Spec issue: What exception should really be
        // thrown here?
        throw wrapper.rirInvalidPreInit() ;
    }

    org.omg.CORBA.Object objRef = null;

    try {
        objRef = orb.resolve_initial_references( id );
    }
    catch( org.omg.CORBA.ORBPackage.InvalidName e ) {
        // Convert PIDL to IDL exception:
        throw new InvalidName();
    }

    return objRef;
}
 
Example #9
Source File: ORBInitInfoImpl.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * See orbos/99-12-02, Chapter 11, Dynamic Initial References on page
 * 11-81.  This operation is identical to ORB::register_initial_reference
 * described there.  This same functionality exists here because the ORB,
 * not yet fully initialized, is not yet available but initial references
 * may need to be registered as part of Interceptor registration.
 * <p>
 * This method may not be called during post_init.
 */
public void register_initial_reference( String id,
                                        org.omg.CORBA.Object obj )
    throws InvalidName
{
    checkStage();
    if( id == null ) nullParam();

    // As per CORBA 3.0 section 21.8.1,
    // if null is passed as the obj parameter,
    // throw BAD_PARAM with minor code OMGSystemException.RIR_WITH_NULL_OBJECT.
    // Though the spec is talking about IDL null, we will address both
    // Java null and IDL null:
    // Note: Local Objects can never be nil!
    if( obj == null ) {
        throw omgWrapper.rirWithNullObject() ;
    }

    // This check was made to determine that the objref is a
    // non-local objref that is fully
    // initialized: this was called only for its side-effects of
    // possibly throwing exceptions.  However, registering
    // local objects should be permitted!
    // XXX/Revisit?
    // IOR ior = ORBUtility.getIOR( obj ) ;

    // Delegate to ORB.  If ORB version throws InvalidName, convert to
    // equivalent Portable Interceptors InvalidName.
    try {
        orb.register_initial_reference( id, obj );
    } catch( org.omg.CORBA.ORBPackage.InvalidName e ) {
        InvalidName exc = new InvalidName( e.getMessage() );
        exc.initCause( e ) ;
        throw exc ;
    }
}
 
Example #10
Source File: ORBInitInfoImpl.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
/**
 * This operation is only valid during post_init.  It is identical to
 * ORB::resolve_initial_references.  This same functionality exists here
 * because the ORB, not yet fully initialized, is not yet available,
 * but initial references may be required from the ORB as part
 * of Interceptor registration.
 * <p>
 * (incorporates changes from errata in orbos/00-01-01)
 * <p>
 * This method may not be called during pre_init.
 */
public org.omg.CORBA.Object resolve_initial_references (String id)
    throws InvalidName
{
    checkStage();
    if( id == null ) nullParam();

    if( stage == STAGE_PRE_INIT ) {
        // Initializer is not allowed to invoke this method during
        // this stage.

        // _REVISIT_ Spec issue: What exception should really be
        // thrown here?
        throw wrapper.rirInvalidPreInit() ;
    }

    org.omg.CORBA.Object objRef = null;

    try {
        objRef = orb.resolve_initial_references( id );
    }
    catch( org.omg.CORBA.ORBPackage.InvalidName e ) {
        // Convert PIDL to IDL exception:
        throw new InvalidName();
    }

    return objRef;
}
 
Example #11
Source File: ORBInitInfoImpl.java    From jdk1.8-source-analysis with Apache License 2.0 5 votes vote down vote up
/**
 * See orbos/99-12-02, Chapter 11, Dynamic Initial References on page
 * 11-81.  This operation is identical to ORB::register_initial_reference
 * described there.  This same functionality exists here because the ORB,
 * not yet fully initialized, is not yet available but initial references
 * may need to be registered as part of Interceptor registration.
 * <p>
 * This method may not be called during post_init.
 */
public void register_initial_reference( String id,
                                        org.omg.CORBA.Object obj )
    throws InvalidName
{
    checkStage();
    if( id == null ) nullParam();

    // As per CORBA 3.0 section 21.8.1,
    // if null is passed as the obj parameter,
    // throw BAD_PARAM with minor code OMGSystemException.RIR_WITH_NULL_OBJECT.
    // Though the spec is talking about IDL null, we will address both
    // Java null and IDL null:
    // Note: Local Objects can never be nil!
    if( obj == null ) {
        throw omgWrapper.rirWithNullObject() ;
    }

    // This check was made to determine that the objref is a
    // non-local objref that is fully
    // initialized: this was called only for its side-effects of
    // possibly throwing exceptions.  However, registering
    // local objects should be permitted!
    // XXX/Revisit?
    // IOR ior = ORBUtility.getIOR( obj ) ;

    // Delegate to ORB.  If ORB version throws InvalidName, convert to
    // equivalent Portable Interceptors InvalidName.
    try {
        orb.register_initial_reference( id, obj );
    } catch( org.omg.CORBA.ORBPackage.InvalidName e ) {
        InvalidName exc = new InvalidName( e.getMessage() );
        exc.initCause( e ) ;
        throw exc ;
    }
}
 
Example #12
Source File: ORBInitInfoImpl.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
/**
 * This operation is only valid during post_init.  It is identical to
 * ORB::resolve_initial_references.  This same functionality exists here
 * because the ORB, not yet fully initialized, is not yet available,
 * but initial references may be required from the ORB as part
 * of Interceptor registration.
 * <p>
 * (incorporates changes from errata in orbos/00-01-01)
 * <p>
 * This method may not be called during pre_init.
 */
public org.omg.CORBA.Object resolve_initial_references (String id)
    throws InvalidName
{
    checkStage();
    if( id == null ) nullParam();

    if( stage == STAGE_PRE_INIT ) {
        // Initializer is not allowed to invoke this method during
        // this stage.

        // _REVISIT_ Spec issue: What exception should really be
        // thrown here?
        throw wrapper.rirInvalidPreInit() ;
    }

    org.omg.CORBA.Object objRef = null;

    try {
        objRef = orb.resolve_initial_references( id );
    }
    catch( org.omg.CORBA.ORBPackage.InvalidName e ) {
        // Convert PIDL to IDL exception:
        throw new InvalidName();
    }

    return objRef;
}
 
Example #13
Source File: ORBInitInfoImpl.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
/**
 * See orbos/99-12-02, Chapter 11, Dynamic Initial References on page
 * 11-81.  This operation is identical to ORB::register_initial_reference
 * described there.  This same functionality exists here because the ORB,
 * not yet fully initialized, is not yet available but initial references
 * may need to be registered as part of Interceptor registration.
 * <p>
 * This method may not be called during post_init.
 */
public void register_initial_reference( String id,
                                        org.omg.CORBA.Object obj )
    throws InvalidName
{
    checkStage();
    if( id == null ) nullParam();

    // As per CORBA 3.0 section 21.8.1,
    // if null is passed as the obj parameter,
    // throw BAD_PARAM with minor code OMGSystemException.RIR_WITH_NULL_OBJECT.
    // Though the spec is talking about IDL null, we will address both
    // Java null and IDL null:
    // Note: Local Objects can never be nil!
    if( obj == null ) {
        throw omgWrapper.rirWithNullObject() ;
    }

    // This check was made to determine that the objref is a
    // non-local objref that is fully
    // initialized: this was called only for its side-effects of
    // possibly throwing exceptions.  However, registering
    // local objects should be permitted!
    // XXX/Revisit?
    // IOR ior = ORBUtility.getIOR( obj ) ;

    // Delegate to ORB.  If ORB version throws InvalidName, convert to
    // equivalent Portable Interceptors InvalidName.
    try {
        orb.register_initial_reference( id, obj );
    } catch( org.omg.CORBA.ORBPackage.InvalidName e ) {
        InvalidName exc = new InvalidName( e.getMessage() );
        exc.initCause( e ) ;
        throw exc ;
    }
}
 
Example #14
Source File: ORBInitInfoImpl.java    From JDKSourceCode1.8 with MIT License 5 votes vote down vote up
/**
 * This operation is only valid during post_init.  It is identical to
 * ORB::resolve_initial_references.  This same functionality exists here
 * because the ORB, not yet fully initialized, is not yet available,
 * but initial references may be required from the ORB as part
 * of Interceptor registration.
 * <p>
 * (incorporates changes from errata in orbos/00-01-01)
 * <p>
 * This method may not be called during pre_init.
 */
public org.omg.CORBA.Object resolve_initial_references (String id)
    throws InvalidName
{
    checkStage();
    if( id == null ) nullParam();

    if( stage == STAGE_PRE_INIT ) {
        // Initializer is not allowed to invoke this method during
        // this stage.

        // _REVISIT_ Spec issue: What exception should really be
        // thrown here?
        throw wrapper.rirInvalidPreInit() ;
    }

    org.omg.CORBA.Object objRef = null;

    try {
        objRef = orb.resolve_initial_references( id );
    }
    catch( org.omg.CORBA.ORBPackage.InvalidName e ) {
        // Convert PIDL to IDL exception:
        throw new InvalidName();
    }

    return objRef;
}
 
Example #15
Source File: ORBInitInfoImpl.java    From JDKSourceCode1.8 with MIT License 5 votes vote down vote up
/**
 * See orbos/99-12-02, Chapter 11, Dynamic Initial References on page
 * 11-81.  This operation is identical to ORB::register_initial_reference
 * described there.  This same functionality exists here because the ORB,
 * not yet fully initialized, is not yet available but initial references
 * may need to be registered as part of Interceptor registration.
 * <p>
 * This method may not be called during post_init.
 */
public void register_initial_reference( String id,
                                        org.omg.CORBA.Object obj )
    throws InvalidName
{
    checkStage();
    if( id == null ) nullParam();

    // As per CORBA 3.0 section 21.8.1,
    // if null is passed as the obj parameter,
    // throw BAD_PARAM with minor code OMGSystemException.RIR_WITH_NULL_OBJECT.
    // Though the spec is talking about IDL null, we will address both
    // Java null and IDL null:
    // Note: Local Objects can never be nil!
    if( obj == null ) {
        throw omgWrapper.rirWithNullObject() ;
    }

    // This check was made to determine that the objref is a
    // non-local objref that is fully
    // initialized: this was called only for its side-effects of
    // possibly throwing exceptions.  However, registering
    // local objects should be permitted!
    // XXX/Revisit?
    // IOR ior = ORBUtility.getIOR( obj ) ;

    // Delegate to ORB.  If ORB version throws InvalidName, convert to
    // equivalent Portable Interceptors InvalidName.
    try {
        orb.register_initial_reference( id, obj );
    } catch( org.omg.CORBA.ORBPackage.InvalidName e ) {
        InvalidName exc = new InvalidName( e.getMessage() );
        exc.initCause( e ) ;
        throw exc ;
    }
}
 
Example #16
Source File: ORBInitInfoImpl.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * This operation is only valid during post_init.  It is identical to
 * ORB::resolve_initial_references.  This same functionality exists here
 * because the ORB, not yet fully initialized, is not yet available,
 * but initial references may be required from the ORB as part
 * of Interceptor registration.
 * <p>
 * (incorporates changes from errata in orbos/00-01-01)
 * <p>
 * This method may not be called during pre_init.
 */
public org.omg.CORBA.Object resolve_initial_references (String id)
    throws InvalidName
{
    checkStage();
    if( id == null ) nullParam();

    if( stage == STAGE_PRE_INIT ) {
        // Initializer is not allowed to invoke this method during
        // this stage.

        // _REVISIT_ Spec issue: What exception should really be
        // thrown here?
        throw wrapper.rirInvalidPreInit() ;
    }

    org.omg.CORBA.Object objRef = null;

    try {
        objRef = orb.resolve_initial_references( id );
    }
    catch( org.omg.CORBA.ORBPackage.InvalidName e ) {
        // Convert PIDL to IDL exception:
        throw new InvalidName();
    }

    return objRef;
}
 
Example #17
Source File: ORBInitInfoImpl.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * See orbos/99-12-02, Chapter 11, Dynamic Initial References on page
 * 11-81.  This operation is identical to ORB::register_initial_reference
 * described there.  This same functionality exists here because the ORB,
 * not yet fully initialized, is not yet available but initial references
 * may need to be registered as part of Interceptor registration.
 * <p>
 * This method may not be called during post_init.
 */
public void register_initial_reference( String id,
                                        org.omg.CORBA.Object obj )
    throws InvalidName
{
    checkStage();
    if( id == null ) nullParam();

    // As per CORBA 3.0 section 21.8.1,
    // if null is passed as the obj parameter,
    // throw BAD_PARAM with minor code OMGSystemException.RIR_WITH_NULL_OBJECT.
    // Though the spec is talking about IDL null, we will address both
    // Java null and IDL null:
    // Note: Local Objects can never be nil!
    if( obj == null ) {
        throw omgWrapper.rirWithNullObject() ;
    }

    // This check was made to determine that the objref is a
    // non-local objref that is fully
    // initialized: this was called only for its side-effects of
    // possibly throwing exceptions.  However, registering
    // local objects should be permitted!
    // XXX/Revisit?
    // IOR ior = ORBUtility.getIOR( obj ) ;

    // Delegate to ORB.  If ORB version throws InvalidName, convert to
    // equivalent Portable Interceptors InvalidName.
    try {
        orb.register_initial_reference( id, obj );
    } catch( org.omg.CORBA.ORBPackage.InvalidName e ) {
        InvalidName exc = new InvalidName( e.getMessage() );
        exc.initCause( e ) ;
        throw exc ;
    }
}
 
Example #18
Source File: ORBInitInfoImpl.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * This operation is only valid during post_init.  It is identical to
 * ORB::resolve_initial_references.  This same functionality exists here
 * because the ORB, not yet fully initialized, is not yet available,
 * but initial references may be required from the ORB as part
 * of Interceptor registration.
 * <p>
 * (incorporates changes from errata in orbos/00-01-01)
 * <p>
 * This method may not be called during pre_init.
 */
public org.omg.CORBA.Object resolve_initial_references (String id)
    throws InvalidName
{
    checkStage();
    if( id == null ) nullParam();

    if( stage == STAGE_PRE_INIT ) {
        // Initializer is not allowed to invoke this method during
        // this stage.

        // _REVISIT_ Spec issue: What exception should really be
        // thrown here?
        throw wrapper.rirInvalidPreInit() ;
    }

    org.omg.CORBA.Object objRef = null;

    try {
        objRef = orb.resolve_initial_references( id );
    }
    catch( org.omg.CORBA.ORBPackage.InvalidName e ) {
        // Convert PIDL to IDL exception:
        throw new InvalidName();
    }

    return objRef;
}
 
Example #19
Source File: ORBInitInfoImpl.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * See orbos/99-12-02, Chapter 11, Dynamic Initial References on page
 * 11-81.  This operation is identical to ORB::register_initial_reference
 * described there.  This same functionality exists here because the ORB,
 * not yet fully initialized, is not yet available but initial references
 * may need to be registered as part of Interceptor registration.
 * <p>
 * This method may not be called during post_init.
 */
public void register_initial_reference( String id,
                                        org.omg.CORBA.Object obj )
    throws InvalidName
{
    checkStage();
    if( id == null ) nullParam();

    // As per CORBA 3.0 section 21.8.1,
    // if null is passed as the obj parameter,
    // throw BAD_PARAM with minor code OMGSystemException.RIR_WITH_NULL_OBJECT.
    // Though the spec is talking about IDL null, we will address both
    // Java null and IDL null:
    // Note: Local Objects can never be nil!
    if( obj == null ) {
        throw omgWrapper.rirWithNullObject() ;
    }

    // This check was made to determine that the objref is a
    // non-local objref that is fully
    // initialized: this was called only for its side-effects of
    // possibly throwing exceptions.  However, registering
    // local objects should be permitted!
    // XXX/Revisit?
    // IOR ior = ORBUtility.getIOR( obj ) ;

    // Delegate to ORB.  If ORB version throws InvalidName, convert to
    // equivalent Portable Interceptors InvalidName.
    try {
        orb.register_initial_reference( id, obj );
    } catch( org.omg.CORBA.ORBPackage.InvalidName e ) {
        InvalidName exc = new InvalidName( e.getMessage() );
        exc.initCause( e ) ;
        throw exc ;
    }
}
 
Example #20
Source File: ORBInitInfoImpl.java    From jdk1.8-source-analysis with Apache License 2.0 5 votes vote down vote up
/**
 * This operation is only valid during post_init.  It is identical to
 * ORB::resolve_initial_references.  This same functionality exists here
 * because the ORB, not yet fully initialized, is not yet available,
 * but initial references may be required from the ORB as part
 * of Interceptor registration.
 * <p>
 * (incorporates changes from errata in orbos/00-01-01)
 * <p>
 * This method may not be called during pre_init.
 */
public org.omg.CORBA.Object resolve_initial_references (String id)
    throws InvalidName
{
    checkStage();
    if( id == null ) nullParam();

    if( stage == STAGE_PRE_INIT ) {
        // Initializer is not allowed to invoke this method during
        // this stage.

        // _REVISIT_ Spec issue: What exception should really be
        // thrown here?
        throw wrapper.rirInvalidPreInit() ;
    }

    org.omg.CORBA.Object objRef = null;

    try {
        objRef = orb.resolve_initial_references( id );
    }
    catch( org.omg.CORBA.ORBPackage.InvalidName e ) {
        // Convert PIDL to IDL exception:
        throw new InvalidName();
    }

    return objRef;
}