Package org.exolab.jms.net.registry

Examples of org.exolab.jms.net.registry.Registry.lookup()


        ExportServiceImpl exporterImpl = new ExportServiceImpl(echoImpl, orb);
        Proxy proxy = orb.exportObject(exporterImpl);
        orb.getRegistry().bind("service", proxy);

        Registry registry = getRegistry(principal);
        ExportService exporter = (ExportService) registry.lookup("service");
        EchoService echoer = (EchoService) exporter.exportObjectTo();

        assertTrue(echoer.echoBoolean(true));

        checkUnexportObject(orb, echoImpl, echoer);


        Proxy proxy = orb.exportObject(serviceImpl);
        orb.getRegistry().bind("service", proxy);

        ORB client = getClientORB();
        Registry registry = getRegistry(principal);
        CallbackService service = (CallbackService) registry.lookup("service");

        LoggingCallback callback = new LoggingCallback();
        Callback callbackProxy = (Callback) client.exportObjectTo(
                callback, getServerURI(), user, password);
        service.addCallback(callbackProxy);

        Proxy proxy = _orb.exportObject(new ExceptionServiceImpl());
        serverRegistry.bind(EXCEPTION_SERVICE, proxy);

        // get a proxy to the registry, and look up the service
        Registry clientRegistry = _orb.getRegistry(getConnectionProperties());
        _service = (ExceptionService) clientRegistry.lookup(EXCEPTION_SERVICE);
    }

    /**
     * Cleans up the test case.
     *
 

    public void testCallback() throws Exception {
        final int count = 10;
        ORB client = getClientORB();
        Registry registry = client.getRegistry(getConnectionProperties());
        CallbackService service =
                (CallbackService) registry.lookup(CALLBACK_SERVICE);

        LoggingCallback callback = new LoggingCallback();
        Callback proxy = (Callback) client.exportObjectTo(callback,
                                                          getServerURI());
        service.addCallback(proxy);

        final int depth = 4; // recursion depth

        ORB client = getClientORB();
        Registry registry = client.getRegistry(getConnectionProperties());
        CallbackService service =
                (CallbackService) registry.lookup(CALLBACK_SERVICE);

        RecursiveCallback callback = new RecursiveCallback(service, depth);
        Callback proxy = (Callback) client.exportObjectTo(callback,
                                                          getServerURI());
        service.addCallback(proxy);

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.