ThreadPoolExecutor executor = new ThreadPoolExecutor(10, 15, 20, TimeUnit.SECONDS, new PriorityBlockingQueue()); SimpleMutableContext sc = new SimpleMutableContext(); sc.register(Executor.class, executor); factoryConfig.setContext(new CompositeContext(new DefaultContext(Tutorial.class.getClassLoader(), null), sc)); ForwardReasoningSessionFactoryImpl factory = new ForwardReasoningSessionFactoryImpl(new File(args[0]), factoryConfig); ForwardReasoningSession session = factory.createSession(null);