Examples of ORBData


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

    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 ) ;
View Full Code Here

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

        }
    }

    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 ) ;
            }
View Full Code Here

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

     * the ContactInfoList/Acceptor *AND* the legacy SocketFactory
     * transport architecture.
     */
    private void initializeTransport(final ORB orb)
    {
        ORBData od = orb.getORBData();

        CorbaContactInfoListFactory contactInfoListFactory =
            od.getCorbaContactInfoListFactory();
        Acceptor[] acceptors = od.getAcceptors();

        // BEGIN Legacy
        ORBSocketFactory legacySocketFactory = od.getLegacySocketFactory();
        USLPort[] uslPorts = od.getUserSpecifiedListenPorts() ;
        setLegacySocketFactoryORB(orb, legacySocketFactory);
        // END Legacy

        //
        // Check for incorrect configuration.
        //

        if (legacySocketFactory != null && contactInfoListFactory != null) {
            throw wrapper.socketFactoryAndContactInfoListAtSameTime();
        }

        if (acceptors.length != 0 && legacySocketFactory != null) {
            throw wrapper.acceptorsAndLegacySocketFactoryAtSameTime();
        }


        //
        // Client and Server side setup.
        //

        od.getSocketFactory().setORB(orb);

        //
        // Set up client side.
        //

        if (legacySocketFactory != null) {
            // BEGIN Legacy
            // Since the user specified a legacy socket factory we need to
            // use a ContactInfoList that will use the legacy socket factory.
            contactInfoListFactory =
                new CorbaContactInfoListFactory() {
                        public void setORB(ORB orb) { }
                        public CorbaContactInfoList create( IOR ior ) {
                            return new SocketFactoryContactInfoListImpl(
                                orb, ior);
                        }
                    };
            // END Legacy
        } else if (contactInfoListFactory != null) {
            // The user specified an explicit ContactInfoListFactory.
            contactInfoListFactory.setORB(orb);
        } else {
            // Use the default.
            contactInfoListFactory =
                TransportDefault.makeCorbaContactInfoListFactory(orb);
        }
        orb.setCorbaContactInfoListFactory(contactInfoListFactory);

        //
        // Set up server side.
        //

        //
        // Maybe allocate the Legacy default listener.
        //
        // If old legacy properties set, or there are no explicit
        // acceptors then register a default listener.  Type of
        // default listener depends on presence of legacy socket factory.
        //
        // Note: this must happen *BEFORE* registering explicit acceptors.
        //

        // BEGIN Legacy
        int port = -1;
        if (od.getORBServerPort() != 0) {
            port = od.getORBServerPort();
        } else if (od.getPersistentPortInitialized()) {
            port = od.getPersistentServerPort();
        } else if (acceptors.length == 0) {
            port = 0;
        }
        if (port != -1) {
            createAndRegisterAcceptor(orb, legacySocketFactory, port,
                        LegacyServerSocketEndPointInfo.DEFAULT_ENDPOINT,
                        SocketInfo.IIOP_CLEAR_TEXT);
        }
        // END Legacy

        for (int i = 0; i < acceptors.length; i++) {
            orb.getCorbaTransportManager().registerAcceptor(acceptors[i]);
        }

        // BEGIN Legacy
        // Allocate user listeners.
        USLPort[] ports = od.getUserSpecifiedListenPorts() ;
        if (ports != null) {
            for (int i = 0; i < ports.length; i++) {
                createAndRegisterAcceptor(
                    orb, legacySocketFactory, ports[i].getPort(),
                    LegacyServerSocketEndPointInfo.NO_NAME,
View Full Code Here

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

    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 ) ;
View Full Code Here

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

    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 ) ;
View Full Code Here

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

        }
    }

    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 ) ;
            }
View Full Code Here

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

     * the ContactInfoList/Acceptor *AND* the legacy SocketFactory
     * transport architecture.
     */
    private void initializeTransport(final ORB orb)
    {
        ORBData od = orb.getORBData();

        CorbaContactInfoListFactory contactInfoListFactory =
            od.getCorbaContactInfoListFactory();
        Acceptor[] acceptors = od.getAcceptors();

        // BEGIN Legacy
        ORBSocketFactory legacySocketFactory = od.getLegacySocketFactory();
        USLPort[] uslPorts = od.getUserSpecifiedListenPorts() ;
        setLegacySocketFactoryORB(orb, legacySocketFactory);
        // END Legacy

        //
        // Check for incorrect configuration.
        //

        if (legacySocketFactory != null && contactInfoListFactory != null) {
            throw wrapper.socketFactoryAndContactInfoListAtSameTime();
        }

        if (acceptors.length != 0 && legacySocketFactory != null) {
            throw wrapper.acceptorsAndLegacySocketFactoryAtSameTime();
        }


        //
        // Client and Server side setup.
        //

        od.getSocketFactory().setORB(orb);

        //
        // Set up client side.
        //

        if (legacySocketFactory != null) {
            // BEGIN Legacy
            // Since the user specified a legacy socket factory we need to
            // use a ContactInfoList that will use the legacy socket factory.
            contactInfoListFactory =
                new CorbaContactInfoListFactory() {
                        public void setORB(ORB orb) { }
                        public CorbaContactInfoList create( IOR ior ) {
                            return new SocketFactoryContactInfoListImpl(
                                orb, ior);
                        }
                    };
            // END Legacy
        } else if (contactInfoListFactory != null) {
            // The user specified an explicit ContactInfoListFactory.
            contactInfoListFactory.setORB(orb);
        } else {
            // Use the default.
            contactInfoListFactory =
                TransportDefault.makeCorbaContactInfoListFactory(orb);
        }
        orb.setCorbaContactInfoListFactory(contactInfoListFactory);

        //
        // Set up server side.
        //

        //
        // Maybe allocate the Legacy default listener.
        //
        // If old legacy properties set, or there are no explicit
        // acceptors then register a default listener.  Type of
        // default listener depends on presence of legacy socket factory.
        //
        // Note: this must happen *BEFORE* registering explicit acceptors.
        //

        // BEGIN Legacy
        int port = -1;
        if (od.getORBServerPort() != 0) {
            port = od.getORBServerPort();
        } else if (od.getPersistentPortInitialized()) {
            port = od.getPersistentServerPort();
        } else if (acceptors.length == 0) {
            port = 0;
        }
        if (port != -1) {
            createAndRegisterAcceptor(orb, legacySocketFactory, port,
                        LegacyServerSocketEndPointInfo.DEFAULT_ENDPOINT,
                        SocketInfo.IIOP_CLEAR_TEXT);
        }
        // END Legacy

        for (int i = 0; i < acceptors.length; i++) {
            orb.getCorbaTransportManager().registerAcceptor(acceptors[i]);
        }

        // BEGIN Legacy
        // Allocate user listeners.
        USLPort[] ports = od.getUserSpecifiedListenPorts() ;
        if (ports != null) {
            for (int i = 0; i < ports.length; i++) {
                createAndRegisterAcceptor(
                    orb, legacySocketFactory, ports[i].getPort(),
                    LegacyServerSocketEndPointInfo.NO_NAME,
View Full Code Here

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

    /**
     * Returns the logger based on the category.
     */
    public Logger getLogger( String domain )
    {
        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 ) ;
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.