use of com.alipay.sofa.ark.spi.service.plugin.PluginManagerService in project sofa-ark by alipay.
the class BizClassloaderTest method before.
@Before
public void before() {
ArkServiceContainer arkServiceContainer = new ArkServiceContainer();
arkServiceContainer.start();
pluginManagerService = ArkServiceContainerHolder.getContainer().getService(PluginManagerService.class);
pluginDeployService = ArkServiceContainerHolder.getContainer().getService(PluginDeployService.class);
classloaderService = ArkServiceContainerHolder.getContainer().getService(ClassloaderService.class);
bizManagerService = ArkServiceContainerHolder.getContainer().getService(BizManagerService.class);
}
use of com.alipay.sofa.ark.spi.service.plugin.PluginManagerService in project sofa-ark by alipay.
the class RegistryServiceTest method before.
@Before
public void before() {
ArkServiceContainer arkServiceContainer = new ArkServiceContainer();
arkServiceContainer.start();
registryService = ArkServiceContainerHolder.getContainer().getService(RegistryService.class);
pluginManagerService = ArkServiceContainerHolder.getContainer().getService(PluginManagerService.class);
pluginDeployService = ArkServiceContainerHolder.getContainer().getService(PluginDeployService.class);
classloaderService = ArkServiceContainerHolder.getContainer().getService(ClassloaderService.class);
}
use of com.alipay.sofa.ark.spi.service.plugin.PluginManagerService in project sofa-ark by alipay.
the class ExtensionServiceTest method testNotExtensibleService.
@Test
public void testNotExtensibleService() {
PluginManagerService pluginManagerService = ArkServiceContainerHolder.getContainer().getService(PluginManagerService.class);
PluginModel pluginModel = new PluginModel().setPluginClassLoader(this.getClass().getClassLoader()).setPluginName("mock-plugin");
pluginManagerService.registerPlugin(pluginModel);
try {
ArkServiceLoader.loadExtensionFromArkPlugin(ServiceC.class, "", "mock-plugin");
} catch (ArkRuntimeException ex) {
Assert.assertTrue(ex.getMessage().contains(String.format("is not annotated by %s.", Extensible.class)));
}
}
Aggregations