I am developing a service hook for Liferay, and I want to use an external EJB to do the business logic for me. Is there any way to inject a bean to a service class?
Here is my code:
public class MyUserService extends UserServiceWrapper {
//I want a bean injected
@Inject
MyBean myBean;
public MyUserService(UserService userService) {
super(userService);
}
@Override
public User addUserWithWorkflow(/* all kind of parameters */)
throws PortalException, SystemException {
User user = super.addUserWithWorkflow(/* all parameters passes here //);
//do my business logic here
myBean.userRegistered(user);
return user;
}
}
Is there any way to do this?