Package org.jboss.as.test.clustering.cluster.provider.bean

Examples of org.jboss.as.test.clustering.cluster.provider.bean.ServiceProviderRetriever


    public void test() throws Exception {

        ContextSelector<EJBClientContext> selector = EJBClientContextSelector.setup(CLIENT_PROPERTIES);

        try (EJBDirectory directory = new RemoteEJBDirectory(MODULE_NAME)) {
            ServiceProviderRetriever bean = directory.lookupStateless(ServiceProviderRetrieverBean.class, ServiceProviderRetriever.class);
            Collection<String> names = bean.getProviders();
            assertEquals(1, names.size());
            assertTrue(names.toString(), names.contains(NODE_1));
        } finally {
            // reset the selector
            if (selector != null) {
View Full Code Here


    public void test() throws Exception {

        ContextSelector<EJBClientContext> selector = EJBClientContextSelector.setup(CLIENT_PROPERTIES);

        try (EJBDirectory directory = new RemoteEJBDirectory(MODULE_NAME)) {
            ServiceProviderRetriever bean = directory.lookupStateless(ServiceProviderRetrieverBean.class, ServiceProviderRetriever.class);
            Collection<String> names = bean.getProviders();
            assertEquals(2, names.size());
            assertTrue(names.toString(), names.contains(NODE_1));
            assertTrue(names.toString(), names.contains(NODE_2));
           
            undeploy(DEPLOYMENT_1);
           
            names = bean.getProviders();
            assertEquals(1, names.size());
            assertTrue(names.contains(NODE_2));
           
            deploy(DEPLOYMENT_1);
           
            names = bean.getProviders();
            assertEquals(2, names.size());
            assertTrue(names.contains(NODE_1));
            assertTrue(names.contains(NODE_2));
           
            stop(CONTAINER_2);
           
            names = bean.getProviders();
            assertEquals(1, names.size());
            assertTrue(names.contains(NODE_1));
           
            start(CONTAINER_2);
           
            names = bean.getProviders();
            assertEquals(2, names.size());
            assertTrue(names.contains(NODE_1));
            assertTrue(names.contains(NODE_2));
        } finally {
            // reset the selector
View Full Code Here

TOP

Related Classes of org.jboss.as.test.clustering.cluster.provider.bean.ServiceProviderRetriever

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.