Make sessionFactory work for MessageConsole