refactor worker-process to use Java config