com.sun.corba.se.spi.orb.ORBData Java Examples

The following examples show how to use com.sun.corba.se.spi.orb.ORBData. 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: BufferManagerWriteGrow.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Returns the correct buffer size for this type of
 * buffer manager as set in the ORB.
 */
public int getBufferSize() {
    ORBData orbData = null;
    int bufferSize = ORBConstants.GIOP_DEFAULT_BUFFER_SIZE;
    if (orb != null) {
        orbData = orb.getORBData();
        if (orbData != null) {
            bufferSize = orbData.getGIOPBufferSize();
            dprint("BufferManagerWriteGrow.getBufferSize: bufferSize == " + bufferSize);
        } else {
            dprint("BufferManagerWriteGrow.getBufferSize: orbData reference is NULL");
        }
    } else {
        dprint("BufferManagerWriteGrow.getBufferSize: orb reference is NULL");
    }
    return bufferSize;
}
 
Example #2
Source File: BufferManagerWriteGrow.java    From openjdk-jdk8u with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Returns the correct buffer size for this type of
 * buffer manager as set in the ORB.
 */
public int getBufferSize() {
    ORBData orbData = null;
    int bufferSize = ORBConstants.GIOP_DEFAULT_BUFFER_SIZE;
    if (orb != null) {
        orbData = orb.getORBData();
        if (orbData != null) {
            bufferSize = orbData.getGIOPBufferSize();
            dprint("BufferManagerWriteGrow.getBufferSize: bufferSize == " + bufferSize);
        } else {
            dprint("BufferManagerWriteGrow.getBufferSize: orbData reference is NULL");
        }
    } else {
        dprint("BufferManagerWriteGrow.getBufferSize: orb reference is NULL");
    }
    return bufferSize;
}
 
Example #3
Source File: BufferManagerWriteGrow.java    From JDKSourceCode1.8 with MIT License 6 votes vote down vote up
/**
 * Returns the correct buffer size for this type of
 * buffer manager as set in the ORB.
 */
public int getBufferSize() {
    ORBData orbData = null;
    int bufferSize = ORBConstants.GIOP_DEFAULT_BUFFER_SIZE;
    if (orb != null) {
        orbData = orb.getORBData();
        if (orbData != null) {
            bufferSize = orbData.getGIOPBufferSize();
            dprint("BufferManagerWriteGrow.getBufferSize: bufferSize == " + bufferSize);
        } else {
            dprint("BufferManagerWriteGrow.getBufferSize: orbData reference is NULL");
        }
    } else {
        dprint("BufferManagerWriteGrow.getBufferSize: orb reference is NULL");
    }
    return bufferSize;
}
 
Example #4
Source File: BufferManagerWriteGrow.java    From TencentKona-8 with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Returns the correct buffer size for this type of
 * buffer manager as set in the ORB.
 */
public int getBufferSize() {
    ORBData orbData = null;
    int bufferSize = ORBConstants.GIOP_DEFAULT_BUFFER_SIZE;
    if (orb != null) {
        orbData = orb.getORBData();
        if (orbData != null) {
            bufferSize = orbData.getGIOPBufferSize();
            dprint("BufferManagerWriteGrow.getBufferSize: bufferSize == " + bufferSize);
        } else {
            dprint("BufferManagerWriteGrow.getBufferSize: orbData reference is NULL");
        }
    } else {
        dprint("BufferManagerWriteGrow.getBufferSize: orb reference is NULL");
    }
    return bufferSize;
}
 
Example #5
Source File: ORB.java    From jdk1.8-source-analysis with Apache License 2.0 5 votes vote down vote up
/**
 * Returns the logger based on the category.
 */
