private Executor executor;
private OsgiLoggerFactory loggerFactory;
public void start(BundleContext ctx) throws Exception {
// Switch the internal logger to the OSGi LogService.
loggerFactory = new OsgiLoggerFactory(ctx);
InternalLoggerFactory.setDefaultFactory(loggerFactory);
// Prepare the resources required for creating ChannelFactories.
Executor executor = this.executor = Executors.newCachedThreadPool();