com.sun.corba.se.spi.activation.LocatorHelper Java Examples
The following examples show how to use
com.sun.corba.se.spi.activation.LocatorHelper.
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: ORBD.java From jdk1.8-source-analysis with Apache License 2.0 | 5 votes |
protected void startActivationObjects(ORB orb) throws Exception { // create Initial Name Service object initializeBootNaming(orb); // create Repository object repository = new RepositoryImpl(orb, dbDir, orb.orbdDebugFlag ); orb.register_initial_reference( ORBConstants.SERVER_REPOSITORY_NAME, repository ); // create Locator and Activator objects ServerManagerImpl serverMgr = new ServerManagerImpl( orb, orb.getCorbaTransportManager(), repository, getDbDirName(), orb.orbdDebugFlag ); locator = LocatorHelper.narrow(serverMgr); orb.register_initial_reference( ORBConstants.SERVER_LOCATOR_NAME, locator ); activator = ActivatorHelper.narrow(serverMgr); orb.register_initial_reference( ORBConstants.SERVER_ACTIVATOR_NAME, activator ); // start Name Service TransientNameService nameService = new TransientNameService(orb, ORBConstants.TRANSIENT_NAME_SERVICE_NAME); }
Example #2
Source File: ORBD.java From TencentKona-8 with GNU General Public License v2.0 | 5 votes |
protected void startActivationObjects(ORB orb) throws Exception { // create Initial Name Service object initializeBootNaming(orb); // create Repository object repository = new RepositoryImpl(orb, dbDir, orb.orbdDebugFlag ); orb.register_initial_reference( ORBConstants.SERVER_REPOSITORY_NAME, repository ); // create Locator and Activator objects ServerManagerImpl serverMgr = new ServerManagerImpl( orb, orb.getCorbaTransportManager(), repository, getDbDirName(), orb.orbdDebugFlag ); locator = LocatorHelper.narrow(serverMgr); orb.register_initial_reference( ORBConstants.SERVER_LOCATOR_NAME, locator ); activator = ActivatorHelper.narrow(serverMgr); orb.register_initial_reference( ORBConstants.SERVER_ACTIVATOR_NAME, activator ); // start Name Service TransientNameService nameService = new TransientNameService(orb, ORBConstants.TRANSIENT_NAME_SERVICE_NAME); }
Example #3
Source File: ORBD.java From openjdk-8 with GNU General Public License v2.0 | 5 votes |
protected void startActivationObjects(ORB orb) throws Exception { // create Initial Name Service object initializeBootNaming(orb); // create Repository object repository = new RepositoryImpl(orb, dbDir, orb.orbdDebugFlag ); orb.register_initial_reference( ORBConstants.SERVER_REPOSITORY_NAME, repository ); // create Locator and Activator objects ServerManagerImpl serverMgr = new ServerManagerImpl( orb, orb.getCorbaTransportManager(), repository, getDbDirName(), orb.orbdDebugFlag ); locator = LocatorHelper.narrow(serverMgr); orb.register_initial_reference( ORBConstants.SERVER_LOCATOR_NAME, locator ); activator = ActivatorHelper.narrow(serverMgr); orb.register_initial_reference( ORBConstants.SERVER_ACTIVATOR_NAME, activator ); // start Name Service TransientNameService nameService = new TransientNameService(orb, ORBConstants.TRANSIENT_NAME_SERVICE_NAME); }
Example #4
Source File: ORBD.java From jdk8u60 with GNU General Public License v2.0 | 5 votes |
protected void startActivationObjects(ORB orb) throws Exception { // create Initial Name Service object initializeBootNaming(orb); // create Repository object repository = new RepositoryImpl(orb, dbDir, orb.orbdDebugFlag ); orb.register_initial_reference( ORBConstants.SERVER_REPOSITORY_NAME, repository ); // create Locator and Activator objects ServerManagerImpl serverMgr = new ServerManagerImpl( orb, orb.getCorbaTransportManager(), repository, getDbDirName(), orb.orbdDebugFlag ); locator = LocatorHelper.narrow(serverMgr); orb.register_initial_reference( ORBConstants.SERVER_LOCATOR_NAME, locator ); activator = ActivatorHelper.narrow(serverMgr); orb.register_initial_reference( ORBConstants.SERVER_ACTIVATOR_NAME, activator ); // start Name Service TransientNameService nameService = new TransientNameService(orb, ORBConstants.TRANSIENT_NAME_SERVICE_NAME); }
Example #5
Source File: ORBD.java From JDKSourceCode1.8 with MIT License | 5 votes |
protected void startActivationObjects(ORB orb) throws Exception { // create Initial Name Service object initializeBootNaming(orb); // create Repository object repository = new RepositoryImpl(orb, dbDir, orb.orbdDebugFlag ); orb.register_initial_reference( ORBConstants.SERVER_REPOSITORY_NAME, repository ); // create Locator and Activator objects ServerManagerImpl serverMgr = new ServerManagerImpl( orb, orb.getCorbaTransportManager(), repository, getDbDirName(), orb.orbdDebugFlag ); locator = LocatorHelper.narrow(serverMgr); orb.register_initial_reference( ORBConstants.SERVER_LOCATOR_NAME, locator ); activator = ActivatorHelper.narrow(serverMgr); orb.register_initial_reference( ORBConstants.SERVER_ACTIVATOR_NAME, activator ); // start Name Service TransientNameService nameService = new TransientNameService(orb, ORBConstants.TRANSIENT_NAME_SERVICE_NAME); }
Example #6
Source File: ORBD.java From openjdk-8-source with GNU General Public License v2.0 | 5 votes |
protected void startActivationObjects(ORB orb) throws Exception { // create Initial Name Service object initializeBootNaming(orb); // create Repository object repository = new RepositoryImpl(orb, dbDir, orb.orbdDebugFlag ); orb.register_initial_reference( ORBConstants.SERVER_REPOSITORY_NAME, repository ); // create Locator and Activator objects ServerManagerImpl serverMgr = new ServerManagerImpl( orb, orb.getCorbaTransportManager(), repository, getDbDirName(), orb.orbdDebugFlag ); locator = LocatorHelper.narrow(serverMgr); orb.register_initial_reference( ORBConstants.SERVER_LOCATOR_NAME, locator ); activator = ActivatorHelper.narrow(serverMgr); orb.register_initial_reference( ORBConstants.SERVER_ACTIVATOR_NAME, activator ); // start Name Service TransientNameService nameService = new TransientNameService(orb, ORBConstants.TRANSIENT_NAME_SERVICE_NAME); }
Example #7
Source File: ORBD.java From openjdk-jdk8u with GNU General Public License v2.0 | 5 votes |
protected void startActivationObjects(ORB orb) throws Exception { // create Initial Name Service object initializeBootNaming(orb); // create Repository object repository = new RepositoryImpl(orb, dbDir, orb.orbdDebugFlag ); orb.register_initial_reference( ORBConstants.SERVER_REPOSITORY_NAME, repository ); // create Locator and Activator objects ServerManagerImpl serverMgr = new ServerManagerImpl( orb, orb.getCorbaTransportManager(), repository, getDbDirName(), orb.orbdDebugFlag ); locator = LocatorHelper.narrow(serverMgr); orb.register_initial_reference( ORBConstants.SERVER_LOCATOR_NAME, locator ); activator = ActivatorHelper.narrow(serverMgr); orb.register_initial_reference( ORBConstants.SERVER_ACTIVATOR_NAME, activator ); // start Name Service TransientNameService nameService = new TransientNameService(orb, ORBConstants.TRANSIENT_NAME_SERVICE_NAME); }
Example #8
Source File: ORBD.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 5 votes |
protected void startActivationObjects(ORB orb) throws Exception { // create Initial Name Service object initializeBootNaming(orb); // create Repository object repository = new RepositoryImpl(orb, dbDir, orb.orbdDebugFlag ); orb.register_initial_reference( ORBConstants.SERVER_REPOSITORY_NAME, repository ); // create Locator and Activator objects ServerManagerImpl serverMgr = new ServerManagerImpl( orb, orb.getCorbaTransportManager(), repository, getDbDirName(), orb.orbdDebugFlag ); locator = LocatorHelper.narrow(serverMgr); orb.register_initial_reference( ORBConstants.SERVER_LOCATOR_NAME, locator ); activator = ActivatorHelper.narrow(serverMgr); orb.register_initial_reference( ORBConstants.SERVER_ACTIVATOR_NAME, activator ); // start Name Service TransientNameService nameService = new TransientNameService(orb, ORBConstants.TRANSIENT_NAME_SERVICE_NAME); }
Example #9
Source File: ORBD.java From hottub with GNU General Public License v2.0 | 5 votes |
protected void startActivationObjects(ORB orb) throws Exception { // create Initial Name Service object initializeBootNaming(orb); // create Repository object repository = new RepositoryImpl(orb, dbDir, orb.orbdDebugFlag ); orb.register_initial_reference( ORBConstants.SERVER_REPOSITORY_NAME, repository ); // create Locator and Activator objects ServerManagerImpl serverMgr = new ServerManagerImpl( orb, orb.getCorbaTransportManager(), repository, getDbDirName(), orb.orbdDebugFlag ); locator = LocatorHelper.narrow(serverMgr); orb.register_initial_reference( ORBConstants.SERVER_LOCATOR_NAME, locator ); activator = ActivatorHelper.narrow(serverMgr); orb.register_initial_reference( ORBConstants.SERVER_ACTIVATOR_NAME, activator ); // start Name Service TransientNameService nameService = new TransientNameService(orb, ORBConstants.TRANSIENT_NAME_SERVICE_NAME); }
Example #10
Source File: ORBD.java From openjdk-jdk9 with GNU General Public License v2.0 | 5 votes |
protected void startActivationObjects(ORB orb) throws Exception { // create Initial Name Service object initializeBootNaming(orb); // create Repository object repository = new RepositoryImpl(orb, dbDir, orb.orbdDebugFlag ); orb.register_initial_reference( ORBConstants.SERVER_REPOSITORY_NAME, repository ); // create Locator and Activator objects ServerManagerImpl serverMgr = new ServerManagerImpl( orb, orb.getCorbaTransportManager(), repository, getDbDirName(), orb.orbdDebugFlag ); locator = LocatorHelper.narrow(serverMgr); orb.register_initial_reference( ORBConstants.SERVER_LOCATOR_NAME, locator ); activator = ActivatorHelper.narrow(serverMgr); orb.register_initial_reference( ORBConstants.SERVER_ACTIVATOR_NAME, activator ); // start Name Service TransientNameService nameService = new TransientNameService(orb, ORBConstants.TRANSIENT_NAME_SERVICE_NAME); }
Example #11
Source File: ORBConfiguratorImpl.java From openjdk-8 with GNU General Public License v2.0 | 4 votes |
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 #12
Source File: ORBConfiguratorImpl.java From openjdk-8-source with GNU General Public License v2.0 | 4 votes |
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 #13
Source File: ORBConfiguratorImpl.java From hottub with GNU General Public License v2.0 | 4 votes |
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 #14
Source File: ORBConfiguratorImpl.java From openjdk-jdk9 with GNU General Public License v2.0 | 4 votes |
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 File: ORBConfiguratorImpl.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 4 votes |
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 #16
Source File: ORBConfiguratorImpl.java From openjdk-jdk8u with GNU General Public License v2.0 | 4 votes |
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 #17
Source File: ORBConfiguratorImpl.java From JDKSourceCode1.8 with MIT License | 4 votes |
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 jdk8u60 with GNU General Public License v2.0 | 4 votes |
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: ORBConfiguratorImpl.java From TencentKona-8 with GNU General Public License v2.0 | 4 votes |
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 #20
Source File: ORBConfiguratorImpl.java From jdk1.8-source-analysis with Apache License 2.0 | 4 votes |
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 ) ; } } }