public Logger getLogger( String domain )
{
    synchronized (this) {
        checkShutdownState();
    }
    ORBData odata = getORBData() ;

    // Determine the correct ORBId.  There are 3 cases:
    // 1. odata is null, which happens if we are getting a logger before
    //    ORB initialization is complete.  In this case we cannot determine
    //    the ORB ID (it's not known yet), so we set the ORBId to
    //    _INITIALIZING_.
    // 2. odata is not null, so initialization is complete, but ORBId is set to
    //    the default "".  To avoid a ".." in
    //    the log domain, we simply use _DEFAULT_ in this case.
    // 3. odata is not null, ORBId is not "": just use the ORBId.
    String ORBId ;
    if (odata == null)
        ORBId = "_INITIALIZING_" ;
    else {
        ORBId = odata.getORBId() ;
        if (ORBId.equals(""))
            ORBId = "_DEFAULT_" ;
    }

    return getCORBALogger( ORBId, domain ) ;
}
 
Example #6
Source File: ORB.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Returns the logger based on the category.
 */
public Logger getLogger( String domain )
{
    synchronized (this) {
        checkShutdownState();
    }
    ORBData odata = getORBData() ;

    // Determine the correct ORBId.  There are 3 cases:
    // 1. odata is null, which happens if we are getting a logger before
    //    ORB initialization is complete.  In this case we cannot determine
    //    the ORB ID (it's not known yet), so we set the ORBId to
    //    _INITIALIZING_.
    // 2. odata is not null, so initialization is complete, but ORBId is set to
    //    the default "".  To avoid a ".." in
    //    the log domain, we simply use _DEFAULT_ in this case.
    // 3. odata is not null, ORBId is not "": just use the ORBId.
    String ORBId ;
    if (odata == null)
        ORBId = "_INITIALIZING_" ;
    else {
        ORBId = odata.getORBId() ;
        if (ORBId.equals(""))
            ORBId = "_DEFAULT_" ;
    }

    return getCORBALogger( ORBId, domain ) ;
}
 
Example #7
Source File: ORB.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Returns the logger based on the category.
 */
public Logger getLogger( String domain )
{
    synchronized (this) {
        checkShutdownState();
    }
    ORBData odata = getORBData() ;

    // Determine the correct ORBId.  There are 3 cases:
    // 1. odata is null, which happens if we are getting a logger before
    //    ORB initialization is complete.  In this case we cannot determine
    //    the ORB ID (it's not known yet), so we set the ORBId to
    //    _INITIALIZING_.
    // 2. odata is not null, so initialization is complete, but ORBId is set to
    //    the default "".  To avoid a ".." in
    //    the log domain, we simply use _DEFAULT_ in this case.
    // 3. odata is not null, ORBId is not "": just use the ORBId.
    String ORBId ;
    if (odata == null)
        ORBId = "_INITIALIZING_" ;
    else {
        ORBId = odata.getORBId() ;
        if (ORBId.equals(""))
            ORBId = "_DEFAULT_" ;
    }

    return getCORBALogger( ORBId, domain ) ;
}
 
Example #8
Source File: ORB.java    From JDKSourceCode1.8 with MIT License 5 votes vote down vote up
/**
 * Returns the logger based on the category.
 */
public Logger getLogger( String domain )
{
    synchronized (this) {
        checkShutdownState();
    }
    ORBData odata = getORBData() ;

    // Determine the correct ORBId.  There are 3 cases:
    // 1. odata is null, which happens if we are getting a logger before
    //    ORB initialization is complete.  In this case we cannot determine
    //    the ORB ID (it's not known yet), so we set the ORBId to
    //    _INITIALIZING_.
    // 2. odata is not null, so initialization is complete, but ORBId is set to
    //    the default "".  To avoid a ".." in
    //    the log domain, we simply use _DEFAULT_ in this case.
    // 3. odata is not null, ORBId is not "": just use the ORBId.
    String ORBId ;
    if (odata == null)
        ORBId = "_INITIALIZING_" ;
    else {
        ORBId = odata.getORBId() ;
        if (ORBId.equals(""))
            ORBId = "_DEFAULT_" ;
    }

    return getCORBALogger( ORBId, domain ) ;
}
 
