Java Code Examples for com.sun.corba.se.impl.logging.ORBUtilSystemException.badStringifiedIor()

The following are Jave code examples for showing how to use badStringifiedIor() 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: CorbaClientRequestDispatcherImpl.java   Source Code and License Vote up 4 votes
protected void consumeServiceContexts(ORB orb,
                                    CorbaMessageMediator messageMediator)
{
    ServiceContexts ctxts = messageMediator.getReplyServiceContexts();
    ServiceContext sc ;
    ORBUtilSystemException wrapper = ORBUtilSystemException.get( orb,
            CORBALogDomains.RPC_PROTOCOL ) ;

    if (ctxts == null) {
        return; // no service context available, return gracefully.
    }

    sc = ctxts.get( SendingContextServiceContext.SERVICE_CONTEXT_ID ) ;

    if (sc != null) {
        SendingContextServiceContext scsc =
            (SendingContextServiceContext)sc ;
        IOR ior = scsc.getIOR() ;

        try {
            // set the codebase returned by the server
            if (messageMediator.getConnection() != null) {
                ((CorbaConnection)messageMediator.getConnection()).setCodeBaseIOR(ior);
            }
        } catch (ThreadDeath td) {
            throw td ;
        } catch (Throwable t) {
            throw wrapper.badStringifiedIor( t ) ;
        }
    }

    // see if the version subcontract is present, if yes, then set
    // the ORBversion
    sc = ctxts.get( ORBVersionServiceContext.SERVICE_CONTEXT_ID ) ;

    if (sc != null) {
        ORBVersionServiceContext ovsc =
           (ORBVersionServiceContext) sc;

        ORBVersion version = ovsc.getVersion();
        orb.setORBVersion( version ) ;
    }

    getExceptionDetailMessage(messageMediator, wrapper);
}
 
Example 2
Project: openjdk-jdk10   File: CorbaClientRequestDispatcherImpl.java   Source Code and License Vote up 4 votes
protected void consumeServiceContexts(ORB orb,
                                    CorbaMessageMediator messageMediator)
{
    ServiceContexts ctxts = messageMediator.getReplyServiceContexts();
    ServiceContext sc ;
    ORBUtilSystemException wrapper = ORBUtilSystemException.get( orb,
            CORBALogDomains.RPC_PROTOCOL ) ;

    if (ctxts == null) {
        return; // no service context available, return gracefully.
    }

    sc = ctxts.get( SendingContextServiceContext.SERVICE_CONTEXT_ID ) ;

    if (sc != null) {
        SendingContextServiceContext scsc =
            (SendingContextServiceContext)sc ;
        IOR ior = scsc.getIOR() ;

        try {
            // set the codebase returned by the server
            if (messageMediator.getConnection() != null) {
                ((CorbaConnection)messageMediator.getConnection()).setCodeBaseIOR(ior);
            }
        } catch (ThreadDeath td) {
            throw td ;
        } catch (Throwable t) {
            throw wrapper.badStringifiedIor( t ) ;
        }
    }

    // see if the version subcontract is present, if yes, then set
    // the ORBversion
    sc = ctxts.get( ORBVersionServiceContext.SERVICE_CONTEXT_ID ) ;

    if (sc != null) {
        ORBVersionServiceContext ovsc =
           (ORBVersionServiceContext) sc;

        ORBVersion version = ovsc.getVersion();
        orb.setORBVersion( version ) ;
    }

    getExceptionDetailMessage(messageMediator, wrapper);
}