Java Code Examples for com.sun.corba.se.impl.logging.ORBUtilSystemException.LOCAL_OBJECT_NOT_ALLOWED

The following are Jave code examples for showing how to use LOCAL_OBJECT_NOT_ALLOWED of the com.sun.corba.se.impl.logging.ORBUtilSystemException class. You can vote up the examples you like. Your votes will be used in our system to get more good examples.
Example 1
Project: OpenJSharp   File: ORBImpl.java   Source Code and License Vote up 5 votes
/**
 * Convert an object ref to a string.
 * @param obj The object to stringify.
 * @return A stringified object reference.
 */
public synchronized String object_to_string(org.omg.CORBA.Object obj)
{
    checkShutdownState();

    // Handle the null objref case
    if (obj == null) {
        IOR nullIOR = IORFactories.makeIOR( this ) ;
        return nullIOR.stringify();
    }

    IOR ior = null ;

    try {
        ior = ORBUtility.connectAndGetIOR( this, obj ) ;
    } catch (BAD_PARAM bp) {
        // Throw MARSHAL instead if this is a LOCAL_OBJECT_NOT_ALLOWED error.
        if (bp.minor == ORBUtilSystemException.LOCAL_OBJECT_NOT_ALLOWED) {
            throw omgWrapper.notAnObjectImpl( bp ) ;
        } else
            // Not a local object problem: just rethrow the exception.
            // Do not wrap and log this, since it was already logged at its
            // point of origin.
            throw bp ;
    }

    return ior.stringify() ;
}
 
Example 2
Project: openjdk-jdk10   File: ORBImpl.java   Source Code and License Vote up 5 votes
/**
 * Convert an object ref to a string.
 * @param obj The object to stringify.
 * @return A stringified object reference.
 */
public synchronized String object_to_string(org.omg.CORBA.Object obj)
{
    checkShutdownState();

    // Handle the null objref case
    if (obj == null) {
        IOR nullIOR = IORFactories.makeIOR( this ) ;
        return nullIOR.stringify();
    }

    IOR ior = null ;

    try {
        ior = ORBUtility.connectAndGetIOR( this, obj ) ;
    } catch (BAD_PARAM bp) {
        // Throw MARSHAL instead if this is a LOCAL_OBJECT_NOT_ALLOWED error.
        if (bp.minor == ORBUtilSystemException.LOCAL_OBJECT_NOT_ALLOWED) {
            throw omgWrapper.notAnObjectImpl( bp ) ;
        } else
            // Not a local object problem: just rethrow the exception.
            // Do not wrap and log this, since it was already logged at its
            // point of origin.
            throw bp ;
    }

    return ior.stringify() ;
}