See the full source code at the following links: UserService: https://github.com/eldermoraes/javaee8-cookbook/tree/master/chapter08/ch08-decoupled-user DoSomethingService: https://github.com/eldermoraes/javaee8-cookbook/tree/master/chapter08/ch08-decoupled-dosomethingwithuser