Example #9
Source File: ORB.java    From hottub with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Returns the logger based on the category.
 */
public Logger getLogger( String domain )
{
    synchronized (this) {
        checkShutdownState();
    }
    ORBData odata = getORBData() ;

    // Determine the correct ORBId.  There are 3 cases:
    // 1. odata is null, which happens if we are getting a logger before
    //    ORB initialization is complete.  In this case we cannot determine
    //    the ORB ID (it's not known yet), so we set the ORBId to
    //    _INITIALIZING_.
    // 2. odata is not null, so initialization is complete, but ORBId is set to
    //    the default "".  To avoid a ".." in
    //    the log domain, we simply use _DEFAULT_ in this case.
    // 3. odata is not null, ORBId is not "": just use the ORBId.
    String ORBId ;
    if (odata == null)
        ORBId = "_INITIALIZING_" ;
    else {
        ORBId = odata.getORBId() ;
        if (ORBId.equals(""))
            ORBId = "_DEFAULT_" ;
    }

    return getCORBALogger( ORBId, domain ) ;
}
 
Example #10
Source File: ORB.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Returns the logger based on the category.
 */
public Logger getLogger( String domain )
{
    synchronized (this) {
        checkShutdownState();
    }
    ORBData odata = getORBData() ;

    // Determine the correct ORBId.  There are 3 cases:
    // 1. odata is null, which happens if we are getting a logger before
    //    ORB initialization is complete.  In this case we cannot determine
    //    the ORB ID (it's not known yet), so we set the ORBId to
    //    _INITIALIZING_.
    // 2. odata is not null, so initialization is complete, but ORBId is set to
    //    the default "".  To avoid a ".." in
    //    the log domain, we simply use _DEFAULT_ in this case.
    // 3. odata is not null, ORBId is not "": just use the ORBId.
    String ORBId ;
    if (odata == null)
        ORBId = "_INITIALIZING_" ;
    else {
        ORBId = odata.getORBId() ;
        if (ORBId.equals(""))
            ORBId = "_DEFAULT_" ;
    }

    return getCORBALogger( ORBId, domain ) ;
}
 
Example #11
Source File: ORB.java    From openjdk-8 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Returns the logger based on the category.
 */
public Logger getLogger( String domain )
{
    synchronized (this) {
        checkShutdownState();
    }
    ORBData odata = getORBData() ;

    // Determine the correct ORBId.  There are 3 cases:
    // 1. odata is null, which happens if we are getting a logger before
    //    ORB initialization is complete.  In this case we cannot determine
    //    the ORB ID (it's not known yet), so we set the ORBId to
    //    _INITIALIZING_.
    // 2. odata is not null, so initialization is complete, but ORBId is set to
    //    the default "".  To avoid a ".." in
    //    the log domain, we simply use _DEFAULT_ in this case.
    // 3. odata is not null, ORBId is not "": just use the ORBId.
    String ORBId ;
    if (odata == null)
        ORBId = "_INITIALIZING_" ;
    else {
        ORBId = odata.getORBId() ;
        if (ORBId.equals(""))
            ORBId = "_DEFAULT_" ;
    }

    return getCORBALogger( ORBId, domain ) ;
}
 
Example #12
Source File: ORB.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Returns the logger based on the category.
 */
public Logger getLogger( String domain )
{
    synchronized (this) {
        checkShutdownState();
    }
    ORBData odata = getORBData() ;

    // Determine the correct ORBId.  There are 3 cases:
    // 1. odata is null, which happens if we are getting a logger before
    //    ORB initialization is complete.  In this case we cannot determine
    //    the ORB ID (it's not known yet), so we set the ORBId to
    //    _INITIALIZING_.
    // 2. odata is not null, so initialization is complete, but ORBId is set to
    //    the default "".  To avoid a ".." in
    //    the log domain, we simply use _DEFAULT_ in this case.
    // 3. odata is not null, ORBId is not "": just use the ORBId.
    String ORBId ;
    if (odata == null)
        ORBId = "_INITIALIZING_" ;
    else {
        ORBId = odata.getORBId() ;
        if (ORBId.equals(""))
            ORBId = "_DEFAULT_" ;
    }

    return getCORBALogger( ORBId, domain ) ;
}
 
