use of org.teiid.runtime.JBossLogger in project teiid by teiid.
the class TeiidExtension method initialize.
@Override
public void initialize(ExtensionContext context) {
final SubsystemRegistration subsystem = context.registerSubsystem(TEIID_SUBSYSTEM, TEIID_VERSION);
LogManager.setLogListener(new JBossLogger());
subsystem.registerXMLElementWriter(TeiidSubsystemParser.INSTANCE);
// Main Teiid system, with children query engine and translators, register only if this is a server
subsystem.registerSubsystemModel(new TeiidSubsytemResourceDefinition(context.getProcessType().isServer()));
}
use of org.teiid.runtime.JBossLogger in project teiid by teiid.
the class ConvertVDB method convert.
public static String convert(File f) throws VirtualDatabaseException, ConnectorManagerException, TranslatorException, IOException, URISyntaxException, MalformedURLException, AdminException, Exception, FileNotFoundException {
LogManager.setLogListener(new JBossLogger() {
@Override
public boolean isEnabled(String context, int level) {
return false;
}
});
EmbeddedConfiguration ec = new EmbeddedConfiguration();
ec.setUseDisk(false);
ec.setCacheFactory(new CacheFactory() {
@Override
public <K, V> Cache<K, V> get(String name) {
return new MockCache<>(name, 10);
}
@Override
public void destroy() {
}
});
MyServer es = new MyServer();
LogManager.setLogListener(new JBossLogger() {
@Override
public boolean isEnabled(String context, int level) {
return false;
}
});
es.start(ec);
try {
return es.convertVDB(new FileInputStream(f));
} finally {
es.stop();
}
}
Aggregations