com.sun.org.omg.SendingContext.CodeBaseHelper Java Examples

The following examples show how to use com.sun.org.omg.SendingContext.CodeBaseHelper. 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: CachedCodeBase.java    From jdk1.8-source-analysis with Apache License 2.0 4 votes vote down vote up
private synchronized boolean connectedCodeBase() {
    if (delegate != null)
        return true;

    // The delegate was null, so see if the connection's
    // IOR was set.  If so, then we just need to connect
    // it.  Otherwise, there is no hope of checking the
    // remote code base.  That could be bug if the
    // service context processing didn't occur, or it
    // could be that we're talking to a foreign ORB which
    // doesn't include this optional service context.
    if (conn.getCodeBaseIOR() == null) {
        // REVISIT.  Use Merlin logging service to report that
        // codebase functionality was requested but unavailable.
        if (conn.getBroker().transportDebugFlag)
            conn.dprint("CodeBase unavailable on connection: " + conn);

        return false;
    }

    synchronized(iorMapLock) {

        // Recheck the condition to make sure another
        // thread didn't already do this while we waited
        if (delegate != null)
            return true;

        // Do we have a reference initialized by another connection?
        delegate = CachedCodeBase.iorMap.get(conn.getCodeBaseIOR());

        if (delegate != null)
            return true;

        // Connect the delegate and update the cache
        delegate = CodeBaseHelper.narrow(getObjectFromIOR());

        // Save it for the benefit of other connections
        CachedCodeBase.iorMap.put(conn.getCodeBaseIOR(), delegate);
    }

    // It's now safe to use the delegate
    return true;
}
 
Example #2
Source File: CachedCodeBase.java    From TencentKona-8 with GNU General Public License v2.0 4 votes vote down vote up
private synchronized boolean connectedCodeBase() {
    if (delegate != null)
        return true;

    // The delegate was null, so see if the connection's
    // IOR was set.  If so, then we just need to connect
    // it.  Otherwise, there is no hope of checking the
    // remote code base.  That could be bug if the
    // service context processing didn't occur, or it
    // could be that we're talking to a foreign ORB which
    // doesn't include this optional service context.
    if (conn.getCodeBaseIOR() == null) {
        // REVISIT.  Use Merlin logging service to report that
        // codebase functionality was requested but unavailable.
        if (conn.getBroker().transportDebugFlag)
            conn.dprint("CodeBase unavailable on connection: " + conn);

        return false;
    }

    synchronized(iorMapLock) {

        // Recheck the condition to make sure another
        // thread didn't already do this while we waited
        if (delegate != null)
            return true;

        // Do we have a reference initialized by another connection?
        delegate = CachedCodeBase.iorMap.get(conn.getCodeBaseIOR());

        if (delegate != null)
            return true;

        // Connect the delegate and update the cache
        delegate = CodeBaseHelper.narrow(getObjectFromIOR());

        // Save it for the benefit of other connections
        CachedCodeBase.iorMap.put(conn.getCodeBaseIOR(), delegate);
    }

    // It's now safe to use the delegate
    return true;
}
 
Example #3
Source File: CachedCodeBase.java    From jdk8u60 with GNU General Public License v2.0 4 votes vote down vote up
private synchronized boolean connectedCodeBase() {
    if (delegate != null)
        return true;

    // The delegate was null, so see if the connection's
    // IOR was set.  If so, then we just need to connect
    // it.  Otherwise, there is no hope of checking the
    // remote code base.  That could be bug if the
    // service context processing didn't occur, or it
    // could be that we're talking to a foreign ORB which
    // doesn't include this optional service context.
    if (conn.getCodeBaseIOR() == null) {
        // REVISIT.  Use Merlin logging service to report that
        // codebase functionality was requested but unavailable.
        if (conn.getBroker().transportDebugFlag)
            conn.dprint("CodeBase unavailable on connection: " + conn);

        return false;
    }

    synchronized(iorMapLock) {

        // Recheck the condition to make sure another
        // thread didn't already do this while we waited
        if (delegate != null)
            return true;

        // Do we have a reference initialized by another connection?
        delegate = CachedCodeBase.iorMap.get(conn.getCodeBaseIOR());

        if (delegate != null)
            return true;

        // Connect the delegate and update the cache
        delegate = CodeBaseHelper.narrow(getObjectFromIOR());

        // Save it for the benefit of other connections
        CachedCodeBase.iorMap.put(conn.getCodeBaseIOR(), delegate);
    }

    // It's now safe to use the delegate
    return true;
}
 
