Add support of embedded batch mode.