Example #13
Source File: ORB.java    From openjdk-8-source with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Returns the logger based on the category.
 */
public Logger getLogger( String domain )
{
    synchronized (this) {
        checkShutdownState();
    }
    ORBData odata = getORBData() ;

    // Determine the correct ORBId.  There are 3 cases:
    // 1. odata is null, which happens if we are getting a logger before
    //    ORB initialization is complete.  In this case we cannot determine
    //    the ORB ID (it's not known yet), so we set the ORBId to
    //    _INITIALIZING_.
    // 2. odata is not null, so initialization is complete, but ORBId is set to
    //    the default "".  To avoid a ".." in
    //    the log domain, we simply use _DEFAULT_ in this case.
    // 3. odata is not null, ORBId is not "": just use the ORBId.
    String ORBId ;
    if (odata == null)
        ORBId = "_INITIALIZING_" ;
    else {
        ORBId = odata.getORBId() ;
        if (ORBId.equals(""))
            ORBId = "_DEFAULT_" ;
    }

    return getCORBALogger( ORBId, domain ) ;
}
 
Example #14
Source File: ORBImpl.java    From openjdk-jdk9 with GNU General Public License v2.0 4 votes vote down vote up
public ORBData getORBData()
{
    return configData ;
}
 
Example #15
Source File: ORBSingleton.java    From openjdk-8 with GNU General Public License v2.0 4 votes vote down vote up
public ORBData getORBData()
{
    return getFullORB().getORBData() ;
}
 
Example #16
Source File: ORBImpl.java    From openjdk-8 with GNU General Public License v2.0 4 votes vote down vote up
public ORBData getORBData()
{
    return configData ;
}
 
Example #17
Source File: ORBConfiguratorImpl.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 4 votes vote down vote up
private void persistentServerInitialization( ORB orb )
{
    ORBData data = orb.getORBData() ;

    // determine the ORBD port so that persistent objrefs can be
    // created.
    if (data.getServerIsORBActivated()) {
        try {
            Locator locator = LocatorHelper.narrow(
                orb.resolve_initial_references(
                    ORBConstants.SERVER_LOCATOR_NAME )) ;
            Activator activator = ActivatorHelper.narrow(
                orb.resolve_initial_references(
                    ORBConstants.SERVER_ACTIVATOR_NAME )) ;
            Collection serverEndpoints =
                orb.getCorbaTransportManager().getAcceptors(null, null);
            EndPointInfo[] endpointList =
                new EndPointInfo[serverEndpoints.size()];
            Iterator iterator = serverEndpoints.iterator();
            int i = 0 ;
            while (iterator.hasNext()) {
                Object n = iterator.next();
                if (! (n instanceof LegacyServerSocketEndPointInfo)) {
                    continue;
                }
                LegacyServerSocketEndPointInfo ep =
                    (LegacyServerSocketEndPointInfo) n;
                // REVISIT - use exception instead of -1.
                int port = locator.getEndpoint(ep.getType());
                if (port == -1) {
                    port = locator.getEndpoint(SocketInfo.IIOP_CLEAR_TEXT);
                    if (port == -1) {
                        throw new Exception(
                            "ORBD must support IIOP_CLEAR_TEXT");
                    }
                }

                ep.setLocatorPort(port);

                endpointList[i++] =
                    new EndPointInfo(ep.getType(), ep.getPort());
            }

            activator.registerEndpoints(
                data.getPersistentServerId(), data.getORBId(),
                    endpointList);
        } catch (Exception ex) {
            throw wrapper.persistentServerInitError(
                CompletionStatus.COMPLETED_MAYBE, ex ) ;
        }
    }
}
 
