use of org.jboss.as.subsystem.test.LegacyKernelServicesInitializer in project wildfly by wildfly.
the class DatasourcesSubsystemTestCase method initialKernelServices.
private KernelServices initialKernelServices(KernelServicesBuilder builder, ModelTestControllerVersion controllerVersion, final ModelVersion modelVersion) throws Exception {
LegacyKernelServicesInitializer initializer = builder.createLegacyKernelServicesBuilder(null, controllerVersion, modelVersion);
String mavenGroupId = controllerVersion.getMavenGroupId();
String artifactId = "wildfly-connector";
if (controllerVersion.isEap() && controllerVersion.getMavenGavVersion().equals(controllerVersion.getCoreVersion())) {
// EAP 6
artifactId = "jboss-as-connector";
}
initializer.addMavenResourceURL(mavenGroupId + ":" + artifactId + ":" + controllerVersion.getMavenGavVersion());
initializer.addMavenResourceURL("org.jboss.ironjacamar:ironjacamar-spec-api:1.0.28.Final").addMavenResourceURL("org.jboss.ironjacamar:ironjacamar-common-api:1.0.28.Final").setExtensionClassName("org.jboss.as.connector.subsystems.datasources.DataSourcesExtension").excludeFromParent(SingleClassFilter.createFilter(ConnectorLogger.class));
KernelServices mainServices = builder.build();
Assert.assertTrue(mainServices.isSuccessfulBoot());
KernelServices legacyServices = mainServices.getLegacyServices(modelVersion);
Assert.assertTrue(legacyServices.isSuccessfulBoot());
Assert.assertNotNull(legacyServices);
return mainServices;
}
Aggregations