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 Project: TencentKona-8   Author: Tencent   File: BufferManagerWriteGrow.java    License: 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 Project: JDKSourceCode1.8   Author: wupeixuan   File: BufferManagerWriteGrow.java    License: 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 #3
Source Project: openjdk-jdk8u   Author: AdoptOpenJDK   File: BufferManagerWriteGrow.java    License: 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 #4
Source Project: openjdk-jdk8u-backup   Author: AdoptOpenJDK   File: BufferManagerWriteGrow.java    License: 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 Project: jdk1.8-source-analysis   Author: raysonfang   File: ORB.java    License: 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 Project: TencentKona-8   Author: Tencent   File: ORB.java    License: 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 Project: jdk8u60   Author: chenghanpeng   File: ORB.java    License: 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 Project: JDKSourceCode1.8   Author: wupeixuan   File: ORB.java    License: 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 Project: openjdk-jdk8u   Author: AdoptOpenJDK   File: ORB.java    License: 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 Project: openjdk-jdk8u-backup   Author: AdoptOpenJDK   File: ORB.java    License: 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 Project: hottub   Author: dsrg-uoft   File: ORB.java    License: 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 Project: openjdk-8-source   Author: keerath   File: ORB.java    License: 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 Project: openjdk-8   Author: bpupadhyaya   File: ORB.java    License: 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 Project: jdk1.8-source-analysis   Author: raysonfang   File: ORBConfiguratorImpl.java    License: 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 ) ;
        }
    }
}
 
Example #15
Source Project: jdk1.8-source-analysis   Author: raysonfang   File: ORBImpl.java    License: Apache License 2.0 4 votes vote down vote up
public ORBData getORBData()
{
    return configData ;
}
 
Example #16
Source Project: jdk1.8-source-analysis   Author: raysonfang   File: ORBSingleton.java    License: Apache License 2.0 4 votes vote down vote up
public ORBData getORBData()
{
    return getFullORB().getORBData() ;
}
 
Example #17
Source Project: TencentKona-8   Author: Tencent   File: ORBConfiguratorImpl.java    License: 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 Project: TencentKona-8   Author: Tencent   File: ORBImpl.java    License: GNU General Public License v2.0 4 votes vote down vote up
public ORBData getORBData()
{
    return configData ;
}
 
Example #19
Source Project: TencentKona-8   Author: Tencent   File: ORBSingleton.java    License: GNU General Public License v2.0 4 votes vote down vote up
public ORBData getORBData()
{
    return getFullORB().getORBData() ;
}
 
Example #20
Source Project: jdk8u60   Author: chenghanpeng   File: ORBConfiguratorImpl.java    License: 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 #21
Source Project: jdk8u60   Author: chenghanpeng   File: ORBImpl.java    License: GNU General Public License v2.0 4 votes vote down vote up
public ORBData getORBData()
{
    return configData ;
}
 
Example #22
Source Project: jdk8u60   Author: chenghanpeng   File: ORBSingleton.java    License: GNU General Public License v2.0 4 votes vote down vote up
public ORBData getORBData()
{
    return getFullORB().getORBData() ;
}
 
Example #23
Source Project: JDKSourceCode1.8   Author: wupeixuan   File: ORBConfiguratorImpl.java    License: MIT License 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 #24
Source Project: JDKSourceCode1.8   Author: wupeixuan   File: ORBImpl.java    License: MIT License 4 votes vote down vote up
public ORBData getORBData()
{
    return configData ;
}
 
Example #25
Source Project: JDKSourceCode1.8   Author: wupeixuan   File: ORBSingleton.java    License: MIT License 4 votes vote down vote up
public ORBData getORBData()
{
    return getFullORB().getORBData() ;
}
 
Example #26
Source Project: openjdk-jdk8u   Author: AdoptOpenJDK   File: ORBConfiguratorImpl.java    License: 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 #27
Source Project: openjdk-jdk8u   Author: AdoptOpenJDK   File: ORBImpl.java    License: GNU General Public License v2.0 4 votes vote down vote up
public ORBData getORBData()
{
    return configData ;
}
 
Example #28
Source Project: openjdk-jdk8u   Author: AdoptOpenJDK   File: ORBSingleton.java    License: GNU General Public License v2.0 4 votes vote down vote up
public ORBData getORBData()
{
    return getFullORB().getORBData() ;
}
 
Example #29
Source Project: openjdk-jdk8u-backup   Author: AdoptOpenJDK   File: ORBConfiguratorImpl.java    License: 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 #30
Source Project: openjdk-jdk8u-backup   Author: AdoptOpenJDK   File: ORBImpl.java    License: GNU General Public License v2.0 4 votes vote down vote up
public ORBData getORBData()
{
    return configData ;
}