Example #4
Source File: CachedCodeBase.java    From JDKSourceCode1.8 with MIT License 4 votes vote down vote up
private synchronized boolean connectedCodeBase() {
    if (delegate != null)
        return true;

    // The delegate was null, so see if the connection's
    // IOR was set.  If so, then we just need to connect
    // it.  Otherwise, there is no hope of checking the
    // remote code base.  That could be bug if the
    // service context processing didn't occur, or it
    // could be that we're talking to a foreign ORB which
    // doesn't include this optional service context.
    if (conn.getCodeBaseIOR() == null) {
        // REVISIT.  Use Merlin logging service to report that
        // codebase functionality was requested but unavailable.
        if (conn.getBroker().transportDebugFlag)
            conn.dprint("CodeBase unavailable on connection: " + conn);

        return false;
    }

    synchronized(iorMapLock) {

        // Recheck the condition to make sure another
        // thread didn't already do this while we waited
        if (delegate != null)
            return true;

        // Do we have a reference initialized by another connection?
        delegate = CachedCodeBase.iorMap.get(conn.getCodeBaseIOR());

        if (delegate != null)
            return true;

        // Connect the delegate and update the cache
        delegate = CodeBaseHelper.narrow(getObjectFromIOR());

        // Save it for the benefit of other connections
        CachedCodeBase.iorMap.put(conn.getCodeBaseIOR(), delegate);
    }

    // It's now safe to use the delegate
    return true;
}
 
Example #5
Source File: CachedCodeBase.java    From openjdk-jdk8u with GNU General Public License v2.0 4 votes vote down vote up
private synchronized boolean connectedCodeBase() {
    if (delegate != null)
        return true;

    // The delegate was null, so see if the connection's
    // IOR was set.  If so, then we just need to connect
    // it.  Otherwise, there is no hope of checking the
    // remote code base.  That could be bug if the
    // service context processing didn't occur, or it
    // could be that we're talking to a foreign ORB which
    // doesn't include this optional service context.
    if (conn.getCodeBaseIOR() == null) {
        // REVISIT.  Use Merlin logging service to report that
        // codebase functionality was requested but unavailable.
        if (conn.getBroker().transportDebugFlag)
            conn.dprint("CodeBase unavailable on connection: " + conn);

        return false;
    }

    synchronized(iorMapLock) {

        // Recheck the condition to make sure another
        // thread didn't already do this while we waited
        if (delegate != null)
            return true;

        // Do we have a reference initialized by another connection?
        delegate = CachedCodeBase.iorMap.get(conn.getCodeBaseIOR());

        if (delegate != null)
            return true;

        // Connect the delegate and update the cache
        delegate = CodeBaseHelper.narrow(getObjectFromIOR());

        // Save it for the benefit of other connections
        CachedCodeBase.iorMap.put(conn.getCodeBaseIOR(), delegate);
    }

    // It's now safe to use the delegate
    return true;
}
 
Example #6
Source File: CachedCodeBase.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 4 votes vote down vote up
private synchronized boolean connectedCodeBase() {
    if (delegate != null)
        return true;

    // The delegate was null, so see if the connection's
    // IOR was set.  If so, then we just need to connect
    // it.  Otherwise, there is no hope of checking the
    // remote code base.  That could be bug if the
    // service context processing didn't occur, or it
    // could be that we're talking to a foreign ORB which
    // doesn't include this optional service context.
    if (conn.getCodeBaseIOR() == null) {
        // REVISIT.  Use Merlin logging service to report that
        // codebase functionality was requested but unavailable.
        if (conn.getBroker().transportDebugFlag)
            conn.dprint("CodeBase unavailable on connection: " + conn);

        return false;
    }

    synchronized(iorMapLock) {

        // Recheck the condition to make sure another
        // thread didn't already do this while we waited
        if (delegate != null)
            return true;

        // Do we have a reference initialized by another connection?
        delegate = CachedCodeBase.iorMap.get(conn.getCodeBaseIOR());

        if (delegate != null)
            return true;

        // Connect the delegate and update the cache
        delegate = CodeBaseHelper.narrow(getObjectFromIOR());

        // Save it for the benefit of other connections
        CachedCodeBase.iorMap.put(conn.getCodeBaseIOR(), delegate);
    }

    // It's now safe to use the delegate
    return true;
}
 
Example #7
Source File: CachedCodeBase.java    From openjdk-jdk9 with GNU General Public License v2.0 4 votes vote down vote up
private synchronized boolean connectedCodeBase() {
    if (delegate != null)
        return true;

    // The delegate was null, so see if the connection's
    // IOR was set.  If so, then we just need to connect
    // it.  Otherwise, there is no hope of checking the
    // remote code base.  That could be bug if the
    // service context processing didn't occur, or it
    // could be that we're talking to a foreign ORB which
    // doesn't include this optional service context.
    if (conn.getCodeBaseIOR() == null) {
        // REVISIT.  Use Merlin logging service to report that
        // codebase functionality was requested but unavailable.
        if (conn.getBroker().transportDebugFlag)
            conn.dprint("CodeBase unavailable on connection: " + conn);

        return false;
    }

    synchronized(iorMapLock) {

        // Recheck the condition to make sure another
        // thread didn't already do this while we waited
        if (delegate != null)
            return true;

        // Do we have a reference initialized by another connection?
        delegate = CachedCodeBase.iorMap.get(conn.getCodeBaseIOR());

        if (delegate != null)
            return true;

        // Connect the delegate and update the cache
        delegate = CodeBaseHelper.narrow(getObjectFromIOR());

        // Save it for the benefit of other connections
        CachedCodeBase.iorMap.put(conn.getCodeBaseIOR(), delegate);
    }

    // It's now safe to use the delegate
    return true;
}
 