Example #18
Source File: ORBConfiguratorImpl.java    From openjdk-8 with GNU General Public License v2.0 4 votes vote down vote up
private void persistentServerInitialization( ORB orb )
{
    ORBData data = orb.getORBData() ;

    // determine the ORBD port so that persistent objrefs can be
    // created.
    if (data.getServerIsORBActivated()) {
        try {
            Locator locator = LocatorHelper.narrow(
                orb.resolve_initial_references(
                    ORBConstants.SERVER_LOCATOR_NAME )) ;
            Activator activator = ActivatorHelper.narrow(
                orb.resolve_initial_references(
                    ORBConstants.SERVER_ACTIVATOR_NAME )) ;
            Collection serverEndpoints =
                orb.getCorbaTransportManager().getAcceptors(null, null);
            EndPointInfo[] endpointList =
                new EndPointInfo[serverEndpoints.size()];
            Iterator iterator = serverEndpoints.iterator();
            int i = 0 ;
            while (iterator.hasNext()) {
                Object n = iterator.next();
                if (! (n instanceof LegacyServerSocketEndPointInfo)) {
                    continue;
                }
                LegacyServerSocketEndPointInfo ep =
                    (LegacyServerSocketEndPointInfo) n;
                // REVISIT - use exception instead of -1.
                int port = locator.getEndpoint(ep.getType());
                if (port == -1) {
                    port = locator.getEndpoint(SocketInfo.IIOP_CLEAR_TEXT);
                    if (port == -1) {
                        throw new Exception(
                            "ORBD must support IIOP_CLEAR_TEXT");
                    }
                }

                ep.setLocatorPort(port);

                endpointList[i++] =
                    new EndPointInfo(ep.getType(), ep.getPort());
            }

            activator.registerEndpoints(
                data.getPersistentServerId(), data.getORBId(),
                    endpointList);
        } catch (Exception ex) {
            throw wrapper.persistentServerInitError(
                CompletionStatus.COMPLETED_MAYBE, ex ) ;
        }
    }
}
 
Example #19
Source File: ORBImpl.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 4 votes vote down vote up
public ORBData getORBData()
{
    return configData ;
}
 
Example #20
Source File: ORBSingleton.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 4 votes vote down vote up
public ORBData getORBData()
{
    return getFullORB().getORBData() ;
}
 
Example #21
Source File: ORBConfiguratorImpl.java    From openjdk-jdk9 with GNU General Public License v2.0 4 votes vote down vote up
private void persistentServerInitialization( ORB orb )
{
    ORBData data = orb.getORBData() ;

    // determine the ORBD port so that persistent objrefs can be
    // created.
    if (data.getServerIsORBActivated()) {
        try {
            Locator locator = LocatorHelper.narrow(
                orb.resolve_initial_references(
                    ORBConstants.SERVER_LOCATOR_NAME )) ;
            Activator activator = ActivatorHelper.narrow(
                orb.resolve_initial_references(
                    ORBConstants.SERVER_ACTIVATOR_NAME )) ;
            Collection serverEndpoints =
                orb.getCorbaTransportManager().getAcceptors(null, null);
            EndPointInfo[] endpointList =
                new EndPointInfo[serverEndpoints.size()];
            Iterator iterator = serverEndpoints.iterator();
            int i = 0 ;
            while (iterator.hasNext()) {
                Object n = iterator.next();
                if (! (n instanceof LegacyServerSocketEndPointInfo)) {
                    continue;
                }
                LegacyServerSocketEndPointInfo ep =
                    (LegacyServerSocketEndPointInfo) n;
                // REVISIT - use exception instead of -1.
                int port = locator.getEndpoint(ep.getType());
                if (port == -1) {
                    port = locator.getEndpoint(SocketInfo.IIOP_CLEAR_TEXT);
                    if (port == -1) {
                        throw new Exception(
                            "ORBD must support IIOP_CLEAR_TEXT");
                    }
                }

                ep.setLocatorPort(port);

                endpointList[i++] =
                    new EndPointInfo(ep.getType(), ep.getPort());
            }

            activator.registerEndpoints(
                data.getPersistentServerId(), data.getORBId(),
                    endpointList);
        } catch (Exception ex) {
            throw wrapper.persistentServerInitError(
                CompletionStatus.COMPLETED_MAYBE, ex ) ;
        }
    }
}
 
