Package org.apache.tuscany.sca.host.corba.naming

Examples of org.apache.tuscany.sca.host.corba.naming.TransientNameServer


    @BeforeClass
    public static void setUp() {
        try {
            try {
                server =
                    new TransientNameServer(TestConstants.TEST1_HOST, TestConstants.TEST1_PORT,
                                            TransientNameService.DEFAULT_SERVICE_NAME);
                Thread t = server.start();
                if (t == null) {
                    Assert.fail("The naming server cannot be started");
                }
View Full Code Here


     */
    synchronized private void createLocalNameServer(int port) throws CorbaHostException {
        int useCount = clientsCount.containsKey(port) ? clientsCount.get(port) : 0;
        // no server previously spawned
        if (useCount == 0) {
            TransientNameServer server =
                new TransientNameServer("localhost", port, TransientNameService.DEFAULT_SERVICE_NAME);
            Thread thread = server.start();
            if (thread == null) {
                throw new CorbaHostException("TransientNameServer couldn't be started");
            } else {
                localServers.put(port, server);
            }
View Full Code Here

     */
    synchronized private void releaseLocalNameServer(int port) throws CorbaHostException {
        int useCount = clientsCount.containsKey(port) ? clientsCount.get(port) : 0;
        if (useCount == 1) {
            // last client executed stop, cleaning up
            TransientNameServer server = localServers.get(port);
            if (server != null) {
                server.stop();
                clientsCount.remove(port);
                localServers.remove(port);
            } else {
                logger.warning("Local name server on port " + port + " was null!");
            }
View Full Code Here

    @BeforeClass
    public static void start() {
        try {
            server =
                new TransientNameServer(TestConstants.TEST2_HOST, TestConstants.TEST2_PORT,
                                        TransientNameService.DEFAULT_SERVICE_NAME);
            Thread t = server.start();
            if (t == null) {
                Assert.fail("The naming server cannot be started");
            }
View Full Code Here

    private static TransientNameServer server;

    @BeforeClass
    public static void start() {
        try {
            server = new TransientNameServer(LOCALHOST, DEFAULT_PORT, TransientNameService.DEFAULT_SERVICE_NAME);
            Thread t = server.start();
            if (t == null) {
                fail("The naming server cannot be started");
            }
            host = new DefaultCorbaHost();
View Full Code Here

    @Ignore
    @Test
    public void test_ensureORBStopped() {
        try {
            int innerORBPort = 11102;
            TransientNameServer innerServer =
                new TransientNameServer(LOCALHOST, innerORBPort, TransientNameService.DEFAULT_SERVICE_NAME);
            innerServer.start();
            innerServer.stop();
            try {
                Thread.sleep(500);
            } catch (Exception e) {
            }
            Socket socket = new Socket(LOCALHOST, innerORBPort);
View Full Code Here

    public static void setUp() {
        TestCorbaHost.setCorbaHost(new DefaultCorbaHost());
        try {
            try {
                server =
                    new TransientNameServer("localhost", ORB_INITIAL_PORT, TransientNameService.DEFAULT_SERVICE_NAME);
                Thread t = server.start();
                if (t == null) {
                    Assert.fail("The naming server cannot be started");
                }
                orb = server.getORB();
View Full Code Here

    @BeforeClass
    public static void setUp() {
        System.setProperty("org.apache.tuscany.sca.binding.sca.provider.SCABindingMapper.mappedBinding", "{http://tuscany.apache.org/xmlns/sca/1.1}binding.corba");
        TestCorbaHost.setCorbaHost(new DefaultCorbaHost());
        try {
            server = new TransientNameServer("localhost", ORB_INITIAL_PORT, TransientNameService.DEFAULT_SERVICE_NAME);
            Thread t = server.start();
            if (t == null) {
                Assert.fail("The naming server cannot be started");
            }
            // obtain node
View Full Code Here

    public static void setUp() {
        TestCorbaHost.setCorbaHost(new DefaultCorbaHost());
        try {
            try {
                server =
                    new TransientNameServer("localhost", ORB_INITIAL_PORT, TransientNameService.DEFAULT_SERVICE_NAME);
                Thread t = server.start();
                if (t == null) {
                    Assert.fail("The naming server cannot be started");
                }
                orb = server.getORB();
View Full Code Here

    public static void setUp() {
        TestCorbaHost.setCorbaHost(new DefaultCorbaHost());
        try {
            try {
                server =
                    new TransientNameServer("localhost", ORB_INITIAL_PORT, TransientNameService.DEFAULT_SERVICE_NAME);
                Thread t = server.start();
                if (t == null) {
                    Assert.fail("The naming server cannot be started");
                }
            } catch (Throwable e) {
View Full Code Here

TOP

Related Classes of org.apache.tuscany.sca.host.corba.naming.TransientNameServer

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.