Package org.exolab.jms.net.orb

Examples of org.exolab.jms.net.orb.ORB


        getORB().shutdown(); // default ORB setup withouth auth

        // set up the orb
        BasicPrincipal principal = new BasicPrincipal("user", "password");
        Authenticator authenticator = new TestAuthenticator(principal);
        ORB orb = createORB(authenticator);

        // set up the echo service
        EchoService service = new EchoServiceImpl();
        _service = orb.exportObject(service);
        assertTrue(_service instanceof EchoService);
        orb.getRegistry().bind(ECHO_SERVICE, _service);

        // make sure a valid user can perform a lookup
        Registry registry = getRegistry(principal);
        assertNotNull(registry);
        Proxy proxy = registry.lookup(ECHO_SERVICE);
View Full Code Here


     * subsequently looked up.
     *
     * @throws Exception for any error
     */
    public void testLocalLookup() throws Exception {
        ORB orb = getORB();
        Registry registry = orb.getRegistry();
        checkLookup(registry);
    }
View Full Code Here

     * via the local registry
     *
     * @throws Exception for any error
     */
    public void testLocalNotBound() throws Exception {
        ORB orb = getORB();
        Registry registry = orb.getRegistry();
        checkNotBound(registry);
    }
View Full Code Here

     * <code>AlreadyBoundException</code>, via the local registry.
     *
     * @throws Exception for any error
     */
    public void testLocalAlreadyBound() throws Exception {
        ORB orb = getORB();
        Registry registry = orb.getRegistry();
        checkAlreadyBound(registry);
    }
View Full Code Here

     * Verifies that objects can be unbound via the local registry.
     *
     * @throws Exception for any error
     */
    public void testLocalUnbind() throws Exception {
        ORB orb = getORB();
        Registry registry = orb.getRegistry();
        checkUnbind(registry);
    }
View Full Code Here

     * only.
     *
     * @throws Exception for any error
     */
    public void testReadOnly() throws Exception {
        ORB orb = getORB();
        LocalRegistry local = orb.getRegistry();
        Registry remote = getRegistry();

        // registry is read-write by default
        assertFalse(local.getReadOnly());

View Full Code Here

     * @throws Exception for any error
     */
    protected void setUp() throws Exception {
        super.setUp();
        // export the service
        ORB orb = getORB();
        EchoService service = new EchoServiceImpl();
        _service = orb.exportObject(service);
        assertTrue(_service instanceof EchoService);

        // make sure registry is available
        orb.getRegistry();
    }
View Full Code Here

            properties.put(ORB.SECURITY_CREDENTIALS, password);
        }

        Registry registry;
        try {
            ORB orb = SharedORB.getInstance();
            registry = orb.getRegistry(properties);
        } catch (RemoteException exception) {
            JMSException error = new JMSException(
                    "Failed to get registry service for URL: " + url);
            error.setLinkedException(exception);
            throw error;
View Full Code Here

        properties.put(Context.PROVIDER_URL, getProviderURI(url));
        map(properties, Context.PROVIDER_URL, ORB.PROVIDER_URI);
        map(properties, Context.SECURITY_PRINCIPAL, ORB.SECURITY_PRINCIPAL);
        map(properties, Context.SECURITY_CREDENTIALS, ORB.SECURITY_CREDENTIALS);

        ORB orb;
        Registry registry;
        try {
            orb = SharedORB.getInstance();
            registry = orb.getRegistry(properties);
        } catch (RemoteException exception) {
            NamingException error = new CommunicationException(
                    "Failed to get registry service for URL: " + url);
            error.setRootCause(exception);
            throw error;
View Full Code Here

        CallerListener listener = new CallerListener() {
            public void disconnected(Caller caller) {
                latch.release();
            }
        };
        ORB client = getClientORB();
        client.addCallerListener(getServerURI(), listener);

        ORB server = getORB();
        server.getRegistry();

        // get the registry proxy. This will establish a connection to the
        // server.
        Registry registry = getRegistry();
        assertNotNull(registry);

        server.shutdown();

        if (!latch.attempt(10 * 1000)) {
            fail("CallerListener not notified of disconnection");
        }
    }
View Full Code Here

TOP

Related Classes of org.exolab.jms.net.orb.ORB

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.