Example #22
Source File: ORBSingleton.java    From openjdk-8-source with GNU General Public License v2.0 4 votes vote down vote up
public ORBData getORBData()
{
    return getFullORB().getORBData() ;
}
 
Example #23
Source File: ORBSingleton.java    From openjdk-jdk9 with GNU General Public License v2.0 4 votes vote down vote up
public ORBData getORBData()
{
    return getFullORB().getORBData() ;
}
 
Example #24
Source File: ORBImpl.java    From openjdk-8-source with GNU General Public License v2.0 4 votes vote down vote up
public ORBData getORBData()
{
    return configData ;
}
 
Example #25
Source File: ORBConfiguratorImpl.java    From hottub with GNU General Public License v2.0 4 votes vote down vote up
private void persistentServerInitialization( ORB orb )
{
    ORBData data = orb.getORBData() ;

    // determine the ORBD port so that persistent objrefs can be
    // created.
    if (data.getServerIsORBActivated()) {
        try {
            Locator locator = LocatorHelper.narrow(
                orb.resolve_initial_references(
                    ORBConstants.SERVER_LOCATOR_NAME )) ;
            Activator activator = ActivatorHelper.narrow(
                orb.resolve_initial_references(
                    ORBConstants.SERVER_ACTIVATOR_NAME )) ;
            Collection serverEndpoints =
                orb.getCorbaTransportManager().getAcceptors(null, null);
            EndPointInfo[] endpointList =
                new EndPointInfo[serverEndpoints.size()];
            Iterator iterator = serverEndpoints.iterator();
            int i = 0 ;
            while (iterator.hasNext()) {
                Object n = iterator.next();
                if (! (n instanceof LegacyServerSocketEndPointInfo)) {
                    continue;
                }
                LegacyServerSocketEndPointInfo ep =
                    (LegacyServerSocketEndPointInfo) n;
                // REVISIT - use exception instead of -1.
                int port = locator.getEndpoint(ep.getType());
                if (port == -1) {
                    port = locator.getEndpoint(SocketInfo.IIOP_CLEAR_TEXT);
                    if (port == -1) {
                        throw new Exception(
                            "ORBD must support IIOP_CLEAR_TEXT");
                    }
                }

                ep.setLocatorPort(port);

                endpointList[i++] =
                    new EndPointInfo(ep.getType(), ep.getPort());
            }

            activator.registerEndpoints(
                data.getPersistentServerId(), data.getORBId(),
                    endpointList);
        } catch (Exception ex) {
            throw wrapper.persistentServerInitError(
                CompletionStatus.COMPLETED_MAYBE, ex ) ;
        }
    }
}
 
Example #26
Source File: ORBImpl.java    From hottub with GNU General Public License v2.0 4 votes vote down vote up
public ORBData getORBData()
{
    return configData ;
}
 
