use of org.jboss.ejb.client.legacy.JBossEJBProperties in project wildfly by wildfly.
the class CommandDispatcherTestCase method test.
@Test
public void test() throws Exception {
JBossEJBProperties properties = JBossEJBProperties.fromClassPath(CommandDispatcherTestCase.class.getClassLoader(), CLIENT_PROPERTIES);
properties.runCallable(() -> {
try (EJBDirectory directory = new RemoteEJBDirectory(MODULE_NAME)) {
ClusterTopologyRetriever bean = directory.lookupStateless(ClusterTopologyRetrieverBean.class, ClusterTopologyRetriever.class);
ClusterTopology topology = bean.getClusterTopology();
assertEquals(1, topology.getNodes().size());
assertTrue(topology.getNodes().toString(), topology.getNodes().contains(NODE_1));
assertTrue(topology.getRemoteNodes().toString() + " should be empty", topology.getRemoteNodes().isEmpty());
}
return null;
});
}
use of org.jboss.ejb.client.legacy.JBossEJBProperties in project wildfly by wildfly.
the class ServiceProviderRegistrationTestCase method test.
@Test
public void test() throws Exception {
JBossEJBProperties properties = JBossEJBProperties.fromClassPath(ServiceProviderRegistrationTestCase.class.getClassLoader(), CLIENT_PROPERTIES);
properties.runCallable(() -> {
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));
}
return null;
});
}
use of org.jboss.ejb.client.legacy.JBossEJBProperties in project wildfly by wildfly.
the class RegistryTestCase method test.
@Test
public void test() throws Exception {
JBossEJBProperties properties = JBossEJBProperties.fromClassPath(RegistryTestCase.class.getClassLoader(), CLIENT_PROPERTIES);
properties.runCallable(() -> {
try (EJBDirectory context = new RemoteEJBDirectory(MODULE_NAME)) {
RegistryRetriever bean = context.lookupStateless(RegistryRetrieverBean.class, RegistryRetriever.class);
Collection<String> names = bean.getNodes();
assertEquals(1, names.size());
assertTrue(names.toString(), names.contains(NODE_1));
}
return null;
});
}
Aggregations