Example #8
Source File: CachedCodeBase.java    From hottub with GNU General Public License v2.0 4 votes vote down vote up
private synchronized boolean connectedCodeBase() {
    if (delegate != null)
        return true;

    // The delegate was null, so see if the connection's
    // IOR was set.  If so, then we just need to connect
    // it.  Otherwise, there is no hope of checking the
    // remote code base.  That could be bug if the
    // service context processing didn't occur, or it
    // could be that we're talking to a foreign ORB which
    // doesn't include this optional service context.
    if (conn.getCodeBaseIOR() == null) {
        // REVISIT.  Use Merlin logging service to report that
        // codebase functionality was requested but unavailable.
        if (conn.getBroker().transportDebugFlag)
            conn.dprint("CodeBase unavailable on connection: " + conn);

        return false;
    }

    synchronized(iorMapLock) {

        // Recheck the condition to make sure another
        // thread didn't already do this while we waited
        if (delegate != null)
            return true;

        // Do we have a reference initialized by another connection?
        delegate = CachedCodeBase.iorMap.get(conn.getCodeBaseIOR());

        if (delegate != null)
            return true;

        // Connect the delegate and update the cache
        delegate = CodeBaseHelper.narrow(getObjectFromIOR());

        // Save it for the benefit of other connections
        CachedCodeBase.iorMap.put(conn.getCodeBaseIOR(), delegate);
    }

    // It's now safe to use the delegate
    return true;
}
 
Example #9
Source File: CachedCodeBase.java    From openjdk-8-source with GNU General Public License v2.0 4 votes vote down vote up
private synchronized boolean connectedCodeBase() {
    if (delegate != null)
        return true;

    // The delegate was null, so see if the connection's
    // IOR was set.  If so, then we just need to connect
    // it.  Otherwise, there is no hope of checking the
    // remote code base.  That could be bug if the
    // service context processing didn't occur, or it
    // could be that we're talking to a foreign ORB which
    // doesn't include this optional service context.
    if (conn.getCodeBaseIOR() == null) {
        // REVISIT.  Use Merlin logging service to report that
        // codebase functionality was requested but unavailable.
        if (conn.getBroker().transportDebugFlag)
            conn.dprint("CodeBase unavailable on connection: " + conn);

        return false;
    }

    synchronized(iorMapLock) {

        // Recheck the condition to make sure another
        // thread didn't already do this while we waited
        if (delegate != null)
            return true;

        // Do we have a reference initialized by another connection?
        delegate = CachedCodeBase.iorMap.get(conn.getCodeBaseIOR());

        if (delegate != null)
            return true;

        // Connect the delegate and update the cache
        delegate = CodeBaseHelper.narrow(getObjectFromIOR());

        // Save it for the benefit of other connections
        CachedCodeBase.iorMap.put(conn.getCodeBaseIOR(), delegate);
    }

    // It's now safe to use the delegate
    return true;
}
 
Example #10
Source File: CachedCodeBase.java    From openjdk-8 with GNU General Public License v2.0 4 votes vote down vote up
private synchronized boolean connectedCodeBase() {
    if (delegate != null)
        return true;

    // The delegate was null, so see if the connection's
    // IOR was set.  If so, then we just need to connect
    // it.  Otherwise, there is no hope of checking the
    // remote code base.  That could be bug if the
    // service context processing didn't occur, or it
    // could be that we're talking to a foreign ORB which
    // doesn't include this optional service context.
    if (conn.getCodeBaseIOR() == null) {
        // REVISIT.  Use Merlin logging service to report that
        // codebase functionality was requested but unavailable.
        if (conn.getBroker().transportDebugFlag)
            conn.dprint("CodeBase unavailable on connection: " + conn);

        return false;
    }

    synchronized(iorMapLock) {

        // Recheck the condition to make sure another
        // thread didn't already do this while we waited
        if (delegate != null)
            return true;

        // Do we have a reference initialized by another connection?
        delegate = CachedCodeBase.iorMap.get(conn.getCodeBaseIOR());

        if (delegate != null)
            return true;

        // Connect the delegate and update the cache
        delegate = CodeBaseHelper.narrow(getObjectFromIOR());

        // Save it for the benefit of other connections
        CachedCodeBase.iorMap.put(conn.getCodeBaseIOR(), delegate);
    }

    // It's now safe to use the delegate
    return true;
}