Example #27
Source File: ORBConfiguratorImpl.java    From openjdk-8-source with GNU General Public License v2.0 4 votes vote down vote up
private void persistentServerInitialization( ORB orb )
{
    ORBData data = orb.getORBData() ;

    // determine the ORBD port so that persistent objrefs can be
    // created.
    if (data.getServerIsORBActivated()) {
        try {
            Locator locator = LocatorHelper.narrow(
                orb.resolve_initial_references(
                    ORBConstants.SERVER_LOCATOR_NAME )) ;
            Activator activator = ActivatorHelper.narrow(
                orb.resolve_initial_references(
                    ORBConstants.SERVER_ACTIVATOR_NAME )) ;
            Collection serverEndpoints =
                orb.getCorbaTransportManager().getAcceptors(null, null);
            EndPointInfo[] endpointList =
                new EndPointInfo[serverEndpoints.size()];
            Iterator iterator = serverEndpoints.iterator();
            int i = 0 ;
            while (iterator.hasNext()) {
                Object n = iterator.next();
                if (! (n instanceof LegacyServerSocketEndPointInfo)) {
                    continue;
                }
                LegacyServerSocketEndPointInfo ep =
                    (LegacyServerSocketEndPointInfo) n;
                // REVISIT - use exception instead of -1.
                int port = locator.getEndpoint(ep.getType());
                if (port == -1) {
                    port = locator.getEndpoint(SocketInfo.IIOP_CLEAR_TEXT);
                    if (port == -1) {
                        throw new Exception(
                            "ORBD must support IIOP_CLEAR_TEXT");
                    }
                }

                ep.setLocatorPort(port);

                endpointList[i++] =
                    new EndPointInfo(ep.getType(), ep.getPort());
            }

            activator.registerEndpoints(
                data.getPersistentServerId(), data.getORBId(),
                    endpointList);
        } catch (Exception ex) {
            throw wrapper.persistentServerInitError(
                CompletionStatus.COMPLETED_MAYBE, ex ) ;
        }
    }
}
 
Example #28
Source File: ORBSingleton.java    From hottub with GNU General Public License v2.0 4 votes vote down vote up
public ORBData getORBData()
{
    return getFullORB().getORBData() ;
}
 
Example #29
Source File: ORBSingleton.java    From openjdk-jdk8u with GNU General Public License v2.0 4 votes vote down vote up
public ORBData getORBData()
{
    return getFullORB().getORBData() ;
}
 
Example #30
Source File: ORBConfiguratorImpl.java    From jdk1.8-source-analysis with Apache License 2.0 4 votes vote down vote up
private void persistentServerInitialization( ORB orb )
{
    ORBData data = orb.getORBData() ;

    // determine the ORBD port so that persistent objrefs can be
    // created.
    if (data.getServerIsORBActivated()) {
        try {
            Locator locator = LocatorHelper.narrow(
                orb.resolve_initial_references(
                    ORBConstants.SERVER_LOCATOR_NAME )) ;
            Activator activator = ActivatorHelper.narrow(
                orb.resolve_initial_references(
                    ORBConstants.SERVER_ACTIVATOR_NAME )) ;
            Collection serverEndpoints =
                orb.getCorbaTransportManager().getAcceptors(null, null);
            EndPointInfo[] endpointList =
                new EndPointInfo[serverEndpoints.size()];
            Iterator iterator = serverEndpoints.iterator();
            int i = 0 ;
            while (iterator.hasNext()) {
                Object n = iterator.next();
                if (! (n instanceof LegacyServerSocketEndPointInfo)) {
                    continue;
                }
                LegacyServerSocketEndPointInfo ep =
                    (LegacyServerSocketEndPointInfo) n;
                // REVISIT - use exception instead of -1.
                int port = locator.getEndpoint(ep.getType());
                if (port == -1) {
                    port = locator.getEndpoint(SocketInfo.IIOP_CLEAR_TEXT);
                    if (port == -1) {
                        throw new Exception(
                            "ORBD must support IIOP_CLEAR_TEXT");
                    }
                }

                ep.setLocatorPort(port);

                endpointList[i++] =
                    new EndPointInfo(ep.getType(), ep.getPort());
            }

            activator.registerEndpoints(
                data.getPersistentServerId(), data.getORBId(),
                    endpointList);
        } catch (Exception ex) {
            throw wrapper.persistentServerInitError(
                CompletionStatus.COMPLETED_MAYBE, ex ) ;
        }
    }
}