Package org.exolab.jms.net.registry

Examples of org.exolab.jms.net.registry.Registry


        ORB orb = createORB(authenticator);
        EchoServiceImpl impl = new EchoServiceImpl();
        Proxy proxy = orb.exportObject(impl);
        orb.getRegistry().bind("service", proxy);

        Registry registry = getRegistry(principal);
        EchoService service = (EchoService) registry.lookup("service");

        assertTrue(service.echoBoolean(true));

        checkUnexportObject(orb, impl, service);
    }
View Full Code Here


        ORB orb = createORB(authenticator);
        EchoServiceImpl impl = new EchoServiceImpl();
        Proxy proxy = orb.exportObject(impl, getExportURI());
        orb.getRegistry().bind("service", proxy);

        Registry registry = getRegistry(principal);
        EchoService service = (EchoService) registry.lookup("service");

        assertTrue(service.echoBoolean(true));

        checkUnexportObject(orb, impl, service);
    }
View Full Code Here

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

        CallbackService serviceImpl = new CallbackServiceImpl();
        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);
View Full Code Here

        _log.debug("setUp() [test=" + getName() + ", uri=" + _uri + "]");
        _orb = ORBFactory.createORB(getAcceptorProperties());
        if (_routeURI != null) {
            _orb.addRoute(_uri, _routeURI);
        }
        Registry serverRegistry = _orb.getRegistry();

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

     * @throws Exception for any error
     */
    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);
View Full Code Here

    public void testRecursion() throws Exception {
        final int count = 10;
        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);
View Full Code Here

     */
    public Registry getRegistry(Map properties) throws RemoteException {
        if (properties == null || properties.get(PROVIDER_URI) == null) {
            throw new ConnectException(PROVIDER_URI + " not specified");
        }
        Registry registry;
        String uri = (String) properties.get(PROVIDER_URI);
        String principal = (String) properties.get(SECURITY_PRINCIPAL);
        String credentials = (String) properties.get(SECURITY_CREDENTIALS);
        Principal subject = null;

View Full Code Here

TOP

Related Classes of org.exolab.jms.net.registry.Registry

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.