Package org.apache.yoko.orb.CosNaming.tnaming

Examples of org.apache.yoko.orb.CosNaming.tnaming.TransientNameService


    public static void main(String args[]) throws TransientServiceException {

        ORB orb = null;
        int status = 0;
        try {
            TransientNameService service = new TransientNameService("localhost", NS_PORT);
            System.out.println("Starting transient name service");
            service.run();
            System.out.println("Transient name service started");

            java.util.Properties props = new Properties();
            props.putAll(System.getProperties());
            props.put("org.omg.CORBA.ORBClass", "org.apache.yoko.orb.CORBA.ORB");
View Full Code Here


     * @exception ConfigException
     */
    public Object createNameService(String host, int port) throws ConfigException {
        try {
            // create a name service using the supplied host and publish under the name "NameService"           
            TransientNameService service = new TransientNameService(host, port, "NameService") {
                public void run() throws TransientServiceException {
                    // Create an ORB object
                    java.util.Properties props = new Properties();
                    props.putAll(System.getProperties());

                    props.put("org.omg.CORBA.ORBServerId", "1000000" ) ;
                    props.put("org.omg.CORBA.ORBClass", "org.apache.yoko.orb.CORBA.ORB");
                    props.put("org.omg.CORBA.ORBSingletonClass", "org.apache.yoko.orb.CORBA.ORBSingleton");
                    props.put("yoko.orb.oa.endpoint", "iiop --bind " + host  + " --host " + host + " --port " + port );

                    createdOrb = ORB.init((String[])null, props) ;

                    // now initialize the service
                    initialize(createdOrb);
                }
            };
            service.run();
            log.debug("Creating ORB endpoint with host=" + host + ", port=" + port);           
            // the service instance is returned as an opaque object.
            return service;
        } catch (TransientServiceException e) {
            throw new ConfigException("Error starting transient name service", e);
View Full Code Here

     * @exception ConfigException
     */
    public Object createNameService(String host, int port) throws ConfigException {
        try {
            // create a name service using the supplied host and publish under the name "NameService"
            TransientNameService service = new TransientNameService(host, port, "NameService");
            service.run();
            // the service instance is returned as an opaque object.
            return service;
        } catch (TransientServiceException e) {
            throw new ConfigException("Error starting transient name service", e);
        }
View Full Code Here

    public static void main(String args[]) throws TransientServiceException {

        ORB orb = null;
        int status = 0;
        try {
            TransientNameService service = new TransientNameService("localhost", NS_PORT);
            System.out.println("Starting transient name service");
            service.run();
            System.out.println("Transient name service started");

            java.util.Properties props = System.getProperties();
            props.put("org.omg.CORBA.ORBClass", "org.apache.yoko.orb.CORBA.ORB");
            props.put("org.omg.CORBA.ORBSingletonClass", "org.apache.yoko.orb.CORBA.ORBSingleton");
View Full Code Here

     * @exception ConfigException
     */
    public Object createNameService(String host, int port, final int servicePort) throws ConfigException {
        try {
            // create a name service using the supplied host and publish under the name "NameService"
            TransientNameService service = new TransientNameService(host, port, "NameService") {
                public void run() throws TransientServiceException {
                    // Create an ORB object
                    java.util.Properties props = new Properties();
                    props.putAll(System.getProperties());

                    props.put("org.omg.CORBA.ORBServerId", "1000000" ) ;
                    props.put("org.omg.CORBA.ORBClass", "org.apache.yoko.orb.CORBA.ORB");
                    props.put("org.omg.CORBA.ORBSingletonClass", "org.apache.yoko.orb.CORBA.ORBSingleton");
                    props.put("yoko.orb.oa.endpoint", "iiop --bind " + host  + " --host " + host + " --port " + port);
                    String nameServiceEndpoint = "iiop --bind " + host + " --host " + host;
                    if (servicePort > 0) {
                        nameServiceEndpoint += " --port " + servicePort;
                    }
                    props.put("yoko.orb.poamanager.TNameService.endpoint", nameServiceEndpoint);

                    createdOrb = ORB.init((String[])null, props) ;

                    // now initialize the service
                    initialize(createdOrb);
                }
            };
            service.run();
            log.debug("Creating ORB endpoint with host=" + host + ", port=" + port);           
            // the service instance is returned as an opaque object.
            return service;
        } catch (TransientServiceException e) {
            throw new ConfigException("Error starting transient name service on port " + port, e);
View Full Code Here

     * @exception ConfigException
     */
    public Object createNameService(String host, int port) throws ConfigException {
        try {
            // create a name service using the supplied host and publish under the name "NameService"
            TransientNameService service = new TransientNameService(host, port, "NameService");
            service.run();
            // the service instance is returned as an opaque object.
            return service;
        } catch (TransientServiceException e) {
            throw new ConfigException("Error starting transient name service", e);
        }
View Full Code Here

     * @exception ConfigException
     */
    public Object createNameService(String host, int port) throws ConfigException {
        try {
            // create a name service using the supplied host and publish under the name "NameService"
            TransientNameService service = new TransientNameService(host, port, "NameService") {
                public void run() throws TransientServiceException {
                    // Create an ORB object
                    java.util.Properties props = new Properties();
                    props.putAll(System.getProperties());

                    props.put("org.omg.CORBA.ORBServerId", "1000000" ) ;
                    props.put("org.omg.CORBA.ORBClass", "org.apache.yoko.orb.CORBA.ORB");
                    props.put("org.omg.CORBA.ORBSingletonClass", "org.apache.yoko.orb.CORBA.ORBSingleton");
                    props.put("yoko.orb.oa.endpoint", "iiop --bind " + host  + " --host " + host + " --port " + port );

                    createdOrb = ORB.init((String[])null, props) ;

                    // now initialize the service
                    initialize(createdOrb);
                }
            };
            service.run();
            log.debug("Creating ORB endpoint with host=" + host + ", port=" + port);           
            // the service instance is returned as an opaque object.
            return service;
        } catch (TransientServiceException e) {
            throw new ConfigException("Error starting transient name service on port " + port, e);
View Full Code Here

     * @exception ConfigException
     */
    public Object createNameService(String host, int port) throws ConfigException {
        try {
            // create a name service using the supplied host and publish under the name "NameService"
            TransientNameService service = new TransientNameService(host, port, "NameService") {
                public void run() throws TransientServiceException {
                    // Create an ORB object
                    java.util.Properties props = new Properties();
                    props.putAll(System.getProperties());

                    props.put("org.omg.CORBA.ORBServerId", "1000000" ) ;
                    props.put("org.omg.CORBA.ORBClass", "org.apache.yoko.orb.CORBA.ORB");
                    props.put("org.omg.CORBA.ORBSingletonClass", "org.apache.yoko.orb.CORBA.ORBSingleton");
                    props.put("yoko.orb.oa.endpoint", "iiop --bind " + host  + " --host " + host + " --port " + port );

                    createdOrb = ORB.init((String[])null, props) ;

                    // now initialize the service
                    initialize(createdOrb);
                }
            };
            service.run();
            log.debug("Creating ORB endpoint with host=" + host + ", port=" + port);           
            // the service instance is returned as an opaque object.
            return service;
        } catch (TransientServiceException e) {
            throw new ConfigException("Error starting transient name service on port " + port, e);
View Full Code Here

     * @exception ConfigException
     */
    public Object createNameService(String host, int port) throws ConfigException {
        try {
            // create a name service using the supplied host and publish under the name "NameService"
            TransientNameService service = new TransientNameService(host, port, "NameService");
            service.run();
            // the service instance is returned as an opaque object.
            return service;
        } catch (TransientServiceException e) {
            throw new ConfigException("Error starting transient name service", e);
        }
View Full Code Here

     * @exception ConfigException
     */
    public Object createNameService(String host, int port) throws ConfigException {
        try {
            // create a name service using the supplied host and publish under the name "NameService"
            TransientNameService service = new TransientNameService(host, port, "NameService") {
                public void run() throws TransientServiceException {
                    // Create an ORB object
                    java.util.Properties props = new Properties();
                    props.putAll(System.getProperties());

                    props.put("org.omg.CORBA.ORBServerId", "1000000" ) ;
                    props.put("org.omg.CORBA.ORBClass", "org.apache.yoko.orb.CORBA.ORB");
                    props.put("org.omg.CORBA.ORBSingletonClass", "org.apache.yoko.orb.CORBA.ORBSingleton");
                    props.put("yoko.orb.oa.endpoint", "iiop --bind " + host  + " --host " + host + " --port " + port );

                    createdOrb = ORB.init((String[])null, props) ;

                    // now initialize the service
                    initialize(createdOrb);
                }
            };
            service.run();
            log.debug("Creating ORB endpoint with host=" + host + ", port=" + port);           
            // the service instance is returned as an opaque object.
            return service;
        } catch (TransientServiceException e) {
            throw new ConfigException("Error starting transient name service on port " + port, e);
View Full Code Here

TOP

Related Classes of org.apache.yoko.orb.CosNaming.tnaming.TransientNameService

Copyright © 2018 www.massapicom. 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.